Wednesday, April 2, 2008

How to setup Atheros chipset (wireless) in Debian

For those of you who are not familiar how to setup wireless or wifi in linux, i'll show the simple way to do that. The first thing, you need to know your wifi hardware cards, whether PCI or USB, your chipset is support or not. If your chipset is support with linux driver, you're safe, if not get ready to scratch your head. I try to show here specific using Atheros chipset, but it may can apply in other chipset, just change the chipset name. Firstly install all the needed package using assistant-module. Please put non-free in your /etc/apt/source.list

# aptitute install module-assistant madwifi madwifi-tools
# module-assistant a-i madwifi
Done!

unpack

Get your hardware information.

#lspci -nn
01:02.0 Ethernet controller [0200]: Atheros Communications, Inc. AR5212 802.11abg NIC [168c:0013] (rev 01)

From the information above, i know i'm using Atheros chipset, in kernel module they known as ath_pci. Please refer this.

#modprobe ath_pci
# lsmod | grep ath_pci
ath_pci 83008 0
ath_rate_sample 12992 1 ath_pci
wlan 173820 4 wlan_scan_sta,ath_pci,ath_rate_sample
ath_hal 191664 3 ath_pci,ath_rate_sample

Then you need configure your card. The most commonly used command in wireless tools is iwconfig, which you can use to configure most of the wireless parameters, including the SSID and the wireless mode. For the wireless mode, Managed means that there is a wireless access point (WAP) on the network and Ad-hoc signifies that there is none. For example my NIC is named ath0 and my ESSID is yournetwork.

#iwconfig ath0 mode Managed
#iwconfig ath0 essid yournetwork
# iwconfig ath0
ath0 IEEE 802.11g ESSID:"yournetwork"
Mode:Managed Frequency:2.427 GHz Access Point: 00:1C:F0:62:9E:21
Bit Rate:24 Mb/s Tx-Power:14 dBm Sensitivity=0/3
Retry:off RTS thr:off Fragment thr:off
......................

But you need to put all those above setting permanently in your network config setting. For Red Hat/Fedora user, you can put those setting in /etc/sysconfig/network-scripts/ifcfg-ath0. For Debian user you can put those network setting in /etc/network/interfaces. Because i'm using Debian, here my setting


# File /etc/network/interfaces
#The loopback network interface
auto lo
iface lo inet loopback
#My Wifi
iface ath0 inet static
address 192.168.1.1
netmask 255.255.255.0
wireless-essid yournetwork
gateway 192.168.1.1

In this example interface eth0 uses an ESSID of yournetwork. This is the basic step to configure Wifi on your network. I'll show you how to configure WEP and WPA encryption in next the post. Restart your network /etc/init.d/networking restart and now your can start surfing using wifi :)

Friday, March 21, 2008

How to set up startup services in easy way in Debian

In Debian and most other linux distribution, startup files are stored in /etc/init.d/ directory and symbolic linked between /etc/rcX.d/ directory exists. Debian based and Red Hat/ Fedora based distro uses System V initialization scripts to start services at boot time from /etc/rcX.d/ directory. Debian have special utility to control startup files/services.

rcconf
It is a console based interactive utility that allows you to control which services are started when the system boots up or reboots. It displays a menu of all the services which could be started at boot. The ones that are configured to do so are marked and you can toggle individual services on and off. To install just using apt-get rcconf. To start rcconf, login as root user and type rcconf
# rcconf

Forget your Photoshop, here GIMP


I'm using GIMP or GNU Image Manipulation Program since the first time i know Linux, before that Photoshop always with me especially when doing graphic or web editing. I'm not try yet version 2.4, but from what I heard, its more powerful. GIMP can run on many operating system, my Windows box also using GIMP. On Linux, you can install using binary depend on distribution package or using package manager like apt-get, yum or swaret. If you want to compile from source, you need to install some packages like fontconfig, libart2, libtiff, libpng, etc.

Thursday, March 20, 2008

MAMPU offcially migrates to OpenOffice


Hot news from many our local open source site/blog. Finally Malaysian Administrative Modernisation and Management Planning Unit (MAMPU) officially adopts a policy to migrates to OpenOffice.org and ODF format. The official news are here. Then, they will completely uninstall MS office by the end of the year :)-

Wednesday, March 19, 2008

Access windows partition from your linux box


I know many of you using linux together with windows in one PC, in other word using dual boot system. So, the best way to access your windows partition is using Ntfs-3g.
Firstly download the packages :
# wget -c http://www.ntfs-3g.org/ntfs-3g-1.2310.tgz

Then untar and compile the package
# tar zxvf ntfs-3g-1.2129.tgz

(in ntfs-3g-1.2129 directory)
#./configure
#make
#make install
(all step using root )

start using
#mount -t ntfs-3g /dev/hdax /mnt/windows
(if using using sata use sdax, x are the partition numbers)

You can also make NTFS to be mounted during boot by adding the following line to the end of the /etc/fstab file:
/dev/hdax /mnt/windows ntfs-3g defaults 0 0

Now you can use your windows partition.

Sunday, March 9, 2008

Upgrade Joomla! 1.0.12 to 1.0.15


We are using Joomla! CMS as our official website, and as you know Joomla! and any other CMS always exposed to vulnerabilities. So, if you using using Joomla! make sure you're using the latest version. Just like us, our webmaster did not upgrade our Joomla! since version 1.0.12, so i'm take this responsibility to upgrade them. I'm using Joomla! so long starting from Mambo, or before that PHP Nuke as our official website. Upgrading Joomla! was so simple as easy as ABC. What you need is just unzip/gunzip the patch file into your live site folder. But before that, please BACKUP your site first. If anything wrong happened you can go back to your original file.

# tar xjf Joomla_1.0.12_to_1.0.15-Stable-Patch_Package.tar.bz2 /yourwebfolder/

(I'm using package type file .tar.bz2 ). Same like when your download package type file as .zip (unzip) or .tar.gz (tar xzf).
Lastly, please test your patched site as much as you can, it's important to make sure all of our module, component and other 3rd party add ons can function as well.

Friday, March 7, 2008

How to use Wget through proxy

Wget is a super-useful utility to download pages and automate all types of web related tasks. To get wget to use a proxy, you must set up an environment variable before using wget. Type this at the command.

#export http_proxy="http://yourproxy.com:8080"

Replace yourproxy.com with your actual proxy server.
Replace 8080 with your actual proxy server port.

Same goes to ftp if you using ftp

#export ftp_proxy="ftp://yourproxy.com:8080"

Then you should specify the following option in wget command line to turn the proxy behavior on:
–proxy=on

You can use –proxy-username="user name" –proxy-passwd="password" to set proxy user name and password where required.

#export http_proxy="http://username:password@yourproxy.com:8080"