Linux disk configuration cash to build rental and use web server

Cash tray to build rental Q [1152880099]

First, add a virtual host svr11.dawai.com, when you access this site page can be displayed "It works !!"

1) Set up internet LAMP
[root @ svr11 ~] # yum -y install httpd mariadb mariadb-server php php-mysql ----- build platform LAMP

2) the deployment of web resources
[root @ svr11 ~] # mkdir / var / www / web1 ---------------- create web1 directory

[root @ svr11 ~] # vim /var/www/web1/index.html --------------------- create edit Home files
into the editing interface input: It works !

3) virtual host configuration
[root @ svr11 ~] # vim /etc/httpd/conf.d/svr11.conf -------------------- create and edit Web Hosting Configuring
virtual server configuration as follows
<Virtualhost *: 80>
ServerName svr11.dawai.com
the DocumentRoot / var / WWW / web1
</ VirtualHost>

4) Start the http service and access svr11.dawai.com
[root @ svr11 ~] # systemctl restart httpd start ----------- http service
 Note: the need for a successful visit to the dns svr1.dawai.com server, and if not, can temporarily change the hosts file, add a temporary file to verify the svr1.dawai.com

Second, add a virtual host bbs.dawai.com, to see "Network security resurgence, Huawei resurgence" forum system to access this site

1) build a good platform to deploy LAMP good bbs.dawai.com DNS server, the process ibid.

2) deployment Discuz Forum Code
a) in advance Discuz forum download code package file, using WinSCP tool to upload files to the / root directory server

b) unzip the file to a temporary directory tdir
[tedu the root @ ~] -d tdir -------- # /root/Discuz_X3.4_SC_UTF8.zip the unzip Discuz archive into the current directory tdir

c) The Forum Codes deployed as / var / www / bbs /, as a web directory site. Extracting the copied upload / subdirectory deployed / var / WWW / BBS
[svr11 the root @ ~] CP # tdir -rf / upload / / var / WWW / BBS

3) Virtual Host Configuration
[root @ svr11 ~] # vim /etc/httpd/conf.d/svr11.conf -------- modify virtual host configuration file
input follows
<Virtualhost *: 80>
ServerName BBS. dawai.com
the DocumentRoot / var / WWW / BBS
</ VirtualHost>

Guess you like

Origin www.cnblogs.com/zhenshuanga/p/11021924.html