1. Restart the httpd service. This might free a little space some times.
2. Check for apache logs like error_log, access_log , suexec_log in /usr/local/apache/logs . These can either be cleared off or if you need the logs then you can take a zipped copy and keep it aside.
3. Same can be done for the files [...]
Entries Tagged as 'Linux Tricks'
How to reduce or free space in /usr partition
January 13th, 2010 by EZ linux · 1 Comment
Tags: Cheat Sheets · Linux Tricks
Creating a SSH key
November 26th, 2009 by EZ linux · No Comments
ssh-keygen: password-less SSH login
SSH is often used to login from one system to another without requiring passwords.
This requires you generate your own personal set of private/public ssh keys.
ssh-keygen is used to generate that key pair for you. Here is a session where your own personal private/public key pair is created:
root:~> ssh-keygen -t rsa
Generating public/private rsa [...]
Tags: Linux Tricks
Have root logins emailed to you
November 24th, 2009 by EZ linux · No Comments
1. Login to your server and su to root, unless you logged in as root already.
2. cd /root (unless your default login folder is already root)
3. pico .bashrc (or use your favorite editor)
4. Scroll to the end of the file then add the following:
echo ‘ALERT – Root Shell Access (YourserverName) on:’ `date` `who` | mail [...]
Tags: Linux Security · Linux Tricks
Need space on a cpanel server?
November 10th, 2009 by EZ linux · No Comments
Here is some common places you can find some junk to remove:
find /backup/cpbackup/daily -name core.* -exec rm {} \;
find /backup/cpbackup/daily -name *.*.mbox:2, -exec rm {} \;
find /backup/cpbackup/daily -name *.msg” -exec rm {} \;
find /backup/cpbackup/daily -name *.msg” -exec rm {} \;
find /backup/cpbackup/daily/ -name *.*.dwhs1234.dwhs.net:2, -exec rm {} \;
find /backup/cpbackup/daily/ -name *.*.dwhs1234.dwhs.net:2,* -exec rm {} \;
Basically .core [...]
Tags: Cpanel and WHM · Linux Tricks
PHP handler SuPHP
November 9th, 2009 by EZ linux · 1 Comment
Setting your PHP handler to SuPHP, which will cause PHP scripts to run as the user instead of “nobody”.
Note that it has stricter permissions requirements than the other handlers–files must be 644, directories 755
Tags: Cpanel and WHM · Linux Security · Linux Software / Scripts · Linux Tricks
How to find a spammer using nobody on a cpanel server
November 5th, 2009 by EZ linux · No Comments
There is two ways I know to accomplish this, the first seems to be better but I am still testing it out.
The first way is another great script from Script Mantra called Sendmail Logger. Once installed and php has Mail Headers compiled with it then you can see easily whats being sent through nobody or [...]
Tags: Cpanel and WHM · Linux Tricks
Creating a info.php page
October 27th, 2009 by EZ linux · No Comments
Simple create a file called info.php in your public_html folder then add this codd to the page and save:
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php phpinfo(); ?>
</body>
</html>
Tags: Linux Software / Scripts · Linux Tricks
301 redirect
October 12th, 2009 by EZ linux · No Comments
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^dwhs.com [nc]
rewriterule ^(.*)$ http://www.dwhs.com/$1 [r=301,nc]
This will redirect dwhs.com to www.dwhs.com (change dwhs.com to your domain name)
Step by step for DWHS Customers:
log into your cpanel: www.your-main-domain.com/cpanel/
Click file manager and click the option to see hidden files
Make sure your in the folder public_html or www
Then create a new file called: .htaccess
Then in edit [...]
Tags: Cheat Sheets · Linux Tricks
Apache error log settings
September 29th, 2009 by EZ linux · No Comments
This directive adjusts the verbosity of the messages recorded in the server’s error logs (see the ErrorLog directive). The following levels are available, in order of decreasing significance: emerg (emergencies: system is unusable); alert (action must be taken immediately); crit (critical conditions); error (error conditions); warn (warning conditions); notice (normal but significant condition); info (informational [...]
Tags: Cheat Sheets · Linux Software / Scripts · Linux Tricks
Linux rescue CD
September 23rd, 2009 by EZ linux · No Comments
SystemRescueCd is a Linux system rescue disk available as a bootable CD-ROM or USB stick for administrating or repairing your system and data after a crash. It aims to provide an easy way to carry out admin tasks on your computer, such as creating and editing the partitions of the hard disk. It comes with [...]
Tags: Linux Back Up · Linux Software / Scripts · Linux Tricks
