Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Hi I want to ask what are the best practices when installing new software on a web-server, I'm pretty much self-taught, I have on my home PC: Ubuntu 11.04 with LAMP installed, and a VPS that I manage myself that runs CentOS 5.6.

I usually just test everything at home and than make changes on the web server. even though nothing went horribly wrong until now. I want it to keep being this way and I'm slowly gaining confidence to do slightly more complicated things.

Anyway, I don't know how the "pros" do it, but I want to know how the testing usually works. Are the changes made directly to the server or is there some kind of "test server" that has the same configuration as the real server and everything is first tested on the "test server".

Or maybe I could install a virtual box with CentOS and test everything there. The things I currently want to test are apache modules and software installations via SSH.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Are the changes made directly to the server or is there some kind of "test server" that has the same configuration as the real server and everything is first tested on the "test server".

Yes, there is a test server that has the same configuration as the real server and everything is first tested on the test or staging server.

Even with a test server you should have a plan to back out changes (sometimes referred to as a B->A plan) because the reality is that it is difficult (read: expensive) to duplicate your production environment exactly in a test environment and things can (and sometimes do) go wrong.

Cheers

share|improve this answer
    
I would also add that a "test server" isn't really enough as your environments get more complex and you start separating out roles to different physical machines. I typically advise building a VMWare replica of your entire environment (firewalls, web servers, DB servers, etc.) and doing all your testing there. As jasondbecker pointed out, having a good deployment system (radmind, puppet, etc.) and a plan for backing out stuff that blows up is also essential. –  voretaq7 Jul 13 '11 at 16:11

Yes, there are usually testing environments in place for servers. For instance, you could have development, QA, preproduction and production environments.

If you use VirtualBox as a test server, make sure to make heavy use of the snapshot feature. Being able to roll back changes when testing new things is paramound. Remember that just because it's a test server doesn't mean you'll get the installation right the first time. Having snapshots makes it easy to get your setup to work, and then you can easily roll back and perform the setup again in one go (and document the process at the same time so that you can apply it to your production server)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.