CentOS 6 安装 LNMP1.0 (军哥版)

原创
2014/03/01 18:51
阅读数 1.6K


CentOS6 X64 更新 163 源

http://my.oschina.net/chocoball/blog/204249

CentOS 6 安装 LNMP (军哥版)

PHP 5.3.17

MySQL  5.5.27 

Nginx 1.2.7 

安装步骤:

1、使用putty或类似的SSH工具登陆VPS或服务器;

登陆后运行:screen -S lnmp

如果提示screen: command not found 命令不存在可以执行:yum install screen 或 apt-get install screen安装,详细的screen教程

2、下载并安装LNMP一键安装包:

执行安装程序前需要您确认您的Linux发行版,可以执行:cat /etc/issue 查看是CentOS、Debian还是Ubuntu,

CentOS系统下执行:wget -c http://soft.vpser.net/lnmp/lnmp1.0-full.tar.gz && tar zxvf lnmp1.0-full.tar.gz && cd lnmp1.0-full && ./centos.sh


这一步需要设置MySQL的root密码,输入后回车进入下一步,如下图所示:

这里需要确认是否启用MySQL InnoDB,如果不确定是否启用可以输入 y ,这个可以单独在MySQL文件里关闭,输入 y 表示启用,输入 n 表示不启用。输入 y 或 n 后回车进入下一步,显示如下信息:

这一步是选择php版本,可以选择 PHP 5.3.17 或 PHP 5.2.17,安装PHP 5.3.17的话输入 y ,安装PHP 5.2.17 输入 n,输入 y 或 n 后回车,进入下一步MySQL版本的选择,如下图:

可以选择MySQL 版本 5.5.27 或 5.1.60,安装MySQL 5.5.27的话输入 y ,安装MySQL 5.1.60 输入n,输入 y 或 n 后回车,完成选择。

提示"Press any key to start...",按回车键确认开始安装。
LNMP脚本就会自动安装编译Nginx、MySQL、PHP、phpMyAdmin、Zend Optimizer这几个软件。

安装时间可能会几十分钟到几个小时不等,主要是机器的配置网速等原因会造成影响。

3、安装完成
如果显示如下界面:

说明已经安装成功。
接下来按添加虚拟主机教程,添加虚拟主机,通过sftpftp服务器上传网站,将域名解析到VPS或服务器的IP上,解析生效即可使用。

4、安装失败

如果出现类似上图的提示,则表明安装失败,说明没有安装成功!!需要用winscp或其他类似工具,将/root目录下面的lnmp-install.log下载下来,到LNMP支持论坛发帖注明你的发行版名称版本号(可通过 cat /etc/issue获得)、32位还是64位,并将lnmp-install.log压缩以附件形式上传到论坛,我们会通过日志查找错误,并给予相应的解决方法。

5、添加、删除虚拟主机及伪静态管理
http://lnmp.org/faq/lnmp-vhost-add-howto.html

6、eAccelerator,xcache,memcached,imageMagick,ionCube的安装
http://lnmp.org/faq/Add-ons.html

7、LNMP相关软件目录及文件位置
http://lnmp.org/faq/lnmp-software-list.html

8、LNMP状态管理命令

http://lnmp.org/faq/lnmp-status-manager.html

via http://lnmp.org/install.html



== == == == == == == == == == == == == ==Install PHPMyAdmin == == == == == == == == == == == == == == == == =
== == == == == == == == == == == == == ==phpMyAdmin install completed == == == == == == == == == == == == == == == == =
== == == == == == == == == == == == == ==add nginx and php -fpm on startup == == == == == == == == == == == == == ==
Download new nginx init.d file......
-- 2014 - 03 - 01 18 : 05 : 26 --  http : / /soft.vpser.net /lnmp /ext /init.d.nginx
Resolving soft.vpser.net... 96. 44. 153. 111
Connecting to soft.vpser.net | 96. 44. 153. 111 | : 80... connected.
HTTP request sent, awaiting response... 416 Requested Range Not Satisfiable

    The file is already fully retrieved; nothing to do.

== == == == == == == == == == == == == =add nginx and php -fpm on startup completed == == == == == == == == == ==
Starting LNMP...
Starting MySQL.. SUCCESS ! 
Starting php -fpm   done
Starting nginx daemon : nginx.
# Generated by iptables-save v1.4.7 on Sat Mar  1 18:05:29 2014
*filter
:INPUT ACCEPT [ 0 : 0]
:FORWARD ACCEPT [ 0 : 0]
:OUTPUT ACCEPT [ 0 : 0]
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT 
COMMIT
# Completed on Sat Mar  1 18:05:29 2014
== == == == == == == == == == == == == == == == == == = Check install == == == == == == == == == == == == == == == == == =
Checking...
Nginx : OK
PHP : OK
PHP -FPM : OK
MySQL : OK
Install lnmp 1. 0 completed ! enjoy it.
== == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == =
LNMP V1. 0 for CentOS /RadHat Linux VPS  Written by Licess 
== == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == =

For more information please visit http : / /www.lnmp.org /

lnmp status manage : /root /lnmp {start |stop |reload |restart |kill |status}
default mysql root password :
phpinfo : http : / /yourIP /phpinfo.php
phpMyAdmin : http : / /yourIP /phpmyadmin /
Prober : http : / /yourIP /p.php
Add VirtualHost : /root /vhost.sh

The path of some dirs :
mysql dir :   /usr /local /mysql
php dir :     /usr /local /php
nginx dir :   /usr /local /nginx
web dir :     /home /wwwroot /default

== == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == =
== == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == =
Manager for LNMP V1. 0  ,  Written by Licess 
== == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == =
LNMP is a tool to auto -compile & install Nginx +MySQL +PHP on Linux 
This script is a tool to Manage status of lnmp 
For more information please visit http : / /www.lnmp.org 

Usage : /root /lnmp {start |stop |reload |restart |kill |status}
== == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == =
Nginx is runing !
php -fpm is runing !
 SUCCESS ! MySQL running ( 18920)
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      
tcp         0       0 : : : 22                           : : : *                            LISTEN      
 





展开阅读全文
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部