Tuesday, October 21, 2008
Free g.729 and g.723.1 codecs
Download the codecs from http://asterisk.hosting.lv. Separate codecs are available for both g.729 and g.723.1.
Because the free ones are pre-compiled, we'll need to download the correct codec for the Asterisk box. Run cat /proc/cpuinfo and note the output. Look specifically at the model name and the flags, such as:
Process: 0
vendor_id: Genuine Intel
cpu family: 6
model: 8
model name: Pentium III (Coppermine)
stepping: 3
cpu MHz: 648.110
cache size: 256 KB
fdiv_bug: no
hlt_bug: no
f00f_bug: no
coma_bug: no
fpu: yes
fpu_exception: yes
cpuid level: 2
wp: yes
flags: fpu vme de pse tsc msr pae mce cx8 mtrr pge mca cmov pat pse36 mmx fxsr sse
bogomips: 1297.41
From this information we can see that it is a Pentium III processor and it is using sse. This is the 2 bits of required information that we need. If you don’t see sse in your flag then the file you need must contain the words no-sse.
So from the information above to obtain the G729 codec we need to get the file codec_g729-gcc-pentium3.so and for the G723 codec we need to get the file g723-gcc-pentium3.so.
After downloading the codec, store it in /usr/lib/asterisk/modules.
Note: if Asterisk doesn't start, you may need to download the icc versions instead of the 'gcc' ones.
Because the free ones are pre-compiled, we'll need to download the correct codec for the Asterisk box. Run cat /proc/cpuinfo and note the output. Look specifically at the model name and the flags, such as:
Process: 0
vendor_id: Genuine Intel
cpu family: 6
model: 8
model name: Pentium III (Coppermine)
stepping: 3
cpu MHz: 648.110
cache size: 256 KB
fdiv_bug: no
hlt_bug: no
f00f_bug: no
coma_bug: no
fpu: yes
fpu_exception: yes
cpuid level: 2
wp: yes
flags: fpu vme de pse tsc msr pae mce cx8 mtrr pge mca cmov pat pse36 mmx fxsr sse
bogomips: 1297.41
From this information we can see that it is a Pentium III processor and it is using sse. This is the 2 bits of required information that we need. If you don’t see sse in your flag then the file you need must contain the words no-sse.
So from the information above to obtain the G729 codec we need to get the file codec_g729-gcc-pentium3.so and for the G723 codec we need to get the file g723-gcc-pentium3.so.
After downloading the codec, store it in /usr/lib/asterisk/modules.
Note: if Asterisk doesn't start, you may need to download the icc versions instead of the 'gcc' ones.
Slimming down Asterisk
Use the following as a starting point:
[modules]
autoload=no
load => res_indications.so
load => res_features.so
load => res_agi.so
load => res_crypto.so
load => res_musiconhold.so
load => pbx_functions.so
load => pbx_spool.so
load => pbx_loopback.so
load => pbx_config.so
;load => chan_zap.so
load => chan_local.so
load => chan_features.so
load => chan_sip.so
;load => cdr_manager.so
;load => cdr_pgsql.so
load => cdr_addon_mysql.so
load => cdr_csv.so
load => codec_adpcm.so
load => codec_gsm.so
load => codec_a_mu.so
load => codec_ulaw.so
load => codec_alaw.so
load => codec_g726.so
load => format_gsm.so
load => format_wav_gsm.so
load => format_g723.so
load => format_g726.so
load => format_g729.so
load => format_pcm_alaw.so
load => format_pcm.so
load => format_sln.so
load => format_wav.so
load => func_callerid.so
load => app_playback.so
load => app_softhangup.so
load => app_setcidname.so
load => app_milliwatt.so
load => app_macro.so
load => app_verbose.so
load => app_setcdruserfield.so
load => app_read.so
load => app_dial.so
load => app_cdr.so
load => app_cut.so
load => app_echo.so
load => app_setcallerid.so
load => app_readfile.so
load => app_setcidnum.so
load => app_db.so
[global]
chan_modem.so = no
Storage calculation for Recordings
Basic calculation
Based on self-generated white noise file of 30 seconds, sampled at 8KHz in GSM format:
Assumptions
Storage capacity approximations
Based on self-generated white noise file of 30 seconds, sampled at 8KHz in GSM format:
- 30 secs requires 49KB space
- 1 min -> 100KB
- 1 hr -> 6MB
Assumptions
- Operating hours: 9 hours a day, 26 days a month
- Phone lines are 100% saturated 100% of the time:
- Total hours a month = 30 * 9 * 26 = 7,020 hours of recording
- Total server storage capacity = 600GB
- OS and applications consume 100GB. Remaining space = 500GB
- 7,020 hrs -> 42GB, e.g. 1 month requires 42GB storage space
Storage capacity approximations
- 60GB = 10,000 hours = 416 days' worth of recordings
- 80GB = 13,333 hours = 555 days' worth of recordings
- 100GB = 16,666 hours = 695 days' worth of recordings
- 120GB = 20,000 hours = 832 days' worth of recordings
- 160GB = 26,666 hours = 1,111 days' worth of recordings
- 200GB = 33,333 hours = 1,388 days' worth of recordings
Zimbra : Spam & AV
http://www.zimbra.com/forums/administrators/5286-spam-problems-print.html
http://sietse.net/exoops/modules/Zimbra/#tt030
http://www.howtoforge.com/adding-and-updating-spamassassin-rulesets-with-rulesdujour
http://www.zimbra.com/forums/administrators/2877-spam-accounts-auto-training-error-print.html
http://www.zimbra.com/forums/administrators/1015-solved-howto-update-clamav.html
http://www.zimbra.com/forums/administrators/3743-clamav-upgrade.html#post21195
http://www.clamav.net/download/sources
http://wiki.zimbra.com/index.php?title=Updating_CLAMAV
http://sietse.net/exoops/modules/Zimbra/#tt030
http://www.howtoforge.com/adding-and-updating-spamassassin-rulesets-with-rulesdujour
http://www.zimbra.com/forums/administrators/2877-spam-accounts-auto-training-error-print.html
http://www.zimbra.com/forums/administrators/1015-solved-howto-update-clamav.html
http://www.zimbra.com/forums/administrators/3743-clamav-upgrade.html#post21195
http://www.clamav.net/download/sources
http://wiki.zimbra.com/index.php?title=Updating_CLAMAV
Wednesday, June 4, 2008
Monday, May 26, 2008
Sunday, May 25, 2008
Syarat & Terma EURO 2008 Yahoo Fantasy Football
Aku dah menterjemahkan syarat dan terma untuk permainan fantasi ini kepada kurang memahami Bahasa London. Ye la kan, karang kalau dapat point kurang mula la nak bagi alasan, tak tahu syarat la, cikgu bahasa inggeris mati la, sibuk bercinta masa kelas bahasa inggeris la, berangan nak masuk pertandingan raja lawak la dan mcm2 lagi.
Jadi inilah dia:
Syarat dan Terma
THE GAME
Pilih skuad anda dengan membelanjakan badget sebanyak 200 juta pound.
Kami telah menetapkan harga tertentu kepada setiap pemain.
Pasukan anda akan diberi mata bergantung kepada kecemerlangan pemain pada akhir setiap perlawanan.
Anda boleh ganti pemain atau merombak skuad anda selepas itu.
Permainan ini adalah mengikut perlawanan sebenar. Banyak hadiah menanti anda sepanjang berlangsungnya EURO.
SKUAD ANDA
Pembetukkan skuad
Telitikan senarai pemain-pemain yang telah disenaraikan terlebih dahulu dan bentuk skuad anda dengan syarat-syarat yang ditetapkan:
Badget anda ialah 200 juta pound.
Skuad mestilah mempunyai seramai 14 pemain dan tidak melebihi 21 pemain.
Barisan pemain di dalam skuad:
Anda boleh menukar barisan pemain diantara perlawanan, dimana timbulnya isu kurang perform, injured dan sebagainya dengan pencaturan skuad yang sedia ada.
Andainya lebih dari satu pemain yang digugurkan, anda boleh membeli pemain baru dari Transfer Market.
Anda boleh menukar barisan skuad 15 minit sebelum sepak mula. Mata akan diberikan pada setiap akhir perlawanan.
Jadual perlawanan:
Perlawanan ini dibahagikan kepada 6 fasa. Penukaran pemain boleh dibuat pada bila-bila masa.
Fasa 1 : June 07-10, 2008 - Group phase I
Fasa 2 : June 11-14, 2008 - Group phase II
Fasa 3 : June 15-18, 2008 - Group phase III
Fasa 4 : June 19-22, 2008 - Quater final
Fasa 5 : June 25-26, 2008 - Semi final
Fasa 6 : June 29, 2008 - Final
Pilihan Formasi:
Anda boleh memilih formasi formasi yang telah ditetapkan seperti berikut:
* 3-4-3
* 4-3-3
* 3-5-2
* 4-4-2
Pengiraan mata:
Penjumlahan mata akan dibuat pada setiap keesokan pagi selepas akhir perlawanan pada hari itu.
Kapitan:
Anda boleh menentukan salah seorang pemain sebagai kapten dari kotak di sebelah kanan iaitu diatas senarai pemain simpanan anda.
Anda boleh menukar kapten anda pada bila-bila masa. Mata yang diperolehi oleh kapten akan digandakan.
Transfer market:
Anda boleh membentuk dan membeli pemain dari Transfer Market tanpa had.
Liga Persendirian:
Perbezaan mata bagi 5 pemain terbaik yang dikumpulkan oleh pemain didalam liga persendirian akan diambil kira dan dijumlahkan untuk menetapkan ranking keseluruhan liga-liga persendirian.
Jadi sama-sama la kita berjuang untuk liga kita iaitu liga Malaysia Gemilang.
Pengiraan Mata:
Attacking:
Gol : 7 (+3 untuk Shot on Target = 10)
Assist : 4
Gol Kemenangan : +2
Set-Piece Gol : +3
Shot on Target : 3
Cross yang berjaya : 1
Perolehan Foul : 1
Perolehan Corner : 1
Kegagalan Penalti/Save : -5
Defending/Disiplin:
Blocked Shot : 2
Mencelah passing : 1
Tackle yang berjaya : 1
Permainan Bersih : 4
Last-man Saving Tackle : 2
Foul : -1
Bagi Penalti : -3
Own Gol : -3
Kad kuning : -3
Kad merah : -6
Golkeeper:
Menang : 4
Kalah : -2
Seri : 1
Save : 2
Save Penalti : 6
Permainan Bersih : 5
Gol Bolos : -3
Lompat 1 inci macam Ayen : -10
Sesi Soal Jawab:
S: Berapa bayaran yang dikenakan untuk penyertaan?
J: Penyertaan adalah PERCUMA.
S: Adakah harga bagi pemain akan meningkat sepanjang waktu pertandingan?
J: Tidak
S: Berapakah harga bagi pemain bila saya menjualnya?
J: Anda akan menjual pada harga yang sama seperti yang dibeli.
Bermakna anda tidak akan untung atau rugi sewaktu sesi jual beli.
Contohnya: Kalau anda beli Eddie pada harga 38juta pound anda akan
menerima 38juta pound juga jika anda menjualnya. Tapi rugi jual dia,
sebab dia terer giler.
S: Adakah saya akan menerima duit tambahan sepanjang waktu pertandingan?
J: Tidak
S: Adakah pemain simpanan akan mendapat mata?
J: Mungkin. Anda perlu membeli pemain untuk setiap posisi (Goli,
Defender, Midfield, Attack). Seandainya salah seorang pemain kesebelasan utama tidak mendapat mata, pemain simpanan akan mengambil alih dan diberikan mata.
S: Bagaimana nak tahu berapakah mata yang diperolehi oleh pemain saya?
J: Pilih "Previous Match Day" apabila anda melihat skuad anda.
S: Bolehkah saya memerhatikan mata bagi perlawanan?
J: Ya, boleh. Boleh blah!! Klik sini: http://uk.eurofantasyfootball.yahoo.net/app/wertung.jsp
S: Apa akan terjadi apabila ada pasukan yang terkeluar?
J: Tiada apa-apa. Cuma, tiada mata selanjutnya bagi pemain pasukan itu. Jika anda memiliki pemain sedemikian, cepat-cepat la gantikan pemain itu.
S: Adakah saya akan mendapat mata tambahan kalau pemain cuma memperagakan jersey dan gaya rambut tanpa berlari sewaktu perlawanan?
J: Sudah tentu TIDAK. Cepat-cepat la jual pemain seperti itu.
S: Adakah Gol keeper akan mendapat mata tambahan jika baju masuk dalam dan memakai jersey yang terang?
J: Sudah tentu.
S: Bolehkah pemain membawa masuk beg plastik beras cap masjid ke padang?
J: Sudah tentu. Beras mahal sekarang ni.
Jadi inilah dia:
Syarat dan Terma
THE GAME
Pilih skuad anda dengan membelanjakan badget sebanyak 200 juta pound.
Kami telah menetapkan harga tertentu kepada setiap pemain.
Pasukan anda akan diberi mata bergantung kepada kecemerlangan pemain pada akhir setiap perlawanan.
Anda boleh ganti pemain atau merombak skuad anda selepas itu.
Permainan ini adalah mengikut perlawanan sebenar. Banyak hadiah menanti anda sepanjang berlangsungnya EURO.
SKUAD ANDA
Pembetukkan skuad
Telitikan senarai pemain-pemain yang telah disenaraikan terlebih dahulu dan bentuk skuad anda dengan syarat-syarat yang ditetapkan:
Badget anda ialah 200 juta pound.
Skuad mestilah mempunyai seramai 14 pemain dan tidak melebihi 21 pemain.
Barisan pemain di dalam skuad:
Anda boleh menukar barisan pemain diantara perlawanan, dimana timbulnya isu kurang perform, injured dan sebagainya dengan pencaturan skuad yang sedia ada.
Andainya lebih dari satu pemain yang digugurkan, anda boleh membeli pemain baru dari Transfer Market.
Anda boleh menukar barisan skuad 15 minit sebelum sepak mula. Mata akan diberikan pada setiap akhir perlawanan.
Jadual perlawanan:
Perlawanan ini dibahagikan kepada 6 fasa. Penukaran pemain boleh dibuat pada bila-bila masa.
Fasa 1 : June 07-10, 2008 - Group phase I
Fasa 2 : June 11-14, 2008 - Group phase II
Fasa 3 : June 15-18, 2008 - Group phase III
Fasa 4 : June 19-22, 2008 - Quater final
Fasa 5 : June 25-26, 2008 - Semi final
Fasa 6 : June 29, 2008 - Final
Pilihan Formasi:
Anda boleh memilih formasi formasi yang telah ditetapkan seperti berikut:
* 3-4-3
* 4-3-3
* 3-5-2
* 4-4-2
Pengiraan mata:
Penjumlahan mata akan dibuat pada setiap keesokan pagi selepas akhir perlawanan pada hari itu.
Kapitan:
Anda boleh menentukan salah seorang pemain sebagai kapten dari kotak di sebelah kanan iaitu diatas senarai pemain simpanan anda.
Anda boleh menukar kapten anda pada bila-bila masa. Mata yang diperolehi oleh kapten akan digandakan.
Transfer market:
Anda boleh membentuk dan membeli pemain dari Transfer Market tanpa had.
Liga Persendirian:
Perbezaan mata bagi 5 pemain terbaik yang dikumpulkan oleh pemain didalam liga persendirian akan diambil kira dan dijumlahkan untuk menetapkan ranking keseluruhan liga-liga persendirian.
Jadi sama-sama la kita berjuang untuk liga kita iaitu liga Malaysia Gemilang.
Pengiraan Mata:
Attacking:
Gol : 7 (+3 untuk Shot on Target = 10)
Assist : 4
Gol Kemenangan : +2
Set-Piece Gol : +3
Shot on Target : 3
Cross yang berjaya : 1
Perolehan Foul : 1
Perolehan Corner : 1
Kegagalan Penalti/Save : -5
Defending/Disiplin:
Blocked Shot : 2
Mencelah passing : 1
Tackle yang berjaya : 1
Permainan Bersih : 4
Last-man Saving Tackle : 2
Foul : -1
Bagi Penalti : -3
Own Gol : -3
Kad kuning : -3
Kad merah : -6
Golkeeper:
Menang : 4
Kalah : -2
Seri : 1
Save : 2
Save Penalti : 6
Permainan Bersih : 5
Gol Bolos : -3
Lompat 1 inci macam Ayen : -10
Sesi Soal Jawab:
S: Berapa bayaran yang dikenakan untuk penyertaan?
J: Penyertaan adalah PERCUMA.
S: Adakah harga bagi pemain akan meningkat sepanjang waktu pertandingan?
J: Tidak
S: Berapakah harga bagi pemain bila saya menjualnya?
J: Anda akan menjual pada harga yang sama seperti yang dibeli.
Bermakna anda tidak akan untung atau rugi sewaktu sesi jual beli.
Contohnya: Kalau anda beli Eddie pada harga 38juta pound anda akan
menerima 38juta pound juga jika anda menjualnya. Tapi rugi jual dia,
sebab dia terer giler.
S: Adakah saya akan menerima duit tambahan sepanjang waktu pertandingan?
J: Tidak
S: Adakah pemain simpanan akan mendapat mata?
J: Mungkin. Anda perlu membeli pemain untuk setiap posisi (Goli,
Defender, Midfield, Attack). Seandainya salah seorang pemain kesebelasan utama tidak mendapat mata, pemain simpanan akan mengambil alih dan diberikan mata.
S: Bagaimana nak tahu berapakah mata yang diperolehi oleh pemain saya?
J: Pilih "Previous Match Day" apabila anda melihat skuad anda.
S: Bolehkah saya memerhatikan mata bagi perlawanan?
J: Ya, boleh. Boleh blah!! Klik sini: http://uk.eurofantasyfootball.yahoo.net/app/wertung.jsp
S: Apa akan terjadi apabila ada pasukan yang terkeluar?
J: Tiada apa-apa. Cuma, tiada mata selanjutnya bagi pemain pasukan itu. Jika anda memiliki pemain sedemikian, cepat-cepat la gantikan pemain itu.
S: Adakah saya akan mendapat mata tambahan kalau pemain cuma memperagakan jersey dan gaya rambut tanpa berlari sewaktu perlawanan?
J: Sudah tentu TIDAK. Cepat-cepat la jual pemain seperti itu.
S: Adakah Gol keeper akan mendapat mata tambahan jika baju masuk dalam dan memakai jersey yang terang?
J: Sudah tentu.
S: Bolehkah pemain membawa masuk beg plastik beras cap masjid ke padang?
J: Sudah tentu. Beras mahal sekarang ni.
Monday, March 31, 2008
HP Embedded G5 SATA RAID Controller Driver Diskette for SUSE LINUX Enterprise Server 10 (AMD64/EM64T)
This driver diskette image provides the binary driver modules pre-built for SUSE LINUX Enterprise Server 10 (AMD64/EM64T) to enable the HP Embedded G5 SATA RAID Controller.
Download the driver at HP's website here:
Download the driver at HP's website here:
Installation:
To install SUSE Linux Enterprise Server 10 (AMD64/EM64T), use 'aarahci.sles10.x86_64.img' file.
To install SUSE Linux Enterprise Server 10 SP1 (AMD64/EM64T), use 'aarahci.sles10sp1.x86_64.img' file.
CREATING THE DISKETTE
Save the "aarahci.{distro}.{buildtype}.img" file into a temporary directory.
To make a diskette under Linux (or any other Linux-like operating system), you must have permission to write to the device representing a 3.5-inch diskette drive (known as /dev/fd0 under Linux).
First, label a blank, formatted diskette appropriately. Insert the diskette into the floppy drive, but DO NOT issue the mount command:
- # dd if=aarahci.sles10sp1.x86_64.img of=/dev/sda bs=1440k
INSTALLATION
To install Linux using this driver diskette, follow the below instructions:
- Boot from the SUSE LINUX Enterprise Server 10 disc 1.
A list of options will appear in a menu list for 20 seconds. You must
select Installation, press F6 for Driver Update and then press Enter. - Insert the driver diskette when prompted. Press Enter.
- A dialog will be presented with the message
Please choose the Driver Update Medium.
From the menu list, select fd0 (floppy), select the OK button and
press Enter. - The driver diskette will be scanned and you will see the following messages -
Reading the Driver Update...
Driver Update OK.
Press Enter. - The dialog in step 4 will reappear. Select Back and press Enter.
mpg123 compile error on 64bit system
decode_i586.s:44: Error: suffix or operands invalid for `push'
The mpg123 patch for amd64 can be found here: www.lanvik-icu.com/mpg123-0.59r-amd64.diff.txt
Download it into a clean mpg123-0.59r directory.
cd into the directory
Code:
The mpg123 patch for amd64 can be found here: www.lanvik-icu.com/mpg123-0.59r-amd64.diff.txt
Download it into a clean mpg123-0.59r directory.
cd into the directory
Code:
user@box: patch < mpg123-0.59r-amd64.diff
user@box: make linux-x86_64
Friday, March 7, 2008
MySql >= 4.1 Client does not support authentication protocol
If you upgrade your MySql server to >= 4.1 you might get the following error:
- Client does not support authentication protocol requested by server; consider upgrading MySQL client
This happens because the latest versions of MySql uses a new format for the password (it's a longer hash). In order for old clients to continue to use the newer server, you have to set the passwords on the server to their old format or upgrade your client. Because upgrading the client can sometimes be a pain, it's often easier to just update the passwords to the old format on the server.
Run mysql and login as root:
- Client does not support authentication protocol requested by server; consider upgrading MySQL client
This happens because the latest versions of MySql uses a new format for the password (it's a longer hash). In order for old clients to continue to use the newer server, you have to set the passwords on the server to their old format or upgrade your client. Because upgrading the client can sometimes be a pain, it's often easier to just update the passwords to the old format on the server.
Run mysql and login as root:
mysql -u root -pThen, paste the following command, editing as necessary, to change the password of the user to the old format.UPDATE mysql.user
SET password=OLD_PASSWORD('somepassword')
WHERE user='someuser'
AND host='somehost';
After you have set the passwords to the old format, flush the tables.
flush privileges;
Then exit the mysql client with "quit" and you are set.
Wednesday, February 13, 2008
Samba PDC without roaming profiles
To disable roaming profiles so that client pc's don't take a long time to login & logoff on a Samba PDC network:
Start/Run/gpedit.msc
Local Computer Policy/Computer Configuration/Administrative Templates/System/User Profiles
Enable both the "Prevent Roaming Profile changes from propagating to the server" setting and the "Only allow local user profiles" setting.
Note: If enabled, user profiles won't be copied to the Samba PDC server.
Start/Run/gpedit.msc
Local Computer Policy/Computer Configuration/Administrative Templates/System/User Profiles
Enable both the "Prevent Roaming Profile changes from propagating to the server" setting and the "Only allow local user profiles" setting.
Note: If enabled, user profiles won't be copied to the Samba PDC server.
Monday, December 10, 2007
Setting Up a Secure Apache 2 Server
http://www.informit.com/articles/article.aspx?p=30115&seqNum=1
Requirements
openssl-0.9.7g-2.12
openssl-devel-0.9.7g-2
httpd-2.0.58
Configuring Apache
#./configure --enable-module=so --enable-ssl --with-ssl=/usr/include/openssl
#make
#make install
#/usr/local/apache2/bin/httpd -l (to list available modules
Creating a Key Pair
#openssl req -new -key www.example.com.key -out www.example.com.csr
#openssl genrsa -des3 -out www.example.com.key 1024
to backup key (optional):
#./usr/local/ssl/bin/openssl rsa -noout -text -in www.example.com.key
Creating a Self-Signed Certificate
#openssl x509 -req -days 30 -in www.example.com.csr -signkey www.example.com.key -out www.example.com.cert
# chmod 400 www.example.com.key
Edit /usr/local/apache2/conf/ssl.conf
Listen 80
Listen 443
ServerName http://www.example.com
SSLEngine on
SSLCertificateFile \
/etc/ssl/certs/www.example.com.cert
SSLCertificateKeyFile \
/etc/ssl/certs/www.example.com.key
Starting the server
#/usr/local/apache2/bin/apachectl startssl
Requirements
openssl-0.9.7g-2.12
openssl-devel-0.9.7g-2
httpd-2.0.58
Configuring Apache
#./configure --enable-module=so --enable-ssl --with-ssl=/usr/include/openssl
#make
#make install
#/usr/local/apache2/bin/httpd -l (to list available modules
Creating a Key Pair
#openssl req -new -key www.example.com.key -out www.example.com.csr
#openssl genrsa -des3 -out www.example.com.key 1024
to backup key (optional):
#./usr/local/ssl/bin/openssl rsa -noout -text -in www.example.com.key
Creating a Self-Signed Certificate
#openssl x509 -req -days 30 -in www.example.com.csr -signkey www.example.com.key -out www.example.com.cert
# chmod 400 www.example.com.key
Edit /usr/local/apache2/conf/ssl.conf
Listen 80
Listen 443
ServerName http://www.example.com
SSLEngine on
SSLCertificateFile \
/etc/ssl/certs/www.example.com.cert
SSLCertificateKeyFile \
/etc/ssl/certs/www.example.com.key
Starting the server
#/usr/local/apache2/bin/apachectl startssl
Thursday, December 6, 2007
asterisk + mySQL table = refined
You have two options in /usr/src/asterisk-addons:
1. Add CFLAGS+=-DMYSQL_LOGUNIQUEID to the Makefile.
2. Add a #define MYSQL_LOGUNIQUEID to the top of cdr_addon_mysql.c.
- perform the usual make clean, make, make install.
Table definitions for Asterisk cdr_mysql
Create the database
mysql --user=root --password=password -h dbhost
CREATE DATABASE asterisk;
GRANT INSERT
ON asterisk.*
TO asterisk@localhost
IDENTIFIED BY 'yourpassword';
(Remote MySQL server permissions)
GRANT INSERT
ON asterisk.*
TO asterisk@localhost
IDENTIFIED BY 'yourpassword';
USE asterisk;
CREATE TABLE `cdr` (
`calldate` datetime NOT NULL default '0000-00-00 00:00:00',
`clid` varchar(80) NOT NULL default '',
`src` varchar(80) NOT NULL default '',
`dst` varchar(80) NOT NULL default '',
`dcontext` varchar(80) NOT NULL default '',
`channel` varchar(80) NOT NULL default '',
`dstchannel` varchar(80) NOT NULL default '',
`lastapp` varchar(80) NOT NULL default '',
`lastdata` varchar(80) NOT NULL default '',
`duration` int(11) NOT NULL default '0',
`billsec` int(11) NOT NULL default '0',
`disposition` varchar(45) NOT NULL default '',
`amaflags` int(11) NOT NULL default '0',
`accountcode` varchar(20) NOT NULL default '',
`uniqueid` varchar(32) NOT NULL default '',
`userfield` varchar(255) NOT NULL default ''
);
ALTER TABLE `cdr` ADD INDEX ( `calldate` );
ALTER TABLE `cdr` ADD INDEX ( `dst` );
ALTER TABLE `cdr` ADD INDEX ( `accountcode` );
/etc/asterisk/cdr_mysql.conf
[global]
hostname=192.168.10.5
dbname=asterisk
table=cdr
password=asterisk
user=asterisk
port=3306
sock=/var/lib/mysql/mysql.sock
;userfield=1
/etc/asterisk/modules.conf
load => cdr_addon_mysql.so
[global]
1. Add CFLAGS+=-DMYSQL_LOGUNIQUEID to the Makefile.
2. Add a #define MYSQL_LOGUNIQUEID to the top of cdr_addon_mysql.c.
- perform the usual make clean, make, make install.
Table definitions for Asterisk cdr_mysql
Create the database
mysql --user=root --password=password -h dbhost
CREATE DATABASE asterisk;
GRANT INSERT
ON asterisk.*
TO asterisk@localhost
IDENTIFIED BY 'yourpassword';
(Remote MySQL server permissions)
GRANT INSERT
ON asterisk.*
TO asterisk@localhost
IDENTIFIED BY 'yourpassword';
USE asterisk;
CREATE TABLE `cdr` (
`calldate` datetime NOT NULL default '0000-00-00 00:00:00',
`clid` varchar(80) NOT NULL default '',
`src` varchar(80) NOT NULL default '',
`dst` varchar(80) NOT NULL default '',
`dcontext` varchar(80) NOT NULL default '',
`channel` varchar(80) NOT NULL default '',
`dstchannel` varchar(80) NOT NULL default '',
`lastapp` varchar(80) NOT NULL default '',
`lastdata` varchar(80) NOT NULL default '',
`duration` int(11) NOT NULL default '0',
`billsec` int(11) NOT NULL default '0',
`disposition` varchar(45) NOT NULL default '',
`amaflags` int(11) NOT NULL default '0',
`accountcode` varchar(20) NOT NULL default '',
`uniqueid` varchar(32) NOT NULL default '',
`userfield` varchar(255) NOT NULL default ''
);
ALTER TABLE `cdr` ADD INDEX ( `calldate` );
ALTER TABLE `cdr` ADD INDEX ( `dst` );
ALTER TABLE `cdr` ADD INDEX ( `accountcode` );
/etc/asterisk/cdr_mysql.conf
[global]
hostname=192.168.10.5
dbname=asterisk
table=cdr
password=asterisk
user=asterisk
port=3306
sock=/var/lib/mysql/mysql.sock
;userfield=1
/etc/asterisk/modules.conf
load => cdr_addon_mysql.so
[global]
genksyms not found on 64bit kernel
http://folk.uio.no/oeysteio/orinoco-usb/building.html
$ cd /lib/modules/$(uname -r)/
$ rm build
$ ln -s source build
$ cd build/
$ su
(root password)
$ make mrproper
$ make cloneconfig
$ make prepare-all
Important: You must change make prepare-all
to make prepare scripts
if you get an error similar to:
/bin/sh: scripts/genksyms/genksyms: No such file or directory
Wednesday, October 17, 2007
Required CPAN Modules for Mon
#perl -MCPAN -e shell
cpan>install Time::Period
cpan>install Time::HiRes
cpan>install Convert::BER
cpan>install Mon::Protocol
cpan>install Mon::SNMP
cpan>install Mon::Client
And, depending upon what you want to monitor, you may also wish to install the following optional modules:
cpan>install Filesys::DiskSpace
cpan>install Net::Telnet
cpan>install Net::LDAPapi
cpan>install Net::DNS
cpan>install SNMP
cpan>install Time::Period
cpan>install Time::HiRes
cpan>install Convert::BER
cpan>install Mon::Protocol
cpan>install Mon::SNMP
cpan>install Mon::Client
And, depending upon what you want to monitor, you may also wish to install the following optional modules:
cpan>install Filesys::DiskSpace
cpan>install Net::Telnet
cpan>install Net::LDAPapi
cpan>install Net::DNS
cpan>install SNMP
Friday, September 28, 2007
Wednesday, September 26, 2007
Null Modem for High Availability
Null modem cable pin mapping
This is one very common mapping which will work with software that relies on proper assertion of the CD signal.
#Use 1-4 & 4-1 for 9 pin HA null modem.
This is one very common mapping which will work with software that relies on proper assertion of the CD signal.
| Signal Name | DB-25 Pin | DE-9 Pin | DE-9 Pin | DB-25 Pin | ||
| FG (Frame Ground) | 1 | - | X | - | 1 | FG |
| TD (Transmit Data) | 2 | 3 | - | 2 | 3 | RD |
| RD (Receive Data) | 3 | 2 | - | 3 | 2 | TD |
| RTS (Request To Send) | 4 | 7 | - | 8 | 5 | CTS |
| CTS (Clear To Send) | 5 | 8 | - | 7 | 4 | RTS |
| SG (Signal Ground) | 7 | 5 | - | 5 | 7 | SG |
| DSR (Data Set Ready) | 6 | 6 | - | 4 | 20 | DTR |
| CD (Carrier Detect) | 8 | 1 | - | 4 | 20 | DTR |
| DTR (Data Terminal Ready) | 20 | 4 | - | 1 | 8 | CD |
| DTR (Data Terminal Ready) | 20 | 4 | - | 6 | 6 | DSR |
#Use 1-4 & 4-1 for 9 pin HA null modem.
File Descriptors vs Linux Performance
To increase OS system-wide file descriptors limit
http://bloggerdigest.blogspot.com/2006/10/file-descriptors-vs-linux-performance.html
http://bloggerdigest.blogspot.com/2006/10/file-descriptors-vs-linux-performance.html
- Set both the hard limit and soft limit of file descriptors, to as maximum as possible, to either all (the asterisk in first column) or individual user login account (replace the asterisk in the first column to the user login account)
- Modify /etc/security/limits.conf by appending or amending these line
@root hard nofile 4096
to
@root soft nofile 100000
@root hard nofile 102400
Refer to the topic of Linux ulimit command
Friday, September 21, 2007
Zimbra: Daily mail report always reports "No messages found"
http://www.zimbra.com/forums/installation/3332-daily-mail-report-always-reports-no-messages-found.html
http://www.zimbra.com/forums/27508-post20.html
zmloggerinit is probably not what you wanted to do. In either case you'll most likely need to run it again, but first remove the logger db files.
That will get you back to a functioning state.
The logger db was either not competely initialized or the database got corrupted somehow (did your disk fill up?). You can reset it with the above commands or try to recover the raw_logs table by logging into the logger db and running repair table raw_logs; You'll need the logger_root_passwd from zmlocalconfig.
http://www.zimbra.com/forums/27508-post20.html
zmloggerinit is probably not what you wanted to do. In either case you'll most likely need to run it again, but first remove the logger db files.
Code:
% su - zimbra
% rm -rf logger/db
% zmloggerinit The logger db was either not competely initialized or the database got corrupted somehow (did your disk fill up?). You can reset it with the above commands or try to recover the raw_logs table by logging into the logger db and running repair table raw_logs; You'll need the logger_root_passwd from zmlocalconfig.
Friday, August 10, 2007
Ghostscript
Most Linux users have Ghostscript, and Ghostscript is supposed to be
able to append PDFs. The way it works is that it "prints" the files in
sequence, but directs them to a loopback type of printer driver that
actually generates a new PDF. Here's the command:
gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite
-sOutputFile=out.pdf in1.pdf in2.pdf in3.pdf ...
Make appropriate substitutions for different paper sizes (apparently
nobody in North America has ever wanted to do this, because other
examples on the Web invariably specify A4 paper), filenames, etc. I've
found this technique to work quite well. Unfortunately, it caused
Ghostscript to die with a segfault on some of the input I wanted to run
it with, and nothing I could do would get it to process some of those files.
able to append PDFs. The way it works is that it "prints" the files in
sequence, but directs them to a loopback type of printer driver that
actually generates a new PDF. Here's the command:
gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite
-sOutputFile=out.pdf in1.pdf in2.pdf in3.pdf ...
Make appropriate substitutions for different paper sizes (apparently
nobody in North America has ever wanted to do this, because other
examples on the Web invariably specify A4 paper), filenames, etc. I've
found this technique to work quite well. Unfortunately, it caused
Ghostscript to die with a segfault on some of the input I wanted to run
it with, and nothing I could do would get it to process some of those files.
Subscribe to:
Posts (Atom)