一、安装前的准备工作:
1、准备好实验中所需要的各种软件包:bind97、bind97-libs、bind97-utils、mysql、mysql-devel、mysql-server、postfix-2.9.6.tar.gz、dovecot、libtool-ltdl、libtool-ltdl-devel、expect
2、关闭sendmail,并将它的随系统自动启动功能关闭:
# service sendmail stop
# chkconfig sendmail off
3、安装以下开发所用到的rpm包组:
Development Libraries
Development Tools
方法:
# yum groupinstall "packge_group_name"
二、搭建一个简易的DNS服务器
因为邮件服务依赖于DNS服务,所以这里我们简单的搭建一个DNS服务器。
1、安装配置DNS服务器
- # yum install bind97 bind97-libs bind97-utils
2、配置并测试DNS服务器
- # vim /etc/named.conf
- options {
- directory "/var/named";
- dump-file "/var/named/data/cache_dump.db";
- statistics-file "/var/named/data/named_stats.txt";
- memstatistics-file "/var/named/data/named_mem_stats.txt";
- recursion yes;
- /* Path to ISC DLV key */
- bindkeys-file "/etc/named.iscdlv.key";
- };
一个简易的DNS服务器已经搭建完毕。
三、使用rpm安装一个MySQL数据库
1、安装rpm包
- # yum install mysql-server mysql-devel
我们在使用rpm安装数据库的时候需要注意到数据库的库文件及头文件的安装路径。
- # service mysqld start #启动服务
- # chkconfig mysqld on #添加服务级别
2、配置并测试数据库是否安装正常
- # mysql #测试mysql是否使用正常
- Welcome to the MySQL monitor. Commands end with ; or \g.
- Your MySQL connection id is2
- Server version: 5.0.77 Source distribution
- Type 'help;'or'\h'for help. Type '\c' to clear the buffer.
- mysql> \q
- Bye
数据库至此已经安装完毕。
