所需軟件自行準(zhǔn)備
創(chuàng)新互聯(lián)公司-專業(yè)網(wǎng)站定制、快速模板網(wǎng)站建設(shè)、高性價(jià)比貢井網(wǎng)站開發(fā)、企業(yè)建站全套包干低至880元,成熟完善的模板庫,直接使用。一站式貢井網(wǎng)站制作公司更省心,省錢,快速模板網(wǎng)站建設(shè)找我們,業(yè)務(wù)覆蓋貢井地區(qū)。費(fèi)用合理售后完善,10多年實(shí)體公司更值得信賴。
systemctl stop firewalld
setenforce 0
1.編譯安裝httpd
yum install -y net-tools pcre-devel zlib-devel apr apr-devel apr-util apr-util-devel gcc-c++
tar -xf httpd-2.4.25.tar.gz
cd httpd-2.4.25/
./configure --prefix=/usr/local/apache --with-MySQL=/usr/share/mysql --enable-module=so --enable-shared=max --enable-rewrite
make && make install
2.安裝mysql
yum install -y mariadb mariadb-server
systemctl start mariadb
mysql_secure_installation
mysql -uroot -p123456
3.編譯安裝php
3.1依賴包安裝
yum -y install libxml2 libxml2-devel openssl openssl-devel curl-devel libjpeg-devel libpng-devel freetype-devel libmcrypt-devel
tar xf libmcrypt-2.5.6.tar.gz
cd libmcrypt-2.5.6/
./configure
make && make install
3.2編譯安裝php
tar xf php-7.1.4.tar.gz
cd php-7.1.4/
./configure --prefix=/usr/local/php7 --with-apxs2=/usr/local/apache/bin/apxs --with-mcrypt=/usr/include --enable-mysqlnd --with-mysqli --with-pdo-mysql --enable-fpm --with-gd --with-iconv --with-zlib --enable-xml --enable-shmop --enable-sysvsem --enable-inline-optimization --enable-mbregex --enable-exif --enable-mbstring --enable-ftp --enable-gd-native-ttf --with-openssl --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --enable-session --with-curl --with-jpeg-dir --with-freetype-dir --enable-opcache --enable-fileinfo
make && make install
3.3修改http配置文件以支持php
vim /usr/local/apache/conf/httpd.conf
將153這條注釋去掉:
LoadModule rewrite_module modules/mod_rewrite.so
#修改第196行 改為如下值
ServerNamelocalhost:80
#將第254行修改為如下值
DirectoryIndex index.php index.html
#第392行增加如下值
Addtype application/x-httpd-php .php
3.4重啟httpd并測(cè)試php
/usr/local/apache/bin/apachectl -k restart
rm -f /usr/local/apache/htdocs/index.html
vim /usr/local/apache/htdocs/index.php
phpinfo();
?>
chown -R daemon:daemon /usr/local/apache
4.禪道安裝(軟件自行下載)
4.1建立目錄,設(shè)置權(quán)限
mkdir /usr/local/apache/htdocs/zentao
tar xJvf ZenTaoPMS.9.1.2.tar.xz
cp -rf zentaopms/ /usr/local/apache/htdocs/zentao
chown -R daemon:daemon /usr/local/apache/htdocs/zentao
4.2配置php.ini以支持禪道
cd ~/tools/php-7.1.4/(該路徑是php解壓包的路徑)
mv php.ini-development /usr/local/php7/lib/php.ini
vim /usr/local/php7/lib/php.ini
去掉905行 分號(hào)
;extension=php_mysqli.dll
去掉909行的分號(hào)
;extension=php_pdo_mysql.dll
extension=php_pdo_mysql.dll
在1335行添加
session.save_path = "0;/var/lib/php/session"
4.3建立禪道所需的session目錄
cd /var/lib/
mkdir -p php/session
修改權(quán)限
chmod o=rwx -R /var/lib/php/session/
4.4重啟服務(wù)進(jìn)入網(wǎng)頁配置
/usr/local/apache/bin/apachectl -k restart
進(jìn)入www.fengxiaoli41.com/zentao/zentaopms/www
注:
網(wǎng)頁安裝中的那個(gè)pms使用的庫 修改為pmsdb
5.安裝discuz
5.1建立discuz數(shù)據(jù)庫
(mysql -uroot -p123456
create database discuz;
create user 'discuzuser'@'localhost' identified by '123456';
grant all on discuz.* to 'discuzuser'@'localhost';
grant all on discuz.* to 'discuzuser'@'%';
flush privileges;)
5.2解壓discuz并配置
unzip Discuz_X3.3_SC_GBK.zip
mkdir /usr/local/apache/htdocs/bbs/
cp -rf upload/* /usr/local/apache/htdocs/bbs/
chown -R daemon:daemon /usr/local/apache/htdocs/bbs
/usr/local/apache/bin/apachectl -k restart
5.3進(jìn)入網(wǎng)頁配置
進(jìn)入http://www.fengxiaoli41.com/bbs
注:網(wǎng)頁的數(shù)據(jù)庫服務(wù)器要使用127.0.0.1