2012年1月18日 星期三

openSUSE 軟體源

http://ftp.cs.pu.edu.tw/Linux/OpenSuse/update/12.1/

http://gnupg.cdpa.nsysu.edu.tw/Linux/OpenSuSE/update/12.1/

SUSE 常用設定

重啟
rcapache2 restart

#網頁目錄
cd /srv/www
#apache 設定檔
cd /etc/apache2/conf.d
#系統目錄
cd /etc/sysconfig/

PHP.ini
/etc/php5/apache2/php.ini

APACHE_MODULES

crontab -e

yast -i gd

yast -i libpng
yast -i php5-gd php5-mbstring php5-mcrypt php-xml php5-pear

--
起始安裝
yast2 –-install apache2

yast2 –-install mysql mysql-tools

yast2 –-install php5 php5-mysql apache2-mod_php5

yast2 –-install php5-gd php5-mbstring php5-mcrypt php-xml php5-pear

rcmysql start

mysqladmin -u root password 'mysecretpassword'

chkconfig -a mysql

(Please substitute your own unique password for 'mysecretpassword')

pear install MDB2_driver_mssql

a2enmod php5

a2enmod -l

rcapache2 restart

chkconfig -a apache2

2012年1月17日 星期二

openSUSE 12 安裝 openwebmail FAQ

安裝後的網址 http://localhost/cgi-bin/openwebmail/openwebmail.pl


1.
yast2 -i postfix perl perl-Compress-Zlib perl-Text-Iconv
perl -MCPAN -e 'install HTML::Template' 
perl -MCPAN -e 'install Unix::SetUser' 


2. 配合apache安裝openwebmail 網頁


cd /srv/www/
wget http://openwebmail.org/openwebmail/download/current/openwebmail-current.tar.gz
tar zxvf openwebmail-current.tar.gz 
rm openwebmail-current.tar.gz 
mv /srv/www/data/openwebmail /srv/www/htdocs/


vi /srv/www/cgi-bin/openwebmail/etc/openwebmail.conf



ow_cgidir /srv/www/cgi-bin/openwebmail
ow_htmldir /srv/www/htdocs/openwebmail
default_language        zh_TW.Big5


cd /srv/www/cgi-bin/openwebmail/etc/


cp /srv/www/cgi-bin/openwebmail/etc/defaults/dbm.conf /srv/www/cgi-bin/openwebmail/etc/
vi dbm.conf
dbm_ext .pag
dbmopen_ext none
dbmopen_haslock no


cp /srv/www/cgi-bin/openwebmail/etc/defaults/auth_unix.conf /srv/www/cgi-bin/openwebmail/etc/
vi auth_unix.conf


#passwdfile_encrypted /etc/master.passwd
#passwdmkdb /usr/sbin/pwd_mkdb
passwdfile_plaintext /etc/passwd 
passwdfile_encrypted /etc/shadow 
passwdmkdb none


check_expire no
check_nologin no
check_shell no
check_cobaltuser no
change_smbpasswd no


初始化


/srv/www/cgi-bin/openwebmail/openwebmail-tool.pl --init


chmod 4555 /srv/www/cgi-bin/openwebmail/openwebmail*.pl 


chown root.mail /srv/www/cgi-bin/openwebmail/openwebmail*.pl


chmod


----


安裝FAQ
Q1: Can't locate HTML/Template.pm in @INC...
A1: perl -MCPAN -e 'install HTML::Template'


Q2. Cannot read /usr/local/www/cgi-bin/openwebmail/etc/lang! (No such file or directory)
A2:
mkdir /usr/local/www
ln -s /srv/www/cgi-bin /usr/local/www/
ln -s /srv/www/htdocs /usr/local/www/data


Q3./srv/www/cgi-bin/openwebmail/openwebmail.pl must be setuid to root to read the mail spools


vi /srvl/www/cgi-bin/openwebmail/etc/defaults/suid.conf 


have_savedsuid_support no

chmod 4555 /usr/bin/perl 

 之後,登入後就一切正常了。 


 Q4.


vi openwebmail-prefs.pl  line 1794


#sort => $sort,


--


# vi /etc/apache2/default-server.conf
================================================
Alias /openwebmail "/srv/www/htdocs/openwebmail"
ScriptAlias /webmail "/srv/www/cgi-bin/openwebmail/openwebmail.pl"
ScriptAlias /mail "/srv/www/cgi-bin/openwebmail/openwebmail.pl"
================================================


# rcapache2 restart