在搬瓦工服务器上搭建自己的Apache + PHP + MySQL服务

其实重点就是使用lamp:https://github.com/teddysun/lamp

步骤:

1、打开mac的终端,敲入命令:

ssh root@地址 -p 端口

2、进入搬瓦工的服务器后,敲入以下命令:

yum -y install wget screen unzip
wget --no-check-certificate -O lamp.zip https://github.com/teddysun/lamp/archive/master.zip
unzip lamp.zip
cd lamp-master
chmod +x *.sh
screen -S lamp
./lamp.sh

3、选中相关的安装包进行安装,然后稍等20分钟左右等待安装完成

4、装完了,开心两分钟

5、顺便安装一下ftp吧:

rpm -qa|grep vsftp

yum install vsftpd -y

service vsftpd start//启动服务

adduser test//添加ftp用户

passwd test

6、开始享用自己的服务器吧主人。

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s