Showing posts with label Dedicated Servers. Show all posts
Showing posts with label Dedicated Servers. Show all posts

How to Install Apache on Your Dedicated Server

In this lesson you will learn how to install Apache on your Dedicated Server.  If you don't yet have a Dedicated Server on site at your home office or facility, the best thing to do is to open an account at the Rackspace Cloud.  Provision a 256 MB Ubuntu cloud server.  This will run you about $10/month or a few cents per hour if you decide to unprovision the server after completing this lesson.

Apache Web server Installation in Ubuntu
Ubuntu Linux is a great platform to use for an Apache Web server Installation. From a simple machine you can serve web pages to an Intranet or the Internet using one of the most popular Web server configurations.

LAMP Server

For new installations of Ubuntu, the easiest method to get the Apache Web server is by selecting the “LAMP” option on Ubuntu’s software selection screen during installation. This process will get the standard Linux, Apache, MySQL, PHP configuration setup on your server in one automated process.

If you don’t want to configure the server as a LAMP, or if you have other requirements, you can install Apache as a separate application once Ubuntu is installed.

If you went the Rackspace Cloud route, Rackspace has images of Ubuntu already provisioned so you get to skip the installation process and just jump to the Apache installation step.

Download and install Apache Web server

Open a putty session to your server and type “sudo apt-get install apache2” and then press return.

Ubuntu will download and install the Apache Web server software. When the process is complete, you can test your Web server by loading http://localhost (or the IP address assigned to your server) in a browser.

Edit apache2.conf

If the default Apache page doesn’t load, you can try editing the apache2.conf file. Just type in “sudo nano /etc/apache2/apache2.conf” and then press enter to edit the file in Nano. Add the line, “ServerName localhost” to the file and then save and exit. Every time you change apache2.conf you should restart the Apache server so the changes will take effect. Type in sudo apache2ctl restart and press . When this is finished, try browsing to “localhost” in your Firefox browser.

Other considerations

Most of the time, people want to use PHP with Apache. To do this, all you have to do is type “sudo aptitude install php5 libapache2-mod-php5” into a terminal window and then press . If you need to have PHP4 installed, type in “sudo aptitude install php4 libapache2-mod-php4” and then press .

After that, enable the PHP modules by typing in “sudo a2enmod php4” and then pressing and then type “sudo a2enmod php5” followed by hitting the key. Type in sudo apache2ctl restart and press .


As you have seen, Apache Web server installation is really easy in Ubuntu. You can continue to add modules to Apache such as CGI and Perl if necessary. The Apache Web server is one of the most powerful available and is capable of running the most sophisticated Web applications.

Virtualization Solutions for Dedicated Servers

This week, you may want to consider and review solutions that other companies are doing to help consolidate their dedicated servers with virtualization.

On the storage side, SeverWatch is reporting that Virtualization Technologies for Storage Get Real:
The technological issue of storage backup being a big problem once virtual machines are up and running. The most effective way to backup the virtual machines is do so in a way that doesn't involve the box itself being backed up. The easiest and most common way to handle this is to snapshot the virtual machine's image and backup.
Here I agree that snapshots are the easiest way to backup your virtual machine.  But where do you store those images?  CommVault offers a $900/TB license which will enable you to backup your data to the cloud, but what about smaller solutions?

Here you may want to consider CTERA, the "Coolest Cloud Storage Vendor". CTERA offers a plug-in computer that connects to the internet that enables you to backup your data to off-site storage via Rackspace Cloud Files.  A somewhat more cost effective solution especially if you have a small business or home office.

Eventually your business will grow to a point where expansion becomes nearly impossible and you need to look for alternatives.  Take the case where Attorney Nicholas Barrett consolidated twelve Windows 2003 servers into one using dedicated server.  Not only is he saving money, space and energy with virtualization, he has added capacity to grow his business. His solution is to run Citrix (NASDAQ:CTXS) XEN on a single IBM Blade Center S Chassis. To protect his twelve virtual servers, he uses StorageCraft ShadowProtect software to image servers for disaster backup and recovery.

With virtualization, many of the products used to protect your dedicated server are now scaling to provide a solution for your entire infrastructure.  The good news is that there are affordable solutions for both small companies and large enterprises.

How to Prevent Spammers from Accessing Your Linux Server

I run an article directory on a dedicated Linux server and provide full article RSS feeds for any query or tag. When spammers find the site, they usually pull the feeds and repost the articles on their Wordpress or Blogger blogs.

Occasionaly, for whatever reason, they tend to download feeds like there is no tomorrow. I don't care about them accessing the feeds for whatever use -- as long as they publish the articles intact to preserve the content with links to the author's sites -- but I really when pissed off when they access the server thousands of times per hour. This can bring even the most powerful dedicated Linux Server to its knees.

A simple trick to prevent them from accessing your site is to add in the .htaccess file

order allow,deny
deny from
allow from all

This returns a 403 (forbidden) error. If the script they're running to grap the content from your linux server errors out, then it will stop accessing your site. More often than not, the script continues to scrap your site causing Apache to take up valuble dedicated resources.

A more practicle approach is to prevent them from accessing the server by using the iptables, or firewall rules.

This will reject the access at the TCP transport layer before it gets routed up the transport stack to Apache. To do this, enter this command:

iptables -A INPUT -s -j REJECT

The iptables command must be entered as root from ssh or from your control panel. But with a dedicated or virtual linux server, you should have root access.

Are Dedicated Servers Becoming Obsolete?

Today's Microsoft and Red Hat mutual virtualization support agreement supports a trend that enforces the common belief that dedicated Linux servers are becoming a thing of the past.  Consider in InformationWeek that

Microsoft, Red Hat Agree To Mutual Virtualization Support -- Windows Linux Virtualization
As part of the agreements, Microsoft will run Red Hat Enterprise Linux 5.2 and 5.3 as a guest in Hyper-V environments, and will lend its hand to technical support and documentation. Red Hat will also run Windows Server 2003 SP2, Windows 2000 Server SP4, and Windows Server 2008 as guests on Red Hat virtualization technologies, with similar tech support offered.

Brian Stevens, Red Hat Vice President and CTO makes a valid point that the hardware is becoming so powerful that single applications and cannot taking full advantage of the dedicated server.  That is, the processor speed is not increasing anymore but more and more physical cores are being added.

Unless the application is designed for multiprocessors, the other CPUS are effectively sitting idle.  Allocating the physical cores to logical virtual servers may make the best use of the physical server since each logical processor can be used to balance and increase the overall performance of the dedicated Linux Server.

Linux Dedicated Servers are not Free

Yes folks, there are things such as free hosting sites which use Linux dedicated servers to host thousands of shared hosted sites. But if you think that you can get a dedicated server for free you have been misled.

The important thing is that you want to consider is why you hosted your site on a free or cheap server in the first place when you actually needed a more powerful solution.

Many of my sites are hosted on less expensive solutions but these typically are not CPU and bandwidth intensive, thus, I can get away with it. But sometimes these sites expand beyond the limitations of a shared server and I get the dreaded email stating that I my hosting has been terminated due to hogging the CPU.

So the important question is that you need to ask is "should I initially use a cheaper solution or go the direct route with dedicated?"

We all have illusions of grandeur of having the next great blog or application, but in reality, these are quite rare and you can get away with a simple solution for the initial approach and grow into a virtual dedicated server or more powerful Linux dedicated server.

Yet both of these solutions are costly in the beginning, hence, Linux dedicated servers are not free.

My personal approach is to have a spare dedicated server that I run new applications on that can handle CPU and bandwidth loads. Initial testing of the application may also increase server load due to debug logs and systematic bugs that will easily bring down a dedicated Linux server to its knees.

Although initial alpha testing of the application can be done in house on private servers until the majority of the bugs are resolved, eventually the application needs to be installed on a server that will be exposed to real-world loads. For that, anything but a virtual or dedicated Linux server will suffice.