Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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.

Update
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

1 Answer 1

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

php-common-5.1.6-27.el5_5.3
php-5.1.6-27.el5_5.3
php-gd-5.1.6-27.el5_5.3
php-cli-5.1.6-27.el5_5.3

which will tell you what php packages are on your system

Similarly

rpm -qa | grep mysql 

mysql-5.0.77-4.el5_6.6
mysql-server-5.0.77-4.el5_6.6
mysql-devel-5.0.77-4.el5_6.6

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

 
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.