防火牆
採用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
原因:依賴缺失
解決
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
原因:缺失依賴
解決: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
解決:
.原因分析:
未安裝bzip2導致
解決安裝bzip2軟件
yum install bzip2
png配置no
原因分析:不能自動找到png路徑
解決:給配置項添加上路徑
–with-png=/php/server/png
安裝GD庫時png.h找不到
解決:
vi gd_png.c
將
include “png.h”
替換成:
include “(png的安裝路徑)/include/png.h”
然後再make就可以了
解決2:
yum install libpng libpng-devel