Build an iRedMail email server on a CentOS VM instance
As we can see, many VPS users are not used to build websites, but to create email servers and send emails. Therefore, the old left also learns such functions. To learn how to build an email server, you must first use the free open-source iRedMail software. IRedMail can quickly deploy the mail server solution in environments such as Red Hat, CentOS, SDebian, and Ubuntu. In this article, the old left shares the process of successfully building a Centos 6 32-bit system.
1. Update the system installation package
Yum update
Before Installation, you must update the system Installation package. If you do not solve this problem, an "Installation failed, please check the terminal output" Installation error will appear.
2. modify the current VPS host name HOSTNAME
In general, we use VPS to check that the general host name is not the root domain name we need to set through "hostname-f.
A-edit the/etc/sysconfig/network file and set hostname to mail.laozuo.org
B-edit the/etc/hosts file and add the script 127.0.0.1 mail.laozuo.org mail localhost. localdomain localhost to the file above. Change the script to our host name.
After the VPS is restarted, use "hostname-f" to check whether the current host name has changed to what we need.
Third, domain name resolution
We need to set A record and MX record resolution in domain name DNS resolution. Here, the old left is the domain name post office using DNSPOD. The settings are as follows:
This is only the resolution of our domain name, A record and MX record, used for post office purposes.
4. Download and install iRedMail
Cd/root/
Wgethttp: // www.iredmail.com/iRedMail-0.8.7.tar.bz2
Tar xjf iRedMail-0.8.7.tar.bz2
Cd iRedMail-0.8.7
Bash iRedMail. sh
Enter the preceding download and installation steps, and the installation will be automatically performed. Note that the downloaded installation package contains a messy string. If it is manually modified by SFTP, decompress and install the package.
The installation process went smoothly and there was no error in the middle. We only need to wait and check the Settings section in the next step.
Fifth, iRedMail installation process and settings
A-Welcome to installation
Press ENTER or click YES to confirm installation settings. And the default installation path of/var/vmail is press Enter.
B-select database
Here I select MYSQL database as data storage.
C-set the MYSQL Database Password
D-set Domain Name
The domain name set here cannot be the same as the host name. The domain name set here is the domain name of your email. For example, if you want the domain name suffix of your email to be @ abc.com, enter abc.com here.
E-set the Webmail and iRedAdmin administrator passwords
F-select the integration component required by iRedMail
Then we directly enter y and then let it install.
6. Wait until the iRedMail installation is successful
You need to insert a section to configure the firewall and database.
After setting n and y, press enter to continue the installation. The installation is complete.
We can see the installation and logon portal. By default, https logon is required. You can either set SSL Certificate logon or/var/www/roundcubemail/config. inc. set $ config ['force _ https'] = true in the PHP file; change the parameter to "false" before restarting the PHP file.