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
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
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
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
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
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.
- eth00's blog
- Login or register to post comments
- Read more
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
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
MySQL Replication
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! =-)
- eth00's blog
- Login or register to post comments
Foundry Server Iron Server Load Balancer (SLB)
The ServerIron XL
Server Load Balancer (SLB) Guide
HELP! Server Crashing
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.
Recent comments
1 year 32 weeks ago
1 year 32 weeks ago
2 years 13 weeks ago
2 years 24 weeks ago
2 years 25 weeks ago
2 years 30 weeks ago
2 years 30 weeks ago
2 years 30 weeks ago
2 years 30 weeks ago
2 years 31 weeks ago