Kamis, 21 Januari 2010

Squid Proxy Authentication With PHP/MySQL

Many methods to do authentication in Squid, ie basic, ncsa, ntlm, kerberos, radius,.... But what about authenticate a user by looking in a MySQL table? More convenience if the language is PHP, as everybody language in the Web B-). So, after some quick googling results many clues, I picked one here and added some lines for data retrieval from MySQL. Here they are:

#!/usr/bin/php
mysql_connect("localhost","root","password");
if (! defined(STDIN)) {
define("STDIN", fopen("php://stdin", "r"));
}
while (!feof(STDIN)) {
$line = trim(fgets(STDIN));
$fields = explode(' ', $line);
$username = rawurldecode($fields[0]); //1738
$password = rawurldecode($fields[1]); //1738
$db=mysql("auth","select * from user where nama='$username' and passwd='$password'");
if(mysql_num_rows($db)>0){
fwrite(STDOUT, "OK\n");
} else {
// failed miserably
fwrite(STDOUT, "ERR\n");
}
}
?>

Very simple as we write. Next, chmod the script, eg auth.php with execute permission. Copy/move the script into any folder accessible by squid, just place it in /etc/squid is very well.

Edit /etc/squid/squid.conf, add the following lines:

auth_param basic program /etc/squid/auth.php
auth_param basic children 20
auth_param basic realm FKM HotSpot
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off

And allow only authenticated user:

acl AuthenticatedUsers proxy_auth REQUIRED
http_access allow AuthenticatedUsers
http_access deny all

Restart squid. One major drawback is we have to manually set the browser using the squid address and port, the authentication can't be done in a transparent proxy mode.

Rabu, 20 Januari 2010

Squid with MySQL – authentication

Squid is the widly used proxy server. We are using squid as proxy cahcing server with authnetication with PAM.. Now we have replace this squid with PAM authentication with squid with MySQL.

Installation and configuration -

* Download squid_mysql plugin from here…

1] go to directory where you have extracted squid_mysql plugin..

root@indiangnu.org:/home/arun# cd mysql_auth-0.8
root@indiangnu.org:/home/arun/mysql_auth-0.8#

2] Please change the src/mysql_auth.conf as shown below then run make command

root@indiangnu.org:/home/arun/mysql_auth-0.8# make
gcc -I/usr/include -L/usr/lib -c -o src/mysql_auth.o src/mysql_auth.c
gcc -I/usr/include -L/usr/lib -c -o src/confparser.o src/confparser.c
gcc -I/usr/include -L/usr/lib -c -o src/mypasswd.o src/mypasswd.c
gcc -o mysql_auth src/mysql_auth.c src/confparser.c -lmysqlclient -I/usr/include -L/usr/lib
gcc -o mypasswd src/mypasswd.c src/confparser.c -lmysqlclient -I/usr/include -L/usr/lib
root@indiangnu.org:/home/arun/mysql_auth-0.8#

3] Make sure that squid user ie proxy and group shadow is exist.. if they are not exist then check your squid
configuration and set proper permission

root@indiangnu.org:/home/arun/mysql_auth-0.8# install -o proxy -g shadow -m 755 mysql_auth /usr/lib/squid/mysql_auth

root@indiangnu.org:/home/arun/mysql_auth-0.8# install -o root -g root -m 700 mypasswd /usr/local/bin/squid-passwd

root@indiangnu.org:/home/arun/mysql_auth-0.8# make -p /usr/local/squid/etc/
root@indiangnu.org:/home/arun/mysql_auth-0.8#

root@indiangnu.org:/home/arun/mysql_auth-0.8# install -o proxy -g root -m 600 src/mysql_auth.conf /usr/local/squid/etc/mysql_auth.conf
root@indiangnu.org:/home/arun/mysql_auth-0.8# install -o proxy -g root -m 600 src/mysql_auth.conf /usr/local/squid/etc/mysql_auth.conf.default
root@indiangnu.org:/home/arun/mysql_auth-0.8#

4] please update squid.conf file and add this line to use authentication

###########################################
#This is used for MySQL authentication
auth_param basic program /usr/lib/squid/mysql_auth
#For squid with PAM authentication
#auth_param basic program /usr/lib/squid/pam_auth -1

auth_param basic children 5
auth_param basic realm Magnet Internet Authentication
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
###########################################

* Add ACL in squid file at proper location

acl password proxy_auth REQUIRED
acl acl_name proxy_auth “/etc/proxy/user.list”
acl allow_sites dstdom_regex -i “/etc/proxy/allow.sites”
acl block_sites dstdom_regex -i “/etc/proxy/block.sites”

* add rule for access/privleges
http_access allow allow_sites
http_access deny block_sites !acl_name

* Configuration file for Squid with MySQL authentication

root@indiangnu.org:/home/arun/mysql_auth-0.8# cat src/mysql_auth.conf
#
# mysql_auth.conf – an mysql authenticator config file
# this is the default name. you can call this by other name,
# but set up it in mysql_auth-source/src/define.h.
#
# comment: first character in line is ‘#’
# empty line (EOL at first) allowed
#
# format of parameters and their values:
# parameter – SPACE(S) and/or TAB(S) – value
#
# IMPORTANT: see the mysql_auth-source/scripts/create_script
# this configuration file made by this script
#
# by Ervin Hegedus, 2002, 2003

# hostname
#
# where is the mysql server – the server hostname or IP address;
# first ‘hostname’ directive, and after space(s) or tab(s) its
# value
#
# default:
###################################

hostname 192.168.1.50

###################################
# user
#
# which user can connect to database
# default:

###################################

user mysql_user

###################################
# password
#
# user’s password for database, that store the accounts
# default:

###################################

password mysql_passwd

###################################
# database
#
# mysql database name, where accounts places are
# default:

###################################

database mysql_auth

###################################
# mysql socket
#
# if mysqld doesn’t use INET socket, you must to set this parameter
# where is the location of mysqld socket; if mysqld use INET socket,
# put NULL value
# default:

###################################

mysqld_socket /var/run/mysqld/mysqld.sock

###################################
# next three directives tells what will the select query,
# like this:
# SELECT * FROM table WHERE user_column LIKE “username” AND password_column LIKE “password”
# where username and password comes from client in HTTP header,
# and user_column and password_column is the columns name in table
# this is an easy way to tune this program to your existing database

# table
#
# the table name, where accounts exist in user-password pair
# default:

###################################

table squid_users

###################################
# user_column
#
# user column name in table
# if you already have a database, what contains user-password
# pair, you can set it here

###################################

user_column user_name

###################################
# password_column
#
# password column name in table
# like user column name above
###################################

password_column user_passwd

###################################
# encrypt_password_form
#
# passwords are stored in encrypted form,
# using mysql internal ‘password()’ function
# this mean, you just storing the passwords encrypted format,
# Squid and clients doesn’t use encrypt form!
# The value is case insensitive (YES/yes or not one of these).
# For backward compatibility, default is NO.
#
###################################

#encrypt_password_form NO
encrypt_password_form YES

###################################

root@indiangnu.org:/home/arun/mysql_auth-0.8#

* SQL dump file for Squid with MySQL.

root@indiangnu.org:/home/arun/mysql_auth-0.8# cat scripts/create_script

DROP DATABASE IF EXISTS mysql_auth;

USE mysql;
DELETE FROM user WHERE User LIKE ‘mysql_user’;
DELETE FROM db WHERE User LIKE ‘mysql_user’;
DELETE FROM tables_priv WHERE User LIKE ‘mysql_user’;

CREATE DATABASE mysql_auth;

USE mysql_auth;

CREATE TABLE squid_users
(user_name VARCHAR(16) NOT NULL PRIMARY KEY,
user_passwd VARCHAR(64) BINARY NOT NULL);

GRANT SELECT,INSERT,UPDATE,DELETE ON mysql_auth.* TO ‘mysql_user@’localhost’ IDENTIFIED BY ‘mysql_passwd’;
GRANT SELECT,INSERT,UPDATE,DELETE ON mysql_auth.* TO ‘mysql_user@’192.168.1.50′ IDENTIFIED BY ‘mysql_passwd’;

root@indiangnu.org:/home/arun/mysql_auth-0.8#

* How to create DB and import this file…

* login with root/admin user of MySQL

root@indiangnu.org:/home/arun/mysql_auth-0.8# mysql -u root -p <>

Enter password:

root@indiangnu.org:/home/arun/mysql_auth-0.8#

root@indiangnu.org:/home/arun/mysql_auth-0.8# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6805 to server version: 5.0.21-Debian_3ubuntu1-log

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql> show databases;

* check output and restart squid service

Install Oracle di Linux

Instalasi dan Seting Oracle 10g di Debian Lenny

Lakukan Langkah2 Berikut Ini :

1. Install paket-paket yang dibutuhkan

sudo apt-get install build-essential libaio1 rpm lesstif2-dev alien

2. Buat user dan group untuk instalasi oracle :

groupadd oinstall
groupadd dba
groupadd nobody
sudo useradd -g oinstall -G dba,nobody -m oracle -s /bin/bash

3. Set Password untuk user oracle yang baru saja dibuat

passwd oracle

4. Buat direktori untuk instalasi Oracle dan set kepemilikannya ke oracle:oinstall

mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/app/oracle

5. Ubah konfigurasi parameter kernel di file /etc/sysctl.conf

gedit /etc/sysctl.conf

tambahkan pada bagian akhir file dengan isi sebagai berikut :

kernel.shmall = 2097152

kernel.shmmax = 2147483648

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

net.core.rmem_default = 262144

net.core.rmem_max = 262144

net.core.wmem_default = 262144

net.core.wmem_max = 262144

fs.file-max = 65536

net.ipv4.ip_local_port_range = 1024 65000

6. Reboot sistem atau aktifkan hasil perubahan tadi dengan cara

/sbin/sysctl -p

7. Ubah file /etc/security/limits.conf

gedit /etc/security/limits.conf

tambahkan pada bagian akhir file dengan isi sebagai berikut :

soft nproc 2047

hard nproc 16384

soft nofile 1024

hard nofile 65536

8. Buat symbolic links untuk “menipu” Oracle Installer agar Ubuntu terlihat seperti distro berbasis rpm dan sesuai requirement yakni red hat enterprise linux (redhat-3 dan redhat-4), sles atau asianux.

ln -s /usr/bin/awk /bin/awk
ln -s /usr/bin/rpm /bin/rpm
ln -s /lib/libgcc_s.so.1 /lib/libgcc_s.so
ln -s /usr/bin/basename /bin/basename
touch /etc/redhat-release
chmod 666 /etc/redhat-release
echo redhat-4 > /etc/redhat-release

9. Logout dari user aktif saat ini, dan login sebagai user oracle

10. Setelah login sebagai user oracle, buka sebuah teks editor dan edit file /home/oracle/.bashrc

gedit .bashrc

Tambahkan di bagian akhir file dengan baris-baris berikut

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1

export ORACLE_SID=orcl

export PATH=$PATH:$ORACLE_HOME/bin

11. Kopikan file-file instalasi Oracle ke sebuah direktori misal di /home/oracle/master/ karena instalasi tidak bisa dilakukan melalui CD/DVD

12. Jalankan perintah instalasi berikut, dan ikuti langkah-langkah instalasinya.

./runInstaller -ignoreSysPreReqs

Semoga sukses :).

Setelah Langkah Instalasi Selesai Lakukan Langkah Berikut ini :

1. Logout Komputer anda dan login sebagai oracle

edit file yang ada pada oratab dengan user root

# gedit /etc/oratab
Ubah dari :

orcl:/u01/app/oracle/product/10.2.0/db_1:N

Menjadi :

orcl:/u01/app/oracle/product/10.2.0/db_1:Y

2. Buka konsole oracle :

ketikan dbca

$dbca

Setelah Berhasil

3. Bikin Script Untuk start/restart/shutdown Oracle 10g. dengan nama : orcl-yudebx.sh pada dir /usr/bin dengan user root

# nano /usr/bin/orcl-yudebx.sh

# chmod 755 /usr/bin/orcl-yudebx.sh

Copikan Scripts di Bawah ini :

# Scripts By yudebx.wordpress.com

if [ "start" == $1 ]; then
lsnrctl start
emctl start dbconsole
isqlplusctl start
sqlplus dba1/oracle as sysdba << EOF
startup
EOF
echo “GENERAL REPORTING”
lsnrctl status
emctl status dbconsole
echo “Database Berhasil Start Up !!!”

elif [ "stop" == $1 ]; then
sqlplus dba1/oracle as sysdba << EOF
shutdown immediate
EOF
lsnrctl stop
emctl stop dbconsole
isqlplusctl stop
echo “GENERAL REPORTING”
lsnrctl status
emctl status dbconsole
echo “Database Berhasil Shutdown !!!”

elif [ "restart" == $1 ]; then
sqlplus dba1/oracle as sysdba << EOF
shutdown immediate
EOF
lsnrctl stop
emctl stop dbconsole
isqlplusctl stop

lsnrctl start
emctl start dbconsole
isqlplusctl start
sqlplus dba1/oracle as sysdba << EOF
startup
EOF
echo “GENERAL REPORTING”
lsnrctl status
emctl status dbconsole
echo “Database Berhasil Restarting !!!”
fi

Jika sudah maka save

dan jalankan melalui konsole dengan user oracle :

$ orcl-yudebx.sh start

untuk restart :

$ orcl-yudebx.sh restart

untuk shutdown :

$ orcl-yudebx.sh stop

4. Jika ingin oracle langsung jalan ketika startup (dengan user root):

# gedit /etc/rc.local

su - oracle << EOF
orcl-yudebx.sh start
EOF

5. Cek Oracle Anda :
- melalui terminal

lsnrctl status

emctl status dbconsole

- melalui web browser

iSQL*Plus URL:
http://localhost:5560/isqlplus

iSQL*Plus DBA URL:
http://localhost:5560/isqlplus/dba

Enterprise Manager 10g Database Control URL:
http://localhost:1158/em

auth mySQL di SQUID

Mysql based auth di squid Print E-mail

artikel ini dibuat untuk kamu2 yg ingin membuat authentifikasi squid dan user dan password disimpan di database mysql

asumsi-2:

1. squid-2.4 atau squid-2.5 terinstall dgn baik, dan user dan group yg menjalankan Squid adalah squid (lihat /etc/passwd)
2. mysql (versi berapa aja) terinstall dgn baik
3. RH 7.1 (atau linux yg lainnya
4. gcc, et al
5. admin tidak gila :)

6. yg kurang mohon ditambahkan sendiri


file yg perlu di download:
mysql_auth-0.5.tar.gz (http://freshmeat.net/projects/mysql_auth/)

langkah2 :
1. Ekstrak file mysql_auth
# tar xzpf mysql_auth-0.5.tar.gz
# cd mysql_auth-0.5
2. Cari dan catat lokasi file mysql.h dan libmysqlclient.a
# locate mysql.h
/usr/include/mysql/mysql.h
# locate libmysqlclient.a
/usr/lib/mysql/libmysqlclient.a

3. edit file Makefile
# vi Makefile
ubah baris2 berikut :
a. CFLAGS = -I/usr/local/include -L/usr/local/lib
menjadi
CFLAGS = -I/usr/include/mysql -L/usr/lib/mysql
note : perhatikan yg dicetak tebal di langkah 2 harus sama dengan yg dicetak tebal pada langkah diatas
b. $(INSTALL) -o nobody -g nogroup -m 755 mysql_auth /usr/local/squid/bin/mysql_auth
menjadi
$(INSTALL) -o squid -g squid -m 755 mysql_auth /usr/bin/mysql_auth
c. $(INSTALL) -o nobody -g nogroup -m 600 $(CONF) /usr/local/squid/etc/mysql_auth.conf
menjadi
$(INSTALL) -o squid -g squid -m 600 $(CONF) /etc/mysql_auth.conf
d. $(INSTALL) -o nobody -g nogroup -m 600 $(CONF) /usr/local/squid/etc/mysql_auth.conf.default
menjadi
$(INSTALL) -o squid -g squid -m 600 $(CONF) /etc/mysql_auth.conf.default

catatan : bila user dan group yg menjalankan bukan "squid", misalnya "otong", ganti -o squid -g squid menjadi -o otong -g otong

4. edit src/define
# vi +5 src/define.h
ubah baris
#define CONFIG_FILE "/usr/local/squid/etc/mysql_auth.conf"
menjadi
#define CONFIG_FILE "/etc/mysql_auth.conf"

5. compile dan install
# make
# make install

6. tambahkan database untuk authentifikasi
# cd scripts
# mysql -u root -p <> internet option -> Connections -> LAN Settings

error gnome

laddu@laddu:/tmp$ Window manager warning: Failed to contact configuration server; some possible causes are that you need
to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See
http://www.gnome.org/projects/gconf/ for
information. (Details - 1: IOR file '/tmp/gconfd-laddu/lock/ior' not opened successfully, no gconfd located: No such file
or directory 2: IOR file '/tmp/gconfd-laddu/lock/ior' not opened successfully, no gconfd located: No such file or
directory)
Window manager warning: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP
networking for ORBit, or you have stale NFS locks due to a system crash. See http://www.gnome.org/projects/gconf/ for
information. (Details - 1: IOR file '/tmp/gconfd-laddu/lock/ior' not opened successfully, no gconfd located: No such file
or directory 2: IOR file '/tmp/gconfd-laddu/lock/ior' not opened successfully, no gconfd located: No such file or
directory)
Window manager warning: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP
networking for ORBit, or you have stale NFS locks due to a system crash. See http://www.gnome.org/projects/gconf/ for
information. (Details - 1: IOR file '/tmp/gconfd-laddu/lock/ior' not opened successfully, no gconfd located: No such file
or directory 2: IOR file '/tmp/gconfd-laddu/lock/ior' not opened successfully, no gconfd located: No such file or
directory)
Window manager error: Unable to open X display :0.0

solution :

cd /tmp
rm -rf *
rm -rf .??*


Sabtu, 09 Januari 2010

Ternyata Hidup Ini Indah

Ada seseorang saat melamar kerja, memungut sampah kertas di lantai ke dalam tong sampah,

dan hal itu terlihat oleh peng-interview, dan dia mendapatkan pekerjaan tersebut.

Ternyata untuk memperoleh penghargaan sangat mudah, cukup memelihara kebiasaan yang baik.

—- 000 —–

Ada seorang anak menjadi murid di toko sepeda.

Suatu saat ada seseorang yang mengantarkan sepeda rusak untuk diperbaiki di toko tsb.

Selain memperbaiki sepeda tersebut, si anak ini juga membersihkan sepeda hingga bersih mengkilap.

Murid-murid lain menertawakan perbuatannya.

Keesokan hari setelah sang empunya sepeda mengambil sepedanya, si adik kecil ditarik/diambil kerja di tempatnya.

Ternyata untuk menjadi orang yang berhasil sangat mudah, cukup punya inisiatif sedikit saja.

—- 000 —–

Seorang anak berkata kepada ibunya: “Ibu hari ini sangat cantik.”

Ibu menjawab: “Mengapa?”

Anak menjawab: “Karena hari ini ibu sama sekali tidak marah-marah. ”

Ternyata untuk memiliki kecantikan sangatlah mudah, hanya perlu tidak marah-marah.

—- 000 —–

Seorang petani menyuruh anaknya setiap hari bekerja giat di sawah.

Temannya berkata: “Tidak perlu menyuruh anakmu bekerja keras, Tanamanmu tetap akan tumbuh dengan subur.”

Petani menjawab: “Aku bukan sedang memupuk tanamanku, tapi aku sedang membina anakku.”

Ternyata membina seorang anak sangat mudah, cukup membiarkan dia rajin bekerja.

—- 000 —–

Seorang pelatih bola berkata kepada muridnya:

“Jika sebuah bola jatuh ke dalam rerumputan, bagaimana cara mencarinya?”

Ada yang menjawab: “Cari mulai dari bagian tengah.”

Ada pula yang menjawab: “Cari di rerumputan yang cekung ke dalam.”

Dan ada yang menjawab: “Cari di rumput yang paling tinggi.”

Pelatih memberikan jawaban yang paling tepat:

“Setapak demi setapak cari dari ujung rumput sebelah sini hingga ke rumput sebelah sana.”

Ternyata jalan menuju keberhasilan sangat gampang, cukup melakukan segala sesuatunya

setahap demi setahap secara berurutan, jangan meloncat-loncat.

—- 000 —–

Katak yang tinggal di sawah berkata kepada katak yang tinggal di pinggir jalan:

“Tempatmu terlalu berbahaya, tinggallah denganku.”

Katak di pinggir jalan menjawab: “Aku sudah terbiasa, malas untuk pindah.”

Beberapa hari kemudian katak “sawah” menjenguk katak “pinggir jalan”

dan menemukan bahwa si katak sudah mati dilindas mobil yang lewat.

Ternyata sangat mudah menggenggam nasib kita sendiri, cukup hindari kemalasan saja.

—- 000 —–

Ada segerombolan orang yang berjalan di padang pasir,

semua berjalan dengan berat, sangat menderita,

hanya satu orang yang berjalan dengan gembira.

Ada yang bertanya: “Mengapa engkau begitu santai?”

Dia menjawab sambil tertawa: “Karena barang bawaan saya sedikit.”

Ternyata sangat mudah untuk memperoleh kegembiraan, cukup tidak serakah dan memiliki

secukupnya saja.

* You are what you think about. Beware of your mind.

Kamis, 07 Januari 2010

Adding Windows Fonts in Linux

Unlike past times, Linux do come with good fonts. And the font rendering can be made better by choosing to antialiase the fonts. But at times you come across a website which has been designed with the windows user in mind. Such websites are best viewed with one of the windows
fonts. If you have windows OS installed on your machine, you can copy the essential fonts from the windows partition to linux and use them to get a better web experience. Here is how you do it.
Method I :
Copy the ttf (True Type Fonts) fonts Ariel, Tahoma, Verdana, Courier New and Times New Roman from the windows partition to the fonts:// location in nautilus.

Method 2 :
Some people who are using Ubuntu have said that they can't do it as normal user. And since Ubuntu does not have a root account, they find difficulty in using su to copy eaither. Such people can do the following:
Create a '.fonts' folder in your home directory and copy the necessary fonts into it. Now you have access to the fonts on a per user basis.

Method 3:
This method can be used to install the fonts system wide if the above two methods do not give satisfactory results.
First find out in which location linux has installed the truetype fonts. It is usually at the location '/usr/share/fonts/truetype/' . But you may also do a search for the same as follows:

# find /usr -iname \*.ttf |head -n 5

Once you know the path of the fonts directory, move to this directory and create a folder there (it can be any name).

# cd /usr/share/fonts/truetype
# mkdir windowsfonts

Note: You need to be logged in as root while doing this.
Next copy all the windows ttf fonts to the windowsfonts directory that was just created.

# cp /media/hda1/windows/Fonts/*.ttf .

Now change the ownership of the fonts as well as make sure they have a right of 644 .

# chown root.root *.ttf
# chmod 644 *.ttf

Now run the command mkfontdir while in the windowsfonts directory.

# mkfontdir

This will create an index of the fonts in the directory. It will also create two files fonts.dir and fonts.cache-1 .
Now moving to the parent directory, edit the file fonts.cache-1 using your favourate editor and append the following line to it.

#File: /usr/share/fonts/truetype/fonts.cache-1
...
"windowsfonts" 0 ".dir"

Lastly run the command fc-cache.

# fc-cache

This command will scan the font directories on the system and build font information cache files for applications using fontconfig for their font handling.

That's it. Now you can have access to windows fonts in all your X applications including firefox and OpenOffice.org.

Rabu, 06 Januari 2010

metal garden sheds

Do not let the bicycle or park equipment is stored in your garden without any protection that causes your items easily damaged in the sun or rain, so it does not happen, then you need a metal shed, with a metal shed, so your goods can be stored properly and safely, especially for garden equipment, you can use a metal garden shed, with a material made of stainless metal and durable, your garden equipment will be well protected.
For a good metal shed you can visit the garden metal sheds, there you can see and select metal garden shed with a variety of sizes and functions to suit your needs, with materials made of metal choices, things that you put in a metal garden shed safe and durable.
Let's wait longer if you are interested please contact metal garden sheds.

Senin, 04 Januari 2010

Install XMMS

XMMS (X Multimedia System) was a very popular audio player for many years, but it was dumped from Debian Lenny and Ubuntu since it uses older GTK+ libraries and it is not maintained any more. It was replaced with the newer Audacious player on both distributions, which you can install by typing sudo apt-get install audacious in a terminal.

However, if you want to compile it from source in Ubuntu 9.04 and 8.10, you can follow the steps below:

1. Install the tools needed for compilation and XMMS dependencies
Open up a terminal and type:

sudo apt-get install build-essential

build-essential is a meta package which depends on tools needed for compilation, like gcc (GNU Compiler Collection). Next, install the development libraries:

sudo apt-get install libgtk1.2-dev libglib1.2-dev

It's recommended to also install libvorbis-dev, for the Ogg Vorbis plugin:

sudo apt-get install libvorbis-dev

2. Download the XMMS source
Get the source from the official website, here, and save it to a location of your choice. Next, make sure the current working directory is the one where you saved the source, then uncompress it using one of the following commands (depending on which file you downloaded, the .tar.gz or the .tar.bz2):

tar -xzf xmms-1.2.11.tar.gz

Or:

tar -xjf xmms-1.2.11.tar.bz2

3. Compile and install XMMS
Change the working directory to xmms-1.2.11 and issue the following commands to configure, compile and install it:

./configure
make
sudo make install

Next, run ldconfig as root:

sudo ldconfig

This should be all. Run XMMS by typing ALT+F2 and entering xmms in the Run dialogue that appears. Notice that XMMS will not be able to play sound if there is another audio or video player running.

To uninstall it, issue the command sudo make uninstall in the same directory from which you installed it.

An alternate way of installing XMMS in Intrepid Ibex, without compiling it, is to follow this short guide. Basically, you will have to add the following two lines to your /etc/apt/sources.list file:

deb http://www.pvv.ntnu.no/~knuta/xmms/intrepid ./
deb-src http://www.pvv.ntnu.no/~knuta/xmms/intrepid ./

Update the package lists and install XMMS using:

sudo apt-get update
sudo apt-get install xmms