How to set up linux web/mail server

I have the assignment to plan and perform a website/database move from an offsite commercial solution to an onsite one.  The existing solution is hosted on a Red Hat Linux machine and the site uses php/mysql.  How many hours to complete this project? This will include installing linux on a machine, configuration of database, webserver and mailserver.  Also what Red Hat Linux is suitable and free? Also is there a way of doing this simply like making an image of the existing machine? I am technically inclined and I understand unix pretty well.
Who is Participating?
free Redhat = Fedora;  Enterprise Server is not free.  See: for information on Fedora.

I think that the amount of time it will take is a question that really can't be answered from what you have given us - time spent will depend upon your comfort with the tasks at hand, skills in system administration, and complexity of what you are moving.  Additionally, if you cannot have any downtime, you'll have to proceed and test more cautiously than if downtime is acceptable (it rarely is ;) ).

This is a bit offtopic, as you've decided already to move the server inhouse, but one 'talk' I often give is about the reasons to host offsite versus hosting onsite.  Generally my discussion goes something like this:

When hosting your website, you have a number of options:

(1) You can host inhouse
(2) You can host on a shared server
(3) You can host on a dedicated server
(4) You can host on a colocated server

While it may appear 'cost effective' to house inhouse, some of the disadvantages of (1) include:

. You must maintain Hardware
. You must provide all security, redundancy, etc.
. It could be a legal liability if your server is broken into and used to hack or spam other servers.
. If you have ADSL (asynchronous DSL), your download rate is much faster than your outgoing rate, and your hardware will appear very slow.

Let me explain why I usually recommend to recommend to people that they use a dedicated server over an inhouse server - this will help illuminate the problems with inhouse hosting.

A dedicated server solution is similar to a co-located solution where a server sits on another person's network, but for a dedicated server (sometimes known as a managed server), the server hardware is leased to you, and 100% maintained by the data center.  Coloction will provide you with similar features - see the notes at the end.

 A dedicated server will give you:

*  Security.  Dedicated servers are most often located in a locked down facility (your cost: uncertain!)  that specializes only in dedicated servers, and that is monitored 24/7/365 (your cost: sleep, or the cost of employees).  Most likely, only server farm administrators are allowed in the area that houses your server.  The server farm will have hardware and software firewalls in place (your cost: > $300), and will monitor against hackers and other drains of unusual bandwidth (your cost: once again, sleep!)

*  Reliability.  The server farm places each server on a UPS (your cost: $200 - $1000 and up, depending upon the number and quality), may be located on multiple power grids (! I have no idea of the cost!) and often has an emergency power generator in case of power outages (I would expect this to cost $1000 and up, depending upon the size of the generator).

*Bandwidth and Redundancy.  The server farm is located with high speed direct connections  (usually T1, DC3, OC3, etc.) to multiple backbones on the Internet - if one of the main routers at goes down, your service is rerouted transparently. (Your cost: it varies, although smaller ISPs that I've talked to that only have 2 or 3  links report monthly  costs of > $10,000).

* Fully outsourced hardware support.  The hardware and network are monitored and maintained by server farm staff (your cost: cost of initial server hardware, support and maintenance contract, plus hourly rates to get things replaced and/or fixed)

*  Scalability.  The server is easily upgraded to meet increased usage needs, from both a software and a hardware point of view. Components often cost less to add (as the server farm will buy in bulk) than it will to add to your own server, not to mention the hours of labor incurred.

If you bought and co-located your own server, you'll still have a rental fee (often similar in price to the dedicated server lease costs).   You also lose the outsourced hardware support advantage, and sometimes there are actually tax advantages to leasing over owning.  Generally, the cost of buying a large pipe to your facility usually cannot be justified, until you are running a facility with a good sized support staff.

I would still recommend colocation over hosting inhouse - you gain most of the advantages of the dedicated server, but be prepared - if your hardware goes down, it will stay down until you fix it!

Finally - you haven't mentioned how sharp your system administration skills are.  The responsibility of having your own server means that you need to keep up on all the latest security patches, and understand fully what you have opened to the internet.  Depending upon your skill set, you might be better off securing good shared hosting that allows you to resell accounts, and leave the security issues to the sys admins at the facility.
>> How many hours to complete this project?

4-6 hours for someone who knows what he/she is doing.

>> Also what Red Hat Linux is suitable and free?

The best way would be to use EXACTLY THE SAME as the one on the offsite server

>> Also is there a way of doing this simply like making an image of the existing machine?

Yes, it's more or less manual but should be quite easy.

On the old server, run "rpm -qa > rpmlist" to get the full list of packages installed.

tar everything related to the application wherever it may be (don't forget to stop mysql before tar'ring MySQL db's), and everything in /etc

Inquire if the old system had some software installed not through RPM but throun configure/make/install or has some 3-rd party (non-RedHat) RPMs installed that are needed for your application and if yes, obtain them.


You probably already have an idea of what you should do with all this info once you install the new server.

May I suggest the dedicated server at for web hosting? They offer everything that 'periwinkle' has said. We had a similar situation that was handled smoothly by the administrators at serversoucing.

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

free Red Hat = fedora?  Perhaps so, but I wouldn't recommend that for a production deployment.

Use Centos which is a community rebuild of a certain North American Linux distribution.  You can use the version which is the equivalent of the current install.  Centos 4.3 is the equivalent of RHEL 4 Update 3 for example, see

Buy the Linux Quick Fix Notebook, which is Fedora oriented but the instructions apply to Centos as well
gharnettAuthor Commented:

Nice treatment you gave the question.  The reason we contemplated in house is because we have a database of large images (3000* 350MB).  To upload an image of that size through a php webpage via an html form could be a problem. For example we would need a very large hard drive.  How about that?
That's a lot of data.

Why would you upload those images through a PHP webpage?  Why not use FTP to upload?

However, for that much information to upload at one time, might it make sense to make arrangements to deliver in another way, such as providing a cd/rom, or even a secondary harddrive that could be temporarily hooked up and offloaded?

Alternatively, why not colocoate?  You could preload the data on the computer, and provide to the hosting company?
gharnettAuthor Commented:

it's an existing web application to manage info on inventory where images (1 for web page and another larger 50MB for print) can be uploaded. They now want to upload a 350MB image. For simplicity to the end user it would be ideal to keep the same interface for uploading this image.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.