cPanel Mail Issues
The below has been known to fix most cPanel mail issues. They can range from spamd failed messages to exim just flat out not working at all.
/scripts/perlinstaller Digest::SHA1
/scripts/perlinstaller –force Mail::SpamAssassin
/scripts/fixspamassassinfailedupdate
/scripts/updatenow
/scripts/installspam –force
/scripts/exim4 –force
/etc/rc.d/init.d/exim restart
/scripts/restartsrv spamd
/etc/rc.d/init.d/chkservd restart
Auditd crashing
recent problem with RHEL and cPanel causes some servers to crash on a daily or every couple of days basis. The normal symptoms of this sort of crashing are having the server crashing at the same time every time that it crashes. If you are having these problems I would suggest that you go ahead and just disable the auditd for now since the system can run fine without it and it seems to be causing a lot of trouble for some people. The below has worked fine for me on hundreds of servers and should not cause any issues.chkconfig audit off
service audit stop
ps -ef | grep auditd
Mount a drive
This guide is meant to be a simple walkthrough on how to parition a new drive to be used only for backups. If you want to put mysql and a /tmp parition on it check out my other guide located on the left. This guide uses fdisk which is a very powerful tool but you should be fine as long as you are careful in what you do. Use this guide at your own risk! What ever you do make sure to NOT use the command “fdisk /dev/sda” or “fdisk /dev/hda” as that means you are editing your main and boot partition.
A linux primer
This guide is meant to provide information to those that may still be teething on linux and are not yet familiar with the differences it has with other operating systems. I am also going to cover some of the basic things that should be done about security and the often overlooked importance of backups. Since most of my articles are targeted at people within the hosting industry I am going to write the guide slanted more towards that group. If you have any more ideas or suggestions as to what I should add to this article please give me some suggestions! I am going to gradually try to add some more information, like in the area of how to use ssh.
*Updated August 8th* Fixed some typo’s and added a little bit more (more…)
Creating and using ssh keys
This guide will give an explanation as what ssh keys are and how they can be used on a day to day basis to make a server more secure and logins even faster. Ssh keys very much like the normal lock and key that are found all over. There are two parts to an ssh key, there is the private key and then the public key. The private key is just that, private. If any person is allowed to view or copy that file it becomes possible for them to login to any server that has the public key installed. The public key is just as the name says, public and can be posted anywhere. SSH key authentication works in a two step process. When I connect from a computer with a private key installed the ssh client will offer the private key to the remote server. The remote server then checks the authorized_host2 file which contains a list of all of the public keys that are allowed to authenticate with the server. If there is a match the server will allow the user to login without a plaintext password, the key takes over that function. This process is often faster then putting in a password and saves the trouble of having to write passwords down. A word to the wise, make sure you keep the private key safe!
Starting a webhosting company
This guide is here for all those people that are starting a webhosting company but have absolutly no clue how to do it or just how much work it would take to run one. If you are thinking it is still the late 90’s and the internet means quick and easy money just close this window now and stop reading…that internet is long gone. The truth of the matter is that there are thousands of webhosting “companies” many of whom are run from the desk of a 13 year old kid, while he is not at school of course. Of course I am not trying to say that all hosts are kiddie hosts, but many are and they are the ones that are willing to sell you a $5/year hosting plan. You have to realize that there are different levels of companies and service, if you try to get in to get the bottom feeder clients that want to pay as litlte as possible you will most likely run into trouble. In this article I will go over some of the things to consider before even trying to run a business.
Installing mytop
MySQL is one of the most important programs on a server, unfortunatly it is also pretty resource intensive. One a server it is not uncommon for a single user or even a query to take up the bulk of the servers cpu cycles. Mytop is a very useful program to see what queries a server is currently processing as well as which user is executing them. Think of mytop as top for mysql. If you see a lot from a user that means they are probably the hog. Mytop can also be useful for figuring out exactly which queries are causing the problem in the case of a self-designed website. The following is how to install mytop on the server and run it. Thanks to carlos for the actual commands
Installing zend optimizer
cPanel’s /scripts/installzendopt generally works if you run the cPanel control panel. If you do not the Zend website has an installer which is basically the same thing and works great. If you do not want to search the site I have provided a mirror of the files below. If you do please use version http://eth0.us/files/ZendOptimizer-3.2.8-linux-glibc21-i386.tar.gzas it is compatible with php5 and php4
(more…)
Add an ip address
This is a quick guide on adding IPs to a system manually. I would only suggest it if you are not using a control panel, such as cpanel, that has a feature to adds ips. If your main ethernet device is eth1 instead of eth0 simply substitute eth1 for eth0. Other then that should be pretty simple to follow, this should work on any standard redhat/centos based system.
Login as root then do the following to add a new ip address to any linux redhat based system. If you have cpanel there is a nice little ip management script that just lets you do it via WHM. For those without cpanel do the following:
cd /etc/sysconfig/network-scripts
Change the mysql directory
While not all datacenters do there are some that by default partition the system in a less then ideal manner. I have had to deal with quiet a few clients who have filled up their /var partition due to mysql being stored by default on the partition. This is a short little guide to show you how to move mysql to another parition on the system. I have another guide that shows you how to parition a drive for mysql but many times it is not possible to repartition a drive and it is a lot easier to simply move it to another live parition. I would make sure and leave mysql in the old place, or at least a backup copy, for a few days before deleting it to make sure all of the data was transfered fine. If you want to move to a partition other then /backup/ simply change backup to home or the partition name anyplace you see it. In addition to the space considerations moving to a different drive can also have a profound positive influence on the system performance.
First edit the my.cnf:
pico -w /etc/my.cnf
« Older Posts — Newer Posts »