Archive for March, 2009

Joomla in lighttpd

Posted: March 25, 2009 in archlinux, Debian, Joomla, Slackware

Aku tukar configurations dari nginx kepada lighttpd..

ini semua pasal problem dengan spawn-cgi..

mod_rewrite for joomla using lighttpd.

pico /etc/lighttpd/conf-enabled/10-rewrite.conf

——————————-cut here ——————————

url.rewrite-once = ( “^/joomla/component/option,(.*)/$” =>

——————————-cut here ——————————

change joomla to your directory.

or if you using server.document-root :  /var/ww/joomla use this config

——————————-cut here ——————————

url.rewrite-once = ( “^/component/option,(.*)/$” =>


——————————-cut here ——————————

if you compile lighttpd using source file

pico /etc/lighttpd/rewrite.conf

than copy the script and paste into rewrite.conf

pico /etc/lighttpd/lighttpd.conf

Remove comment-mark on
#    “mod_rewrite”,
Add line:
include “rewrite.conf”

And then restart lighttpd

try my best to serve you..

Pacman Usage

Posted: March 24, 2009 in archlinux

Installing Packages

Before installing and upgrading packages, it is a good idea to synchronize the local package database with the remote repositories.

pacman -Sy

…or, equivalently:

pacman –sync –refresh

To install or upgrade a single package or list of packages (including dependencies), issue the following command:

pacman -S package_name1 package_name2

Sometimes there are multiple versions of a package in different repositories (e.g. extra and testing). You can specify which one to install:

pacman -S extra/package_name
pacman -S testing/package_name

You can also refresh the package database before installing a package in one command:

pacman -Sy package_name

Removing Packages

To remove a single package, leaving all of its dependencies installed:

pacman -R package_name

To remove a package’s dependencies which aren’t required by any other installed package:

pacman -Rs package_name

By default, pacman backs up configuration files of removed applications in place by adding the extension *.pacsave to them. If you want to delete configuration files as well when removing the corresponding package (this behavior is called purging on Debian-based systems) you can use:

pacman -Rn package_name

Of course, this can be extended with -s to also delete now-unnecessary dependencies. Thus, the command to truly remove a package, its configuration, and all dependencies which aren’t needed anymore is:

pacman -Rsn package_name

Note! Pacman will not remove configuration files that are created after the package was installed. You can manually remove them from your home folder.

Upgrading the System

Pacman can update all packages on the system with just one command. This could take quite a while depending on how up-to-date your system is.

pacman -Su

However, the best option is to synchronize the repository databases AND update your system in one go with the following:

pacman -Syu

Querying the Package Database

Pacman can search for packages in the database, searching both in packages’ names and descriptions:

pacman -Ss package

To search for already installed packages:

pacman -Qs package

Once you know the name of the package you are looking for, you can get more information about it:

pacman -Si package
pacman -Qi package

To retrieve a list of the files installed by the package:

pacman -Ql package

You can also query the database to know which package a file on your file system belongs to.

pacman -Qo /path/to/a/file

To list all packages no longer required as dependencies (orphans):

pacman -Qdt

Pacman queries the local package database with the -Q flag. See:

pacman -Q –help

…and queries the sync databases with the -S flag. See:

pacman -S –help

It is good practice to keep periodic backups of all pacman-installed packages. In the event of a system crash which is unrecoverable by other means, pacman can then easily reinstall the very same packages onto a new installation.

First, backup the current list of packages (which are available in a repository):

pacman -Qqe | grep -v “$(pacman -Qmq)” > pkglist

Store the pkglist on a USB key or other convenient medium.

Copy the pkglist file to the new installation, and navigate to the directory containing it.

Issue the following command:

pacman -S $(cat pkglist)

Additional Information

Pacman is quite an extensive package management tool. Here is just a brief collection of other features.

* Download a package without installing it:

pacman -Sw package_name

* Install a ‘local’ package (not from a repository):

pacman -U /path/to/package/package_name-version.pkg.tar.gz

* Install a ‘remote’ package (not from a repository):

pacman -U http://www.examplepackage/repo/examplepkg.tar.gz

* Clean the package cache of packages that’s currently not installed (/var/cache/pacman/pkg):

pacman -Sc

* Completely cleans the package cache

pacman -Scc

Warning: About pacman -Scc, you should do this only if you are sure you will not need to downgrade any package. pacman -Scc removes all packages from the cache.

* For removing orphans (recursively; be careful!):

pacman -Rs $(pacman -Qtdq)

* For reinstalling all packages on your system (which are available in a repository):

pacman -S $(pacman -Qq | grep -v “$(pacman -Qmq)”)

* To get a sorted list of local packages and their size:

LANG=C pacman -Qi | sed -n ‘/^Name[^:]*: \(.*\)/{s//\1 /;x};/^Installed[^:]*: \(.*\)/{s//\1/;H;x;s/\n//;p}’ | sort -nk2

For a more detailed list of switches please refer to pacman –help or man pacman.


Pacman configuration is located in /etc/pacman.conf. In depth information about the configuration file can be found in man pacman.conf.
General Options

General options are in [options] section. Read the man page or look in the default pacman.conf for information on what can be done here.

In this section you define which repositories to use, as referred to in /etc/pacman.conf. They can be defined directly here, or you can include them from another file.

All official repositories use the same /etc/pacman.d/mirrorlist file which contains a variable ‘$repo’, so you only need to maintain one list.

The following is an example for the official repositories which have a lot of mirrors. Avoid using as it is throttled.

# Add your preferred servers here, they will be used first
Include = /etc/pacman.d/mirrorlist

# Add your preferred servers here, they will be used first
Include = /etc/pacman.d/mirrorlist

# Add your preferred servers here, they will be used first
Include = /etc/pacman.d/mirrorlist

Note: Care should be taken when using testing repository!


If you receive the following error:

not found in sync db

…this likely due to the package not being located because the repository has not been set correctly.

Arch Linux

Posted: March 24, 2009 in archlinux

Perg first time lepas aku kena serangan jantung aku buka semula linux ahakssss…

selalunya teman setia aku Dunhill 14 yg setia menemani aku tetapi right now KURMA teman aku plak…

Ermm dah lama aku jumpa benda aalah ni tak pulak nak mencuba sejak 2 menjak nih jer sesaja nak try…  gian nak tengok BENDA HITAM ahakssss PUTTY :p


Configuring the SSH server

To configure you must edit the configuration file:

nano /etc/ssh/sshd_config

change some line :

Port 22

Protocol 2

LoginGraceTime 120

* save & exit

Than changefile /etc/hosts.allow

add the following


# let everyone connect to you
sshd: ALL

# OR you can restrict it to a certain ip

# OR restrict for an IP range

# OR restrict for an IP match
sshd: 192.168.1.


To start using the new configuration, restart the daemon:

/etc/rc.d/sshd restart

Managing SSHD Daemon

Just add sshd to the "DAEMONS" section of your /etc/rc.conf

DAEMONS=(... ... sshd ... ...)

Tweak your PC

Posted: March 24, 2009 in My live

1. Untuk lajukan shutdown
WaitToKillAppTimeOut=5000 (5 seconds)

WaitToKillServiceTimeout=5000 (5 seconds)

2.Kecikkan saiz thumbnail
*if dont create it

3.Determine the burning speed
HKEY_CURRENT_USERSoftwareAheadNero Burning RomRecorder
klik kanan create a new DWORD value, name it ShowSingleRecorderSpeed
value = 1

4.Removing Drive Letter
Create new Dword Value, name it ShowDriveLettersFirst
value data = 2

5.Increase Broadband Speed
taip gpedit.msc kat run
go to ‘Local computer policy’
‘Administrative Templates’ under ‘computer configuration’
click ‘Network’> ‘QoS Packer Scheduler’> double klik “Limit Reservable Bandwidth’
click enable > bandwidth limit% = 0

6.Tweak processor
‘HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSessionManagerMemory Management’
create DWORD Value ‘SecondLevelDataCache’
asign it 512
tengok L2 cache dulu…
pastikan korang tau L2 cache.kalu 1mb,letak je 1024
*aku dah buat dan memang memberi kesan yang memberangsangkan

7.Preventing System Contents From being saved outside RAM (untk RAM 512MB ke atas sahaja)
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession ManagerMemory Management]

8. Yang dibawah adalah berkaitan dengan meningkatkan kelajuan internet anda.
Windows Registry Editor Version 5.00


*korang juga boleh copy code diatas dan paste dalam notepad dan save *.reg. pahtu double klik je.

Windows Registry Editor Version 5.00

*korang juga boleh copy code diatas dan paste dalam notepad dan save *.reg. pahtu double klik je.

Windows Registry Editor Version 5.00


*korang juga boleh copy code diatas dan paste dalam notepad dan save *.reg. pahtu double klik je.

Windows Registry Editor Version 5.00



*korang juga boleh copy code diatas dan paste dalam notepad dan save *.reg. pahtu double klik je.

Windows Registry Editor Version 5.00




*korang juga boleh copy code diatas dan paste dalam notepad dan save *.reg. pahtu double klik je.

Windows Registry Editor Version 5.00


give a try…….

Changing your default editor

Posted: March 23, 2009 in Debian, Slackware

Tired of having ‘vi’ (elvis actually) as the default editor when launching stuff like ‘crontab -e’ and such from the commandline? Would you much rather have emacs, joe, pico or some other editor as the default? It is easy to change, just set the environment variable VISUAL to the full path of your favorite editor, and it will be used instead.

To do it, just execute this command:

$ export VISUAL=/usr/bin/nano

Now ‘nano’ is the default editor. You can make this change permanent for a single user by putting the ‘export VISUAL=’ line into the .bash_profile file in the home dir of the user in question, or you can make it a systemwide default by putting it into the /etc/profile file.

$ sudo nano -wx /etc/slapt-get/slapt-getrc

than chage to this (copy and paste)

——————————-cut here ——————————

# See /usr/doc/slapt-get-0.10.1/example.slapt-getrc
# for example source entries and configuration hints.

——————————-cut here ——————————

Updating Slackware using Swaret

Posted: March 11, 2009 in Slackware

Update slackware using swaret

download swaret


than install using

# installpkg swaret-1.6.3-noarch-2.tgz

Rename the conf file located in the /etc folder:

# cp /etc/ /etc/swaret.conf

Next, set the version of Slackware you wish to keep on your computer. You can set it to 11.0 or current. Current is the most up-to-date version, and it may be unstable and could pose problems, but it should be easier to upgrade to the next version when it rolls out. I keep some servers on current and others, the ones I consider critical, on 11.0:

# swaret --set VERSION=current

Now you can update the list of packages Swaret uses:

# swaret --update

When that command completes successfully you can run the upgrades. You can use the -a switch to automatically install all new updates without being prompted, or use no switch to be prompted for each package update:

# swaret --upgrade

Since version 11.0 has just come out there won’t be many updates right away, so don’t expect much at first.

You can also use Swaret to install programs that were not installed originally by using this command (replace package-name with the actual name of the package):

# swaret --install package-name

or you can use cron to update your slackware

——————————-cut here ——————————

# this will download the update files needed to upgrade
swaret --update
# this will update all the packages automatically
swaret --upgrade -a
# send an email notifying that the update was complete
echo "The updates were completed" | mail -s "Swaret Update" username

——————————-cut here ——————————

Be aware that this will install all the update packages automatically, whether you want them or not.

Install Joomla how to

Posted: March 5, 2009 in Debian, Slackware

It seems that a lot of new Joomla users want to know how to install Joomla. It’s obviously very easy and when I started writing tutorials for Jooma I skiped that step. Of, course that must be the first tutorial but…

I will start as you are used to with a step-by-step tutorial. Before we proceed you need Joomla package. The Joomla package can be found on Joomla Forge and can be downloaded from here . It is better to download the latest version because it has the latest bug fixes and new patches. You will find at the bottom of the Forge page the latest full package. Start download it and let’s prepare to install.

You must decide where to install Joomla on your domain. The following paths can be used: or . You you don’t have anything on your domain I will suggest to install on You can also change to or anything you want.

After you downloaded the package you must decompress it to your hard drive before upload. Decompress and open your FTP client. Login with your Ftp client to your site and upload all your files in the desired directory.

Until all the files upload let’s prepare our database. Login to your cpanel and go to “MySQL databases”. Serach for the button “add db” and type in the form the name of the new database (ex: joomladatabase). Press “add db” button. The new database is created. Now, let’s add a user to that database. Look for “Add User” button. Type your uservame and a password and press “add User”. (don’t forget the password). The next step is to add the user to our database. Below databases are 2 dropdown spots where you see a user and a database. Select yournew user and database. Below select the desired privileges and press “Adduser to DB”.

Image Image

Wow, finished with our database! You can close now the Cpanel because we don’t need it at this point.

or you can use with phpmyadmin or using command line

mysql -u root -p

password: (your password)

create database joomla; <———– use your databasename


If the upload is over we can start installing Joomla. Open your browser and type in the adressbar or The browser will load the first page in our installation process. It shoul look like the image below.


If something goes wrong and you don’t see the images above type in your browser I still the page is stange you must verify if:

  • you uploaded all your files
  • you uploaded your files on another directory of your site
  • you have Apache / SQL / PHP server

Our screen have 3 sections: The first checks that your system is able to run Joomla, the second part are some PHP settings and the thrid part checks several file and directory permissions. All parts must be exacly like our image. If the first 2 are not the same ask your web hosting provider about them and maybe they will make corrections. The 3rd part must be modiied by you. This can be done with your ftp client. You must give the directory permisions (CHMOD) so the files to be writeable.




If everything is ok click “Next” button.

The next screen is Joomla Licence and “Terms and Conditions”. read it and if you agree click the checkbox “I Accept the GPL License” and click “next” button on the top-right.


Next page is the “STEP 1” in our configuration. We have to fill our database configuration. Your hostname is usually “localhost”. We created before the database, username and password. Now, all you have to do is to fill the spaces with the name of the database, username and password. The MySQL Table prefix can be left “jos_” . If is your first installation click the checkbox “Install Sample data”. Click “Next”. A pop-up window will appear to ask you if all info are correct. Verify again and click “Ok”.


Next page is very simple. Type your Site Name and click “Next”. You can Modify you Site name if you want later in the administration area.


In “STEP 3” you will confirm your URL, path, email and password. The URL and path are usually right and you don’t need to make modifications. The e-mail and password is your “Super Administrator” e-mail and password. Type your e-mail and a password. Remember the password because you won’t be able to login in the Administrator Section i you forgot it. Your username is by default “admin”. You can change your username, password and e-mail later in the “Administration Section”. If all done press “Next”.


Last Step! You see in this screen your username and password. Also Joomla remember you to delete the “Installation” directory. (Use ftp client for that). Also, you have the configuration file typed. Select all and copy. With your ftp client edit “configuration.php” and type (better “paste”) what is written in this last Step.


That’s all! You can press “View Site” to view your new Joomla Site, or “Administration” to enter in the “Administration Area”.

Network traffic using darkstat

Posted: March 5, 2009 in Debian

Darkstat is network traffic monitor in web. simple to use, quick setup and easy.

install darkstat in debian

aptitude install darkstat

after finish install

cd /etc/darkstat/

pico init.cfg



INTERFACE = -i eth0

PORT = -p 666

save & exit

after that start darkstat


than open with


that’all folks :p

Network Traffic Monitor

Posted: March 5, 2009 in Debian

Network traffic monitor using console (Vnstat)


To install vnstat in debian;

aptitude install vnstat

after install use this command to created data

vnstat -u -i eth0

than use this command to view network

vnstat –live -i eth0

you can use other command

vnstat –day -i eth0 <——————– to view daily

vnstat –week -i eth0 <——————– to view weekly

vnstat –month -i eth0 <—————— to view monthly

vnstat –top10 -i eth0 <—————— to view top ten