VPS拿到手的第一件事是干什么?哦,当然是连接ssh咯~什么?不懂连接ssh,看看第三期吧~好吧连接好了ssh之后干么呢?当然是搭建环境做站了!好吧,今天阿福讲的第五期就是搭建最简单的LNMP环境(PS:其实也就是一键包。)
好吧,那么让我们开始吧
首先得下载一键安装包
登陆你的ssh,然后使用wget 命令下载吧
国内的选用:
wget -c http://soft.vpser.net/lnmp/lnmp0.9-full.tar.gz
国外的选用:
wget -c http://soft.vpser.net/lnmp/lnmp0.9.tar.gz
其实用国内vps的还真不多,购买国外低价vps的很多,因此阿福就直接用第二个命令写教程了。(两个安装包的区别就在于下面的是不带软件的,上面的是带全软件的,不用在安装过程中再去下载了的。)
下面就是一行一行复制回车的事情了。
tar zxvf lnmp0.9.tar.gz
cd lnmp0.9
./centos.sh /*如果你的是debian或者是ubuntu的话就用./debian.sh 或./ubuntu.sh*/
输入后会出现如下(加粗部分为你要输入的建议不要使用要建站的域名填写在下方):
=========================================================================
LNMP V0.9 for CentOS/RadHat Linux VPS Written by Licess
=========================================================================
A tool to auto-compile & install Nginx+MySQL+PHP on LinuxFor more information please visit http://www.lnmp.org/
=========================================================================
Please input domain:
(Default domain: www.lnmp.org):myvps.rffan.info /*这里是输入域名的,不过不要输入你以后要做站的域名*/
===========================
domain=myvps.rffan.info
===========================
===========================
Please input the root password of mysql:
(Default password: root):rffan123456 /*这里是输入mysql 的root密码*/
===========================
mysqlrootpwd=rffan123456
===========================
===========================
Do you want to install the InnoDB Storage Engine?
(Default no,if you want please input: y ,if not please press the enter button): /*这里是选择是否安装InnoDB引擎,应该说大多数都用不着*/
INPUT error,The InnoDB Storage Engine will NOT install!Press any key to start…
按回车后就可以等待安装完成了。预计时间大概是20-40min
安装完成后的提示信息如下:
========================== Check install ================================
Install lnmp 0.9 completed! enjoy it.
=========================================================================
LNMP V0.9 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:rffan123456
phpinfo : http://myvps.rffan.info/phpinfo.php
phpMyAdmin : http://myvps.rffan.info/phpmyadmin/
Prober : http://myvps.rffan.info/p.php
Add VirtualHost : /root/vhost.shThe path of some dirs:
mysql dir: /usr/local/mysql
php dir: /usr/local/php
nginx dir: /usr/local/nginx
web dir : /home/wwwroot=========================================================================
=========================================================================
Manager 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 Manage status of lnmp
For more information please visit http://www.lnmp.orgUsage: /root/lnmp {start|stop|reload|restart|kill|status}
=========================================================================
Nginx is runing!
php-fpm is runing!
SUCCESS! MySQL running (13615)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
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 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 :::22 :::* LISTEN
上一期:走进VPS,第四期——认识VPS的管理工具(2) WinSCP
未经允许不得转载:啊福主机 » 走进VPS,第五期——最简单的环境LNMP的搭建