Get the App
SLTechnology News&Howtos  ›  Database  › 

Lamp compilation and installation + discuz+ Zen

Shulou Source: shulou.com Published: 2022-06-01 11:03:31 10月01日 Update

The required software is prepared by itself.

Systemctl stop firewalld

Setenforce 0

1. Compile and install 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

two。 Install mysql

Yum install-y mariadb mariadb-server

Systemctl start mariadb

Mysql_secure_installation

Mysql-uroot-p123456

3. Compile and install php

3.1 dependency package installation

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.2Compiler and install 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 modify the http configuration file to support php

Vim / usr/local/apache/conf/httpd.conf

Remove the note 153:

LoadModule rewrite_module modules/mod_rewrite.so

# modify line 196 to read as follows

ServerName localhost:80

# modify line 254 to the following value

DirectoryIndex index.php index.html

# Line 392 is added as follows

Addtype application/x-httpd-php .php

3.4 restart httpd and test php

/ usr/local/apache/bin/apachectl-k restart

Rm-f / usr/local/apache/htdocs/index.html

Vim / usr/local/apache/htdocs/index.php

Chown-R daemon:daemon / usr/local/apache

4. Zen installation (download the software by yourself)

4.1 create directories and set permissions

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 configure php.ini to support Zen

Cd ~ / tools/php-7.1.4/ (this path is the path where php unzipped the package)

Mv php.ini-development / usr/local/php7/lib/php.ini

Vim / usr/local/php7/lib/php.ini

Remove 905 line semicolons

; extension=php_mysqli.dll

Remove the semicolon from line 909

; extension=php_pdo_mysql.dll

Extension=php_pdo_mysql.dll

Add on line 1335

Session.save_path = "0positionUniqqxxxxxxx"

4.3 establish the session directory required for Zen Tao

Cd / var/lib/

Mkdir-p php/session

Modify permissions

Chmod o=rwx-R / var/lib/php/session/

4.4 restart the service to enter the web configuration

/ usr/local/apache/bin/apachectl-k restart

Enter www.fengxiaoli41.com/zentao/zentaopms/www

Note:

The library used by the pms in the web installation was changed to pmsdb

5. Install discuz

5.1Establishment of discuz database

(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 extract discuz and configure

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 enter the web page configuration

Enter http://www.fengxiaoli41.com/bbs

Note: the database server of the web page should use 127.0.0.1

Tags: Configuration web pages compilation semicolons data databases permissions directories software support services files servers comments paths preparation testing Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft MySQL Huawei NVidia vpn