sudo netstat -anpe
cat /etc/redhat-release
CentOS Linux release 7.0.1406 (Core)
sudo yum -y update
lsblk
NAME MAJ: MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202: 0 0 8G 0 disk
L-xvda1 202: 1 0 8G 0 part /
xvdf 202: 80 0 1G 0 disk
sudo file -s /dev/xvda1
SGI XFS filesystem data (blksz 4096, inosz 256, v2 dirs)
sudo mkfs -t xfs /dev/xvdf
meta-data = / dev / xvdf isize = 256 agcount = 4, agsize = 65536 blks
= sectsz = 512 attr = 2, projid32bit = 1
= crc = 0 finobt = 0
data = bsize = 4096 blocks = 262144, imaxpct = 25
= sunit = 0 swidth = 0 blks
naming = version 2 bsize = 4096 ascii-ci = 0 ftype = 0
log = internal log bsize = 4096 blocks = 2560, version = 2
= sectsz = 512 sunit = 0 blks, lazy-count = 1
realtime = none extsz = 4096 blocks = 0, rtextents = 0
sudo file -s /dev/xvdf
/ dev / xvdf: SGI XFS filesystem data (blksz 4096, inosz 256, v2 dirs)
sudo mkdir -p /data/mail/
sudo mount /dev/xvdf /data/mail/
lsblk
NAME MAJ: MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202: 0 0 8G 0 disk
L-xvda1 202: 1 0 8G 0 part /
xvdf 202: 80 0 1G 0 disk / data / mail
sudo cp /etc/fstab /etc/fstab.orig
sudo vi /etc/fstab
sudo mount -a
sudo vi /etc/hosts
sudo cat /etc/hosts
127.0.0.1 mail.citr.tk mail localhost localhost.localdomain
# 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
:: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6
yum repolist all
C7.0.1406-base / x86_64 CentOS-7.0.1406 - Base disabled
C7.0.1406-centosplus / x86_64 CentOS-7.0.1406 - CentOSPlus disabled
C7.0.1406-extras / x86_64 CentOS-7.0.1406 - Extras disabled
C7.0.1406-fasttrack / x86_64 CentOS-7.0.1406 - CentOSPlus disabled
C7.0.1406-updates / x86_64 CentOS-7.0.1406 - Updates disabled
base / 7 / x86_64 CentOS-7 - Base enabled: 8,652
base-debuginfo / x86_64 CentOS-7 - Debuginfo disabled
base-source / 7 CentOS-7 - Base Sources disabled
centosplus / 7 / x86_64 CentOS-7 - Plus disabled
centosplus-source / 7 CentOS-7 - Plus Sources disabled
cr / 7 / x86_64 CentOS-7 - cr disabled
extras / 7 / x86_64 CentOS-7 - Extras enabled: 149
extras-source / 7 CentOS-7 - Extras Sources disabled
fasttrack / 7 / x86_64 CentOS-7 - fasttrack disabled
updates / 7 / x86_64 CentOS-7 - Updates enabled: 1,198
updates-source / 7 CentOS-7 - Updates Sources disabled
sudo yum install php php-mysql
... 5.4.16-36.e17_1 ...
sudo cp -r /home/centos/iRedMail-0.9.2 /root
sudo ls /root
iRedMail-0.9.2
rm -rf /home/centos/iRedMail-0.9.2
sudo vi /etc/selinux/config
sudo cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX = can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
# SELINUX = enforcing
SELINUX = disabled
# SELINUXTYPE = can be one of these two values:
# targeted - Targeted processes are protected,
# minimum - Modification of the targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE = targeted
sudo reboot
getenforce
Disabled
sudo su -
vi /etc/hostname
sudo cat /etc/hostname
mail.domain.tk
hostname mail.domain.tk
hostname
mail.domain.tk
cd /root/iRedMail-0.9.2
bash iRedMail.sh
************************************************= ******************
* Congratulations, mail server setup completed successfully. Please
* read below file for more information:
*
* - /root/iRedMail-0.9.2/iRedMail.tips
*
* And send it to your mail account postmaster@citr.tk.
*
********************* WARNING **************************** **********
*
* Rebooting your system is required to enable mail services.
*
************************************************= ******************
exit
sudo reboot
sudo cat /root/iRedMail-0.9.2/iRedMail.tips
sudo cat /root/iRedMail-0.9.2/config
sudo rm -f /root/iRedMail-0.9.2/config
sudo hostname mail.domain.tk
sudo rm -f /var/www/html/index.html
sudo chmod 777 /var/www/html
sudo chmod 755 /var/www/html
sudo yum -y update
sudo openssl passwd -1 postmaster-
# Values ​​will be different.
$ 1 $ 2dQ48hyz $ .mCLeDSdPkP3fxVmARsB.0
mysql -u root -p
USE vmail;
Table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
UPDATE mailbox SET password='$1$2dQ48hyz$.mCLeDSdPkP3fxVmARsB.0' WHERE username='postmaster@domain.tk';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
exit
exit
Source: https://habr.com/ru/post/264685/