All of the information provided on the site is provided free of charge in the spirit of open source. If you need work done on your server but do not feel comfortable doing so please contact TotalServerSolutions , the company that I co-founded.

Thanks for visiting!
John Wigle
"eth00"

Rsync

Rsync is another very powerful command that is used to sync 2 directories between servers and only transfer the new files to the server. This is a great method for backups as it is low on bandwidth and it is also commonly used to keep clustered servers working together. The ending slashes are very important when using rsync. If you are not familiar with how it works simply always make sure to have an ending slash on both the source and the destination and it should be fine.

Replace

The replace command is a very simple but VERY powerful command that comes as part of mysql. It can be used to quickly replace entries within a group of files. Generally I find it useful for mass-modification of an IP for dns or TTL for dns.

Change the mysql directory

Untitled Document

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.

Add an ip address

Untitled Document

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.


Installing zend optimizer

Untitled Document 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
Updated August 2007






Zend optimizer is a plugin to php which allows a server to read zend encoded files as well as serve as a platform to install zend modules such as eaccelerator.

 

Installing mytop

Untitled Document

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

Why use a foundry server iron load balancer

Untitled Document

So what exactly is a server load balancer (SLB) and how is it going to help you?

An SLB is a rather expensive, but very effective, way to minimize downtime on an important website that requires 0 downtime. The load balancer that I have the most experience with is the foundry serveriron load balancer that ev1servers currently offers. The primary gain from a load balancer is the ability to host one, or a small group, of websites easily on multiple servers without having to rely on unbalanced solutions like round robin (RR) dns. The load balancer is configured so that each website has a single incoming IP and then when traffic hits the load balancer it will send it to which ever server has the least amount of connections. In this way if for some reason a server starts to slow down and the connections queue up it will stop sending them.

Increasing TCP IP Efficiency

Okay, Well... This script is not a security script, nore a load balencing script. But it is a very useful script if you get high traffic or are hosting a Game Server. I've Had CounterStrike Server player ping go down as much as 50ms after running this script.

So what you want to do is log into your server's shell, and create a file (nano filename.sh). Once you create the file, you need to put this code in the file;

#!/bin/bash

# Create backup
if [ ! -e ./speed_backup.sh ] ; then
echo -n "Creating backup (`pwd`/speed_backup.sh)... "
echo "#!/bin/bash" > ./speed_backup.sh
echo "" >> ./speed_backup.sh
echo "echo \"`cat /proc/sys/net/ipv4/tcp_sack`\" > /proc/sys/net/ipv4/tcp_sack" >> ./speed_backup.sh
echo "echo \"`cat /proc/sys/net/ipv4/tcp_timestamps`\" > /proc/sys/net/ipv4/tcp_timestamps" >> ./speed_backup.sh
echo "echo \"`cat /proc/sys/net/ipv4/tcp_mem`\" > /proc/sys/net/ipv4/tcp_mem" >> ./speed_backup.sh
echo "echo \"`cat /proc/sys/net/ipv4/tcp_rmem`\" > /proc/sys/net/ipv4/tcp_rmem" >> ./speed_backup.sh

Starting a webhosting company

Untitled Document

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.

BCC/php spam email and a fix

So I am sure if you are running a cPanel server you are having the exact same trouble as we have been having the last week, lots of spam! It appears there is somebody in this world that has decided to write a rather efficient script that searches for webforms then sends spam via php and bcc. The first quick fix was to enable safe_mode but that obviouslly gets a fair amount of webhosting clients pretty bad. I have been working with mod_security and come up with a pretty simple rule that should help:

SecFilterSelective THE_REQUEST "bcc:|Bcc:|BCc:|BCC:|bCc:|bCC:|bcC:|BcC:"


What that will do is search first for the bcc, Bcc, etc then look for com, org, or net in a url. I was trying to filter it looking for an @ symbol but I was having trouble with apache picking it up. I figure if they are not spamming to one of those TDLs it is probably not a very big attack. If you want to protect more simply add to the list, remember all it has to do is catch one and it blocks the entire request.

How-To setup a MySQL replicating cluster

Untitled Document

MySQL Replication

 This guide is designed to help do the initial setup on a MySQL cluster in which multiple MySQL servers all serve the same content through the use of the replication function. We have successfully deployed this solution for multiple clients and it is a very good option for those needing a more powerful mysql solution. Carlos (theuruguayan) actually created this document so please direct any questions to carlos@totalserversolutions.com .

 Be sure your mysql servers are running the same version before starting this guide, yes, is possible to have a few combinations of master-slave versions, for more information about this you can check:

Site update....finally!

Well I have finally taken the time to go ahead and update the site to something I like better then before. The old design was just getting way too crowded and there was no room to breath. I was also having trouble making sure I had links to all of the articles, which I did not. I am now in the process of going through all of the articles and linking them to the main catagories in the upper left. Now that I have finally gotten this done I will also most likely start writing a few new articles as well! =-)

Foundry Server Iron Server Load Balancer (SLB)

The ServerIron XL Server Load Balancer (SLB) Guide

The ServerIron XL Server Load Balancer (SLB) Guide

 This guide was written by John Wigle “eth00” with the help of carlos “theuruguayan” of www.totalserversolutions.com please direct any questions or comments to john@totalserversolutions.com . This guide is not finished and I am always open to corrections or additions. Please do not publish this guide on any public websites or fourms, I would appreciate any knowledge of such postings.

 I have recently had the pleasure of working with a few of the server irons that ev1 deploys as load balancers within the private racks and in the process of setting them up noticed the lack of easy to read documentation. The foundry website is full of great information but it takes a lot of reading and most of it is targeted at the telnet prompt and not the web interface. I have written this guide targeted at doing an initial setup of the slb as well as some more the more advanced configuration that clients may need. If you have purchased a load balancer inside of a private rack you will be dealing with the same hardware that this guide is targeted towards.

HELP! Server Crashing

Untitled Document

HELP! My server is constantly crashing!

There are a lot of things that may cause a server to crash, this guide is going to primarily look at the hardware side of crashing. There are many things that might be causing the server to crash from a software standpoint such a process that runs out of control or uses too many resources. There are a few things that might be going wrong with a server. Normally the component that goes wrong is the hard drive, simply because it is use so much and is a moving part. The RAM on a server will occasionally go but this is more common when the server is moved around or the RAM moved because it has a chance of being statically shocked. On the less common side of things you could have the CPU, powersupply, ethernet card, or motherboard going out.

Auditd crashing

Untitled Document A 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.

Powered by Drupal - Theme created by Danger4k