9月 12, 2013

在 Debian 7 環境下執行 rTorrent 0.8.6

Debian 7 "Wheezy" 預設安裝的 rTorrent 版本是:0.9.2

陸續測了幾回合,穩定性都不是很理想,只要下載的檔案數一多,程式整個就炸掉了(Segmentation fault)。想裝回 Debian 6 上的舊版(ver 0.8.6) 又擔心套件庫大亂。最後只好研究一下 rTorrent 這個 package 到底封裝了什麼。

出乎意料地單純,檔案分佈在三個資料夾中:
/usr/bin/rtorrent
/usr/share/doc/rtorrent/NEWS.Debian.gz
/usr/share/doc/rtorrent/changelog.Debian.gz
/usr/share/doc/rtorrent/copyright
/usr/share/doc/rtorrent/examples/fixSession080.py.gz
/usr/share/man/man1/rtorrent.1.gz
那何不先裝新版的 rTorrent 後,再抽換舊版的執行檔?反正關鍵程式只有一個。

1. 所以先裝上 0.9.2 版的 rTorrent,讓 apt 套件庫認定已經安裝該軟體:
# apt-get install rtorrent
2. 取得舊版 v0.8.6 的 rTorrent 及其相依套件:
# dpkg -i libssl0.9.8_0.9.8o-4squeeze14_i386.deb
# dpkg -i libtorrent11_0.12.6-2_i386.deb
# ar x rtorrent_0.8.6-1_i386.deb ( 然後再解開 data.tar.gz 可取得執行檔 )
3. 最後把舊版的 rTorrent 拷到 /usr/bin/ 目錄下面。整個大功告成。

9月 08, 2013

run OpenWebMail on Debian 7


# apt-get install build-essential

# cpan HTML::Template

# wget http://openwebmail.acatysmoof.com/download/current/openwebmail-current.tar.gz

# touch /var/log/openwebmail.log

# chown root:mail /var/log/openwebmail.log

# tar -zxvf openwebmail-current.tar.gz

# vim cgi-bin/openwebmail/etc/openwebmail.conf

    ow_cgidir               /var/www/cgi-bin/openwebmail
    ow_cgiurl               /cgi-bin/openwebmail
    ow_htmldir              /var/www/openwebmail
    ow_htmlurl              /openwebmail
  
# cp cgi-bin/openwebmail/etc/defaults/auth_unix.conf  cgi-bin/openwebmail/etc/

# vim cgi-bin/openwebmail/etc/auth_unix.conf
  
    passwdfile_plaintext    /etc/passwd
    passwdfile_encrypted    /etc/shadow
    passwdmkdb              none
  
# cp cgi-bin/openwebmail/etc/defaults/dbm.conf  cgi-bin/openwebmail/etc/

# vim cgi-bin/openwebmail/etc/dbm.conf

    dbm_ext           .pag
    dbmopen_ext       none
    dbmopen_haslock   no
  
# mv cgi-bin/openwebmail/ /var/www/cgi-bin/
# mv data/openwebmail/ /var/www/

# cd /var/www/cgi-bin/openwebmail/
# chmod 4755 ./misc/tools/wrapsuid/wrapsuid.pl
# ./misc/tools/wrapsuid/wrapsuid.pl /var/www/cgi-bin/openwebmail/openwebmail*.pl
# chmod 600 ./misc/tools/wrapsuid/wrapsuid.pl
# chmod 4755 openwebmail*.pl
# ./openwebmail-tool.pl --init