0

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.

2

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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