首先先在Linux上安装相应的库文件
yum install -y zlib-devel pcre pcre-devel apr apr-devel libxml2-devel openssl openssl-devel bzip2 bzip2-devel libpng libpng-devel freetype freetype-devel libcurl-devel libjpeg-devel libtool-ltdl-devel epel-release libmcrypt-devel
MySQL安装部分
mysql
tar zxvf mysql-5.1.73-linux-x86_64-glibc23.tar.gz
mv mysql-5.1.73-linux-x86_64-glibc23 /usr/local/mysql
useradd -s /sbin/nologin mysql
cd /usr/local/mysql
mkdir -p /data/mysql ; chown -R mysql:mysql /data/mysql
./scripts/mysql_install_db --user=mysql --datadir=/data/mysql
cp support-files/my-large.cnf /etc/my.cnf
cp support-files/mysql.server /etc/init.d/mysqld
chmod 755 /etc/init.d/mysqld
vim /etc/init.d/mysqld “datadir=/data/mysql”
chkconfig --add mysqld
chkconfig mysqld on
service mysqld start
安装Apache
httpd-2.2.24.tar.bz2
tar jxvf httpd-2.2.24.tar.bz2
cd httpd-2.2.24
./configure --prefix=/usr/local/apache2 --with-included-apr --enable-so --enable-deflate=shared --enable-expires=shared --enable-rewrite=shared
make && make install
php 安装
cd /usr/local/src
tar zxvf php-5.3.27.tar.gz cd php-5.3.27
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif
make && make install
cp php.ini-production /usr/local/php/etc/php.ini
AddType application/x-httpd-php .php
<Directory />
Options FollowSymLinks
DirectoryIndex index.html index.htm index.php
ServerName localhost:80
/usr/local/apache2/bin/apachectl start
安装Discuz
mkdir /data/www
cd /data/www
unzip Discuz_X3.2_SC_GBK.zip
mv upload/* .
在Apache的配置文件注销掉前面的#号
#Include conf/extra/httpd-vhosts.conf
vim /usr/local/apache2/conf/extra/httpd-vhosts.conf
<VirtualHost *:80>
DocumentRoot "/data/www"
ServerName www.test.com
#ServerAlias www.dummy-host.example.com
#ErrorLog "logs/dummy-host.example.com-error_log"
# CustomLog "logs/dummy-host.example.com-access_log" common
</VirtualHost>
/usr/local/apache2/bin/apachectl -t
/usr/local/apache2/bin/apachectl restart
/usr/local/mysql/bin/mysql -uroot
create database discuz;
grant all on discuz.* to ‘aaa‘@‘localhost‘ identified by ‘123456‘;
cd /data/www
chown -R daemon:daemon data uc_server/data uc_client/data config
本文出自 “10897714” 博客,请务必保留此出处http://10907714.blog.51cto.com/10897714/1730600
原文地址:http://10907714.blog.51cto.com/10897714/1730600