中国IT动力,最新最全的IT技术教程
最新100篇 | 推荐100篇 | 专题100篇 | 排行榜 | 搜索 | 在线API文档 | 网通镜像
首 页 | 程序开发 | 操作系统 | 软件应用 | 图形图象 | 网络应用 | 精文荟萃 | 教育认证 | 硬件维护 | 未整理篇 | 站长教程
ASP JS PHP工程 ASP.NET 网站建设 UML J2EESUN .NET VC VB VFP 网络维护 数据库 DB2 SQL2000 Oracle Mysql
服务器 Win2000 Office C DreamWeaver FireWorks Flash PhotoShop 上网宝典 CorelDraw 协议大全 网络安全 微软认证
硬件维护  CPU  主板  硬盘  内存  显卡  显示器  键盘鼠标  声卡音箱  打印机  机箱电源  BIOS  网卡  C#  Java  Delphi  vs.net2005
  当前位置:> 程序开发 > 编程语言 > 综合其它
sol9_x86+apache+mysql+php+discuz
作者:未知 时间:2005-09-13 23:34 出处:Blog.ChinaUnix.net 责编:chinaitpower
              摘要:sol9_x86+apache+mysql+php+discuz
sol9_x86+apache+mysql+php+discuz

 
环境:VM+Solaris9 for x86
软件:httpd-2.0.52
mysql-4.0.16
php-4.3.9
Discuz-2.2F

sol9_x86+apache+mysql+php+discuz

 
环境:VM+Solaris9 for x86
软件:httpd-2.0.52
mysql-4.0.16
php-4.3.9
Discuz-2.2F
参考的文档有:
http://bbs.chinaunix.net/forum/viewtopic.php?t=343241&highlight=llzqq
http://bbs.chinaunix.net/forum/viewtopic.php?t=43778
http://bbs.chinaunix.net/forum/viewtopic.php?t=329698
http://bbs.chinaunix.net/forum/viewtopic.php?t=129215&highlight=sql_lex.cc
http://bbs.chinaunix.net/forum/viewtopic.php?t=265341
http://bbs.chinaunix.net/forum/viewtopic.php?t=193717
http://bbs.chinaunix.net/forum/6/040921/411198.html

所需安装的软件包括:
bison-1.875d
perl-5.8.5
ncurse-5.4
autoconf-2.59
automake-1.9
make-3.80
zlib-1.2.1
gcc-3.4.1(libgcc-3.4.1在这其中)
上述软件可以从http://www.sunfreeware.com/下载


一、修改路径
vi /etc/profile
在最后写入:
PATH=$PATH:/usr/ccs/bin:/usr/local/lib:/usr/local/bin:/usr/lib:/usr/local/httpd/bin:/usr/local/mysql/share/mysql:/usr/local/mysql/bin

ysql/bin
CC=gcc
CFLAGS="-O6"
CXX=gcc
CXXFLAGS="-O6 -felide-constructors -fno-exceptions -fno-rtti"
保存退出
执行. /etc/profile
使修改立即生效。

二、编译MYSQL
useradd mysql
groupadd mysql
#./configure --prefix=/usr/local/mysql --with-mysqld-user=mysql --with-charset=gb2312 --with-extra-charsets=all

--with-unix-socket-path=/usr/local/mysql/var/mysql.sock
如在编译过程中出现:
In file included from /usr/include/sys/reg.h:13,
from /usr/include/sys/regset.h:24,
from /usr/include/sys/ucontext.h:21,
from /usr/local/lib/gcc/i386-pc-solaris2.9/3.4.0/include/sys/signal.h:249,
from /usr/include/signal.h:27,
from mysql.cc:40:
/usr/include/ia32/sys/reg.h:300: error: `upad128_t" does not name a type
/usr/include/ia32/sys/reg.h:301: error: `upad128_t" does not name a type
/usr/include/ia32/sys/reg.h:331: error: `upad128_t" does not name a type
make[2]: *** [mysql.o] Error 1
make[2]: Leaving directory `/export/home/z3j/mysql-4.0.18/client"
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/export/home/z3j/mysql-4.0.18"
make: *** [all] Error 2

请修改/usr/include/ia32/sys/reg.h
在第245行
写入
typedef union {
long _q;
uint32_t _l[4];
} upad128_t;


如果出现:
sql_lex.cc: In function `void lex_init()":
sql_lex.cc:85: `symbols" undeclared (first use this function)
sql_lex.cc:85: (Each undeclared identifier is reported only once
sql_lex.cc:85: for each function it appears in.)
sql_lex.cc:87: `sql_functions" undeclared (first use this function)
sql_lex.cc: In function `int find_keyword(LEX *, unsigned int, bool)":
sql_lex.cc:171: implicit declaration of function `int get_hash_symbol(...)"
sql_lex.cc:171: initialization to `SYMBOL *" from `int" lacks a cast

解决办法:
cd sql
make gen_lex_hash
./gen_lex_hash > lex_hash.h (如果提示xx文件找不到,就把/usr/local/lib/的xx文件cp到/usr/lib下)
make

# cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf
# /usr/local/mysql/bin/mysql_install_db
# chmod -R 1777 /usr/local/mysql/var
# chown -R mysql /usr/local/mysql/
# chgrp -R mysql /usr/local/mysql/
启动MYSQL:
# /usr/local/mysql/share/mysql/mysql.server start
# /usr/local/mysql/bin/mysqladmin -u root password 123456
# cp /usr/local/lib/libncurses.so.5 /usr/local/mysql/lib/mysql
# /usr/local/mysql/bin/mysql -uroot -p123456



三、编译APACHE

#./configure --prefix=/usr/local/httpd --enable-track-vars --enable-cgi --with-config-file-path=/usr/local/httpd/conf

--with-charset=gb2312 --with-extra-charsets=all --enable-so;make;make install

修改配置文件:
vi /usr/local/httpd/conf/httpd.conf
将Group #-1改为Group nobody

找到#AddType application/x-tar .tgz 这行,在下面加一行。前面不要加#号。
AddType application/x-httpd-php .php

找到下面一行在后面加上index.php,这表示网站的默认页也能够为index.php

DirectoryIndex index.html index.html.var index.php

在行AddDefaultCharset ISO-8859-1下加入:
AddDefaultCharset GB2312
并注释掉AddDefaultCharset ISO-8859-1



四、编译PHP
#./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/httpd/bin/apxs --enable-track-vars

--enable-force-cgi-redirect --with-config-file-path=/usr/local/php/etc;make;make install

vi /usr/local/httpd/htdocs/index.php
写入:
#chmod 755 index.php
#apachectl start
然后在IE中输入ip,测试一下是否成功了。


五、安装Discuz论坛
将下载下来的包中的Discuz!目录下的文件考到APACHE的网页根目录
在mysql中创建一个数据库bbs:
mysql>create database bbs;
重启一下APACHE:
#apachectl restart
在IE地址栏输入:http://ip/install.php
按提示操作:
# chmod 707 config.php
# chmod 777 ./tem*
# chmod 777 ./for*
# chmod 777 ./foru*/templ*
# chmod 777 ./foru*/cache
接下来自己看提示操作就OK了。
最后删除网页根目录下的install.php

关闭本页
 
首页 | 投资与合作 | 服务条款 | 隐私政策 | 收藏本站 | 设为首页 | 新用户注册 | 免责声明 | 使用帮助
Copyright ©2005-2008 chinaitpower.com All rights reserved. www.chinaitpower.com 版权所有