All posts tagged server

Closing Down a Server

By Tavis J. Hampton in: VPS & Dedicated

Closed sign over highway exit

Everything comes to an end, and there are times when shutting down a server for the last time may just be the right thing to do. Whether the hardware is old and the websites need to be moved to a new server, or you have just decided to move on, there are certain steps you should take to make sure the process goes smoothly.

1. Keep backups of everything. Even if you have already made it clear to clients and users that the server will soon be gone, you should still keep backups around for a while, just in case.

2. Announce the shutdown well in advance. Do not wait until a few days before such a major change. Give anyone else involved time to prepare.

3. If you are migrating to a new server, have everything set up on the new server before you pull the plug on the old one. There should be minimal downtime.

4. Help customers adjust. If you were running some type of reseller or hosting business, refer your customers to another good host and help them move their sites. You never know when you may want to do business with those customers again.

5. If your website was particularly valuable in terms of content, consider selling it intact or passing off the content to someone who may want to use it and preserve it.

6. Keep or sell your domains. If they were at all valuable to you, they might be valuable to someone else or to you in the future. Do not just let them expire.

7. If you know of any places that recommended your site or advertised for you, make sure to notify them that you are closing.

8. Accept that change is part of life and move on with your life.

Photo Source: Flickr

Continue reading: Closing Down a Server

....
share this 0 comments

Server Backup Tips

By Tavis J. Hampton in: VPS & Dedicated

server burnt to a crisp

Backing up your server may be the single most important thing you ever do. It could save your websites, your clients, and your business. We have covered quite a few backup issues on this blog. Here is a summary of some important points.

1. Always use a remote backup server. Although there are some benefits to local backup, it will be useless when the entire server crashes.

2. If possible, avoid using your home computer as your backup server. Use a dedicated backup server or lease backup space from a web host.

3. Use rsync or similar program to perform remote incremental backups.

4. Automate the backup process with a cron job.

5. Backup all website files and databases.

6. Periodically test your backups to make sure the process completed correctly.

7. Make sure users or clients also perform their own individual backups for added protection.

Photo Source: Wikimedia Commons

Continue reading: Server Backup Tips

....
share this 0 comments

Server Hardware Tips

By Tavis J. Hampton in: VPS & Dedicated Web servers

Inside server hardware

Much of the discussion about web hosting and servers centers around operating systems, software, and web applications. But one should not overlook hardware, which can make or break website performance. Here are a few hardware tips to make sure you get the most for your money.

1. When possible, opt for the quality, server-grade CPUs (i.e. 64-bit Intel Xeon dual or quad core)

2. The more RAM you have, the better. You can never go wrong by adding memory to your system.

3. Get large, fast hard drives, especially if you plan to run virtual private servers (VPS).

4. For large-scale sites, server redundancy is a good thing, if you can afford it.

5. Multi-core processors improve performance, but correlate the amount of processing power you get with your actual needs. In other words, there is no point in having a 64-core processor for a couple of blogs.

6. Find ways to save power, especially if you have to pay for it. Green servers will save you money and save the environment.

7. Remember that technology is constantly evolving. Plan on needing to upgrade in the future.

Photo Source: Flickr

Continue reading: Server Hardware Tips

....
share this 0 comments

Server Maintenance Tips

By Tavis J. Hampton in: VPS & Dedicated Web servers

fsck running on Linux

Over the course of the past year, we have covered many dedicated server maintenance issues, particularly for servers running Linux. In no particular order, here is a list of some of the more important tips you should remember when taking care of your server.

1. When possible, rely on the distribution updates and repositories. Only add third-party software when absolutely necessary.

2. Periodically run fsck to check the file system.

3. Monitor system and service logs.

4. Disable unused services.

5. Periodically optimize MySQL databases.

6. Monitor CPU and RAM usage.

7. Optimize RAM and swap usage.

8. On larger servers, run the database server on a separate machine, optimize the servers for scalability, and consider using a CDN (Content Delivery Network).

Photo Source: Flickr

Continue reading: Server Maintenance Tips

....
share this 0 comments

Server Hosting Tips

By Tavis J. Hampton in: VPS & Dedicated Web servers

Server mainframe drawing
Web hosting is a vast subject, and we have covered many areas of the topic over the past year. Here are a few tips to help you keep your server in the best web hosting shape possible.

1. Keep backups of all data, both account storage and databases. If possible, keep the backups on a remote server and schedule regular incremental updates

2. Update the kernel and other software regularly.

3. Use a script installation service to help users install web applications

4. Provide a web-based control panel to help users manage their sites

5. Enforce strong passwords and encourage users to update their passwords regularly

6. Use a monitoring service for the web server, mail server, database server, and any other critical services

7. Maximize disk and memory usage only to the point of ideal performance and do not over exert the server

8. Always announce any changes, updates, reboots, or maintenance, giving users plenty of time adjust.

Photo Source: Wikimedia Commons

Continue reading: Server Hosting Tips

....
share this 0 comments

Rsync Incremental Backups

By Tavis J. Hampton in: Web servers Software

Graphical rsync output

Question: How can I easily perform incremental backups on my dedicated server?

Answer: There are few tasks more important than backing up your server. Because of the nature of computers and especially the nature of the Internet, you are bound to have problems. They may or may not cause data loss, but that is not a chance you want to take.

Rsync is a tool that simply syncs the files in one directory with another. What makes it ideal for backups is that 1) it can archive files and compress them and 2) it can use SSH to perform the backups to remote servers.

To run an rsync backup, just execute the command like this:

rsync -avz ~/public_html username@hostname.com:/home/user/backupfiles/

This will backup, archive, and compress the files found in public_html on your server. Finally, it will send those archives to the remote server in the directory specified. The best part about rsync is that, the next time you perform a backup, it will only backup the files that have changed (i.e. incremental backups), saving you bandwidth and time.

Continue reading: Rsync Incremental Backups

....
share this 0 comments

How to Change Your FTP Port

By Tavis J. Hampton in: VPS & Dedicated Web servers

FTP iconThe default port for most FTP servers is 21, and that is how most system administrators will leave it. The majority of FTP clients are configured to use it, and some will not even ask you to change it unless you dig through the configuration. There are, however, a few situations where you might want to change the FTP port for your dedicated server or VPS.

If you do not have other users accessing your server and want to add a little security by making your FTP port something no one would guess, you can easily change the port in ProFTPD or Vsftpd.

To change the port in ProFTPD, edit the configuration file, /etc/proftpd.conf and change the following line:

Port 21

Replace “21″ with whatever port number you want.

To change the port in Vsftpd, edit /etc/vsftpd/vsftpd.conf and change the line:

listen_port=21

When you are finished, you should restart your FTP server to force the changes to take effect.

There are a few issues you should note. Before changing the port, make sure the port you want to use is available and not used by another service. Also, after you free up port 21, you should close it in your firewall settings and open whatever port you have opened to replace it.

Continue reading: How to Change Your FTP Port

....
share this 0 comments

How to Force YUM to Exclude Certain Packages

By Tavis J. Hampton in: Web servers Software

YUM logoYUM is a package management system for Red Hat Enterprise Linux (RHEL), CentOS, Fedora, and other Red Hat-based Linux operating systems. It is command-line driven and is an easy tool you can use to keep your server updated and install any new software you need.

Normally, when you perform updates, YUM will search the distribution’s online repository and select any newly updated packages for download and installation. These may include everything from Apache web server to the Linux kernel itself.

Most of the time, it is a general good practice to update all of the available packages, but there are times when this may not be ideal. For example, if you know for certain that a new version of a particular package that you have installed will not work with a version of one of your web applications, you may want to delay updating until you have patched your application. Another possible scenario is that you may want to update most of your other packages now but wait until later to update the kernel, which will require a reboot.

YUM has a built-in feature that allows you to exclude a package or group of packages of your choosing. You can either use the exclude function on a long-term basis or for one particular update. To make a long-term change, you should edit your repository file (usually yum.conf). Find the [main] section and add the following line:

Continue reading: How to Force YUM to Exclude Certain Packages

....
share this 0 comments

What is Anonymous FTP?

By Tavis J. Hampton in: Web servers

FTP icon

By default, FTP servers require the user to login in order to upload or download files. Many web hosts, however, additionally offer the ability to use anonymous FTP. It basically gives you the ability to allow users to login to the FTP server without providing a username or a password.

What it really does is give users access to a username called anonymous, which does not require a password. They can then perform whatever tasks that are allowed for that user. For example, the anonymous use may be allowed to download public files but probably will not be allowed to upload. Downloading with FTP takes load off of the web server and usually offers more connections so more users can access the files at once.

Despite its name, anonymous FTP is not completely anonymous. As a website owner, you can still track IP addresses and host name, in case someone attempts to compromise your system. If you do not offer public downloads of any sort, it is usually a good idea to disable anonymous FTP.

Continue reading: What is Anonymous FTP?

....
share this 0 comments

How to Fix an Open Relay in Postfix

By Tavis J. Hampton in: Web servers Software

As I have been reiterating all week, an open relay is a bad idea. If your mail server is left open, anyone can use your SMTP service to send mail, and spammers will use it. This can result in your server being blacklisted and extraneous use of system resources that neither benefit you nor your users.
Postfix logoTo secure Postfix, there are a number of functions you can add the configuration file /etc/mail/main.cf. Edit the file and add the following lines:

smtpd_helo_required = yes
smtpd_delay_reject = no
disable_vrfy_command = yes

smtpd_helo_restrictions = permit_mynetworks,
reject_invalid_hostname,
reject_unknown_hostname,
reject_non_fqdn_hostname

This will force incoming requests to pause and identify themselves before proceeding, and will allow properly authenticated users to pass through and send mail. To finish, save the file and restart Postfix:

/etc/init.d/postfix restart

Continue reading: How to Fix an Open Relay in Postfix

....
share this 0 comments

How Do Spammers Send Spam from My Server?

By Tavis J. Hampton in: Software

Wall of real spam

When your server has become a haven for spammers, it is never a pleasant ordeal. Your server will probably be blacklisted, causing many of the emails you send to bounce back, and you may have serious connection problems due to the spammer using valuable system resources.

There are a couple of ways in which spammers will use a server to send their emails. The first is through an open relay in your mail server. This is something that you can easily fix in both Postfix and Sendmail. I will post more about fixing an open relay tomorrow. The second method is by signing up for a legitimate hosting account with your web hosting service, but then using the account to send spam. By the time you figure out what they have done, they are usually long gone.

The third and probably most nefarious method of sending spam from your server is through an actual attack on your server. When a hacker finds a hole in your security, they will install a bot on the server. That bot will then act as a small mail server for the hacker, all without your knowledge. You may not even notice it unless it causes some side effects. All three methods should be fixed with increased security and careful scanning of your server for possible threats.

Photo Source: Flickr

Continue reading: How Do Spammers Send Spam from My Server?

....
share this 0 comments

Mail Server Causing High Server Load

By Tavis J. Hampton in: Security

Mail letter iconQuestion: My CPU usage on my server is very high, and it seems to be originated from my mail server. What could be the problem?

Answer: If your mail server is sucking up valuable CPU power, there are a couple of possibilities, none of which are pleasant.

1. You or users on your server are getting a lot of emails, more than usual. Although it is possible that it is just a temporary thing, it could be a deliberate attack on your server.

2. Someone is sending spam from your server, using an open relay in your SMTP settings or exploiting a user’s account.

3. Your server is receiving a ridiculous amount of spam (i.e. spam attack). This could be an intentional attack or just a particularly bad day.

Usually, if the CPU upswing is substantial, you should be really concerned about your server’s security. Take a look at the mail server logs and see where the emails are originating and where they are being sent. Take note of IP addresses, user names, and any other useful information. If you cannot figure it out, you can take the data to a security expert who can help you solve the problem.

Continue reading: Mail Server Causing High Server Load

....
share this 0 comments
Network Blogo