yum安装lnmp步骤
yum的安装| 1 | yum update | 
安装nginx最新yum源
| 1 2 | yum localinstall http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm yum repolist enabled | grep "nginx*" | 
| 1 | yum -y install nginx | 
| 1 | service nginx start | 
| 1 | systemctl enable nginx.service | 
| 1 | systemctl list-dependencies | grep nginx | 
| 1 | http://00.00.00.00/ | 
安装mysql源
| 1 2 | yum -y localinstall http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm yum repolist enabled | grep "mysql.*-community.*" | 
| 1 | yum -y install mysql-community-server install mysql-community-devel | 
| 1 | service mysqld start | 
| 1 | service mysqld status 或者 ps -ef | grep mysql | 
| 1 | systemctl enable mysqld.service | 
| 1 | systemctl list-dependencies | grep mysqld | 
查看mysql的随机密码
| 1 | grep 'temporary password' /var/log/mysqld.log | 
| 1 2 | mysql -u root -p 更改密码(mysql文档规定,密码必须包括大小写字母数字加特殊符号>8位) ALTER USER 'root'@'localhost' IDENTIFIED BY 'Yourpassword'; | 
| 1 2 | exit; mysql -u root -p | 
安装php源
| 1 2 | rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm | 
| 1 | yum repolist enabled | grep "webtatic*" | 
| 1 2 3 4 | yum -y install php71w php71w-fpm yum -y install php71w-mbstring php71w-common php71w-gd php71w-mcrypt yum -y install php71w-mysql php71w-xml php71w-cli php71w-devel yum -y install php71w-pecl-memcached php71w-pecl-redis php71w-opcache | 
验证php是否安装成功
| 1 | php -v | 
| 1 | php -m | 
启动php-fpm
| 1 | service php-fpm star | 
| 1 | service php-fpm status | 
| 1 | systemctl enable php-fpm.service | 
| 1 2 | systemctl list-dependencies | grep php-fpm ps -ef | grep php-fpm | 
转载请注明来源网址:青锋建站-http://www.sjzphp.com/webdis/lnmp_1221.html
 
