您的位置:首页 > 其它

论坛的搭建

2012-08-29 10:56 20 查看
论坛搭建的技术

PHPWind是一个基于PHP和MySQL的论坛程序,是国内最受欢迎的通用型论坛程序之一。PHPWind的前身是ofstar,发布于2004年,王学集和林耀纳是它的创始人。 PHPWind由杭州德天信息技术有限公司开发,分商业版和免费版,但在功能和版本上没有区别,软件全面开源免费。版本现已已有累积超过60万的用户。自2008年发布PHPWind7.0版本以来,PHPWind围绕着提升社区内容价值和推进社区电子商务两个大方向,开发单核心多模式的产品,实现新型的社区形态。
WordPress是一种使用PHP语言开发的博客平台,用户可以在支持PHP和MySQL 数据库的服务器上架设自己的网志。也可以把 WordPress 当作一个内容管理系统(CMS)来使用。WordPress 是一个免费的开源项目,在GNU通用公共许可证下授权发布。WordPress 是一个功能非常强大的博客系统,插件众多,易于扩充功能。安装和使用都非常方便。目前 WordPress 已经成为主流的 Blog 搭建平台。
无论是使用phpwind还是wordpress来搭建论坛,都需要来做搭建之前的环境配置,我们需要做的就是在Linux上搭建lamp(Linux+apache+mysql+php)环境。

lamp环境的搭建

[root@localhost ~]# mkdir /mnt/cdrom
[root@localhost ~]# mount /dev/cdrom /mnt/cdrom #挂载光盘
[root@localhost ~]# vim /etc/yum.repos.d/rhel-debuginfo.repo #编辑yum
1 [rhel-server]
2 name=Red Hat Enterprise Linux server 3 baseurl=file:///mnt/cdrom/Server
4 enabled=1
5 gpgcheck=1
6 gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-redhat-release
[root@localhost ~]# yum install httpd
[root@localhost ~]# chkconfig httpd on #安装apache服务
[root@localhost ~]# yum install mysql mysql-server –y #安装mysql
[root@localhost ~]# yum install php php-mysql php-mbstring –y #安装php
[root@localhost html]# service httpd start
启动 httpd: [确定]
[root@localhost html]# service mysqld start

[确定]
启动 MySQL: [确定]

利用phpwind来进行论坛的搭建

将文件包phpwind_GBK_8.3.zip wordpress_v3.0.5-zh_CN.zip拷贝到root目录下
[root@localhost ~]#unzip phpwind_GBK_8.3.zip
[root@localhost ~]# ll
总计 15016
-rw------- 1 root root 1175 2012-08-21 anaconda-ks.cfg
drwxr-xr-x 2 root root 4096 08-20 21:29 Desktop
-rw-r--r-- 1 root root 35236 2012-08-21 install.log
-rw-r--r-- 1 root root 3995 2012-08-21 install.log.syslog
drwxr-xr-x 4 root root 4096 2010-12-21 phpwind_GBK_8.3
-rw-r--r-- 1 root root 11962650 08-20 22:17 phpwind_GBK_8.3.zip
-rw-r--r-- 1 root root 3322727 08-20 22:17 wordpress_v3.0.5-zh_CN.zip
[root@localhost ~]# cd phpwind_GBK_8.3
[root@localhost phpwind_GBK_8.3]# ll
总计 8
drwxr-xr-x 4 root root 4096 2010-12-21 docs
drwxr-xr-x 22 root root 4096 2010-12-21 upload
[root@localhost phpwind_GBK_8.3]# mv upload/ /var/www/html/phpwind #制作物理目录
[root@localhost ~]# vim /etc/httpd/conf/httpd.conf 修改页面语言,使页面显示为中文





[root@localhost ~]# service httpd restart
停止 httpd: [确定]
启动 httpd: [确定]





[root@localhost ~]# cd /var/www/html/phpwind/
[root@localhost phpwind]# chmod -R 777 attachment
[root@localhost phpwind]# chmod -R 777 data
[root@localhost phpwind]# chmod -R 777 html
#按照要求修改attachment data html权限





[root@localhost phpwind]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.77 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database phpwind;
Query OK, 1 row affected (0.02 sec)

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| phpwind |
| test |
+--------------------+
4 rows in set (0.00 sec)

mysql> use phpwind;
Database changed #创建数据库
给数据库添加密码123
[root@localhost phpwind]# mysqladmin -u root -p password '123'
Enter password:
[root@localhost phpwind]#









删除install.Php
[root@localhost phpwind]# rm install.php
rm:是否删除 一般文件 “install.php”? y
[root@localhost phpwind]#
基于物理目录的主机登录





基于虚拟主机的登录
创建虚拟主机
[root@localhost ~]# vim /etc/httpd/conf/httpd.conf





修改客户机hosts文件





登陆成功。

利用wordpress进行论坛的搭建

[root@localhost ~]# unzip wordpress_v3.0.5-zh_CN.zip
[root@localhost ~]# cd wordpress-3.0.5-zh_CN/
[root@localhost wordpress-3.0.5-zh_CN]# ll
总计 4
drwxr-xr-x 5 root root 4096 2011-02-09 wordpress
[root@localhost wordpress-3.0.5-zh_CN]# mv wordpress/ /var/www/html/ #制作物理目录
[root@localhost wordpress-3.0.5-zh_CN]# cd /var/www/html/
[root@localhost html]# ll
总计 12
-rw-r--r-- 1 root root 20 08-20 21:58 index.php
drwxr-xr-x 22 root root 4096 08-20 23:38 phpwind
drwxr-xr-x 5 root root 4096 2011-02-09 wordpress





[root@localhost wordpress]# cp wp-config-sample.php wp-config.php #创建wp-config.php配置文件
[root@localhost wordpress]# chown apache.apache wp-config.php 修改其权限





创建数据库
[root@localhost wordpress]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 25
Server version: 5.0.77 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database wordpress;
Query OK, 1 row affected (0.04 sec)
[root@localhost wordpress]# vim wp-config.php












利用虚拟主机登录站点
别名设置





创建虚拟主机





修改客户机hosts文件









访问成功。

本文出自 “孙晓雨的博客” 博客,请务必保留此出处http://xysun.blog.51cto.com/5628254/976142
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: