Lamp separation structure + discuz Forum Building
Building Lamp Separation Structure
1, Server classification:
(1) Application server: Web server. Stored procedure source code, such as php/python/jsp
(2) database server: MySQL
(3) file server: Save static file
3. Prepare three virtual machines
Vh01.tedu.cn 192.168.4.1 MySQL
Vh02.tedu.cn 192.168.4.2 Web
Vh03.tedu.cn 192.168.4.3 Web
4. Configure MySQL Server
[email protected] ~]# Yum install-y mariadb-server
[Email protected] ~]# systemctl start mariadb
[Email protected] ~]# Systemctl enable MARIADB
[[email protected] ~]# MySQL
MariaDB [(None)]> grant all on
.To ' admin ' @ '% ' of ' identified by ' tedu.cn ';
5. Installing Web Services on VH02 and vh03
[email protected] ~]# yum install-y httpd php php-mysql
[Email protected] ~]# systemctl start httpd
[Email protected] ~]# Systemctl enable httpd
6. Deploy Discuz on Vh02
[Email protected] ~]# Unzip Discuz_x3.0_sc_utf8.zip
[Email protected] ~]# cp-r upload//var/www/html/bbs
[Email protected] ~]# chown-r Apache.apache/var/www/html/bbs
[email protected] ~]# Firefox Http://192.168.4.2/bbs
7, Configuration vh03
[Email protected] ~]# cd/var/www/html/
[Email protected] html]# tar czf bbs.tar.gz BBS
[Email protected] html]# SCP bbs.tar.gz 192.168.4.3:/var/www/html/
[Email protected] ~]# cd/var/www/html/
[Email protected] html]# tar xzf bbs.tar.gz
Lamp separation structure + discuz Forum Building