防火墙

centos7配置LAMP过程问题及解决

采用centos7的防火墙命令:

开启:systemctl start firewalld
关闭:systemctl stop firewalld
重启:systemctl restart firewalld
现在状态:firewall-cmd –state

开放端口:sudo firewall-cmd –zone=public –add-port=3000/tcp –permanent
重启:sudo firewall-cmd –reload

禁止firewalld开机启动: systemctl disable firewalld

采用传统命令:

安装老版本防火墙:

yum install iptables-services
设置开机启动:
systemctl enable iptables
常用命令:
systemctl [stop|start|restart|reload] iptables(分开执行)
保存设置:
service iptables save 或者 /usr/libexec/iptables/iptables.init save
也可以参考下这个的设置

Mysql初始化

错误:-bash: /php/server/mysql/scripts/mysql_install_db: /usr/bin/perl: bad interpreter: No such file or directory
centos7配置LAMP过程问题及解决
原因:依赖缺失
解决

yum -y install perl perl-devel

错误:FATAL ERROR: please install the following Perl modules
before executing /php/server/mysql/scripts/mysql_install_db:
Data::Dumper
centos7配置LAMP过程问题及解决
原因:缺失依赖
解决:yum install -y perl-Data-Dumper

Aphche

问题:
解压.gz2

tar: bzip2: Cannot exec: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
centos7配置LAMP过程问题及解决
解决:
.原因分析:
未安装bzip2导致
解决安装bzip2软件
yum install bzip2

png配置no

centos7配置LAMP过程问题及解决
原因分析:不能自动找到png路径
解决:给配置项添加上路径
–with-png=/php/server/png

安装GD库时png.h找不到

centos7配置LAMP过程问题及解决

解决:
vi gd_png.c

include “png.h”
替换成:
include “(png的安装路径)/include/png.h”
然后再make就可以了
解决2:
yum install libpng libpng-devel

相关文章: