【合肥清默】Linux下搭建lamp论坛(phpwind+wordpress+discus)
:lamp简介:Linux+Apache+Mysql+Perl/PHP/Python一组常用来搭建动态网站或者服务器的开源软件,本身都是各自独立的程序,但是因为常被放在一起使用,拥有了越来越高的兼容度,共同组成了一个强大的Web应用程序平台。该软件开发的项目在软件方面的投资成本较低,因此受到整个IT界的关注。从网站的流量上来说,70%以上的访问流量是LAMP来提供的,LAMP是最强大的网站解决方案.二:phpwind,wordpress,discus,discus简介:PHPWind(简称:PW)是一个基于PHP和MySQL的论坛程序,是国内最受欢迎的通用型论坛程序之一.WordPress 是一种使用 PHP语言和 MySQL数据库开发的开源、免费的 Blog(博客,网站)引擎,用户可以在支持 PHP 和 MySQL 数据库的服务器上建立自己的blog.Discuz是北京康盛新创科技有限责任公司推出的一套通用的社区论坛软件系统,是全球成熟度最高、覆盖率最大的论坛软件系统之一。三:创建论坛:phpwind:1:# mkdir /mnt/cdrom# mount /dev/cdrom /mnt/cdrom/# vim /etc/yum.repos.d/rhel-debuginfo.repo #编辑本地yum,如图:http://img1.51cto.com/attachment/201208/28/5493845_1346163760pAPY.png2:# yum install httpd #安装http服务器# yum install mysql mysql-server #安装mysql工具包和mysql-server# yum list all |grep php #搜索安装php需要的包# yum install php php-mbstringphp-mysql #安装这三个软件包# service httpd start #开启http服务器# service mysqld start #开启mysql服务器# chkconfig httpd on #开机自动启动http服务器# chkconfig mysqld on #开机自动启动mysql服务器# cd /var/www/html/# vim index.php #编辑一个动态的页面,测试php是否能被apache调用http://img1.51cto.com/attachment/201208/28/5493845_1346163764d3sD.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346163770GuhP.png# vim index.php #编辑动态页面,测试mysql是否能被php调用http://img1.51cto.com/attachment/201208/28/5493845_1346163773XnCC.pnghttp://img1.51cto.com/attachment/201208/28/5493845_13461637762pmx.png 3:# cd /mnt/cdrom/Server/# rpm -ivh vsftpd-2.0.5-16.el5.i386.rpm# vim /etc/vsftpd/vsftpd.confhttp://img1.51cto.com/attachment/201208/28/5493845_1346163778aUr9.png# cd /var/ftp# chmod o+w pub/# service vsftpd restart利用ftp将phpwind,wordpress传入虚拟机中:http://img1.51cto.com/attachment/201208/28/5493845_1346163781T7HS.png# cd /var/ftp/pub/ http://img1.51cto.com/attachment/201208/28/5493845_1346163785r5Wv.png4:# mv phpwind_GBK_8.3.zip /root/ #将这些包全部移动到/root中# mv Stratex.zip/root/# mv WireMagazine.zip/root/# mv wordpress_v3.0.5-zh_CN.zip/root/# unzip phpwind_GBK_8.3.zip #解压文件# cd phpwind_GBK_8.3# mv upload/ /var/www/html/phpwind #将网页upload文件移动到/var/www/html中,并重命名为phpwind# vim /etc/httpd/conf/httpd.conf #编辑apache配置文件,更改论坛页面字体http://img1.51cto.com/attachment/201208/28/5493845_1346163787U5Pg.png# service httpd restarthttp://img1.51cto.com/attachment/201208/28/5493845_13461638050c5m.png# chmod -R attachment/ #更改上图中目录属性为777,-R表示递归# chmod -R 777 data/ #更改上图中目录属性为777,-R表示递归# chmod -R 777 html/ #更改上图中目录属性为777,-R表示递归http://img1.51cto.com/attachment/201208/28/5493845_1346163811ZxNV.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346163815HPMT.png# mysqladmin -u root -p password '123' #为数据库创建用户名root,密码“123”http://img1.51cto.com/attachment/201208/28/5493845_1346163817LgfW.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346163819tmG2.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346163824M9tA.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346163829GWlX.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346163831mL76.png# cd /var/www/html/phpwind/# rm install.phphttp://img1.51cto.com/attachment/201208/28/5493845_1346163837svcA.pnghttp://img1.51cto.com/attachment/201208/28/5493845_13461638381unD.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346163840fiwy.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346163842j5Ul.pnghttp://img1.51cto.com/attachment/201208/28/5493845_13461638446yCG.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346163845ojdP.pngwordpress:1:# unzip wordpress_v3.0.5-zh_CN.zip #解压wordpress# ll wordpress-3.0.5-zh_CN/# mv wordpress-3.0.5-zh_CN/wordpress//var/www/html/ #将wordpress文件移动到/var/www/html# cd /var/www/html/wordpress/# cp wp-config-sample.phpwp-config.php #产生一个wp-config.php文件# chown apache.apache wp-config.php #将wp-config.php文件交给apache进程处理# mysql -u root –p #登录数据库http://img1.51cto.com/attachment/201208/28/5493845_1346163847eFP4.png2:# cd /var/www/html/wordpress/# vim wp-config.phphttp://img1.51cto.com/attachment/201208/28/5493845_1346163849Es3m.png# service httpd restarthttp://img1.51cto.com/attachment/201208/28/5493845_13461638524eZW.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346163857CLHU.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346163858n71z.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346163860qBn1.pnghttp://img1.51cto.com/attachment/201208/28/5493845_13461638623wSb.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346163876qTg4.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346163876I0Gv.png进入后台管理页面:http://img1.51cto.com/attachment/201208/28/5493845_1346163882uh8B.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346163894uQUX.png修改/var/www/html/wordpress/wp-content权限:# cd /var/www/html/wordpress# chmod o+w wp-content/ #增加写的权限http://img1.51cto.com/attachment/201208/28/5493845_1346163921C71O.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346163923kyzp.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346163929FwCV.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346163935Z9oC.png# cd uploads/# cp Stratex.zip ../themes/# cd ../themes/# unzip Stratex.zip# unzip Stratex.zip #将Stratex.zip解压缩 http://img1.51cto.com/attachment/201208/28/5493845_1346163938YESC.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346163945qId5.png建立基于主机头的虚拟主机,用不同的主机名登录论坛:# vim /etc/httpd/conf/httpd.confhttp://img1.51cto.com/attachment/201208/28/5493845_1346163946R5kw.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346163948uII8.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346163952T3Nx.png http://img1.51cto.com/attachment/201208/28/5493845_1346163953cMFH.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346163960Spah.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346163965PFFd.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346163976omsp.pngDiscuz:(安装discus并将discus添加到虚拟主机中)# cd /var/ftp/pub/# mv Discuz_X2.5_SC_GBK.zip /root/# cd# unzip Discuz_X2.5_SC_GBK.zip #解压文件# mvupload//var/www/html/# cd /var/www/html/# mkdidr discus #新建目录# cp -r readme/ ./discus/ #将readme目录移动到discus中# cp -r upload/ ./discus/# cp -r utility/ ./discus/# vim /etc/httpd/conf/httpd.confhttp://img1.51cto.com/attachment/201208/28/5493845_1346163977qXj1.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346163983hmvX.png# service httpd restart http://img1.51cto.com/attachment/201208/28/5493845_1346163986DWU1.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346163988C7nI.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346163990YEtM.png# cd discus/# chmod -R o+wconfig/# chmod -R o+wdata/# chmod -R o+wuc_client/# chmod -R o+wuc_server/http://img1.51cto.com/attachment/201208/28/5493845_1346163992nR0C.pnghttp://img1.51cto.com/attachment/201208/28/5493845_13461639944Yoc.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346163996kQde.pnghttp://img1.51cto.com/attachment/201208/28/5493845_13461640004viJ.png# mysql -u root –p #登录数据库mysqlhttp://img1.51cto.com/attachment/201208/28/5493845_13461640026vA2.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346164005lRik.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346164007XJbK.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346164008eLiv.pnghttp://img1.51cto.com/attachment/201208/28/5493845_1346164011cqZk.pnghttp://img1.51cto.com/attachment/201208/29/5493845_1346202949MngL.pnghttp://img1.51cto.com/attachment/201208/29/5493845_1346202978ht5c.pnghttp://img1.51cto.com/attachment/201208/29/5493845_1346202993rNO0.png能把图重传一下吗?{:6_277:} Moose 发表于 2013-11-20 11:43 static/image/common/back.gif
能把图重传一下吗?
好的 这个是已经写好的文章图片是显示不了了 不过你去康哥的博客去看看吧,在里面找这篇文章.http://blog.sina.com.cn/qmcisco
页:
[1]