具体配置看原文,不重新复述:
原文:https://lnmp.org/install.html
因为配置数据库主从,需要保持两台mysql数据库服务器的mysql版本号一致,所以又重新装了一次。。重新安装直接操作步骤2即可。貌似没卸载,直接重装就行。
1、参考原文
yum install screen
2、参考原文
wget -c http://soft.vpser.net/lnmp/lnmp1.3-full.tar.gz && tar zxf lnmp1.3-full.tar.gz && cd lnmp1.3-full && ./install.sh lnmp
最后出现这个:按回车(大概30分钟多点)
Checking ...
Nginx: OK
MySQL: OK
PHP: OK
PHP-FPM: OK
Clean src directory...
+------------------------------------------------------------------------+
| LNMP V1.3 for CentOS Linux Server, Written by Licess |
+------------------------------------------------------------------------+
| For more information please visit http://www.lnmp.org |
+------------------------------------------------------------------------+
| lnmp status manage: lnmp {start|stop|reload|restart|kill|status} |
+------------------------------------------------------------------------+
| phpMyAdmin: http://IP/phpmyadmin/ |
| phpinfo: http://IP/phpinfo.php |
| Prober: http://IP/p.php |
+------------------------------------------------------------------------+
| Add VirtualHost: lnmp vhost add |
+------------------------------------------------------------------------+
| Default directory: /home/wwwroot/default |
+------------------------------------------------------------------------+
| MySQL/MariaDB root password: lnmp.org |
+------------------------------------------------------------------------+
+-------------------------------------------+
| Manager for LNMP, Written by Licess |
+-------------------------------------------+
| http://lnmp.org |
+-------------------------------------------+
nginx (pid 6363 6360) is running...
php-fpm is runing!
SUCCESS! MySQL running (6893)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
Install lnmp V1.3 completed! enjoy it.
3、个人觉得到这一步之后,可以不用再参考原文。
直接访问 http://ip 或者命令行 curl http://localhost/
用集成包,只是嫌麻烦一个一个安装,到这一步之后,什么配置虚拟机啥的,用到再配置就可以了。
4、在配置主从的时候,关不掉mysql。(可能因为重新安装了lnmp集成包,原先的进程没有停掉,改了myslq的版本安装,找不到mysql的进程号了)
/etc/init.d/mysql stop
但是关闭mysql的时候报错了:
MySQL server PID file could not be found! [FAILED]
解决办法: 原文出处:http://www.longhui.org/archives/466
ps aux|grep mysql
找出Mysql的进程,然后杀掉。 Kill 进程号
kill 1111
然后启动Mysql:
/etc/init.d/mysql strat