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.