Roczne Archiwum: 2010

Instalacja i konfiguracja OpenLDAP

Instalacja i podstawowa konfiguracja usługi katalogowej LDAP (OpenLDAP) na Ubuntu:

drfugazi@charr:~% sudo aptitude install slapd ldap-utils

Opis wzorowany jest na angielskim opisie dla Karmic Koala na HowtoForge. Ja jestem przyzwyczajony do konfigurowania LDAPa w pliku slapd.conf, ale to stara szkoła. Tutaj dostajemy możliwość dynamicznej konfiguracji bez konieczności restartu serwera LDAP.

cd /etc/ldap

Na początek proponuję dodać kilka schematów, zwierających klasy obiektów, które będą przydatne później:

ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/cosine.ldif
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/inetorgperson.ldif
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/nis.ldif

Jeśli Wam się nie uda dodanie z powodu niewystarczających uprawnień, to przełączcie się na roota poleceniem sudo su -

php-5.2.14

Get the sources:

root@hydra:~# su - soft
soft@hydra:~% cd php 
soft@hydra:~/php% wget "http://pl.php.net/get/php-5.2.14.tar.gz/from/this/mirror"
...
soft@hydra:~/php% gtar -zxf php-5.2.14.tar.gz

Correct version numbers in script (use sed):

soft@hydra:~/php% gsed "s/5.2.12/5.2.14/g" drf_php-5.2.12_conf > drf_php-5.2.14_conf
soft@hydra:~/php% chmod 754 !$
chmod 754 drf_php-5.2.14_conf

Check and correct path to apxs if needed:

soft@hydra:~/php% vi drf_php-5.2.14_conf

Instalacja systemu pocztowego na Ubuntu

Zakładam, że system jest zainstalowany i posiada podstawową konfigurację z uruchomioną usługą SSH. Po zalogowaniu przystępujemy do instalacji pakietu dovecot-postfix, który opisany jest jako w pełni funkcjonalny serwer pocztowy:

drfugazi@charr:~% sudo aptitude install dovecot-postfix
[sudo] password for drfugazi:
Czytanie list pakietów... Gotowe
Budowanie drzewa zależności
Odczyt informacji o stanie... Gotowe
Reading extended state information
Initializing package states... Gotowe
The following NEW packages will be installed:
  dovecot-common{a} dovecot-imapd{a} dovecot-pop3d{a} dovecot-postfix
0 packages upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 7957kB of archives. After unpacking 15,1MB will be used.
Do you want to continue? [Y/n/?] y
...
Konfigurowanie dovecot-common (1:1.2.9-1ubuntu6.1) ...
Creating config file /etc/dovecot/dovecot.conf with new version
Creating config file /etc/dovecot/dovecot-ldap.conf with new version
Creating config file /etc/dovecot/dovecot-sql.conf with new version

Sprawdzamy czy działa serwer Dovecot i czy da się połączyć do serwera IMAP z localhosta:

apache-2.2.17

The Apache HTTP Server Project is an effort to develop and maintain
an open-source HTTP server for modern operating systems including UNIX
and Windows NT. The goal of this project is to provide a secure,
efficient and extensible server that provides HTTP services in sync
with the current HTTP standards.

Apache httpd has been the most popular web server on the Internet since
April 1996, and celebrated its 15th birthday as a project this February.

The Apache HTTP Server („httpd”) is a project of The Apache Software Foundation.

php-5.2.14

root@hydra:~# su - soft
soft@hydra:~% cd php 
soft@hydra:~/php% wget "http://pl.php.net/get/php-5.2.14.tar.gz/from/this/mirror"
...
soft@hydra:~/php% gtar -zxf php-5.2.14.tar.gz
soft@hydra:~/php% gsed "s/5.2.12/5.2.14/g" drf_php-5.2.12_conf > drf_php-5.2.14_conf
soft@hydra:~/php% chmod 754 !$
chmod 754 drf_php-5.2.14_conf

Trzeba sprawdzić i ewentualnie poprawić ścieżkę do apxs

soft@hydra:~/php% vi drf_php-5.2.14_conf

Kompilacja przy użyciu skryptu (w załączniku)

apache-2.2.17

Projekt Apache HTTP Server, to przedsięwzięcie mające na celu rozwój i utrzymywanie serwera HTTP o otwartym kodzie, dla nowoczesnych systemów operacyjnych, takich jak UNIX czy Windows NT. Celem tego projektu jest dostarczenie bezpiecznego, wydajnego i skalowalnego serwera, który dostarcza usług zgodnych z aktualnymi standardami HTTP.

Apache httpd jest najbardziej popularnym serwerem stron www w Internecie od kwietnia 1996 roku i w lutym tego roku obchodził swoje 15-te urodziny jako projekt.

dovecot-2.0.6

Dovecot is an open source IMAP and POP3 email server for Linux/UNIX-like systems, written with security primarily in mind. Dovecot is an excellent choice for both small and large installations. It’s fast, simple to set up, requires no special administration and it uses very little memory.

Source: http://dovecot.org/

Dovecot 2.0.6 is bugfix release and should be more stable than previous versions of 2.0.x.

Below you can find transcript of configuration and compilation session of Dovecot server and a script which I use for this purpose (as attachement).

dovecot-2.0-sieve-0.2.0

Pigeonhole – Sieve Support for Dovecot

Projekt Pigeonhole is the name of the project that adds support for the Sieve language (RFC 5228) and the ManageSieve protocol (RFC 5804) to the Dovecot Secure IMAP Server. In the literal sense, a pigeonhole is a a hole or recess inside a dovecot for pigeons to nest in. It is, however, also the name for one of a series of small, open compartments in a cabinet used for filing or sorting mail. As a verb, it describes the act of putting an item into one of those pigeonholes. The name `Pigeonhole’ therefore well describes an important part of the functionality that this project adds to Dovecot: sorting and filing e-mail messages.

Source: http://pigeonhole.dovecot.org/

dovecot-2.0.3

Dovecot is an open source IMAP and POP3 email server for Linux/UNIX-like systems, written with security primarily in mind. Dovecot is an excellent choice for both small and large installations. It’s fast, simple to set up, requires no special administration and it uses very little memory.

Source: http://dovecot.org/

Below you can find transcript of configuration and compilation session of Dovecot server and a script which I use for this purpose (as attachement).

dovecot-2.0-sieve-0.2.0

Interpreter Pigeonhole Sieve

Projekt Pigeonhole dostarcza Sieve jako plugina dla Dovecotowego agenta dostarczania poczty (LDA) jak również usługi LMTP. Plugin implementuje interpreter języka Sieve, który pozwala na filtrowanie przychodzących wiadomości używając skryptów zgodnych ze specyfikacją języka Sieve (RFC 5228). Skrypty Sieve mogą być modyfikowane przez użytkowników i dzięki temu użytkownik może decydować o obsłudze przychodzących wiadomości. Mogą być one dostarczane do konkretnych folderów, przekazywane, odrzucane itd.