您的位置:首页 > 运维架构 > Linux

linux系统下创建论坛

2012-08-29 09:45 155 查看
在linux系统下创建论坛可以使用phpwind和wordpress等,那么什么是phpwind和wordpress呢

Phpwind简介:

PHPWind(简称:PW)是一个基于PHP和MySQL的论坛程序,是国内最受欢迎的通用型论坛程序之一。PHPWind的前身是ofstar,发布于2004年,王学集和林耀纳是它的创始人。 PHPWind由杭州德天信息技术有限公司开发,分商业版和免费版,但在功能和版本上没有区别,软件全面开源免费。版本现已已有累积超过60万的用户。自2008年发布PHPWind7.0版本以来,PHPWind围绕着提升社区内容价值和推进社区电子商务两个大方向,开发单核心多模式的产品,实现新型的社区形态。
WordPress简介:
WordPress是一种使用PHP语言开发的博客平台,用户可以在支持PHP和MySQL 数据库的服务器上架设自己的网志。也可以把 WordPress 当作一个内容管理系统(CMS)来使用。WordPress 是一个免费的开源项目,在GNU通用公共许可证下授权发布. WordPress 拥有世界上最强大的插件和模板。个人可以根据它的核心程序提供的规则自己开发模板和插件。他可以在瞬间把你的博客改成cms.forums、等各种类型的站点。它强大的功能令你刮目相看。WordPress Theme 风格模板是世界上的程序里最多的。类型复杂,品质可嘉,样式繁多,你只需要把不同的模板文件放到空间的 Theme 目录下就可以自由的在后台变幻,方便使用,而且不管你安装的的什么语言包,都可以自由的使用这些风格。根本没有限制。

下面分别利用phpwind和wordpress搭建论坛系统
1.利用phpwind搭建
首先搭建lamp环境,这里就不再详细列出.
解压缩
Unzip phpwind_GBK_8.3.zip
进入目录
[root@localhost ~]cd phpwind_GBK_8.3
[root@localhost phpwind_GBK_8.3]# mv upload/ /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

[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.00 sec)

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

mysql>
[root@localhost phpwind]# mysqladmin -u root -p password '123'
Enter password:
[root@localhost phpwind]#





















删除install.php

[root@localhost phpwind]# ll ins*

-rw-r--r-- 1 root root 32955 2010-12-21 install.php
[root@localhost phpwind]# rm install.php
rm:是否删除 一般文件 “install.php”? y
[root@localhost phpwind]#













虚拟主机设置

[root@localhost phpwind]# vim /etc/httpd/conf/httpd.conf
991 #</VirtualHost>
992 <VirtualHost 192.168.28.20:80>
993 ServerAdmin webmaster@dummy-host.example.com
994 DocumentRoot /var/www/html/phpwind
995 ServerName bbs.nxl.com
996 ErrorLog logs/phpwind-error_log
997 CustomLog logs/phpwind-access_log common
998 </VirtualHost>
:
测试结果




2.利用wordpress搭建论坛:
[root@localhost wordpress]# unzip wordpress_v3.0.5-zh_CN.zip
[root@localhost wordpress]# 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 97 08-19 21:14 index.php
drwxr-xr-x 22 root root 4096 08-19 21:22 phpwind
drwxr-xr-x 5 root root 4096 2011-02-09 wordpress





[root@localhost html]# cd wordpress/
[root@localhost wordpress]# ls
index.php wp-atom.php wp-cron.php wp-mail.php wp-settings.php
license.txt wp-blog-header.php wp-feed.php wp-pass.php wp-signup.php
readme.html wp-comments-post.php wp-includes wp-rdf.php wp-trackback.php
wp-activate.php wp-commentsrss2.php wp-links-opml.php wp-register.php xmlrpc.php
wp-admin wp-config-sample.php wp-load.php wp-rss2.php
wp-app.php wp-content wp-login.php wp-rss.php

[root@localhost wordpress]# cp wp-config-sample.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 37
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.00 sec)

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| phpwind |
| test |
| wordpress |
+--------------------+
5 rows in set (0.01 sec)
[root@localhost wordpress]# vim wp-config.php
/** WordPress 数据库的名称 */^M
define('DB_NAME', 'wordpress');^M
^M
/** MySQL 数据库用户名 */^M
define('DB_USER', 'root');^M
^M
/** MySQL 数据库密码 */^M
define('DB_PASSWORD', '123');^M
^M
/** MySQL 主机 */^M
define('DB_HOST', 'localhost');^M
^M
/** 创建数据表时默认的文字编码 */^M
define('DB_CHARSET', 'utf8');^M













访问主页面





[root@localhost html]# vim /etc/httpd/conf/httpd.conf

#</VirtualHost>
<VirtualHost 192.168.28.20:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /var/www/html/phpwind
ServerName bbs.nxl.com
ErrorLog logs/phpwind-error_log
CustomLog logs/phpwind-access_log common
</VirtualHost>
<VirtualHost 192.168.28.20:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /var/www/html/wordpress
ServerName bbs.qq.com
ErrorLog logs/wp-error_log
CustomLog logs/wp-access_log common
</VirtualHost>

[root@localhost html]# service httpd restart
停止 httpd: [确定]
启动 httpd: [确定]
测试结果








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