在全新CentOS 7.0上安装LAMP/LNMP环境
CentOS 7.0发布,改动较大,这里总结一些技巧:
一键安装常用软件 yum install vim wget smartmontools
安装yum install docker
查看服务状态 systemctl status docker
激活服务 systemctl enable docker
启动服务 systemctl start docker
firewall-cmd –get-active-zones
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
yum install ntp
systemctl start ntpd
vi /etc/selinux/config 将SELINUX=enforcing 改成SELINUX=disabled
setenforce 0
vim /etc/ssh/sshd_config
Port 17222
systemctl restart sshd
systemctl status sshd
yum install firewalld
systemctl start firewalld.service
systemctl enable firewalld.service
systemctl status firewalld
firewall-cmd –permanent –zone=public –add-port=17385/tcp
firewall-cmd –permanent –zone=trusted –add-interface=docker0
firewall-cmd –reload
firewall-cmd –permanent –zone=trusted –list-interface
firewall-cmd –permanent –zone=public –list-port
chmod +x /etc/rc.d/rc.local
很有用
不错的文章