lamp编译安装+discuz+禅道

所需软件自行准备

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


本文转自 fxl风 51CTO博客,原文链接:http://blog.51cto.com/fengxiaoli/1944930

上一篇:Ceph Luminous版本DashBoard预览


下一篇:编译安装LAMP环境