nginx version: nginx/1.14.0
3)启动nginx
/etc/init.d/nginx start 或 service nginx start
4 ) 防火墙允许通过80端口
vim /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
/etc/init.d/iptables restart
流程二:安装mysql
1)安装Mysql,先更新yum源。yum源下载地址,根据自己需要的版本选择相应的源
https://dev.mysql.com/downloads/repo/yum/
2)这里版本是6.x系列的,所以选择linux 6 下载
wget https://repo.mysql.com//mysql57-community-release-el6-11.noarch.rpm
3)安装mysql的yum源
rpm -Uvh mysql57-community-release-el6-11.noarch.rpm 或 yum -y localinstall mysql57-community-release-el6-11.noarch.rpm
4)查看mysql源是否成功
[root@localhost yum.repos.d]# ls /etc/yum.repos.d/|grep mysql
mysql57-community-release-el6-11.noarch.rpm
mysql-community.repo
mysql-community-source.repo
5)安装mysql
yum -y install mysql-community-server
[root@localhost ~]# mysql -V
mysql Ver 14.14 Distrib 5.7.22, for Linux (x86_64) using EditLine wrapper
6)开启mysql,并更改默认密码
/etc/init.d/mysqld start
netstat -tnlp |grep 3306
chkconfig mysqld on
[root@localhost yum.repos.d]# grep 'temporary password' /var/log/mysqld.log
2018-05-10T22:59:11.434638Z 1 [Note] A temporary password is generated for root@localhost: OScMFRu&j75Q
mysql -uroot -p"OScMFRu&j75Q"
ALTER USER 'root'@'localhost' IDENTIFIED BY 'ywxi123';
mysql -uroot -p"ywxi123"
7)防火墙允许通过3306端口
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
service iptables restart
流程三:安装php