安装LNMP 更新系统
yum check-update yum update 安装Screen
yum install screen 开始安装Lnmp
screen -S lnmp wget -c http://soft.vpser.net/lnmp/lnmp0.8.tar.gz //最新版请查阅lnmp官网 tar zxvf lnmp0.8.tar.gz ./lnmp0.8/centos.sh | tee lnmp.log //输出log文件,以备出错时查阅 接下来按照提示设定域名和MysQL密码,程序会自动下载相关程序,而后编译安装
安装PureFTP
./lnmp0.8/pureftp.sh 按提示输入MySQL和Ftp管理员密码,安装完成后可以通过http://vpsip/ftp/来登录管理ftp帐号
使用Lnmp 添加虚拟主机
/root/vhost.sh 按照提示填入域名、目录、rewrite规则文件,如下所示:
root@buyvm256:~#/root/vhost.sh ========================================================================= Add Virtual Host for LNMP V0.9 , Written by Licess ========================================================================= LNMP is a tool to auto-compile & install Nginx+MySQL+PHP on Linux This script is a tool to add virtual host for nginx For more information please visit http://www.lnmp.org/ ========================================================================= Please input domain: //添加域名 (Default domain: www.lnmp.org):unixetc.com =========================== domain=unixetc.com =========================== Do you want to add more domain name? (y/n) //添加更多域名 y Type domainname,example(bbs.vpser.net forums.vpser.net luntan.vpser.net): www.unixetc.com =========================== domain list=www.unixetc.com =========================== Please input the directory for the domain:unixetc.com : //网站目录 (Default directory: /home/wwwroot/unixetc.com): =========================== Virtual Host Directory=/home/wwwroot/unixetc.com =========================== =========================== Allow Rewrite rule? (y/n) //重写规则 =========================== y Please input the rewrite of programme : wordpress,discuz,typecho,sablog,dabr rewrite was exist. (Default rewrite: other):wordpress //选择重写规则 =========================== You choose rewrite=wordpress =========================== =========================== Allow access_log? (y/n) //是否记录log =========================== n Press any key to start create virtul host... 然后,登录http://vpsip/ftp/添加ftp帐号,http://vpsip/phpmyadmin/编辑数据库
...