Установка Courier-IMAP, Courier-Authlib и Maildrop
К сожалению не имеется RPM пакетов для Courier-IMAP, Courier-Authlib и Maildrop, поэтому мы должны собрать их сами.
|
Затем установим предпосылки, что бы мы смогли собрать пакеты Courier RPM пакеты:
|
RPM пакеты не должны быть собраны под root, Courier-IMAP будет отказываться от компиляции, если будет обнаружено, что компиляция запускается под root пользователем. Поэтому мы создаем учетную запись обычного пользователя (mobil в данном примере) и присвоим ему пароль:
|
Нам понадобится Sudo команда в дальнейшем, так что пользователь mobil может собрать и установить RPM пакеты. Но во-первых, мы должны позволить mobil, запустить все команды, с использованием sudo. Выполним:
|
В файл, который откроется есть строка корень root ALL=(ALL) ALL. Добавить аналогичные линии для mobil чуть ниже этой строки:
[...] ## Allow root to run any commands anywhere root ALL=(ALL) ALL mobil ALL=(ALL) ALL [...]
Теперь мы готовы собрать наш RPM пакет. Сначала надо стать пользователем mobil:
|
Далее мы создадим нашe средe сборки:
|
Теперь мы создаем каталог downloads и скачаем исходные файлы из http://www.courier-mta.org/download.php:
|
(Вы можете спросить, почему я не скачать новую версию Courier-IMAP - 4.9.3 на момент написания этой статьи - а использовал старую - 4.8.1. Это потому, что 4.9.3 не удалось построить на моей системе, а 4.8.1 работает просто отлично). Теперь (пока еще в $HOME/downloads) мы можем построить Courier-authlib:
|
После процесса сборки, RPM пакеты можно найти в /root/rpmbuild/RPMS/x86_64 ( /root/rpmbuild/RPMS/i686 если Вы находитесь в i686 системе). Команда:
|
показывает, доступных пакетов RPM:
[mobil@server1 downloads]$ sudo ls -l /root/rpmbuild/RPMS/x86_64 total 520 -rw-r--r-- 1 root root 123448 May 25 18:06 courier-authlib-0.63.0-1.fc15.x86_64.rpm -rw-r--r-- 1 root root 265144 May 25 18:06 courier-authlib-debuginfo-0.63.0-1.fc15.x86_64.rpm -rw-r--r-- 1 root root 34876 May 25 18:06 courier-authlib-devel-0.63.0-1.fc15.x86_64.rpm -rw-r--r-- 1 root root 17448 May 25 18:06 courier-authlib-ldap-0.63.0-1.fc15.x86_64.rpm -rw-r--r-- 1 root root 13808 May 25 18:06 courier-authlib-mysql-0.63.0-1.fc15.x86_64.rpm -rw-r--r-- 1 root root 13020 May 25 18:06 courier-authlib-pgsql-0.63.0-1.fc15.x86_64.rpm -rw-r--r-- 1 root root 8276 May 25 18:06 courier-authlib-pipe-0.63.0-1.fc15.x86_64.rpm -rw-r--r-- 1 root root 34108 May 25 18:06 courier-authlib-userdb-0.63.0-1.fc15.x86_64.rpm [mobil@server1 downloads]$
Выберите те, которые Вы хотите установить, и установить их так:
|
Теперь мы вернемся к нашему каталогу downloads:
|
Выполните следующие команды, чтобы создать необходимые каталоги / разрешения смены каталога (потому что иначе процесс сборки для Courier-IMAP не удастся):
|
Теперь запустите rpmbuild снова, на этот раз без Sudo , в противном случае компиляция не удастся, поскольку она была запущена с правами root:
|
После процесса сборки, RPM пакеты можно найти в $HOME/rpm/RPMS/x86_64 ($HOME/rpm/RPMS/i686 если Вы находитесь на i686 систему):
|
Команда
|
показывает, доступных пакетов RPM:
[mobil@server1 x86_64]$ ls -l total 1708 -rw-rw-r-- 1 mobil mobil 596432 May 25 18:33 courier-imap-4.8.1-2.15.x86_64.rpm -rw-rw-r-- 1 mobil mobil 1149328 May 25 18:33 courier-imap-debuginfo-4.8.1-2.15.x86_64.rpm [mobil@server1 x86_64]$
Вы можете установить Courier-IMAP:
— Регулярная проверка качества ссылок по более чем 100 показателям и ежедневный пересчет показателей качества проекта.
— Все известные форматы ссылок: арендные ссылки, вечные ссылки, публикации (упоминания, мнения, отзывы, статьи, пресс-релизы).
— SeoHammer покажет, где рост или падение, а также запросы, на которые нужно обратить внимание.
SeoHammer еще предоставляет технологию Буст, она ускоряет продвижение в десятки раз, а первые результаты появляются уже в течение первых 7 дней. Зарегистрироваться и Начать продвижение
|
Теперь мы вернемся к нашему загрузки каталоге:
|
и запустим rpmbuild снова, на этот раз для создания Maildrop пакет:
Теперь мы вернемся к нашему загрузки каталоге:
|
После процесса сборки, RPM пакеты можно найти в /root/rpmbuild/RPMS/x86_64 ( /root/rpmbuild/RPMS/i686 если Вы находитесь в i686 системе). Команда:
|
показывает, доступных пакетов RPM:
[mobil@server1 downloads]$ sudo ls -l /root/rpmbuild/RPMS/x86_64 total 1628 -rw-r--r-- 1 root root 123448 May 25 18:06 courier-authlib-0.63.0-1.fc15.x86_64.rpm -rw-r--r-- 1 root root 265144 May 25 18:06 courier-authlib-debuginfo-0.63.0-1.fc15.x86_64.rpm -rw-r--r-- 1 root root 34876 May 25 18:06 courier-authlib-devel-0.63.0-1.fc15.x86_64.rpm -rw-r--r-- 1 root root 17448 May 25 18:06 courier-authlib-ldap-0.63.0-1.fc15.x86_64.rpm -rw-r--r-- 1 root root 13808 May 25 18:06 courier-authlib-mysql-0.63.0-1.fc15.x86_64.rpm -rw-r--r-- 1 root root 13020 May 25 18:06 courier-authlib-pgsql-0.63.0-1.fc15.x86_64.rpm -rw-r--r-- 1 root root 8276 May 25 18:06 courier-authlib-pipe-0.63.0-1.fc15.x86_64.rpm -rw-r--r-- 1 root root 34108 May 25 18:06 courier-authlib-userdb-0.63.0-1.fc15.x86_64.rpm -rw-r--r-- 1 root root 278520 May 25 18:50 maildrop-2.5.4-1.15.x86_64.rpm -rw-r--r-- 1 root root 685672 May 25 18:50 maildrop-debuginfo-2.5.4-1.15.x86_64.rpm -rw-r--r-- 1 root root <24 May 25 18:50 maildrop-devel-2.5.4-1.15.x86_64.rpm -rw-r--r-- 1 root root 63968 May 25 18:50 maildrop-man-2.5.4-1.15.x86_64.rpm [mobil@server1 downloads]$
Теперь Вы можете установить Maildrop так:
|
После того как Вы собрали и установили все необходимые пакеты, Вы можете снова стать root, введя:
|
Установка Postfix
Postfix может быть установлен следующим образом:
|
Затем выключим Sendmail и запустим Postfix и MySQL:
|
Установка GetMail
GetMail может быть установлен следующим образом:
|
Установка MySQL пароли и настройка PhpMyAdmin
Установите пароль для учетной записи корень MySQL:
|
[root@server1 ~]# mysql_secure_installation NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MySQL to secure it, we'll need the current password for the root user. If you've just installed MySQL, and you haven't set the root password yet, the password will be blank, so you should just press enter here. Enter current password for root (enter for none): - ENTER OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MySQL root user without the proper authorisation. Set root password? [Y/n] - ENTER New password: - Ваш root SQL пароль Re-enter new password: - Ваш root SQL пароль Password updated successfully! Reloading privilege tables.. ... Success! By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? [Y/n] - ENTER ... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] - ENTER ... Success! By default, MySQL comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] - ENTER - Dropping test database... ... Success! - Removing privileges on test database... ... Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n] - ENTER ... Success! Cleaning up... All done! If you've completed all of the above steps, your MySQL installation should now be secure. Thanks for using MySQL! [root@server1 ~]#
Теперь мы настроим PhpMyAdmin. Мы изменим конфигурации Apache, чтобы PhpMyAdmin позволял связаться не только с локального хоста (путем комментирования строки
|
# phpMyAdmin - Web based MySQL browser written in php # # Allows only localhost by default # # But allowing phpMyAdmin to anyone other than localhost should be considered # dangerous unless properly secured by SSL Alias /phpMyAdmin /usr/share/phpMyAdmin Alias /phpmyadmin /usr/share/phpMyAdmin #<Directory /usr/share/phpMyAdmin/> # Order Deny,Allow # Deny from All # Allow from 127.0.0.1 # Allow from ::1 #</Directory> <Directory /usr/share/phpMyAdmin/setup/> Order Deny,Allow Deny from All Allow from 127.0.0.1 Allow from ::1 </Directory> # These directories do not require access over HTTP - taken from the original # phpMyAdmin upstream tarball # <Directory /usr/share/phpMyAdmin/libraries/> Order Deny,Allow Deny from All Allow from None </Directory> <Directory /usr/share/phpMyAdmin/setup/lib/> Order Deny,Allow Deny from All Allow from None </Directory> # This configuration prevents mod_security at phpMyAdmin directories from # filtering SQL etc. This may break your mod_security implementation. # #<IfModule mod_security.c> # <Directory /usr/share/phpMyAdmin/> # SecRuleInheritance Off # </Directory> #</IfModule>
Затем мы добавим в автозапуск системы Apache и запустим его:
|
Теперь Вы можете перейти в Ваш браузере по адресу http://server1.example.com/phpmyadmin/ или http://192.168.1.101/phpmyadmin/ и войти в систему с именем пользователя root и Вашим новый root паролем MySQL.