28 Apr 2008 @ 6:39 PM 

Install unrar command

Under Debian Linux, you need to type apt-get as follows to install unrar program:

# apt-get install unrar

If you are using Fedora core Linux then use yum command as follows :

# yum install unrar

If you are using FreeBSD, use:

# pkg_add -v -r unrar

If any of above, methods is not working for you, download binary package from official rarlab site:

$ cd /tmp

$ wget http://www.rarlab.com/rar/rarlinux-3.6.0.tar.gz

Untar file

$ tar -zxvf rarlinux-3.6.0.tar.gz

Both unrar and rar commands are located in rar sub-directory. Just go to rar directory:

$ cd rar

$ ./unrar

Now copy rar and unrar to /bin directory:

# cp rar unrar /bin

How to use unrar

unrar command supports various options below are common options that you need to use everyday.

Task: To open rar (unpack) file in current directory type command:

$ unrar e file.rar

Please note that replace file.rar filename with your actual filename.

Task: List (l) file inside rar archive:

$ unrar l file.rar

Task: To extract (x) files with full path type command:

$ unrar x file.rar

(D) To test (t) integrity of archive, file type command:

$ unrar t file.rar

Tags Tags: , , , , ,
Categories: Celoteh Harian, Reviews
Posted By: dedi
Last Edit: 28 Apr 2008 @ 06 42 PM

E-mailPermalinkComments (5)

The phpMyadmin errror “#2002 - The server is not responding (or the local MySQL server’s socket is not correctly configured)” occurs due to many reasons.

1. First check whether mysql is working in the server or not.

2, Check whether there is a symbolic link from mysql.sock to /tmp. If not, create a symlink between /var/lib/mysql/mysql.sock and /tmp/mysql.sock.
~~~~~~~~~
ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
~~~~~~~~~

3. If this doesn’t fix the issue check the file: /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php and make sure the entries are like this:
~~~~~~~~~~~~~~~~
$cfg['Servers'][$i]['socket'] = ‘/var/lib/mysql/mysql.sock’;
$cfg['Servers'][$i]['connect_type'] = ’socket’;
~~~~~~~~~~~~~~~~~

Hope these will help u……

Tags Tags: , , , , , , , , , , ,
Categories: Celoteh Harian, Reviews
Posted By: dedi
Last Edit: 28 Apr 2008 @ 06 30 AM

E-mailPermalinkComments (1)

If you are getting

php: /usr/lib/libmysqlclient.so.14: version `libmysqlclient_14? not found (required by php)

Rebuild your php.
/scripts/easyapache
/scripts/mysqlup –force

That should solve your problem.

That seems to be a common suggestion, but I fail to see how it could ever fix it as the PHP in question being used is cPanel’s backend PHP and not the one used with Apache. At any rate, I caught a lucky break; I replaced /usr/lib/mysql/libmysqlclient.so.14 with /usr/lib/cpanel/libmysqlclient.so.14, re-ran ldconfig, and now it’s working. It hasn’t seemed to have any adverse effect on anything so who knows what the problem is with the one supplied in /usr/lib/mysql.

it sounds like you may be missing mysql-devel.
try “yum install mysql-devel”. That should install any missing mysql libraries.

Cheers!

Tags Tags: , ,
Categories: Celoteh Harian, Reviews
Posted By: dedi
Last Edit: 25 Apr 2008 @ 05 18 PM

E-mailPermalinkComments (0)
 25 Apr 2008 @ 3:48 PM 

my cool desktop

Sedikit demi sedikit, akhirnya berubah mulai sk utak atik linux, dengan implementasikan pc kerja pake linux distro FEDORA 8 , wah lumayan ribet juga ternyata, awalnya udah agak drop, tapi setelah dicoba coba cukup fun juga euy.. hahaa..abisnya keren abis itu kaya gambar di atas, yes that was my new desktop lah euy… ahahaa

yah pikirku mungkin pada awal kebiasaan pake windows kali yah, simple klo mo pake ¨remote desktop connection¨ Namun, di sini woooww… tampilan desktop baru ndak takut euyyy

it? very simple how to install RDESKTOP di FEDORA 8 ini…..

1. masuk ke terminal dengan user root,

2. ketik [yum install rdesktop]

3. setelah selesai install langsung deh jalanin rdesktop dari terminal

rdesktop -u [username] -p [password] -g [resolusi] [hostname/namadomain]

well done….beres dehh… bisa ngeremote serper windows dari unix :D

nah daripada susah klo ngeremote musti nulis segitu panjang command nya mendingan bikin script nya

#!/bin/bash
rdesktop -u [username] -p [password] -g [resolusi] [hostname/namadomain]

nah udah tinggal bikin file lalu, masukkan script di atas, chown +x lalu panggil script nya ./namafilescriptmu beres dahhh, mau simple lagi ya tinggal copy saja script yg kmu simpen tadi ke /usr/bin setiap mau make rdesktop tinggal ketik aja nama file nya beres, and simple kan? hehe… oh iya skedar catatan saja resolusi asli untuk RDESKTOP itu 800×600 :D jadi harap di settting ndiri yakk :D

Tags Tags: , , , ,
Categories: Celoteh Harian, Reviews
Posted By: dedi
Last Edit: 25 Apr 2008 @ 03 58 PM

E-mailPermalinkComments (0)
 20 Apr 2008 @ 11:05 AM 

Cpanel/WHM sometimes has problems with the user quota files causing all users accounts to have unlimited disk space available or 0 megs of disk space in use. This obviously confuses your customers and doesn’t show a real representation of actual disk space being used by your clients. This guide will take you through fixing any quota issues with Cpanel manually or automated.

Common reasons for quota problems
- There are files owned by the same user elsewhere on the server
- The backup directory is being counted towards the users disk quota
- Extra log files are being counted towards the users quota
- Cpanel was just updated and the quotas are now unlimited

Quick Fix - an easy way to fix quota issues

Step 1. Log into your server through SSH as the root user.

Step 2. Run the following command
/scripts/fixquotas

Advanced Fix - other reasons quotas are not working

Step 1. Find the user account where the quotas are incorrect and login to your server in SSH as root.

Step 2. Go to the users folder and check their disk space being used.
cd /home/username
du -h or try du -hs

Step 3. Check /etc/passwd and /etc/shadow to make sure there is no weirdness where the username shows up multiple times.

Step 4. Try finding other files owned by the user.
find -user username | more
This will list all files owned by this user that could be affecting the quota reported by Cpanel.

Step 5. Uncompressed backups can cause quota problems, ensure your backups are compressed in the WHM backup options.

Step 6. After your determine the source of the files and remove them then run /scripts/fixquotas

Tags Tags: , ,
Categories: Reviews
Posted By: dedi
Last Edit: 20 Apr 2008 @ 11 22 AM

E-mailPermalinkComments (0)

Basic trouble shooting linux server.

1. Check how much is the load on your server.
==> You can check that by w command or by using
top -d2 command (-d2 means to updates the states in every 2 seconds).
If the load is above 5-10 then there is something wrong going on your server.
The load should not be more than 20 atleast. After Top -d2 command you can
Check which process utilizing more memory by pressing “SHIFT + M”
(It will sort all the process according to the memory each proccess utilizing),
Check which process utilizing more processors resources by pressing “SHIFT + P”
(It will sort all the process according to the Process each proccess utilizing),
check the path of the script that’s been used in top by “SHIFT + M”
(This will show the path of each files in top)
For more details you can check its help section but from these you will get
which process causing problem on server.
You will see the process ID of that process or atleast the name of the process
so you got which process using too much resources how from the observation of TOP.
kill that process by following command.

kill -9 PROCESS_ID_HERE
killall -9 httpd
killall -KILL httpd

If you didnt get which process causing problem you need to find out the culprit
process from ps -aux command.

2. Check how many connections there to your system of there is an attack on your server
==> Check that from “netstat -nap” or “netstat -nlp | more” Check which IP or the service
have maximmum connection to your server and block that IP from /etc/hosts.deny file or from
iptables by fllowing
#netstat -nap

tcp 0 0 Your_Server_IP_Will_Be_Here:80 Culprit_IPs_To_Check:8109 ESTABLISHED 30770/httpd
tcp 0 0 Your_Server_IP_Will_Be_Here:80 Culprit_IPs_To_Check:8109 ESTABLISHED 30808/httpd
tcp 0 0 Your_Server_IP_Will_Be_Here:80 Culprit_IPs_To_Check:8109 ESTABLISHED 30735/httpd
tcp 0 0 Your_Server_IP_Will_Be_Here:80 Culprit_IPs_To_Check:8109 ESTABLISHED 30808/httpd
tcp 0 0 Your_Server_IP_Will_Be_Here:80 Culprit_IPs_To_Check:8109 ESTABLISHED 30734/httpd
tcp 0 0 Your_Server_IP_Will_Be_Here:80 Culprit_IPs_To_Check:8109 ESTABLISHED 30732/httpd
tcp 0 0 Your_Server_IP_Will_Be_Here:80 Culprit_IPs_To_Check:8109 ESTABLISHED 31249/httpd

#iptables -A INPUT -p tcp –dport 80 -s CULPRIT_IP_HETR -j REJECT
If you want to remove that from the block IP list later on then you can remove it from /etc/sysconfig/iptables
file or by using following command.
#iptables -A INPUT -p tcp –dport 80 -s CULPRIT_IP_HETR -j ACCEPT.
Also you can use following command to block IPs by route command. (dont use below command if you are not familier with it)
#route add IP_HERE reject <== It will block the route for it.
#route del IP_HERE reject <== remove from the block list and allow for its connection.

3. Check if there is free disk space available on server?
==> YOu can check that by df -h command.

]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda1 4.0G 610M 3.2G 16% /

/dev/hda2 251M 24M 215M 10% /boot
none 16G 0 16G 0% /dev/shm

/dev/hda3 4.0G 688M 3.1G 18% /opt

/dev/hda4 4.0G 1.7G 2.1G 44% /usr

/dev/hda5 2.0G 41M 1.9G 3% /usr/local
/dev/hda6 4.0G 253M 3.5G 7% /var

/dev/hda7 38G 636M 36G 2% /appl
Check if there is enough space available for each partition. If there isn’t enough disk
space then remove the unwanted content from that partition.
(Usually you can remove the logs and .core files, some installation that you are not using
or ant big .tar, .tar.gz, .gz or .zip files.

4. If you are checking something for apache then make sure that http process is
running properly.
==> You can check that from /etc/init.d/httpd status or /etc/init.d/apache status.
That will show if thats running or not if its not running then you can restart it by usnig these commands.

/etc/init.d/httpd stop
/etc/init.d/httpd stop

/etc/init.d/httpd stop

/etc/init.d/httpd stop
killall -KILL http
killall -KILL http
killall -KILL http
Untill you see no process runnning
/etc/init.d/httpd startssl
/etc/init.d/httpd startssl
/etc/init.d/httpd startssl
Untill you see process already running.
If it do not restart then you need to trouble shoot it by
/etc/init.d/httpd configtest it wil show if there is any syntax error.
also check /etc/httpd/logs/error_logs
If require to changes in /etc/httpd/conf/httpd.conf file to start the process properly.

5. If the server load is due to tomcat process then
==> Same way kill all the process for tomcat as shown above in (1) and then go to the directory
where tomcat is installed (usually it will be /usr/local/jakarta5.1.0/tomcat or /appl/tomcat0 or /opt/tomcat)
#./bin/shutdown.sh (This will stop the tomcat service)
#./bin/startup.sh (This will start the tomcat service)
If its not starting then check the last logs for it in logs/catalina.out directoty.

6. Check if your sites resolves fine for the DNS
==> Check with dig and nslookup command if the name servers are properly set for your domain from registrar end
if its set properly as per DNS server setup then login to DNS server and check if that domain’s entry is there in
/etc/named.conf file and also check the zone file for it as per the path mentioned in /etc/named.conf file for that
domain.
also check if the named service is running or not and if the port or your client’s IP is not blocked on server.
#/etc/init.d/named status
#/etc/init.d/named restart
#/etc/init.d/named stop
#/etc/init.d/named start
Check /var/log/messages for the logs of DNS
If your client IP is blocked then remove it from the iptables as nentioned in (2) above.

7. Check for mysql process
==> Fire mysql command and if you get the mysql prompt then mysql is running fine on your server and if you
get any error then here you go..
service mysql stop
rm -f /var/lib/mysql/mysql.sock
service mysql start
ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
if fails :
The the final solution is : following needed to be in the /etc/my.cnf file:

[mysqld]
set-variable = max_connections=500

[client]
port = 3306
socket = /tmp/mysql.sock
[mysqld]
port = 3306
socket = /tmp/mysql.sock

shut down mysql and chkservd with the following commands:
#service mysql stop
#/etc/rc.d/init.d/chkservd stop
Then I removed the following files:
#rm -rf /tmp/mysql.sock
#rm -rf /var/lib/mysql/mysql.sock
#service mysql start
Now create the softlink with this:
#ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
There were a couple of variations in that last last command to create the softlink. I guess it depends on
where mysql creates the mysql.sock file when it starts. So if you are trouble shooting you might shut down
mysql as shown above, then remove the mysql.sock files. Then restart mysql as shown above and see where it
creates the mysql.sock file. If it creates it in the /tmp directory then you need the softlink command shown
above. If it creates the mysql.sock file in the /var/lib/mysql directory then you problaby need to use the
softlink command like this as shown in some of the other related posts:
ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
If you want to make sure which should be the valid symlink among the two below used widely.
1. /tmp/mysql.sock
2. /var/tmp/mysql.sock
For the valid link used on the server among the above two, check the /etc/my.cnf file for follwoing line.
“socket=/var/tmp/mysql.sock ”
You need to create the symlink for the socket mentioned in above line.
Reply With Quote

8. Mail trouble shooting..
==> Check if the mail server is running fine or not
#/etc/init.d/exim status
#/etc/init.d/exim restart
Check the error message and error logs for it in /var/logs/exim_mainlog and for pop3 check /var/log/maillog
and do the require changes in /etc/exim.conf file as per requirement.

If you find is interesting then please put your commenr below.
Cheers.

Tags Tags: , , , , ,
Categories: Celoteh Harian, Reviews
Posted By: dedi
Last Edit: 20 Apr 2008 @ 11 01 AM

E-mailPermalinkComments (6)
 20 Apr 2008 @ 10:45 AM 

sekrip bash, yah hasil dari ngoprek nya si arik lumayan buat ditiru, ditaruh di sini biar ga lupa :D

#!/bin/bash
#————————
# cpanel custom script
#———————–
echo -n “Masukkan Username cPanel : ”
read ucp
echo -n “Masukkan Password cPanel Baru : ”
read pas

#process

/scripts/realchpass $ucp $pas

status=$?

if [ $status -eq 0 ]
then
echo ‘password udah direset bos’
else    echo ‘embuh’
fi

nah setelah kode di atas, simpan dengan nama file apa aja, lalu chmod +x lalu untuk menjalankan perintahnya tinggal ./namafile nya simpel kan?? gunanya sekrip di atas untuk reset password cpanel yg biasa client lupa akan password capnelnya :)

selamat mencoba

Tags Tags: , , ,
Categories: Celoteh Harian, Reviews
Posted By: dedi
Last Edit: 20 Apr 2008 @ 10 45 AM

E-mailPermalinkComments (0)
\/ More Options ...
Change Theme...
  • Role »
  • Posts »
  • Comments »
Change Theme...
  • VoidVoid (Default)
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LiteLightweight
  • No Child Pages...
  • No Child Pages...
  • No Child Pages...