Script exercise, write a script to implement the configuration of the local web server: 1. Check if the httpd package has been installed. If not, use the yum command to install it; (you need to configure the yum source in advance) 2. Cancel the central host. Create 5 new domain-based virtual hosts and provide a test home page with the corresponding FQDN: www.magedu.com, /vhosts/magedu bbs.magedu.com, /vhosts/bbs wp.magedu.com, /vhosts/wordpress pw.magedu.com, /vhosts/pw pma.magedu.com, /vhosts/phpmyadmin 3. Check the modified configuration file syntax. If there is no problem, start the httpd service and ask the service to boot automatically. Start;
#!/bin/bash #Author honway #ScriptName AutoSetWebServer SetYUM() { echo "======================== =======================&" echo "Start backup files." echo "backup your .repo file to .repo.bak!" Echo "====================================================== ; YUM_CONF_DIR=/etc/yum.repos.d/for Y in $YUM_ CONF_DIR/*.repo; do mv $Y $Y.bak &>/dev/null done echo "========================= ======================&" echo "Backup successfully." echo "=============== ===============================" echo "Create a yum config file." cat >> $ YUM_CONF_DIR/yumconf.repo <<EOF [Server] name=Server baseurl=ftp://172.16.0.1/pub/Server gpgcheck=0 enabled=1
[VT] name=VT baseurl=ftp ://172.16.0.1/pub/VT gpgcheck=0 enabled=1
[Cluster] name=Cluster baseurl=ftp://172.16.0.1/pub/Cluster gpgeheck=0
[ClusterStorage] name=ClusterStorage baseurl=ftp://172.16.0.1/pub/ClusterStorage gpgcheck=0 enabled=1
[errata] name=errata baseurl=ftp://172.16.0.1/pub/errata Gpgeheck=0 enabled=0 EOF echo "OK!" echo "========================================== =============" }
CreateTestPage(){ echo "$u" > $URL_DIR/index.html } SetYUM
if ! `rpm -qa
Previously did not pay much attention to 301 redirects, first because there is no website to redirec
If you dont have IIS on your machine, you can install IIS as described below. 1. IIS install
The main function of web server is to provide online information browsing service to realize resourc
Step 1: Create a virtual directory under the WSS site “IISADMPWD”point to %syste
Getting Started Tutorial: IIS 5.0 builds a web server
Windows 2003 Vps security settings problem tutorial
Configuring dynamic compression in IIS 7.0
Web Farm and Network Load Balancing Overview and Architecture Examples
Windows system IIS environment to install memcache method
Web Farm NLB Cluster for IIS Web Server
Windows 2003 set up VPN service
Unable to load mcrypt extension, <br /> Please check the PHP configuration solution
Easily implement Web server isochronous automatic backup
View resource usage at each site in IIS
Explain the find and locate commands for finding directories and files in Linux
How to batch delete Win7 extra fonts
What should I do if Win7 can't open CHM files?
How to disable the network search driver in win7 computer
Set Win8 system sleep wake-up password graphic tutorial
Decompose Win XP running speed 100% nine tips
The hidden icon in the lower right corner of the Win7 system is missing. How to do
Enterprise users upgrading Win8 systems should update Win7
Win8 skills: find the calculator under win8 and convert to programmer mode