CentOS6 X64 更新 163 源
http://my.oschina.net/chocoball/blog/204249 php
CentOS 6 安裝 LNMP (軍哥版) html
PHP 5.3.17 mysql
MySQL 5.5.27 linux
Nginx 1.2.7 nginx
安裝步驟:
一、使用putty或相似的SSH工具登錄VPS或服務器; web
登錄後運行:screen -S lnmp sql
若是提示screen: command not found 命令不存在能夠執行:yum install screen 或 apt-get install screen安裝,詳細的screen教程。 centos
二、下載並安裝LNMP一鍵安裝包: 服務器
執行安裝程序前須要您確認您的Linux發行版,能夠執行:cat /etc/issue 查看是CentOS、Debian仍是Ubuntu, ssh
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
![](http://static.javashuo.com/static/loading.gif)
這一步須要設置MySQL的root密碼,輸入後回車進入下一步,以下圖所示:
![](http://static.javashuo.com/static/loading.gif)
這裏須要確認是否啓用MySQL InnoDB,若是不肯定是否啓用能夠輸入 y ,這個能夠單獨在MySQL文件裏關閉,輸入 y 表示啓用,輸入 n 表示不啓用。輸入 y 或 n 後回車進入下一步,顯示以下信息:
![](http://static.javashuo.com/static/loading.gif)
這一步是選擇php版本,能夠選擇 PHP 5.3.17 或 PHP 5.2.17,安裝PHP 5.3.17的話輸入 y ,安裝PHP 5.2.17 輸入 n,輸入 y 或 n 後回車,進入下一步MySQL版本的選擇,以下圖:
![](http://static.javashuo.com/static/loading.gif)
能夠選擇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這幾個軟件。
安裝時間可能會幾十分鐘到幾個小時不等,主要是機器的配置網速等緣由會形成影響。
三、安裝完成
若是顯示以下界面:
![](http://static.javashuo.com/static/loading.gif)
說明已經安裝成功。
接下來按添加虛擬主機教程,添加虛擬主機,經過sftp或ftp服務器上傳網站,將域名解析到VPS或服務器的IP上,解析生效便可使用。
四、安裝失敗
![](http://static.javashuo.com/static/loading.gif)
若是出現相似上圖的提示,則代表安裝失敗,說明沒有安裝成功!!須要用winscp或其餘相似工具,將/root目錄下面的lnmp-install.log下載下來,到LNMP支持論壇發帖註明你的發行版名稱版本號(可經過 cat /etc/issue得到)、32位仍是64位,並將lnmp-install.log壓縮以附件形式上傳到論壇,咱們會經過日誌查找錯誤,並給予相應的解決方法。
五、添加、刪除虛擬主機及僞靜態管理
http://lnmp.org/faq/lnmp-vhost-add-howto.html
六、eAccelerator,xcache,memcached,imageMagick,ionCube的安裝
http://lnmp.org/faq/Add-ons.html
七、LNMP相關軟件目錄及文件位置
http://lnmp.org/faq/lnmp-software-list.html
八、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