Instalando servidores Mysql y Correo en Ubuntu 9.04 64Bits

Vamos a instalar y configurar Postfix, Courier, Saslauthd, MySQL,phpMyAdmin, rkhunter, binutils. Vamos a por ello…

Cambiamos el Shell por defecto, necesitamos /bin/bash, no /bin/dash

dpkg-reconfigure dash

Al instalarlo, nos hará la siguiente pregunta:

Install dash as /bin/sh? No

Actualizamos el servidor

aptitude updateaptitude safe-upgradereboot

Vamos a desactivar una extension de seguridad llamada AppArmor, nuestra intención no es tener un sistema de seguridad, sinó un servidor Ubuntu funcionando con los programas mas usuales que nos dejaran posteriormente configurar el proxy y el servidor de correo, así que no necesitamos esta funcionalidad, a parte que siempre me da problemas… pero vamos, estoy seguro que habrá quien se lleve las manos a la cabeza cuando lea esto.

/etc/init.d/apparmor stop
update-rc.d -f apparmor remove
aptitude remove apparmor apparmor-utils

Ahora hacemos las sincronización de hora con internet

aptitude install ntp ntpdate

Y ahora vamos a instalar todos estos paquetes con un simple comando

aptitude install postfix postfix-mysqlpostfix-doc mysql-client mysql-server
courierauthdaemoncourier-authlib-mysql courier-popcourier-pop-ssl courier-imap
courier-imap-ssllibsasl2-2 libsasl2-modules libsasl2-modulessqlsasl2-bin
 libpam-mysql openssl maildropgetmail4 rkhunter binutils

Nos hará un seguido de preguntas:

New password for the MySQL “root” user: Aquí assignaremos el password para el usuario root de Mysql
Repeat password for the MySQL “root” user: Volvemos a poner el password
Create directories for web-based administration? No
General type of mail configuration: Internet Site
System mail name: Aqui introduciremos el nombre del servidor de correo SrvUbuntu.dominio.com
SSL certificate required Ok

Ok, ya tenemos instalados estos paquetes, ahora vamos a corregir algunas cosas, primero que podamos conectar al Mysql no solo desde el localhost, porque a veces nos interesa poder conectar con programas gestion desde nuestro ordenador y como hemos comentado antes, no es un servidor de seguridad.

Editamos el fichero /etc/mysql/my.cnf y comentamos la linea bind-address = 127.0.0.1

vim /etc/mysql/my.cnf

#bind-address = 127.0.0.1

Una vez hecho esto, reiniciamos el servidor Mysql

/etc/init.d/mysql restart

Ok vamos a por los certificados SSL de correo, durante la instalación se han creado usando el nombre de la máquina “localhost” pero ahora, le hemos cambiado el nombre, tenemos que borrar esos certificados y volverlos a generar usando el nombre real de nuestra máquina.

cd /etc/courier
rm -f /etc/courier/imapd.pem
rm -f /etc/courier/pop3d.pem

Una vez hecho esto, modificamos el fichero /etc/courier/imapd.cnf y /etc/courier/pop3d.cnf remplazando las cadenas CN anteriores por las nuevas.

vim /etc/courier/imapd.cnf

y escribimos

[...]
CN=srvubuntu.virtualizacionesx.com
[...]

vim /etc/courier/pop3d.cnf

[...]
CN=srvubuntu.virtualizacionesx.com
[...]

Ahora vamos a crear nuevamente los certificados

mkimapdcert
mkpop3dcert

Y rearrancar los servicios

/etc/init.d/courier-imap-ssl restart
/etc/init.d/courier-pop-ssl restart

Ok ya tenemos los servidores de correo funcionando, ahora vamos a poner los Antispam y Antivirus:

aptitude install amavisd-new spamassassin clamav clamav-daemon zoo
unzip bzip2 arj nomarch lzop cabextract apt-listchanges libnet-ldap-perl
libauthen-sasl-perl clamav-docs daemon libio-string-perl libio-socket-ssl-perl
libnet-ident-perl zip libnet-dns-perl

Perfecto, ahora vamos a poner SquireMail para darle un cliente Web a estos servidores

aptitude install squirrelmail
ln -s /usr/share/squirrelmail/ /var/www/webmail
squirrelmail-configure

SquirrelMail Configuration : Read: config.php (1.4.0)
———————————————————
Main Menu –
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages

D. Set pre-defined settings for specific IMAP servers

C Turn color on
S Save data
Q Quit

Command >>  D

SquirrelMail Configuration : Read: config.php

———————————————————

While we have been building SquirrelMail, we have discovered some preferences that work better with some servers that don’t work so well with others. If you select your IMAP server, this option will set some pre-defined settings for that server.

Please note that you will still need to go through and make sure everything is correct. This does not change everything. There are only a few settings that this will change. Please select your IMAP server:

bincimap = Binc IMAP server courier
Courier IMAP server cyrus = Cyrus IMAP server dovecot
Dovecot Secure IMAP server exchange = Microsoft Exchange IMAP server
hmailserver = hMailServer
macosx = Mac OS X Mailserver
mercury32 = Mercury/32
uw = University of Washington’s IMAP server
quit = Do not change anything Command

Command–> courier

SquirrelMail Configuration : Read: config.php
———————————————————
While we have been building SquirrelMail, we have discovered some preferences that work better with some servers that don’t work so well with others. If you select your IMAP server, this option will set some pre-defined settings for that server.
Please note that you will still need to go through and make sure everything is correct. This does not change everything. There are only a few settings that this will change.
Please select your IMAP server:
bincimap = Binc IMAP server
courier = Courier IMAP server
cyrus = Cyrus IMAP server
dovecot = Dovecot Secure IMAP server
exchange = Microsoft Exchange IMAP server
hmailserver = hMailServer
macosx = Mac OS X Mailserver
mercury32 = Mercury/32
uw = University of Washington’s IMAP server

quit = Do not change anything

Command –>; courier

imap_server_type = courier
default_folder_prefix = INBOX.
trash_folder = Trash
sent_folder = Sent
draft_folder = Drafts
show_prefix_option = false
default_sub_of_inbox = false
show_contain_subfolders_option = false
optional_delimiter = .
delete_folder = true

Press any key to continue… –> ENTER

SquirrelMail Configuration : Read: config.php (1.4.0)
———————————————————
Main Menu —
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages

D. Set pre-defined settings for specific IMAP servers

C Turn color on
S Save data
Q Quit

Command –> S

SquirrelMail Configuration : Read: config.php (1.4.0)
———————————————————
Main Menu —
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages

D. Set pre-defined settings for specific IMAP servers
C Turn color on
S Save data
Q Quit

Command –> S

Data saved in config.php
Press enter to continue…
–> ENTER

SquirrelMail Configuration : Read: config.php (1.4.0)
———————————————————
Main Menu —
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages

D. Set pre-defined settings for specific IMAP servers

C Turn color on
S Save data
Q Quit
Command –> Q

3 comments to Instalando servidores Mysql y Correo en Ubuntu 9.04 64Bits

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. Nulla nulla lorem, suscipit in posuere in, interdum non magna.