≡ Menu

If you run yum update on your centOS and get an error like this:

You can fix this eror with this command:

1. Check for processes holding the rpm database open:

If it finds any, kill -9 them all.

2. Delete any temporary DB files:

3. Rebuild your RPM database:

If you still have problems, a reboot is probably quickest, then repeat steps 2 and 3 above.

{ 0 comments }

cpanel control panel logoWhen you want to create or restore from backup a cpanel account and get error message like “Account Creation Status: failed (Sorry, a mysql user with the name cpanel-user already exists.)” just go to your mysql database user and drop the user, but if the error message still appear, here some solution.

Solution 1:

Please check if that user cpanel-user is showing up in /var/cpanel/databases/ location:

If that user is already showing up in that location, it will prevent the account from restoring.

Solution 2:

Please check for entries of that usernames in the following files and if there is any, remove those entries.

It did the trick for me. After removing these entries, execute the following command.

{ 0 comments }

cloudlinux OS logoHere is the tips how to boot into single user mode on CloudLinux OS

step 1: At the GRUB splash screen at boot time, press any key to enter the GRUB interactive menu.

step 2: type c (goes to grub command line) then hit esc

step 3: Select Cloud Linux with the version of the kernel that you wish to boot and type a to append the line.

step 4: type single and hit enter to boot

 

source: http://quags.net/archives/73

{ 0 comments }

openvpnWhen you feel confused to create a VPN using OpenVPN Community, as an alternative, you can use OpenVPN-AS (Access Server) where you can get free license with 2 concurent connections.

Step 1 : Make sure TUN divice is enable

To check your TUN device already enable, running this command:

Step 2: Donwloading OpenVPN-AS package

CentOS 5 32BIT

CentOS 5 64BIT

Ubuntu 10 32 BIT

Ubuntu 10 64 BIT

Step 3 : Installing OpenVPN-AS Package

CentOS

Ubuntu

Step 4 : Configuring OpenVPN-AS Software

Go to OpenVPN-AS Admin-UI

https://your-hostname/admin or https://your-ip-address:943/admin

Make sure your OpenVPN-AS software is ON

openvpn-as status

Step 5 : Installing OpenVPN-AS Client Software

Login to https://your-hostname or https://your-ip-address:943 and download OpenVPN-AS client

openvpn client

source : openvpn.net

{ 0 comments }

linuxYou can use iostat command to check your disk utilization and monitoring sistem I/O device loading by observing the time the physical disks are active in relation to their average transfer rates.

Step 1: Install Sysstat Package

CentOS:

Debian/Ubuntu:

step 2 : iostat command for disk utilization report

iostat -d -x interval count

Description:

  • -d : Display the device utilization report (d == disk)
  • -x : Display extended statistics including disk utilization
  • interval : It is time period in seconds between two samples . iostat 2 will give data at each 2 seconds interval.
  • count : It is the number of times the data is needed . iostat 2 5 will give data at 2 seconds interval 5 times

e.g: To display 3 reports of extended statistics at 5 second intervals for disk

output:

Decription the output above:

  • rrqm/s : The number of read requests merged per second that were queued to the hard disk
  • wrqm/s : The number of write requests merged per second that were queued to the hard disk
  • r/s : The number of read requests per second
  • w/s : The number of write requests per second
  • rsec/s : The number of sectors read from the hard disk per second
  • wsec/s : The number of sectors written to the hard disk per second
  • avgrq-sz : The average size (in sectors) of the requests that were issued to the device.
  • avgqu-sz : The average queue length of the requests that were issued to the device
  • await : The average time (in milliseconds) for I/O requests issued to the device to be served. This includes the time spent by the requests in queue and the time spent servicing them.
  • svctm : The average service time (in milliseconds) for I/O requests that were issued to the device
  • %util : Percentage of CPU time during which I/O requests were issued to the device (bandwidth utilization for the device). Device saturation occurs when this value is close to 100%.

How do I interpret the output result for optimization?

First you need to note down following values from the iostat output:

  • The average service time (svctm)
  • Percentage of CPU time during which I/O requests were issued (%util)
  • See if a hard disk reports consistently high reads/writes (r/s and w/s)

If any one of these are high, you need to take one of the following action:

  • Get high speed disk and controller for file system (for example move from SATA I to SAS 15k disk)
  • Tune software or application or kernel or file system for better disk utilization
  • Use RAID array to spread the file system

source: http://www.cyberciti.biz/tips/how-do-i-find-out-linux-cpu-utilization.html

{ 0 comments }

If you get error “Metadata file does not match checksum” when you running yum udate or yum install in you CentOS box e.g:

just running this command:

{ 0 comments }