9555cw搭建完整版
1.上传9555cw_depo包到服务器
2.安装mysql(server client devel)
3.安装apache
首先需要安装pcre :./configure --prefix=/usr/local/pcre
make && make install
然后安装:apache (本来还需要安装APR和APR-util的,现在我已经集成到apache包中了)
./configure --prefix=/usrl/local/apache2 --with-included-apr --with-pcre=/usr/local/pcre
make && makeinstall
3.安装php
由于我们网站PHP脚本需要mbstring来支持,所以需要添加mbstring,需要使用mysql数据库,所以呢
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --enable-mbstring=cn
4.导入备份的数据库
mysql -u root -p 9555cw < xxxxx.sql
5.拷贝网页文件到/usr/local/apache2/htdocs/
6.修改http.conf文件,directory节/usr/local/apache2/htdocs:AllowOverwrite all
7.浏览器测试
FQA:
1.安装好的数据库没有权限操作进入数据库
#/etc/init.d/mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD(’newpassword’) where USER=’root’;
mysql> FLUSH PRIVILEGES;
mysql> quit
# /etc/init.d/mysql restart
# mysql -uroot -p
Enter password: <输入新设的密码newpassword>
mysql>
方法二:
直接使用/etc/mysql/debian.cnf文件中[client]节提供的用户名和密码:
# mysql -udebian-sys-maint -p
Enter password: <输入[client]节的密码>
mysql> UPDATE user SET Password=PASSWORD(’newpassword’) where USER=’root’;
mysql> FLUSH PRIVILEGES;
mysql> quit
# mysql -uroot -p
Enter password: <输入新设的密码newpassword>
mysql>
---------------------------------------------------------------
创建数据库时,冒出这一句:
ERROR 1820 (HY000): You must SET PASSWORD before executing this statement
mysql> SET PASSWORD = PASSWORD('123456');
Query OK, 0 rows affected (0.03 sec)
mysql> create database yan1;
Query OK, 1 row affected (0.00 sec)
DO It!
2. 网站首页可以出来,但是点击导航却提示页面不存在
只是网站伪静态没有正确工作的缘故.有两方面需要注意查看:
first:http.conf配置中的网页根目录是否有权限访问
sec:网站根目录下是否有个.htaccess文件,拷贝的时候需要用-a选项
3.二级域名跳转,提示:Warning: Cannot modify header information - headers already sent by (output started at /usr/local/apache2/htdocs/common/page.class.php:80) in /usr/local/apache2/htdocs/top.php on line 8
在网站最先加载的地方加上一句:ob_start();
浙公网安备 33010602011771号