#!/bin/bash
yum -y install gcc gcc-c++ make &> /dev/null
scp 192.168.200.111:/root/httpd-2.2.17.tar.gz /root
tar xf httpd-2.2.17.tar.gz -C /usr/src
cd /usr/src/httpd-2.2.17/
./configure --prefix=/usr/local/apache &> /dev/null
make &> /dev/null && make install &> /dev/null
echo "编译配置完成"
cd /usr/local/apache/conf
cp httpd.conf httpd.conf.bak
echo " ServerName www.example.com:80 " >> /usr/local/apache/conf/httpd.conf
/usr/local/apache//bin/apachectl start
yum -y install lynx &> /dev/null
mount 192.168.200.112:/data /usr/local/apache/htdocs/