1.更改源:
sudo vim /etc/apt/sources.list
#Ubuntu 官方更新服务器(欧洲,此为官方源,国内较慢,但无同步延迟问题,电信、移动/铁通、联通等公网用户可以使用): deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
sudo apt-get update
2.下载WordPress
wget http://cn.wordpress.org/wordpress-3.9-zh_CN.tar.gz
然后就是安装Wordpress必须的组件:
1)安装apache服务器:
sudo apt-get install apache2
如果访问本机IP出现出现It works!那证明OK了(我这里是默认安装了的)
2)安装php服务:
sudo apt-get install php5
在/var/www/html/下新建一个php文件,如果通过浏览器能访问成功就OK了,
3)重启apache服务器
sudo /etc/init.d/apache2 restart
此时浏览器就可以正确解析php文件了。
4)安装mysql服务:
sudo apt-get install mysql-server sudo apt-get install mysql-admin sudo apt-get install mysql-client
安装过程中提示输入数据库root用户的密码
3.为Wordpress新建mysql数据库:
在终端下打开mysql管理器:
$mysql -u root -p
创建新数据库:
mysql>CREATE DATABASE yourdatabasename;
若非特别声明,文章均为Evilxr的个人笔记,转载请注明出处。