a , lamp environment Construction
Article Reference https://www.linode.com/docs/web-servers/lamp/lamp-on-centos-7/
1. Apache Related Operations
yum install httpd# Keep good habits, modify the configuration file before backup, so as not to spoil the use of cp /etc/httpd/conf/httpd.conf ~/ httpd.conf.backupvim /etc/httpd/conf/httpd.conf joined keepalive off<ifmodule at the end prefork.c> startservers 4 MinSpareServers 20 maxspareservers 40 maxclients 200 maxrequestsperchild 4500</ifmodule># Configure a virtual host <VirtualHost *:8081> documentroot /data/www servername test.com ErrorLog /data/www/logs/error.log customlog /data/www/logs/access.log combined <directory "/data/www" > AllowOverride None Options None Require all granted </Directory></VirtualHost> #创建目录mkdir -p /data/www/mkdir / data/www/logs/
2. MARIADB Installation Related
Yum install #设置root user's password, delete test library, disable root user remote login, privilege refresh mysql_secure_installation #创建用户, set password, permission settings Mysql-uroot-p # Follow the prompts to enter the password grant all privileges on * * to ' mysql ' @ '% ' identified by ' 123456 '; FLUSH privileges;
3. PHP installation, configuration
Yum install-y php php-mysql php-gd php-pear# Modify configuration file vim/etc/php.inierror_reporting = e_compile_error| e_recoverable_error| e_error| E_core_errorerror_log =/var/log/php/error.logmax_input_time = #可保留默认, default 60s# Create directory and modify owner Mkdir/var/log/phpchown apache/var/log/php to this lamp environment: start Apache
Second, discuz installation
Yum install-y unzipcd/data/www# get Discuzwget http://download.comsenz.com/DiscuzX/3.3/Discuz_X3.3_SC_UTF8.zipunzip DISCUZ_X3.3_SC_UTF8.ZIPMV upload/* rm-rf discuz_x3.3_sc_utf8.zip Readme upload utility#chown-r apache:apache/data/ www/Note here to display error during installation of browser access http://ip:8081
1. See the Installation Wizard page
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M00/91/E3/wKiom1j47eGSnybeAAFQU3ZGDYc975.jpg-wh_500x0-wm_ 3-wmp_4-s_765169484.jpg "style=" Float:none; "title=" 1.jpg "alt=" Wkiom1j47egsnybeaafqu3zgdyc975.jpg-wh_50 "/>
2. The page appears. Tip Directory Status directory does not exist or file is not writable
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M01/91/E3/wKiom1j47eLCqwjkAADUxp5wDC8388.jpg-wh_500x0-wm_ 3-wmp_4-s_2951134040.jpg "style=" Float:none; "title=" 2.jpg "alt=" Wkiom1j47elcqwjkaaduxp5wdc8388.jpg-wh_50 "/>
Chown-r apache:apache/data/www/
After the command is executed, everything works, continue with the installation:
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M00/91/E2/wKioL1j47eTDaG5nAAEpPnnWdq8715.jpg-wh_500x0-wm_ 3-wmp_4-s_3071317166.jpg "style=" Float:none; "title=" 3.jpg "alt=" Wkiol1j47etdag5naaeppnnwdq8715.jpg-wh_50 "/>
3. Configuration database Related
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/91/E2/wKioL1j47eSTOzeeAACYWBAFmYo175.jpg-wh_500x0-wm_ 3-wmp_4-s_830508398.jpg "style=" Float:none; "title=" 4.jpg "alt=" Wkiol1j47estozeeaacywbafmyo175.jpg-wh_50 "/>
4. Complete Installation
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M02/91/E3/wKiom1j47eTh5C-GAAFGy2Q26aI264.jpg-wh_500x0-wm_ 3-wmp_4-s_3551558864.jpg "style=" Float:none; "title=" 5.jpg "alt=" Wkiom1j47eth5c-gaafgy2q26ai264.jpg-wh_50 "/>
5. Remove the install directory after installation is complete
rm-rf/data/www/install/*
Third, visit the Management Center, BBS, according to the specific requirements to modify BBS
http://192.168.1.88:8081 Visit BBS Forum
http://192.168.1.88:8081/admin.php access to the background management page
This article is from the "Share,open source" blog, so be sure to keep this source http://liqilong2010.blog.51cto.com/3029053/1917957
Centos7 Lamp+discuz to build his own forum