cPanel Guidelines

cPanel Server Managment

Linux server tip: force reboot/shutdown

Forcing reboot

A Linux Server is not Windows XP and if reboot fail you usually still connect by SSH and do something. This commands will show you how to remotely hard reboot machine. Hard reboot mean that shutdown scripts will not run and machine reboot immediately without syncing hard disk drives, shutdown applications etc, it’s more like hitting the reset button.

echo 1 > /proc/sys/kernel/sysrq

echo b > /proc/sysrq-trigger

This commands enable sysrq and after this calls fast reboot. If you want to force shutdown machine try this.

Force shutdown

echo 1 > /proc/sys/kernel/sysrq

echo o > /proc/sysrq-trigger

This came handy, when I had a server that had some IO error and it can no longer read from disk, only few cached binaries into memory kept it running (kernel, SSHD, bash), I could still access the machine via SSH but can no longer do anything, forcing the reboot as mentioned above was my only resort, and it worked like charm…

How to mount and unmount a drive in linux

How To Mount A Drive In Linux

This simple step by step guide will show you how to mount a new hard drive or partitions onto your Linux server

More >

Linux sub directory size info

Need to know the exact size of your subdirectories in Linux?

Just go to the directory , like cd / and try this

du -cksh *

 

More >

Easyapache failing on CentOS server

Had an issue with one on our CentOS cPanel servers running 64 bit and cPanels easyapache upgrade. The folks at cPanel helped out with their usual professional response

More >

How to find MAC address in CentOS

Open SSH and type the following and press Enter:

/sbin/ifconfig | grep -i hwaddr

The sequence of hexadecimal digits that appears to the right of eth0 HWAddr (e.g. 08:00:27:ED:DA:8b) is
your network card’s MAC Address

cPanel – Manually back up and transfer an account via SSH

Sometime accounts are to big to transfer via the WHM transfer feature.

Below you can find some steps to do so manually

Log into your server and create a cPanel backup for the account

/scripts/pkgacct <username> <location> backup

<username> refers to the username you want to backup.

<location> is the path to where the backup will be placed (in your case you want to put /backup/cpbackup here).

So backup tells pkgacct that you want to create a backup file.

If you leave this off it creates a cpmove archive. Not sure what the difference is between a cpmove and a backup file, but this tells pkgacct you just want to create a <username>.tar.gz file in <location>.

And after the backup has been completed you can simple move it by pushing it via SCP

here is the tutorial  http://www3.wiredgorilla.com/content/view/322/1/

Problems with CenotOS5 – cPanel and BIND

If you have issues with cPanel running CentOS5 with BIND then the easiest way is to downgrade BIND to 9.2.4

The reason you’re having trouble is because CentOS 5 uses bind-9.3 and CentOS 4 uses bind-9.2 – The changes between these versions is significant enough that cPanel won’t work with it properly.

For instance by default there is no /etc/named.conf file created when bind-9.3 is installed and the default named.conf file for bind-9.3 is significantly different than in older versions.

Until the code is updated to work with bind-9.3, I have found the workaround to be to remove bind-9.3 packages and install bind-9.2 packages as follows:
 

More >

kernel yum upgrade

check what kernel you are running at the moment

uname -a


and t
o upgrade your kernel

yum update \kernel*

check if your kernel is added to grub

cat /boot/grub/grub.conf

and then reboot


shutdown -rf now

Installing SSH public key for extra security on your Linux server

Log into SSH

mkdir $HOME/.ssh
chmod -R og= $HOME/.ssh
cd .ssh
nano authorized_keys2

Add your key you created with PuttyGen , make absolutly sure you r key is in one line ONLY , otherwise it wont work!

Adjust your  sshd_config

nano /etc/ssh/sshd_config

to


RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile      .ssh/authorized_keys2

More >

Installing and configuring Windows CDP Agents

R1Soft CDP is a easy to install and use continous data protection system, primarily targeted at the hosting market. It backups up multiple servers to a central backup server; multiple backup windows can be performed per day, and files or even the whole disk can be restored from the image. This tutorial will show you how to install the Windows Agent on a server which you want to be backed up, and how to configure it.

More >

Installing and configuring Linux CDP Agents

R1Soft CDP is a easy to install and use continous data protection
system, primarily targeted at the hosting market. It backups up
multiple servers to a central backup server; multiple backup windows
can be performed per day, and files or even the whole disk can be
restored from the image. This tutorial will show you how to install the Linux Agent on a server which you want to be backed up, and how to
configure it.

More >

Preparing server for bare metal restore using R1Soft Live Rescue CD

Follow these steps to prepare a Linux or Windows server backup system,

prodced by R1Soft,   for a bare metal restore.

1. Put the R1Soft Live Rescue CD into the machine you are going to restore
to, and boot.

Press enter at the splash screen.

2. Once you are logged in, type

netconfig

More >

Installing Cacti

Server monitoring is one of the most important aspects of managing a network. Cacti is a free PHP/MySQL script which can monitor everything from process counts to bandwidth, and is fairly easy to setup and use. If you have multiple clients you can even delegate specific access levels so that they can only view the graphs relevant to them.

This tutorial will guide you through setting up and configuring Cacti on a Linux server. 

More >

Installing Webmin

While the big control panel suites you can install, like cPanel or Plesk, are excellent for large scale deployments or easy system administration, sometimes you just want an interface to quickly carry out complex tasks, which doesn’t require a package as large as cPanel/Plesk.

Webmin, a free and powerful control panel, it easy to install and allows you to carry out administrative tasks in an easy to use browser based frontend. This tutorial will guide you through installing Webmin.

More >

cPanel Name Server Setup

It seems no matter which flavor of linux / unix you are running and which control panel software that setting up custom name servers is always a problem. This How-To will be for installing name servers on a Linux CPanel server. Custom Name Servers are great because you can provide your webhosting customers with ns1.yourcompany.com instead of your server / upllink providers name servers. You will also know how to install Custom name servers for your reseller accounts.
More >

Installing cPanel/WHM on a vanilla CentOS 5 Server

After having initially installed your latest CentOS5 OS on your server you need to take a few steps to get cPanel/WHM running securily on your server.

More >

Issues with Rails on CENTOS5 and cPanel ?

I was trying to get rails to work through cPanel on Centos 5 and as many of you,
I have encountered problems too.

Here’s what made it work for me (run as
root):

More >

cPanel Security – Random JS Toolkit

A server compromise trend has been recently reported targeting multiple hosting platforms. RedHat Enterprise Linux & Centos 4/5 and Fedora Core 5/6 are the most common targets. This compromise is not believed to be specific to cPanel software. This issue has been seen on systems running a variety of control panels.

More >

cPanel easy apache3 not wanting to play ball

Just recently we had a little glitch on one of our cPanel server which we wanted to upgrade to Apache2.2.8
All of a sudden the recompiling process of Apache did not want to start and we got those errors

More >