3

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.

EEAA
  • 109,363
  • 18
  • 175
  • 245
fiftyeight
  • 157
  • 1
  • 7

2 Answers2

1

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

HTTP500
  • 4,833
  • 4
  • 23
  • 31
  • 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
1

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)

gparent
  • 3,601
  • 2
  • 24
  • 28