访问量: 192 次浏览
本博客使用的是Debain Squeeze操作系统上安装的Wordpress。在这里记录一下安装的过程。
1.首先,系统里要装好apache+php+mysql 这在debian中很容易:
# apt-get install apache2 php5 php5-gd php5-mysql mysql-server mysql-client Apache刚装上的时候不提供php支持。当你点击有.php脚本的连接,浏览器会下载这个脚本: 修改 /etc/apache2/httpd.conf,加入:
DirectoryIndex index.php index.php3 index.html index.htm index.shtml index.cgi AddType application/x-httpd-php .php .php3 AddType application/x-httpd-php-source .phps
保存退出。重起apache: # /etc/init.d/apache2 restart 安装phpMyAdmin,在浏览器中输入:
<http://127.0.0.1/phpMyAdmin/> 会提示:
The mcrypt extension is missing. Please check your PHP configuration. The mysqli extension is missing. Please check your PHP configuration. 需要安装:
apt-get install php5-mcrypt 即可。 在/var/www/下建立一个文件my.php里面写入符合PHP语法的语句。 用浏览器打开,如果能正常显示,则安装成功。
2.修改mysql密码:
# mysqladmin password xxxxxx 登陆mysql,输入密码,建立数据库,建立wordpress用户,刷新privileges,离开mysql
# mysql -u root -p mysql> create database wordpress; mysql> grant all on wordpress.* to wordpress@localhost identified by '密码'; mysql> flush privileges; mysql> exit 3.然后安装Wordpress
wget http://wordpress.org/latest.tar.gz 解压:
tar -xvf latest.tar.gz 将wp-config-sample.php改名为wp-config.php. 用vim打开wp-config.php,输入数据库信息。
define('DB_NAME', 'wordpress'); // The name of the database define('DB_USER', 'username'); // Your MySQL username define('DB_PASSWORD', 'password'); // ...and password define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value 将解压出来的wordpress目录下的文件复制到/var/www/目录下,(不包括wordpress目录)
4.安装 用浏览器打开
<http://127.0.0.1/wp-admin/install.php> 下面的安装过程非常简单,就不再多写了。