2015年11月5日 星期四

[研究] OpenWebMail 2.54 快速安裝程式 (CentOS 7.1 x64)

[研究] OpenWebMail 2.54 快速安裝程式 (CentOS 7.1 x64)

2015-11-05

官方網站
http://openwebmail.org/

How to install Open Webmail 2.54 on CentOS 7 (x86_64)
http://openwebmail.org/openwebmail/download/centos/el7/readme.txt

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/ch-Web_Servers.html

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Security_Guide/sec-Using_Firewalls.html

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/SELinux_Users_and_Administrators_Guide/sect-Security-Enhanced_Linux-Working_with_SELinux-Enabling_and_Disabling_SELinux.html

OpenWebMail 最新一版是 21-Feb-2008 釋出,而且只有 i386 版,沒有 x86_64 版。

快速安裝程式 OpenWebMail.sh 內容如下


#!/bin/bash

echo -e "\033[31;42m ********** Install OpenWebMail 2.54 on CentOS 7.1 x64 ********** \033[0m"
echo -e "\033[31m 2015/11/05 ********** \033[0m"

# 關閉 SElinux,不然可能看到下面錯誤訊息
#   "Couldn't create File /var/log/openwebmail.log! (Permission denied)"

# Check SELinux status
if  [ "`grep SELINUX=disabled /etc/selinux/config`" == "" ]; then

# disable SELinux now
/usr/sbin/setenforce 0

# disable SELinux always
sed -i -e "s@SELINUX=enforcing@#SELINUX=enforcing@"   /etc/selinux/config
sed -i -e "s@SELINUX=permissive@#SELINUX=permissive@"   /etc/selinux/config
sed -i -e "/SELINUX=/aSELINUX=disabled"   /etc/selinux/config
fi

# Kill nptd on running...
ProcessID="`ps aux | grep ntpd | awk '{print $2}' `"
for i in $ProcessID
do
  echo $i
  kill -9 $i
done
ntpdate tick.stdtime.gov.tw

# Kill yum on running...
ProcessID="`ps aux | grep yum | awk '{print $2}' `"
for i in $ProcessID
do
  echo $i
  kill -9 $i
done

yum  -y  groupinstall "Basic Web Server"


#1) Enable and Start Web Service
systemctl start httpd
systemctl enable httpd
systemctl status httpd

#2) Enable and Start Firewall Service with port 80 (http) opened
systemctl start firewalld
systemctl enable firewalld
systemctl status firewalld

firewall-cmd --get-default-zone
firewall-cmd --zone=public --list-all
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --reload


#3) Install a Repostory File for CentOS 7
# 原文 cd /etc/yum.repo.d 寫錯,應該是 cd /etc/yum.repos.d
cd /etc/yum.repos.d wget ftp://openwebmail.org/pub/openwebmail/el7/openwebmail-el7.repo #4) Install Open Webmail 2.54 for CentOS 7 yum -y install openwebmail

#5) Install C Compiler (gcc) if you haven't already
yum -y install gcc

# 6) Configure Open Webmail 2.54 for CentOS 7 with 'openwebmail-tool'
# 最後有問題要回答
openwebmail-tool --init

#7) Login following URL with a regular user account.
#http://localhost/cgi-bin/openwebmail/openwebmail.pl

# 實測有看到這個錯誤訊息,所以必須修正
#8) If you see following error, run 'openwebmail-tool --fix'
#"/var/www/cgi-bin/openwebmail/.openwebmail.pl' must setuid to root"

/usr/local/bin/openwebmail-tool --fix

# 用瀏覽器載入網址
firefox  http://localhost/cgi-bin/openwebmail/openwebmail.pl   &


(下圖) 用 Linux 帳號登入


(下圖) 用 root 帳號登入會出錯


其中初始化的訊息如下,最後要答個問題

[root@localhost yum.repos.d]# openwebmail-tool --init -y

The version of Perl on your system (5.016003) does not support set user id.
Attempting to wrap the openwebmail perl files in a C wrapper to enable set
user id capability...

   Found C compiler /usr/bin/cc
   wrapping file: openwebmail-webdisk.pl...wrapped file already exists, skipping
   wrapping file: openwebmail.pl...wrapped file already exists, skipping
   wrapping file: openwebmail-abook.pl...wrapped file already exists, skipping
   wrapping file: openwebmail-advsearch.pl...wrapped file already exists, skipping
   wrapping file: openwebmail-cal.pl...wrapped file already exists, skipping
   wrapping file: openwebmail-folder.pl...wrapped file already exists, skipping
   wrapping file: openwebmail-main.pl...wrapped file already exists, skipping
   wrapping file: openwebmail-prefs.pl...wrapped file already exists, skipping
   wrapping file: openwebmail-read.pl...wrapped file already exists, skipping
   wrapping file: openwebmail-saprefs.pl...wrapped file already exists, skipping
   wrapping file: openwebmail-send.pl...wrapped file already exists, skipping
   wrapping file: openwebmail-spell.pl...wrapped file already exists, skipping
   wrapping file: openwebmail-tool.pl...wrapped file already exists, skipping
   wrapping file: openwebmail-vdomain.pl...wrapped file already exists, skipping
   wrapping file: openwebmail-viewatt.pl...wrapped file already exists, skipping


Creating UTF-8 locales...
langconv ar_AE.CP1256 -> ar_AE.UTF-8
langconv ar_AE.ISO8859-6 -> ar_AE.UTF-8
langconv bg_BG.CP1251 -> bg_BG.UTF-8
langconv ca_ES.ISO8859-1 -> ca_ES.UTF-8
langconv cs_CZ.ISO8859-2 -> cs_CZ.UTF-8
langconv da_DK.ISO8859-1 -> da_DK.UTF-8
langconv de_DE.ISO8859-1 -> de_DE.UTF-8
langconv el_GR.ISO8859-7 -> el_GR.UTF-8
langconv en_US.ISO8859-1 -> en_US.UTF-8
langconv es_AR.ISO8859-1 -> es_AR.UTF-8
langconv fi_FI.ISO8859-1 -> fi_FI.UTF-8
langconv fr_FR.ISO8859-1 -> fr_FR.UTF-8
langconv he_IL.CP1255 -> he_IL.UTF-8
langconv hr_HR.ISO8859-2 -> hr_HR.UTF-8
langconv hu_HU.ISO8859-2 -> hu_HU.UTF-8
langconv id_ID.ISO8859-1 -> id_ID.UTF-8
langconv it_IT.ISO8859-1 -> it_IT.UTF-8
langconv ko_KR.eucKR -> ko_KR.UTF-8
langconv lt_LT.CP1257 -> lt_LT.UTF-8
langconv nl_NL.ISO8859-1 -> nl_NL.UTF-8
langconv no_NO.ISO8859-1 -> no_NO.UTF-8
langconv pl_PL.ISO8859-2 -> pl_PL.UTF-8
langconv pt_BR.ISO8859-1 -> pt_BR.UTF-8
langconv pt_PT.ISO8859-1 -> pt_PT.UTF-8
langconv ro_RO.ISO8859-2 -> ro_RO.UTF-8
langconv ru_RU.KOI8-R -> ru_RU.UTF-8
langconv sk_SK.ISO8859-2 -> sk_SK.UTF-8
langconv sl_SI.CP1250 -> sl_SI.UTF-8
langconv sr_CS.ISO8859-2 -> sr_CS.UTF-8
langconv sv_SE.ISO8859-1 -> sv_SE.UTF-8
langconv th_TH.TIS-620 -> th_TH.UTF-8
langconv tr_TR.ISO8859-9 -> tr_TR.UTF-8
langconv uk_UA.KOI8-U -> uk_UA.UTF-8
...done.

Welcome to the OpenWebMail!

This program is going to send a short message back to the developer,
so we could have the idea that who is installing and how many sites are
using this software, the content to be sent is:

OS: Linux 3.10.0-229.el7.x86_64 x86_64
Perl: 5.016003
WebMail: OpenWebMail 2.54 20141206

Send the site report?(Y/n)   n  
sending report...

Thank you.

[root@localhost yum.repos.d]#

相關設定在

/var/www/cgi-bin/openwebmail/etc/openwebmail.conf
/var/www/cgi-bin/openwebmail/etc/defaults/dbm.conf

(完)

相關

[研究] OpenWebMail 2.54 快速安裝程式 (CentOS 7.1 x64)
http://shaurong.blogspot.com/2015/11/openwebmail-254-centos-71-x64.html

How to install Open Webmail 2.54 on CentOS 7 (x86_64)
http://openwebmail.org/openwebmail/download/centos/el7/readme.txt

[研究] OpenWebMail 2.53 快速安裝程式 (CentOS 6.5 x64)
http://shaurong.blogspot.com/2014/01/openwebmail-253-centos-65-x64_12.html
http://forum.icst.org.tw/phpbb/viewtopic.php?f=20&t=80686

[研究] OpenWebMail 2.53 安裝 (CentOS 6.5 x64)
http://shaurong.blogspot.com/2014/01/openwebmail-253-centos-65-x64.html
http://forum.icst.org.tw/phpbb/viewtopic.php?f=20&t=80685

[研究] OpenWebMail 2.53 安裝 (CentOS 5.6 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=20223


沒有留言:

張貼留言