The Perfect Server - Fedora 10 - Page 4
10 MySQL (5.0)To install MySQL, we do this: yum install mysql mysql-devel mysql-server Then we create the system startup links for MySQL (so that MySQL starts automatically whenever the system boots) and start the MySQL server: chkconfig --levels 235 mysqld on Now check that networking is enabled. Run netstat -tap | grep mysql It should show something like this: [root@server1 ~]# netstat -tap | grep mysql If it does not, edit /etc/my.cnf and comment out the option skip-networking: vi /etc/my.cnf
and restart your MySQL server: /etc/init.d/mysqld restart Run mysqladmin -u root password yourrootsqlpassword to set a password for the user root (otherwise anybody can access your MySQL database!). If the last command throws an error at you... [root@server1 named]# mysqladmin -h server1.example.com -u root password yourrootsqlpassword ... we can set the password as follows: connect to MySQL: mysql -u root -p Type in the password for the MySQL root user. Then, on the MySQL shell, do this: mysql> USE mysql; mysql> UPDATE user SET Password = password('yourrootsqlpassword') WHERE Host = 'server1.example.com' AND User = 'root'; mysql> UPDATE user SET Password = password('yourrootsqlpassword') WHERE Host = '127.0.0.1' AND User = 'root'; Run mysql> SELECT * FROM user; to make sure that all rows where the user is root have a password. If everything is looking ok, run mysql> FLUSH PRIVILEGES; ... and leave the MySQL shell: mysql> quit;
11 Postfix With SMTP-AUTH And TLSNow we install Postfix and Dovecot (Dovecot will be our POP3/IMAP server): yum install cyrus-sasl cyrus-sasl-devel cyrus-sasl-gssapi cyrus-sasl-md5 cyrus-sasl-plain postfix dovecot Now we configure SMTP-AUTH and TLS: postconf -e 'smtpd_sasl_local_domain =' We must edit /usr/lib/sasl2/smtpd.conf so that Postfix allows PLAIN and LOGIN logins (on 64bit systems, this file is in /usr/lib64/sasl2/smtpd.conf). It should look like this: vi /usr/lib/sasl2/smtpd.conf
Afterwards we create the certificates for TLS: mkdir /etc/postfix/ssl chmod 600 smtpd.key openssl x509 -req -days 3650 -in smtpd.csr -signkey smtpd.key -out smtpd.crt openssl rsa -in smtpd.key -out smtpd.key.unencrypted mv -f smtpd.key.unencrypted smtpd.key Next we configure Postfix for TLS: postconf -e 'smtpd_tls_auth_only = no' Then we set the hostname in our Postfix installation (make sure you replace server1.example.com with your own hostname): postconf -e 'myhostname = server1.example.com' After these configuration steps you should now have a /etc/postfix/main.cf that looks like this (I have removed all comments from it): cat /etc/postfix/main.cf
Now start Postfix, saslauthd, and Dovecot: chkconfig --levels 235 sendmail off To see if SMTP-AUTH and TLS work properly now run the following command: telnet localhost 25 After you have established the connection to your Postfix mail server type ehlo localhost If you see the lines 250-STARTTLS and 250-AUTH PLAIN LOGIN everything is fine. [root@server1 ssl]# telnet localhost 25 Type quit to return to the system's shell.
11.1 MaildirDovecot uses Maildir format (not mbox), so if you install ISPConfig on the server, please make sure you enable Maildir under Management -> Server -> Settings -> Email. ISPConfig will then do the necessary configuration. If you do not want to install ISPConfig, then you must configure Postfix to deliver emails to a user's Maildir (you can also do this if you use ISPConfig - it doesn't hurt ;-)): postconf -e 'home_mailbox = Maildir/'
|
Join the discussion.
www.seamlessenterprise.com
IP Convergence
Integrate your wireless and wireline networks.
Learn how from the experts at Sprint.
www.seamlessenterprise.com
Wireless & Wireline Integration
Thoughts, strategies and solutions: join the discussion
www.seamlessenterprise.com
Unified Communications 2009
Join the Discussion. Now.
www.seamlessenterprise.com





print: 
Recent comments
20 hours 58 min ago
22 hours 26 min ago
1 day 2 hours ago
1 day 4 hours ago
1 day 7 hours ago
1 day 8 hours ago
1 day 8 hours ago
1 day 9 hours ago
1 day 10 hours ago
1 day 11 hours ago