1、安装Ubuntu-server-配置IP sudo nano /etc/network/interface
更改sources.
list文件:
deb http://mirrors.163.com/ubuntu/ utopic main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ utopic-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ utopic-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ utopic-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ utopic-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ utopic main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ utopic-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ utopic-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ utopic-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ utopic-backports main restricted universe multiverse
2、
apt-get update
3、开启ssh-server,需要下载:
sudo apt-get install openssh-server
4.下载xampp :
cd download
wget http://downloads.sourceforge.net/project/xampp/XAMPP Linux/1.8.3/xampp-linux-x64-1.8.3-5-installer.run
5、安装xampp
chmod +x xampp-linux-x64-1.8.3-5-installer.run
./xampp-linux-x64-1.8.3-5-installer.run
安装过程如下:
6、因为是在localhost外做调试,把localhost限制先注释掉;
sudo nano /opt/lamp/etc/extra/http-xampp.conf
7 为了方便起见,把控制脚本放到用户目录,这样在登录时就可以直接做控制
cp /opt/lamp/ctlscript.sh /home/<你的用户名>/
8 使第6步修改生效,重启apache :
sudo ./sltscript restart apache
9 再次访问主页,查看安全选项:按照提示修复:
sudo /opt/lamp/xampp security
注意:提示mysql is accessable via network时,根据自己环境设置,我这里选择N,表示允许通过网络访问mysql数据库,如果选择默认值,则只允许从本机访问(推荐生产环境下这样设置)。
至此,基础环境搭建完毕!