1 LNMP介绍
主要组件是Linux,Nginx,MySQL,PHP,另外可选有常用缓存组件入acceleraor是通过shell脚本自动安装,主要面向debian系和redhat系
2 LNMP安装
既然是写好的脚本,那安装就很简单了
2.1 下载官方的lnmp1.2-full.tar.gz文件
wget --no-check-certificate https://api.sinas3.com/v1/SAE_lnmp/soft/lnmp1.2-full.tar.gz
2.2 安装步骤
# 安装screen插件,screen可以用来控制与远程的会话,即使网络断掉也不影响命令执行的
yum -y install screen
# 关于screen的命令具体使用,可参考博文
# 新建一个名为lnmp的会话
screen -S lnmp
# tar xf lnmp1.2-full.tar.gz
# cd lnmp1.2-full
# ./install.sh lnmp
+------------------------------------------------------------------------+
| LNMP V1.2 for CentOS Linux Server, Written by Licess |
+------------------------------------------------------------------------+
| A tool to auto-compile & install LNMP/LNMPA/LAMP on Linux |
+------------------------------------------------------------------------+
| For more information please visit http://www.lnmp.org |
+------------------------------------------------------------------------+
Please setup root password of MySQL.(Default password: root)
Please enter:
Do you want to enable or disable the InnoDB Storage Engine?
Default enable,Enter your choice [Y/n]: Y
You will enable the InnoDB Storage Engine
===========================
You have 5 options for your DataBase install.
1: Install MySQL 5.1.73
2: Install MySQL 5.5.42 (Default)
3: Install MySQL 5.6.23
4: Install MariaDB 5.5.42
5: Install MariaDB 10.0.17
Enter your choice (1, 2, 3, 4 or 5):
No input,You will install MySQL 5.5.42
===========================
You have 5 options for your PHP install.
1: Install PHP 5.2.17
2: Install PHP 5.3.29
3: Install PHP 5.4.41 (Default)
4: Install PHP 5.5.25
5: Install PHP 5.6.9
Enter your choice (1, 2, 3, 4 or 5):
No input,You will install PHP 5.4.41
===========================
You have 3 options for your Memory Allocator install.
1: Don‘t install Memory Allocator. (Default)
2: Install Jemalloc
3: Install TCMalloc
Enter your choice (1, 2 or 3): 2
You will install JeMalloc
Press any key to install...or Press Ctrl+c to cancel
大概半小时的时间,终于安装完了
+------------------------------------------------------------------------+
| LNMP V1.2 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: xxxxx |
+------------------------------------------------------------------------+
+-------------------------------------------+
| Manager for LNMP, Written by Licess |
+-------------------------------------------+
| http://lnmp.org |
+-------------------------------------------+
nginx (pid 7973 7971) is running...
php-fpm is runing!
SUCCESS! MySQL running (8297)
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测试了一下几个方面都还好
本文出自 “启学的学习之路” 博客,请务必保留此出处http://qixue.blog.51cto.com/7213178/1705999
原文:http://qixue.blog.51cto.com/7213178/1705999