Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am a PHP coder and have next to none experience in system administration. One of my clients has obtained a VPS from HostGator. The logins I was sent, take me to Parallels Infrastructure Manager, where I presumably, can start and stop containers. I guess a container in this context is a virtual server. Anyway, I looked for and couldn't find a cPanel, Plesk or anything familiar. I contacted support and asked how could I get a LAMP envo working on this account. They said as the account is not Level 3, I need to do everything through SSH.

I verified that Apache is running. But don't know where I should look for the document root. With that I would be able to check if I have PHP and MySQL running or not. If they're not, I don't know what should I do next. Your advice is appreciated.

P.S. The OS is CentOS.

Ok, I found the document root which is /var/www/html as noted here. If you someone can provide guidance on how to setup PHP and MySQL via SSH, it would be great.

share|improve this question
up vote 2 down vote accepted

You should be able to find the DocumentRoot by looking in the /etc/httpd/conf/httpd.conf file. It would normally be /var/www/html.

You could check for php by running the command

rpm -qa | grep php


which will tell you what php packages are on your system


rpm -qa | grep mysql 


Tells you what mysql packages are installed.

/sbin/service mysqld status

will tell you if the mysql daemon is running or not.

sudo /sbin/service mysqld start

will start it.

If you want to start mysqld with your system then use

/sbin/chkconfig --level 3 mysqld on
share|improve this answer
+1 Thank you! Getting somewhere ... – Majid Fouladpour Jul 30 '11 at 17:39

Your Answer


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.