6400
@ IN SOA ns1.eyo.com. root.eyo.com. (
2011070801; Serial
4H ; Refresh
30M ; Retry
12H ; Expire
1D ) ; Minimum
IN NS ns1.eyo.com.
ns1 IN A 173.16.16.1
www IN A 173.16.16.1
[root@dns named]# named-checkzone eyo.com eyo.com.zone.lan
zone eyo.com/IN: loaded serial 2011070801
OK
[root@dns named]# named-checkzone eyo.com eyo.com.zone.wan
zone eyo.com/IN: loaded serial 2011070801
OK
[root@dns named]# service named start
启动 named: [确定]
[root@dns named]# chkconfig named on
3、在web1、web2服务器上搭建LAMP平台(暂时不安装awstats和phpMyAdmin)
编译安装Apache:
[root@web1 Desktop]# tar zxvf httpd-2.2.9.tar.gz -C /usr/src/
[root@web1 Desktop]# cd /usr/src/httpd-2.2.9/
[root@web1 httpd-2.2.9]# ./configure --prefix=/usr/local/apache2 --enable-so --enable-rewrite --enable-ssl --with-ssl=/usr/lib --enable-auth-digest --enable-cgi --enable-suexec --with-suexec-caller=daemon --with-suexec-docroot=/usr/local/apache2/htdocs
[root@web1 httpd-2.2.9]# make && make install
[root@web1 httpd-2.2.9]# vim /usr/local/apache2/conf/httpd.conf
97 ServerName web1.eyo.com(修改97行)
[root@web1 httpd-2.2.9]# echo "/usr/local/apache2/bin/apachectl start" >> /etc/rc.local
Apache服务器不需做太多配置,暂时告一段落
编译安装MySQL:
[root@web1 Desktop]# useradd -M -s /sbin/nologin mysql
[root@web1 Desktop]# tar zxvf mysql-5.0.56.tar.gz -C /usr/src/
[root@web1 Desktop]# cd /usr/src/mysql-5.0.56/
[root@web1 mysql-5.0.56]# ./configure --prefix=/usr/local/mysql
[root@web1 mysql-5.0.56]# make && make install
[root@web1 mysql-5.0.56]# cp support-files/my-medium.cnf /etc/my.cnf
[root@web1 mysql-5.0.56]# /usr/local/mysql/bin/mysql_install_db --user=mysql
[root@web1 mysql-5.0.56]# chown -R root:mysql /usr/local/mysql/
[root@web1 mysql-5.0.56]# chown -R mysql /usr/local/mysql/var/
[root@web1 mysql-5.0.56]# echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf
[root@web1 mysql-5.0.56]# ldconfig
[root@web1 mysql-5.0.56]# /usr/local/mysql/bin/mysqld_safe --user=mysql &
[1] 14639
Starting mysqld daemon with databases from /usr/local/mysql/var
[root@web1 mysql-5.0.56]# netstat -tunpl | grep 3306
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 14665/mysqld
[root@web1 mysql-5.0.56]# cp support-files/mysql.server /etc/init.d/mysqld
[root@web1 mysql-5.0.56]# chmod x /etc/init.d/mysqld
[root@web1 mysql-5.0.56]# chkconfig --add mysqld
[root@web1 mysql-5.0.56]# chkconfig mysqld on
[root@web1 mysql-5.0.56]# export PATH=$PATH:/usr/local/mysql/bin
[root@web1 mysql-5.0.56]# echo "PATH=$PATH:/usr/local/mysql/bin" >> /etc/profile
[root@web1 ~]# mysqladmin -u root password "redhat"
|