Fedora搭建wordpress

这几天做asp的课程设计,搭建商务网站。真不理解,大学教育的反射弧也是这般的长。个人觉得,php比asp强的地方很多,速度快、可跨平台、可移植、开源免费、够健壮。自闭只会固步自封,开源才是王道。不过说回来,仁者见仁,智者见智么。课程设计嘛,如期完成了。但因为多种欲望,我决定把自己的电脑搞成个服务器,跑上php的woedpress程序,顺便看下mysql。记一下怕忘了。

sudo yum install httpd php php-gd php-pdo php-mysql mysql mysql-server

其中,httpd是web 服务器的核心,php-pdo提供与数据库的接口,php-gd也是一个扩展。

ok后启动相应服务,sudo /etc/init.d/httpd start  还有mysql.

在/var/www/html/目录下放一htm页面,现在访问localhost(127.0.0.1),正常显示。

增加以下代码,让我们搭建的apache服务器支持php,/etc/httpd/conf/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

使用mysql,一些基本常用的语句。

登录,mysql -u root -p

show databases;                show tables;

create database wp;          use wp;

select * from user.sql;

grant all on wp.* to 用户名@localhost identified by “密码”;

有了数据库,用户名,密码就可以搭建本地wp了。

把wp解压到/var/www/html/目录下,改名wp-config-sample.php为wp-config.php,再该文件内更改对应的配置内容。让后安装,登录。大功告成~~

Tags :

Google Reader Yahoo Facebook Twitter Digg FriendFeed Delicious Google Translate
这篇日志发表于2010年03月18日 9:09 上午。 你可以订阅该日志的所有评论通过 RSS 2.0。 你可以发表评论,或者引用通告

1条回应

评论(1)引用通告(0)

  1. Louboutin Shoes

    Thanks for this useful article.

    [reply]

    06/13/2010 6:34 下午 | #1

发表评论

(Ctrl+Enter)

XHTML:你可以使用这些标签:<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>