您好,登錄后才能下訂單哦!
所需軟件自行準備
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行 改為如下值
ServerName localhost:80
#將第254行修改為如下值
<IfModule dir_module>
DirectoryIndex index.php index.html
</IfModule>
#第392行增加如下值
Addtype application/x-httpd-php .php
3.4重啟httpd并測試php
/usr/local/apache/bin/apachectl -k restart
rm -f /usr/local/apache/htdocs/index.html
vim /usr/local/apache/htdocs/index.php
<?php
phpinfo();
?>
chown -R daemon:daemon /usr/local/apache
4.禪道安裝(軟件自行下載)
4.1建立目錄,設置權限
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行 分號
;extension=php_mysqli.dll
去掉909行的分號
;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
修改權限
chmod o=rwx -R /var/lib/php/session/
4.4重啟服務進入網頁配置
/usr/local/apache/bin/apachectl -k restart
進入www.fengxiaoli41.com/zentao/zentaopms/www
注:
網頁安裝中的那個pms使用的庫 修改為pmsdb
5.安裝discuz
5.1建立discuz數據庫
(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進入網頁配置
進入http://www.fengxiaoli41.com/bbs
注:網頁的數據庫服務器要使用127.0.0.1
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。