大橙子网站建设,新征程启航

为企业提供网站建设、域名注册、服务器等服务

RedHat5.4搭建Discuz论坛系统

Redhat 5.4搭建Discuz论坛系统
一:环境: redhat5.4 32位系统
二:操作系统安装请参考(yourmail系统安装文件)
三:系统底层架构: LAMP平台
LAMP+phpMyAadmin+discuz
四:实施步骤

______________________________________________________________________________
1:1检查Discuz系统所需的依赖包,软件包在系统盘去找即可。
libtermcap-2.0.8-46.1.i386.rpm
libtermcap-devel-2.0.8-46.1.i386.rpm
libxml2-2.6.26-2.1.2.8.i386.rpm
libxml2-devel-2.6.26-2.1.2.8.i386.rpm
libxml2-python-2.6.26-2.1.2.8.i386.rpm
openssl-0.9.8e-12.el5.i386.rpm
openssl-0.9.8e-12.el5.i686.rpm
openssl-devel-0.9.8e-12.el5.i386.rpm
openssl-perl-0.9.8e-12.el5.i386.rpm
glib-1.2.10-20.el5.i386.rpm
gd-progs-2.0.33-9.4.el5_1.1.i386.rpm
gdm-docs-2.16.0-56.el5.i386.rpm
gdk-pixbuf-0.22.0-25.el5.i386.rpm
gdk-pixbuf-devel-0.22.0-25.el5.i386.rpm
gtk+-1.2.10-56.el5.i386.rpm
gtk+-devel-1.2.10-56.el5.i386.rpm
lm_sensors-2.10.7-4.el5.rpm
net-snmp-libs-5.3.2.2-7.el5.rpm
net-snmp-utils-5.3.2.2-7.el5.rpm
net-snmp-5.3.2.2-7.el5.rpm
freeradius-1.1.3-1.4.el5.rpm
freeradius-MySQL-1.1.3-1.4.el5.rpm
libtool-ltdl-devel-1.5.22-6.1.i386.rpm
gamin-devel-0.1.7-8.el5.i386.rpm
expect-5.43.0-5.1.i386.rpm
expect-devel-5.43.0-5.1.i386.rpm
pcre-devel-6.6-2.el5_1.7.i386.rpm

______________________________________________________________________________
1:2 apache
rpm -e httpd --nodeps
tar -zxvf httpd-2.2.15.tar.gz -C /usr/src
cd /usr/src/httpd-2.2.15
配置
./configure --prefix=/usr/local/http --enable-rewrite --enable-so --enable-auth-digest --enable-cgi --with-ssl=/usr/lib --enable-ssl --enable-suexec --with-suexec-docroot=/usr/local/http/htdocs 
编译安装
make && make install
cd /usr/local/http/bin
vim apachectl        添加如下
#! /bin/sh
# chkconfig: 35 85 15
# description: Apache is a World Wide Web Server

cp /usr/local/http/bin/apachectl /etc/init.d/httpd
chmod o+x /etc/init.d/httpd
chkconfig --add httpd
chkconfig httpd on
配置apache 用户和属组
useradd -M -s /sbin/nologin postfix
cd /usr/local/http/conf/
vim httpd.conf
User postfix
Group postfix
启动apache
service httpd start
http://localhost
______________________________________________________________________________
1.3 mysql
rpm -e mysql –nodeps
userdel -r mysql
useradd -M -s /sbin/nologin mysql
tar -zxvf mysql-5.1.44.tar.gz -C /usr/src/
cd /usr/src/mysql-5.1.44/
./configure --prefix=/usr/local/mysql --with-mysqld-user=mysql --enable-thread-safe-client  --enable-local-infile --with-charset=gbk --with-low-memory
Make
Make install
cp support-files/my-medium.cnf /etc/my.cnf
/usr/local/mysql/bin/mysql_install_db --user=mysql
chown -R root:mysql /usr/local/mysql/
chown -R mysql /usr/local/mysql/var/
echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf
ldconfig
/usr/local/mysql/bin/mysqld_safe --user=mysql &
查看进程
ps -ef | grep mysqld_safe
root      6315  4638  0 18:44 pts/2    00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --user=mysql
是否开启3306端口
netstat -ntulp | grep mysql
tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      6414/mysqld   
    
cp support-files/mysql.server /etc/init.d/mysqld
chmod +x /etc/init.d/mysqld
chkconfig --add mysqld
chkconfig mysqld on
export PATH=$PATH:/usr/local/mysql/bin/
echo "PATH=$PATH:/usr/local/mysql/bin/" >> /etc/profile
mysqladmin -u root password 123456
mysql -u root –p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.44-log Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> quit
______________________________________________________________________________
1:4 PHP
安装libmcrypt mhash mcrypt解决无法加载mcrypt
(1)
tar -zxvf libmcrypt-2.5.8.tar.gz -C /usr/src/
cd /usr/src/libmcrypt-2.5.8/
./configure
Make
Make install
echo "/usr/local/lib" >> /etc/ld.so.conf
ldconfig
(2)
tar -zxvf mhash-0.9.9.9.tar.gz -C /usr/src/
cd /usr/src/mhash-0.9.9.9/
./configure
Make
Make install
(3)
tar -zxvf mcrypt-2.6.8.tar.gz -C /usr/src/
cd /usr/src/mcrypt-2.6.8/
LD_LIBRARY_PATH=/usr/local/lib ./configure
Make
Make install

rpm -e php --nodeps
tar -zxvf php-5.2.13.tar.gz -C /usr/src
cd /usr/src/php-5.2.13
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/http/bin/apxs --with-config-file-path=/usr/local/php --with-gd --with-freetype-dir --with-mysql=/usr/local/mysql --enable-sockets --enable-mbstring --with-jpeg-dir --with-png-dir --disable-json --with-zlib --with-mysqli --with-mcrypt
make
make install
cp php.ini-dist /usr/local/php/php.ini
vim /usr/local/http/conf/httpd.conf     启用php模块
53 LoadModulephp5_module                   modules/libphp5.so                                                                                 
54 AddType application/x-httpd-php .php                                      
167
168       DirectoryIndexindex.phpindex.html                                  
169

vim /usr/local/http/htdocs/index.php           
          phpinfo();
?>
service apache stop     关闭
service apache start    启动
http://localhost
______________________________________________________________________________
1:5 phpMyAdmin数据库管理软件
unzip phpMyAdmin-3.3.1-all-languages.zip -d /usr/local/http/htdocs/
cd /usr/local/http/htdocs/
mv phpMyAdmin-3.3.1-all-languages myadmin
cd phpMyAdmin/
cp config.sample.inc.php config.inc.php
vim config.inc.php
18 $cfg['blowfish_secret'] = '123456'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
service httpd stop
service httpd start
http://localhost/myadmin
______________________________________________________________________________
1:6 架设Discuz论坛
mysql -u root –p
create database bbsdb;
grant all on bbsdb.* to runbbs@localhost identified by '123456';
unzip Discuz_7.2_FULL_SC_UTF8.zip -d discus
mv discus/upload /usr/local/http/htdocs/bbs
cd /usr/local/http/htdocs/bbs/
chown -R postfix config.inc.php p_w_uploads/ forumdata/  uc_client/data/cache/ 
访问以下地址
http://localhost/bbs/install/

创新互联公司专注于中大型企业的成都网站建设、成都网站制作和网站改版、网站营销服务,追求商业策划与数据分析、创意艺术与技术开发的融合,累计客户1000多家,服务满意度达97%。帮助广大客户顺利对接上互联网浪潮,准确优选出符合自己需要的互联网运用,我们将一直专注品牌网站设计和互联网程序开发,在前进的路上,与客户一起成长!

cd /usr/local/http/htdocs/bbs/
mv install/ install.lock
chmod o-rx install.lock/
访问bbs前台:http://localhost/bbs/
访问bbs后台:http://localhost/bbs/admincp.php

 

为了技术方面交流欢迎加入QQ:1464251539


网页标题:RedHat5.4搭建Discuz论坛系统
本文URL:http://dzwzjz.com/article/jojcoc.html
在线咨询
服务热线
服务热线:028-86922220
TOP