建立单位局域网网站过程记录
一、环境:单台PC机,centos5.5系统,系统自带的mysql和appach程序。
二、搭建phpwind8.7论坛软件:
1、由于自带的mysql和appach,没有做扩展,所以默认情况下,并没有做mysql支持,需要在其他处理前,安装几个扩展包,这些扩展包在centos光盘中有,分别是:
php-mysql
php-gd
php-imap
php-ldap
php-odbc
php-pear
php-xml
php-xmlrpc
php-mbstring
这里只提供大概的名字,具体的版本号就不写了,光盘里面都有,注意其中有几个包,是已经安装了的,有几个包安装的时候,需要先安装其他包,不多,好像只有一二个,所以不详细写了。
2、在安装扩展包完成后,就可以启动mysql和appach了:
/etc/init.d/mysqld start
/etc/init.d/httpd start
启动完成后,检查PHP设置情况:
在/var/www/html下,用vi创建一个info.php文件:
phpinfo();
?>
然后在其他机器或者本机用浏览器打开:http://IP地址/info.php。就可以查看,如下图:
其中,一直向下滑动滚动条,可以看到:
这就是PHP信息中的MYSQL支持项。
PHP设置就到此了。
3、开始用PHPWIND8.7创建论坛。
在创建前,最好先注意下,大部分用户浏览器预设的编码是什么方式,PHPWIND提供三个编码方式,最好是安装编码相对应的PHPWIND,为了只是在打开浏览器时不用手动切换编码,一般我们中文,有三种,繁体big5,简体UTF-8,简体GBK。
具体的创建办法:
解压后,有两个文件夹,上传upload中得文件到/var/www/html目录中。
修改文件和文件夹书写权限:
chmod 777 attachment/
chmod 777 attachment/cn_img/
chmod 777 attachment/photo/
chmod 777 attachment/pushpic/
chmod 777 attachment/thumb/
chmod 777 attachment/upload/
chmod 777 attachment/upload/middle/
chmod 777 attachment/upload/small/
chmod 777 attachment/upload/tmp/
chmod 777 attachment/mini/
chmod 777 attachment/mutiupload/
chmod 777 data/
chmod 777 data/bbscache/
chmod 777 data/forums/
chmod 777 data/groupdb/
chmod 777 data/guestcache/
chmod 777 data/tplcache/
chmod 777 data/style/
chmod 777 data/tmp/
chmod 777 html/
chmod 777 html/js/
chmod 777 html/stopic/
chmod 777 html/read/
chmod 777 html/channel/
chmod 777 html/portal/bbsindex/
chmod 777 html/portal/bbsindex/main.htm
chmod 777 html/portal/bbsindex/config.htm
chmod 777 html/portal/bbsindex/index.html
chmod 777 html/portal/bbsradio/
chmod 777 html/portal/bbsradio/main.htm
chmod 777 html/portal/bbsradio/config.htm
chmod 777 html/portal/bbsradio/index.html
chmod 777 html/portal/oindex/
chmod 777 html/portal/oindex/main.htm
chmod 777 html/portal/oindex/config.htm
chmod 777 html/portal/oindex/index.html
chmod 777 html/portal/groupgatherleft/main.htm
chmod 777 html/portal/groupgatherleft/config.htm
chmod 777 html/portal/groupgatherleft/index.html
chmod 777 html/portal/groupgatherright/main.htm
chmod 777 html/portal/groupgatherright/config.htm
chmod 777 html/portal/groupgatherright/index.html
chmod 777 html/portal/userlist/main.htm
chmod 777 html/portal/userlist/config.htm
chmod 777 html/portal/userlist/index.html
chmod 777 html/portal/usermix/main.htm
chmod 777 html/portal/usermix/config.htm
chmod 777 html/portal/usermix/index.html
其中有可能下面三个文件丢失,确信是空白文件,所以可以用VI直接创建空文件。然后再修改权限。
html/portal/groupgatherleft/index.html
html/portal/groupgatherright/index.html
html/portal/userlist/index.html
打开浏览器,直接输入http://IP地址。就直接进入了安装过程。按照向导安装就可以了。注意mysql数据库设置页的时候,如果没有对mysql数据库进行设置,而是直接启动数据库的话,ROOT用户的密码应该是空的,所以不填就可以了。
到了最后一步,有可能提示:您已经安装过 phpwind,如需重新安装,请删除此文件(http://IP地址/data/install.lock)再进行安装。
这个错误,如果发生,那么不管是不是第一次安装,都有可能发生的。可以不管这个错误,在linux系统中删除install.php文件。删除后重新进入相应的IP地址。就直接进入论坛了。
到此,论坛搭建完成。
三、修改PHPWIND带来的一些错误。
1、在安装完成后,最好是先进入后台看看,检查其中数据》文件检查,看下里面的文件属性检查,我之前一个错误就是:发帖后没有成功返回,而是提供一个错误,这个就是由一个文件夹data/package属性错误导致的,修改过来就成功返回了。
2、IE6,在打开论坛的时候,会出现一个提示thread.php文件错误,然后就会终止操作,退出网站,办法:
在根目录找到:global.php
在里边查找
$output .= "
var url=\"http://init.phpwind.net/init.php?sitehash={$GLOBALS[db_sitehash]}&v={$GLOBALS[wind_version]}&c=$ceversion\";
var g=d.createElement(t);g.async=1;g.src=url;d.body.appendChild(g)}(document,\"script\"));";
这段代码,然后删除就可以了。从字面看,是向PHPWIND网站报告一些内容,由于局域网无法上互联网,所以导致错误。
3、其他错误暂时没有,待出现后补充。