3. ติดตั้ง mariadb, postfix, dovecot ของ EAI Email Server บน CentOS 7
ไปยังการนำทาง
ไปยังการค้นหา
1. เริ่มติดตั้ง mariadb, postfix, dovecot ด้วยคำสั่ง
# yum --enablerepo=centosplus install postfix # yum install dovecot mariadb-server dovecot-mysql
2. อัพเดตจาก postfix version 2.x.x เป็น version 3.x.x
- บน CentOS 7 จะติดตั้ง postfix version 2.x.x เป็นค่าเริ่มต้น เราต้อง remove ออกก่อน เนื่องจาก postfix version 2.x.x ยังไม่รองรับ EAI และอัพเกรดเป็น version 3.x.x ขึ้นไป
# yum remove postfix # yum remove ssmtp # yum remove sendmail
- สร้างไฟล์ repo ชื่อ gf.repo เพื่อติดตั้ง postfix version 3.x.x ขึ้นไป
# vi /etc/yum.repos.d/gf.repo
ตัวอย่าง
[gf] name=Ghettoforge packages that won't overwrite core distro packages. mirrorlist=http://mirrorlist.ghettoforge.org/el/7/gf/$basearch/mirrorlist enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-gf.el7 failovermethod=priority [gf-plus] name=Ghettoforge packages that will overwrite core distro packages. mirrorlist=http://mirrorlist.ghettoforge.org/el/7/plus/$basearch/mirrorlist # Please read http://ghettoforge.org/index.php/Usage *before* enabling this repository! enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-gf.el7 failovermethod=priority
- โหลด key ที่ใช้กับ repo วางไว้ใน path : /etc/pki/rpm-gpg/
# cd /etc/pki/rpm-gpg/ # wget http://mirror.ghettoforge.org/distributions/gf/RPM-GPG-KEY-gf.el7
- ติดตั้ง postfix version 3.x.x
# yum install postfix3 postfix-mysql
3. ตั้งค่า mariadb, postfix, dovecot ให้เริ่มทำงานทุกครั้งที่เปิดเครื่อง
# systemctl start mariadb # systemctl enable mariadb # systemctl start postfix # systemctl enable postfix # systemctl start dovecot # systemctl enable dovecot
4. ตรวจสอบสถานะการทำงานของ mariadb, postfix, dovecot
# systemctl status mariadb # systemctl status postfix # systemctl status dovecot