安装Nginx+MySQL+PHP+PHPMyAdmin+eAcelerator使用Licess的LNMP。
有些VPS默认是安装Apahche的,如果安装了,请先执行:yum -y remove httpd
下面是按照的过程使用的命令,及相关注释(注释用 //,红色加粗为所使用的命令)
Using username “root”.
root@67.215.242.196’s password:
[root@vpser ~]#cd /usr/local/src
[root@vpser src]#ls
[root@vpser src]#wget http://licess.googlecode.com/files/LNMP.zip //下载LNMP文件
–11:29:51– http://licess.googlecode.com/files/LNMP.zip
Resolving licess.googlecode.com… 209.85.173.82
Connecting to licess.googlecode.com|209.85.173.82|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 11261 (11K) [application/x-zip]
Saving to: `LNMP.zip’
100%[=======================================>] 11,261 –.-K/s in 0.1s
11:29:52 (111 KB/s) - `LNMP.zip’ saved [11261/11261]
[root@vpser src]#unzip LNMP.zip //解压LNMP压缩包
Archive: LNMP.zip
creating: LNMP/
creating: LNMP/conf/
inflating: LNMP/conf/fcgi.conf
inflating: LNMP/conf/nginx-load.conf
inflating: LNMP/conf/nginx-proxy.conf
inflating: LNMP/conf/nginx.conf
inflating: LNMP/conf/php-fpm.conf
inflating: LNMP/down.sh
inflating: LNMP/install.sh
inflating: LNMP/opt.sh
inflating: LNMP/readme.txt
inflating: LNMP/startup.sh
[root@vpser src]#cd LNMP
[root@vpser LNMP]#ls
conf down.sh install.sh opt.sh readme.txt startup.sh
[root@vpser LNMP]#chmod +x install.sh down.sh //为install.sh和down.sh添加执行权限
[root@vpser LNMP]#./down.sh //下载安装所需的源代码文件
=========================================================================
LNMP v0.0.1 for VPS Written by Licess
=========================================================================
For more information please visit http://blog.licess.cn/lnmp/
start download LNMP package
………………………….省略下载过程
download package finished!
=========================================================================
[root@vpser LNMP]#clear
[root@vpser LNMP]#ls
conf mysql-5.0.22.tar.gz
down.sh nginx-0.7.19.tar.gz
eaccelerator-0.9.5.3.tar.bz2 opt.sh
install.sh pcre-7.7.tar.gz
libiconv-1.12.tar.gz php-5.2.6-fpm-0.5.9.diff.gz
libmcrypt-2.5.8.tar.gz php-5.2.6.tar.gz
mcrypt-2.6.7.tar.gz phpMyAdmin-3.1.1-all-languages.tar.gz
memcache-2.2.3.tgz readme.txt
mhash-0.9.9.tar.gz startup.sh
[root@vpser LNMP#]./install.sh //开始安装
=========================================================================
LNMP v0.0.1 for VPS Written by Licess
=========================================================================
A tool to auto-compile & install Nginx+MySQL+PHP on Linux
For more information please visit http://blog.licess.cn/lnmp/
The path of some dirs:
mysql dir: /usr/local/mysql
php dir: /usr/local/php
nginx dir: /usr/local/nginx
web dir /web/www
=========================================================================
在此步中输入你要绑定的域名,例如:diavps.vpser.net ,回车确认。
Please input domain:
(Default domain: www.lnmp.org):diavps.vpser.net
===========================
domain=diavps.vpser.net
===========================
Press any key to start… ""再次按任意键确认,开始安装
Loading “fastestmirror” plugin
………………………………..
开始安装……..
PS:屏幕疯狂的滚动…….欣赏一下
经过漫长的等待(时间不确定,根据实际情况,我的是半个多小时),终于安装完了。
下面看一下PHPInfo
PHPMyAdmin:
程序安装路径:
MySQL : /usr/local/mysql
PHP : /usr/local/php
Nginx : /usr/local/nginx
PHPMyAdmin /web/www/phpmyadmin
Web目录 /web/www
MySQL 用户:root 密码:root
通过下面这几个链接查看phpinfo和管理MySQL
phpinfo http://ip/phpinfo.php
phpMyAdmin http://ip/phpmyadmin
让Nginx开机后手动执行 /root/run.sh 后Nginx会运行 ,开机自动运行可以运行 LNMP目录下面的 startup.sh 文件即可。
opt.sh 为优化文件,如果内存小于128MB可以通过执行 ./opt.sh 添加swap分区,并修改时区为东8区。注:并不一定在所有的VPS上都可以添加swap分区,swvps不可以,其他没有测试。
安装完后,请立即修改您的MySQL的root密码,使用命令cd /usr/local/bin
再执行:mysqladmin -u root -p password mypasswd //mypasswd为自己的密码
输入这个命令后,需要输入root的原密码,然后root的密码将改为mypasswd。
把命令里的root改为你的用户名,你就可以改你自己的密码了。
进入phpmyadmin目录/web/www/phpmyadmin 将 config.default.php 修改为config.inc.php
修改这个文件的 $cfg['Servers'][$i]['auth_type'] = ‘http’;
$cfg['blowfish_secret'] = ‘VPSER’; //VPSER为任意字符
保存,然后就可以登录了。
posted on 2009-05-11 13:28
Blog of JoJo 阅读(910)
评论(1) 编辑 收藏 所属分类:
每日一记