Home

安裝 roundcube on centos 5.5

  • Category: 電腦相關
  • Last Updated: Sunday, 28 November 2010 15:34
  • Published: Sunday, 28 November 2010 15:00
  • Written by sam

日前都是使用openwebmail 居多

這次來裝個不一樣的

本次目標為roundcube

它需要mysql php apache 請使用yum 逐一安裝即可

唯本次安裝的roundcube 因版本的要求 所以php的版本要新的…

使用yum安裝的話 要先加入測試版 server 資料庫

vi /etc/yum.repos.d/CentOS-Base.repo

[c5-testing]
name=CentOS-5 Testing
baseurl=http://dev.centos.org/centos/5/testing/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing

yum update php*

至www.roundcube.net download 套件

解壓縮之後 丟至 /var/www/html/

至mysql 建立 資料庫

至 /var/www/html/SQL/

mysql -u root round -p -h localhost round < mysql.initial.sql

以上為匯入資料庫內容 帳號密碼 請自行修改

修改 /var/www/html/config下 兩個檔案

cp db.inc.php.dist db.inc.php

cp main.inc.php.dist main.inc.php

修改 db.inc.php

$rcmail_config['db_dsnw'] = 'mysql://帳號:密碼@localhost/剛上面建立之資料庫名';

修改 main.inc.php

修改 default_host 依實際情況填寫

mail_domain  依實際情況填寫

smtp_server  依實際情況填寫

auto_create_user true;

create_default_folders true;

language zh_TW

default_charset UTF-8

完成後 請移除installer資料夾

登入 試試吧!

Photobucket

安裝 postfix dovecot cyrus-sasl on centos 5.5

  • Category: 電腦相關
  • Last Updated: Sunday, 28 November 2010 15:34
  • Published: Sunday, 28 November 2010 13:12
  • Written by sam

作個筆記…不過是是事隔了一個星期了 可能會有點不清楚…

首先當然是關掉centos預設的sendmail

先看有沒有啟動 netstat -ntulp |grep :25 查看監聽埠

service sendmail stop 停止服務

chkconfig sendmail off 關了它

chkconfig --list sendmail  確認是否關閉

rpm -e sendmail 移除…

安裝 yum -y install postfix cyrus-sasl dovecot

修改 postfix 設定檔

vi /etc/postfix/main.cf

直接貼上我的內容 只需修改幾個重點位置即可

可以在/usr/sbin/postconf -n

能看到以下資訊

 

alias_database = hash:/etc/aliases

alias_maps = hash:/etc/aliases

broken_sasl_auth_clients = yes

command_directory = /usr/sbin

config_directory = /etc/postfix

daemon_directory = /usr/libexec/postfix

debug_peer_level = 2

home_mailbox = Maildir/

html_directory = no

inet_interfaces = all

mail_owner = postfix

mailbox_command = /usr/libexec/dovecot/deliver

mailq_path = /usr/bin/mailq.postfix

manpage_directory = /usr/share/man

mydestination = $myhostname, localhost.$mydomain, localhost, gotdns.com, myla.gotdns.com,       mail.myla.gotdns.com

mydomain = gotdns.com

myhostname = myla.gotdns.com

mynetworks = 192.168.0.0/16, 127.0.0.0/8

newaliases_path = /usr/bin/newaliases.postfix

queue_directory = /var/spool/postfix

readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES

sample_directory = /usr/share/doc/postfix-2.3.3/samples

setgid_group = postdrop

smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination

smtpd_sasl_auth_enable = yes

smtpd_sasl_security_options = noanonymous

unknown_local_recipient_reject_code = 550

在dovecot 只需修改

 

vi /etc/dovecot.conf

於main.cf 加入 mailbox_command = /usr/libexec/dovecot/deliver

protocols = pop3 imap --> 之後要安裝 roundcube 用!

service dovecot start 啟動

netstat -ntulp |grep :110 看有無啟動

啟動 suslauthd

於main.cf 加入

smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination

smtpd_sasl_auth_enable = yes

smtpd_sasl_security_options = noanonymous

unknown_local_recipient_reject_code = 550

 

重啟 postfix

測試 smtp 認證是否有成功啟動

telnet x.x.x.x 25

ehlo localhost

看有無出現 250-AUTH=PLAIN CRAM-MD5 DIGEST-MD5 LOGIN

有就是ok了

最主要收發信 重點還是在於dns 不過目前這樣的設定 在內網是沒有問題的了

 

 

 

 

安裝 mysql on centos 5.5

  • Category: 電腦相關
  • Last Updated: Tuesday, 23 November 2010 20:41
  • Published: Tuesday, 23 November 2010 20:23
  • Written by sam

1.在centos 裝 mysql 還蠻簡單的…

移除舊的 rm -rf /var/lib/mysql

yum -y install mysql mysql-server

2.安裝好mysql 之後先為 root 這個使用者加上密碼

mysqladmin -u root password '1234'

更改的話 mysqladmin -u root -p password 12345

Enter password: key 上 舊的就行了

3.service mysqld start

4.開機啟動 chkconfig mysqld on

#加入 chkconfig --add mysqld