Setting up a small PHP box?

Soldato
Joined
4 Nov 2006
Posts
2,752
Location
Yorkshire
So, i've hosted more sites than I care to remember, always use a combo of WHM and cPanel as it's easy to use. At work, i'm a pure Windows server techy, never divuldge in to anything else ... However, I want to start running some of my php/sql apps at work and need to get a server up and running for it. We use VMWare ESX so I can setup a server in seconds, but i've never ran PHP and was wondering if anyone has a few steps ... something simple would be good, fed up of reading the massive 100 page tutorials

No worries if not, cheers!
 
super easy

New VM
get debian net install disc - about 150 meg or less
boot from and install it, choose a mirror and let it install. Should take 15-20 mins less if you have fast net connection, Don't install any f the options when asked or it'll download a bunch of stuff you don't need
sometimes a good idea to set the name and static IP of the system plenty of guides to do that, basically edit /etc/network/interfaces and /etc/hostname and /etc/hosts and then restart networking, /etc/init.d/etowrking restart

One installed login as do:
apt-get install ssh screen vim apache php5-cli php5 mysql phpmyadmin

answer some questions (set passwords etc)

then place files for the web in /var/www/
change your db about with phpmyadmin http://localhost/phpmyadmin

Use winscp to get files accross from a win box, or edit on the server using vim directly using putty as a terminal on the windows machine
 
or you could use nano if vim is a little too hard-core :P

indeed. although I found nano only to be useful for editing config files etc.(until i learned to ue vim)

not to turn this in to a holy text editor war ..... but...

For actual programming the power of vim is hard to beat. it's almost impossible to convey this to people who don't know it first hand. so I won't try.

suffice to say that 20 mins spent in vimtutor should give a user enough skills to use it like any other regular text editor. After that it only gets more and more powerful the more you use it.

I only started to use vim properly a few months ago, around the same time I started to learn php. since then I have created a couple of database backed intranet sites. it just takes a small amount of effort and will to get a big payoff imo.

Also, screen is one util you cannot live without. Think of it as VNC for the console.
 
Just started hosting a few sites without a control panel and I am using Ubuntu (so near enough the same as what whitecrook has described).

apt-get the bits you need and away you go - I love the way you can set up virtualhosts in seconds, even if you are a newb like me!!
 
Back
Top Bottom