Chinaunix首页 | 论坛 | 博客
  • 博客访问: 245318
  • 博文数量: 188
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: -30
  • 用 户 组: 普通用户
  • 注册时间: 2017-03-29 11:17
文章分类
文章存档

2013年(8)

2012年(5)

2011年(13)

2010年(26)

2009年(63)

2008年(20)

2007年(32)

2006年(21)

分类: LINUX

2006-03-01 15:49:55

环境:Solaris9 for Sparc+Apache2+PHP+Mysql+”论坛
软件:   httpd-2.0.59
         mysql-5.0.24 
         php-4.4.4-tar.gz

         Discuz!_5.0.0_SC_GBK
所需安装的软件包括:

 Automake  Autoconf make flex bison  m4

 -1.95.5,

-1.11,

 -1.83,

 -1.2.3,

-4.2.52,


libgcc-3.3
gcc-3.3.32
上述软件可以从下载

修改环境变量
vi /etc/profile
在最后写入:
PATH=$PATH:/usr/ccs/bin:/usr/local/bin: /usr/local/mysql/bin:
/usr/local/httpd/bin:/usr/local/mysql/share/mysql:/usr/include:

/usr/ucb:/usr/local/sbin

LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:/lib:/usr/local/mysql/lib/mysql/:/usr/local/lib/sparcv9:$ LD_LIBRARY_PATH

export LD_LIBRARY_PATH  PATH

保存退出
执行./etc/profilelogout一下使修改立即生效。
二 安装依赖软件

1.      #gunzip  zlib-1.2.1-sol9-sparc-local.gz

2.      #gunzip gcc-3.3.2-sol9-sparc-local.gz

3.       #gunzip perl-5.8.5-sol9-sparc-local.gz

4.      #pkgadd -d gcc-3.3.2-sol9-sparc-local.gz

5.      # pkgadd –d perl-5.8.5-sol9-sparc-local.gz

6.      # pkgadd –d zlib-1.2.1-sol9-sparc-local.gz

7.      # gunzip ncurses-5.4-sol9-sparc-local.gz

… …

依次安装依赖的软件

安装Mysql

8.#gunzip mysql-5.0.24.tar.gz

9.#tar xvf mysql-5.0.24.tar

10.#cd mysql-5.0.24

11.#CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors            -fno-exceptions-fno-rtti" ./configure --prefix=/usr/local/mysql --with-mysqld-user=mysql --with-charset=gbk --with-extra-charsets=all --with-low-memory  --sysconfdir=/etc/my.ini   --localstatedir=/var/lib/mysql

12.#groupadd mysql

13#useradd –g mysql mysql

14.# chown -R root /usr/local/mysql

15.#chgrp -R mysql /usr/local/mysql

16.#chown -R mysql /usr/local/mysql/var

17.# cd /var/tmp/mysql-4.0.21

18.# cp support-files/my-medium.cnf  /etc/my.cnf

19#/usr/local/mysql/bin/mysql_install_db  --user=mysql

20.#  /usr/local/mysql/bin/mysqladmin -u root password ‘123456’

# 设置引导文件

21.# cp /usr/local/mysql/share/mysql/mysql.server  /etc/init.d/mysqld

22.# chmod 744 /etc/init.d/mysqld

23.#ln -s /etc/init.d/mysqld S90mysql

24.#ln -s /etc/init.d/mysqld K90mysql

# 启动数据库
25.#cd /usr/local/mysql/bin
26.#./mysqld_safe --user=mysql &

27.#/etc/init.d/mysqld stop

28.#/etc/init.d/mysqld start

29. # 连接测试
30.#cd /usr/local/mysql/bin
31.#./mysql -u root –p

ENTER PASSWORD:

 

安装Apache

32.#gunzip httpd-2.0.59.tar.gz

33.#tar xvf httpd-2.0.59.tar

34.#cd httpd-2.0.59

35.#./configure --prefix=/usr/local/httpd --with-charset=gbk --with-extra-charsets=all --with-mods-shared=all    --enable-so  

--with-config-file-path=/usr/local/httpd/conf --enable-track-vars    --enable-cgi 

36.#make

37.#make install

安装PHP

38.#gunzip php-4.4.4-tar.gz

39.#tar xvf php-4.4.4-tar.gz

40.#cd php-4.4.4

41.#./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=/etc

注:安装PEAR:

 lynx –source  

42.make;

43.make install

修改配置文件:

44.# vi /usr/local/httpd/conf/httpd.conf

Group #-1改为Group nobody

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

AddType application/x-httpd-php .php

AddType application/x-httpd-php .php .php3 .phtml 
AddType application/x-httpd-php-source .phps
找到下面一行在后面加上index.php,这表示网站的默认页也能够为index.php 
DirectoryIndex index.html index.html.var index.php 
 # Add this line for PHP module 
LoadModule php4_module modules/libphp4.so

45.#创建index.php

   vi /usr/local/httpd/htdocs/index.php
   写入:
46.#chmod 755 index.php
47.#apachectl start
48.
然后在IE中输入:

 测试一下是否成功了。

安装论坛

将下载下来的包中discuz5 upload目录下的文件解压并考到APACHE的网页根目录

49#unzip Discuz!_5.0.0_SC_GBK //windows下将.rar格式改为.zip格式

50.将以下目录属性改为777

o                                  ./templates

o                                  ./templates/default

o                                  ./templates/default/*.*

o                                  ./attachments

o                                  ./customavatar

o                                  ./forumdata

o                                  ./forumdata/cache

o                                  ./forumdata/templates

 

51.mysql中创建一个数据库discuz: (要将discuz.sql导入数据库discuz)
mysql>create database discuz;

Mysql>use discuz;//转到discuz这个数据库上

Mysql>source /usr/local/httpd/htdocs/install/discuz.sql;// discuz.sql导入数据库discuz

Mysql>grant create,drop,select,insert,update,delete on discuz.* to admin@localhost Identified by "123456";//discuz数据库创建一个用户

 

52.配置/usr/local/httpd/htdocs/config.in.php文件里的相关信息,
$dbhost = '';                      // 数据库服务器
 $dbuser = 'admin';                  // 数据库用户名
 $dbpw = '123456';                  // 数据库密码
 $dbname = 'discuz';                // 数据库名
 $adminemail = 'admin@test.com.cn'; // 论坛系统 Email
 

53.重起数据库

#/etc/init.d/mysqld restart

 

54.重启一下APACHE

#/usr/local/httpd/bin/apachectl restart

 

55.IE地址栏输入:

安装论坛。
阅读(1841) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~