EZ Linux Admin random header image

Entries Tagged as 'Cpanel and WHM'

add a 404 page to each website on a cpanel server

December 28th, 2011 by EZ linux · No Comments

#!/usr/bin/perl # cPlicensing.net – scripts            Copyright(c) 2003 cPlicensing.net. #                                     All rights Reserved. # support@cPlicensing.net              http://cPlicensing.net # Version: 0.02 print “Starting Scan…\n”; while(@USERS=getpwent()){ if (-d “$USERS[7]/public_html”) { if (-f “$USERS[7]/public_html/404.shtml”) { print “$USERS[0] 404.shtml exists\n”; } else { print “$USERS[0] creating 404.shtml…”; open(FILE,”>$USERS[7]/public_html/404.shtml”) or die “Unable to create file: $!”; close(FILE); chmod(0644, [...]

Click to continue →

Tags: Cpanel and WHM · Linux Security · Linux Software / Scripts

Backup cleaner script for cpanel

December 28th, 2011 by EZ linux · No Comments

#!/usr/bin/perl # cPlicensing.net – scripts             Copyright(c) 2003 cPlicensing.net. #                                       All rights Reserved. # support@cPlicensing.net               http://cPlicensing.net # Unauthorized copying is prohibited #Version: 0.01 use POSIX; $delete_old     = ’1′; #0 or 1, set to 1 to remove old account backups if($ARGV[0] eq “-d”) { $delete_old = ’1′; } $|++; POSIX::nice(19); print “Reading Backup Config…”; open(CPBACK,”/etc/cpbackup.conf”) or [...]

Click to continue →

Tags: Cpanel and WHM · Linux Security · Linux Software / Scripts

Manually changing an IP in Linux

December 17th, 2011 by EZ linux · No Comments

It’s pretty easy actually. Just go to this directory: /etc/sysconfig/network-scripts Then you will see a file for eachnetwork port, for example my server is: ifcfg-eth0 and ifcfg-eth1 I already have the ifcfg-eth0 set up from the install but I want to use the second one for back ups so I just opened the file and [...]

Click to continue →

Tags: Cpanel and WHM · Hardware · Linux Drivers · Linux Operating Systems · Linux Security · Linux Software / Scripts · Linux Tricks · Ports

Tracking down the biggest folders

August 11th, 2011 by EZ linux · No Comments

du -ax –max-depth 1 /var/cpanel | sort -n | tail This is a great command to simply find what folders are the biggest in a directory. You can replace the /var/cpanel with any folder and it will list everything in there and how big they are in order. Once you find the big folder then [...]

Click to continue →

Tags: Cheat Sheets · Cpanel and WHM · Linux Commands · Linux Security · Linux Software / Scripts · Linux Tricks

Cleaning up /var

August 11th, 2011 by EZ linux · No Comments

Cpanel and linux leaves a lot of log files in /var After several years these can add up, especially in the cpanel/bandwidth folder. So a couple quick folder moves and symlinks can clean things up. This is assuming you have a /backup partition and some room in it. Moving the log folder mv /var/log /backup/ [...]

Click to continue →

Tags: Cheat Sheets · Cpanel and WHM · Linux Operating Systems · Linux Security · Linux Software / Scripts · Linux Tricks

Clearing Your DNS Cache

July 19th, 2011 by EZ linux · No Comments

Clearing Your DNS Cache Your DNS cache stores the locations (IP addresses) of pages you have recently viewed. If the location of the page changes before the entry in your DNS cache is updated, you will be unable to access the page. If you are encountering a high number of HTML 404 error codes, you [...]

Click to continue →

Tags: Cheat Sheets · Cpanel and WHM

Remove Fantastico

June 26th, 2011 by EZ linux · No Comments

This short post is a response to the question I received from one reader that wanted to know how to remove completely from his Cpanel server Fantastico. Why would you want to do that? (assuming you have it already installed, it means you have a license also). Well, maybe the data center installed it by [...]

Click to continue →

Tags: Cpanel and WHM · Linux Software / Scripts

Change third party icon names in CPanel

June 23rd, 2011 by EZ linux · No Comments

Third party scripts like rv site builder, fantastico, and softaculous, have names that might confuse users. We found it better to change the names of these icons to what they are not the business names. You do that in this folder: /usr/local/cpanel/base/frontend/x3/dynamicui Then changing the permissions to read only is a good idea in case [...]

Click to continue →

Tags: Cpanel and WHM

setroubleshootd and SELinux is not considered compatible with cPanel

May 30th, 2011 by EZ linux · 1 Comment

The “setroubleshootd” process is included as part of SELinux. SELinux is not considered compatible with cPanel, and we recommend disabling it per our installation documentation: Disable SELinux security features For a fully successful installation you should disable SELinux. When installing a Red Hat or CentOS distribution, you will be able to use the graphical interface [...]

Click to continue →

Tags: Cpanel and WHM · Linux Security · Linux Software / Scripts

Open DNS fix for CPanel

January 15th, 2011 by EZ linux · No Comments

Open DNS gives a error and means that anyone can use your DNS resolvers. To lock it down you can add this. 1. Login to your server as root. 2. Wget and run the script as : Code: http://shashank.net/scripts/named.patch sh named.patch 3. It will provide you with an output like : Code: allow-recursion { 127.0.0.1; [...]

Click to continue →

Tags: Cpanel and WHM · Linux Security