ubuntu linux 安装wordpress
42.121.107.173
deb http://mirrors.163.com/ubuntu/ precise main restricted
deb-src http://mirrors.163.com/ubuntu/ precise main restricted
deb http://mirrors.163.com/ubuntu/ precise-updates main restricted
deb-src http://mirrors.163.com/ubuntu/ precise-updates main restricted
deb http://mirrors.163.com/ubuntu/ precise universe
deb-src http://mirrors.163.com/ubuntu/ precise universe
deb http://mirrors.163.com/ubuntu/ precise-updates universe
deb-src http://mirrors.163.com/ubuntu/ precise-updates universe
deb http://mirrors.163.com/ubuntu/ precise multiverse
deb-src http://mirrors.163.com/ubuntu/ precise multiverse
deb http://mirrors.163.com/ubuntu/ precise-updates multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-updates multiverse
deb http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ precise-security main restricted
deb-src http://mirrors.163.com/ubuntu/ precise-security main restricted
deb http://mirrors.163.com/ubuntu/ precise-security universe
deb-src http://mirrors.163.com/ubuntu/ precise-security universe
deb http://mirrors.163.com/ubuntu/ precise-security multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-security multiverse
deb http://extras.ubuntu.com/ubuntu precise main
deb-src http://extras.ubuntu.com/ubuntu precise main
安装apache
sudo apt-get install apache2
安装php5
sudo apt-get install php5 libapache2-mod-php5
sudo /etc/init.d/apache2 restart
安装mysql
sudo apt-get install mysql-server
vim /etc/mysql/my.cnf 将bind-address改为合适的ip
安装phpadmin
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
vim /etc/php5/apache2/php.ini 修改 ;extension=mysql.so 为 去掉前面的注释符 ;
sudo /etc/init.d/apache2 restart
下载wordpress
wget http://wordpress.org/latest.tar.gz
tar -xzvf latest.tar.gz
cp -rf wordpress /var/www
cd /var/www/wordpress
mv wp-config-sample.php wp-config.php
在mysql中建立数据库
create database wordpress
grant all on wordpress.* to wordpress@localhost identified by 'wordpresspassword';
vim wp-config.php
修改db的名字和密码
打开浏览器 http://42.121.107.173/wordpress/ 进行安装