ubuntu server yapılandırması 2
tarih 13. Kas, 2009 yazar admin in Makale , Problem ve Çözümleri
Bu bölümde MySQL kurulum ve yapılandırması yapıyoruz. kısaca MySQL MySQL dünyanın en popüler açık kaynak veritabanı yazılımı, yazılım. Üstün hız, güvenilirlik ve kullanım kolaylığı ile, MySQL Web, Web 2.0, Saas, ISV, Telekom şirketleri kurumsal BT Yöneticileri tarafından bu hale gelmiştir.
Postfix ise IBM araştırma de yaygın olarak kullanılan Sendmail programına bir alternatif olarak hayatına başlayan mail prgramıdır.
3. Bölüm Ubuntu Server yapılandırması 2 (Ubuntu Jaunty Jackalope)
14 MySQL
MySQL kuruyoruz.
aptitude install mysql-server mysql-client libmysqlclient15-dev
MySQL root için bir şifre girmemizi isteyecektir.
Bu şifre @ localhost root
ile root@server1.example.com aynı şifreler olsun.
New password for the MySQL “root” user: <– Şifreniz
Repeat password for the MySQL “root” user: <– Şifreniz
MySQL i düzenliyoruz /etc/mysql/my.cnf burda bind-address = 127.0.0.1 olarak belirliyoruz.
[...]
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#bind-address = 127.0.0.1 [...]
MySQL resetliyoruz
/etc/init.d/mysql restart
çalıştıgını kontrol ediyoruz.
netstat -tap | grep mysql
çıktı aşağıdaki gibi olmalıdır.
root@server1:~
# netstat -tap | grep mysql
tcp 0 0 *:mysql *:* LISTEN 4318/mysqld root@server1:~#
15 Postfix SMTP-AUTH ve TLS
sasl2-bin libsasl2-modules procmail
sorulacak sorulara yanıt
General type of mail configuration: <– Internet Site
System mail name: <– server1.example.com
tekrar sorulara aşağıdaki gibi yanıtlayın.
General type of mail configuration: <– Internet Site
System mail name: <– server1.example.com
Root and postmaster mail recipient: <– [blank]
Other destinations to accept mail for (blank for none): <– server1.example.com, localhost.example.com,
localhost.localdomain, localhost
Force synchronous updates on mail queue? <– No
Local networks: <– 127.0.0.0/8
[::ffff:127.0.0.0]/104 [::1]/128 Use procmail for local delivery? <– Yes
Mailbox size limit (bytes): <– 0
Local address extension character: <– +
Internet protocols to use: <– all
sıradaki aşama
postconf -e ’smtpd_sasl_local_domain =’
postconf -e ’smtpd_sasl_auth_enable = yes’
postconf -e ’smtpd_sasl_security_options = noanonymous’
postconf -e ‘broken_sasl_auth_clients = yes’
postconf -e ’smtpd_sasl_authenticated_header = yes’
postconf -e ’smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination’
postconf -e ‘inet_interfaces = all’
echo ‘pwcheck_method: saslauthd’ >> /etc/postfix/sasl/smtpd.conf
echo ‘mech_list: plain login’ >> /etc/postfix/sasl/smtpd.conf
cat /etc/postfix/main.cf dosyasını aşağıdaki gibi yapıyoruz.
# See /usr/share/postfix/main.cf.dist for a commented,
more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA’s job.
append_dot_mydomain = no
# Uncomment the next line to generate “delayed mail” warnings
#delay_warning_time = 4h
readme_directory = no
# TLS parameters
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}
/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}
/smtp_scache
# See /usr/share/doc/postfix/TLS_README.gz in the
postfix-doc package for
# information on enabling SSL in the smtp client.
myhostname = server1.example.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = server1.example.com, localhost.example.com,
localhost.localdomain, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a “$EXTENSION”
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,
permit_mynetworks,reject_unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
Kimlik doğrulama saslauthd tarafından yapılacaktır.Düzgün çalışması için bir kaç şey değiştirmek zorundayız. / var / spool / aşağıdakileri yapmanız gerekir:
mkdir -p /var/spool/postfix/var/run/saslauthd
vi /etc/default/saslauthd
aşağıdaki gibi düzenliyoruz.
# See /usr/share/postfix/main.cf.dist for a commented, more complete version# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA’s job.
append_dot_mydomain = no
# Uncomment the next line to generate “delayed mail” warnings
#delay_warning_time = 4h
readme_directory = no
# TLS parameters
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
myhostname = server1.example.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = server1.example.com, localhost.example.com, localhost.localdomain, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a “$EXTENSION”
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
Postfix’e sasl kulanıcısı ekleyelim. ve yeniden başlatalım.
adduser postfix sasl
/etc/init.d/postfix restart
/etc/init.d/saslauthd start
telnet localhost 25
Postfix bağlantısını görmek için
ehlo localhost
aşağıdaki satırı görebiliyorsanız.
250-STARTTLS
ve
250-AUTH LOGIN PLAIN
sorun yok demektir.
Benim Ekran çıktım aşağıdaki gibidir.
root@server1:/etc/postfix/ssl# telnet localhost 25
Trying ::1…
Connected to localhost.localdomain.
Escape character is ‘^]’.
220 server1.example.com ESMTP Postfix (Ubuntu)
ehlo localhost
250-server1.example.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
quit
221 2.0.0 Bye
Connection closed by foreign host.
root@server1:/etc/postfix/ssl#
quit ile çıkıyoruz.
Ubuntu Server yapılandırması 1. bölüm
Ubuntu Server yapılandırması 3. bölüm

