centos7 lamp配置笔记
1.安装apache服务器yum install httpd*
2.更改firewall
centos7默认使用firewall而不是熟悉的iptables
systemctl stop firewalld.service systemctl disabledfirewalld.service
安装iptables
yum install iptables
vim /etc/sysconfig/iptables
在开启的22端口后加入以下两行
-A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 3306 -j ACCEPT
systemctl restart iptables.service
至此可以打开apache默认页面了。
apache常用命令
systemctl httpd.service。
页:
[1]