利用lamp建设phpwind和wordpress论坛

实验设备:Red Hat Enterprise Linux 5虚拟机一台

 

实验所需软件包:phpwind_GBK_8.3.zip,wordpress_v3.0.5-zh_CN.zip

 

用yum搭建lamp

[root@localhost ~]# mount /dev/cdrom /mnt/cdrom #挂载光盘

[root@localhost ~]# vim /etc/yum.repos.d/rhel-debuginfo.repo #编辑yum仓库

[root@localhost ~]# yum install httpd #安装apache,mysql,php

[root@localhost ~]# yum install mysql mysql-server

[root@localhost ~]# yum install php php-mysql php-mbstring

[root@localhost ~]# service httpd start #启动apache,mysql

[root@localhost ~]# service mysqld start

 

建设phpwind论坛

将phpwind_GBK_8.3.zip放到根目录下,并解压缩,解压缩后会生成一个目录phpwind_GBK_8.3

[root@localhost ~]# cd phpwind_GBK_8.3 #进入phpwind_GBK_8.3目录

[root@localhost phpwind_GBK_8.3]# mv upload /var/www/html/phpwind #将upload目录移动到apache站点主目录下

[root@localhost ~]# vim /etc/httpd/conf/httpd.conf #编辑apache的配置脚本

clip_p_w_picpath002

[root@localhost ~]# cd /var/www/html/phpwind/ #修改这三目录的权限

[root@localhost phpwind]# chmod -R 777 p_w_upload

[root@localhost phpwind]# chmod -R 777 data

[root@localhost phpwind]# chmod -R 777 html

[root@localhost phpwind]# mysqladmin -u root -p password '123' #创建mysql的用户名和密码,并创建数据库phpwind

clip_p_w_picpath004

[root@localhost phpwind]# rm install.php #删除phpwind安装文件

[root@localhost ~]# vim /etc/httpd/conf/httpd.conf #以虚拟主机的方式管理论坛

clip_p_w_picpath006

[root@localhost ~]# service httpd restart

Stopping httpd: [ OK ]

Starting httpd: [ OK ]

网页显示结果:

clip_p_w_picpath008

clip_p_w_picpath010

clip_p_w_picpath012

clip_p_w_picpath014

clip_p_w_picpath016

clip_p_w_picpath018

clip_p_w_picpath020

clip_p_w_picpath022

clip_p_w_picpath024

 

 

建设wordpress论坛

在mysql中创建数据库wordpress

clip_p_w_picpath026

将wordpress_v3.0.5-zh_CN.zip放到根目录下,并解压缩,解压缩后会生成一个目录wordpress-3.0.5-zh_CN

[root@localhost ~]# cd wordpress-3.0.5-zh_CN/ #进入目录wordpress-3.0.5-zh_CN,并将wordpress目录移至apache站点主目录下

[root@localhost wordpress-3.0.5-zh_CN]# mv wordpress/ /var/www/html

[root@localhost html]# cd /var/www/html/ wordpress/ #进入目录wordpress

[root@localhost wordpress]# ls #查看所有文件

index.php wp-config-sample.php wp-rdf.php

license.txt wp-content wp-register.php

readme.html wp-cron.php wp-rss2.php

wp-activate.php wp-feed.php wp-rss.php

wp-admin wp-includes wp-settings.php

wp-app.php wp-links-opml.php wp-signup.php

wp-atom.php wp-load.php wp-trackback.php

wp-blog-header.php wp-login.php xmlrpc.php

wp-comments-post.php wp-mail.php

wp-commentsrss2.php wp-pass.php

[root@localhost wordpress]# cp wp-config-sample.php wp-config.php #将文件wp-config-sample.php拷贝成wordpress的配置文件wp-config-.php

[root@localhost wordpress]# chown apache.apache wp-config.php #修改配置文件的所有者和所属组为apache

[root@localhost wordpress]# vim wp-config.php #编辑配置文件

clip_p_w_picpath028

 

 

网页显示结果:

clip_p_w_picpath030

clip_p_w_picpath032