Archive for March, 2008

Music – Rhythmbox

admin March 18th, 2008

Enable mp3 vorbis flac in gentoo :

media-sound/rhythmbox python dbus doc flac keyring libnotify mad tagwriting vorbis

convert all Big5 tag to unicode :
install mutagen : media-libs/mutagen Mutagen is an audio metadata tag reader and writer implemented in pure Python.

find . -iname "*.mp3" -execdir mid3iconv -e big5 {} ;

Pure-ftpd with TLS

admin March 18th, 2008

Install

sudo emerge pure-ftpd (with SSL)

Setting

sudo vim /etc/conf.d/pure-ftpd

IS_CONFIGURED=”yes”
MISC_OTHER=”-x -R -Z –tls=2″ (2 = TLS only, 1 = TLS avaliable, 0 = plaintext)
LOG=”-f ftp” (log ’s facility name)

Gen Cert and Key

openssl req -new -x509
  -keyout server.pem -out server.pem
  -days 365 -nodes

ref : http://help.cs.nctu.edu.tw/blog/

ref : http://trac.lighttpd.net/

Gentoo Resource limit

admin March 18th, 2008

To make restrict on our linux* users , just put rules into
/etc/security/limits.conf  :

# For undergraduates and  master students : Max process  = 256
# No more  horrible fork()
@cs       hard      nproc    256
@gcs      hard      nproc    256

# For undergraduates and master students: Max cpu time = 4 mins
# Prevent buggy NP homework programs from eating all cpu time.
@cs       hard      cpu   256
@gcs      hard      cpu    256

# A little evil choice ( I haven’t used it in real life )
# Don’t be too serious on this! I’m just TALKING about it.
# Theoretically speaking, it forces every user start program from nice
value 19 and let
# simulate programs occupy less system resources. (XD)
@cs       hard     nice  19
@gcs       hard     nice  19

By the way, it’s usually give no restriction to @dcs group.

There are abound useful setting with description in the comments of
limits.conf ,
it worths to read!

ref : <a href=”http://help.cs.nctu.edu.tw/blog/categories/linux/”>http://help.cs.nctu.edu.tw/blog/categories/linux/</a>