红联首页 凝聚Linux人的力量
菜鸟过关 | 精华文档 | 同城人(交友) | 我与Linux的故事 | Linux新闻 | Linux视频 | Linux人才 | 软件下载 | 大学校园 | English
发新话题
打印

debian安装wordpress

debian安装wordpress

现在wordpress越来越流行了,所以,让我们在自己电脑上也做个服务器,体验一下wordpress的强大吧。。。

1,首先,系统里要装好apache+php+mysql
这在debian中很容易:

    sudo 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:

    sudo /etc/init.d/apache2 restart


在/var/www/下建立一个文件my.php里面写入:

    <?php
    echo hello world!
    ?>

用浏览器打开,如果显示
hello world!
安装成功。

2,修改mysql密码

    mysqladmin password xxxxxx

登陆mysql:

    mysql -u root -p

输入密码
建立数据库

    mysql> create database wordpress;

建立wordpress用户

    mysql> grant all on wordpress.* to wordpress@localhost

identified by '密码';
刷新privileges.

    mysql>flush privileges

离开mysql

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
安装的过程很简单,就不写了。
文章来源:http://hi.baidu.com/truant285

[ 本帖最后由 ananai 于 2008-8-19 15:32 编辑 ]

TOP

不错,学习了

TOP

发新话题