Find the answer to your Linux question:
Results 1 to 3 of 3
Just recently rented a VPS as want to force my self to learn linux. Anyhows, the system is CentOS 5.0 and i am logged in with SSH as root. Now ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2012
    Posts
    1

    Super Noob here! Got a few questions regarding CentOS 5.0


    Just recently rented a VPS as want to force my self to learn linux. Anyhows, the system is CentOS 5.0 and i am logged in with SSH as root.

    Now i have a couple of questions if you don't mind answering, thanks!

    1. Where are the website files stored? is it var/www/html? if so does that cover PHP and MySQL?
    2. Do i need to install LAMP my self to run PHP etc on the server, if so where do i install it? would the internet directory be HTDOCS or the one above?


    Should i do a system re-image to install just unbunto LTS ? or is CentOS 5.0 better? it has something called parrals with it..

    Thanks for your time people!

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Quote Originally Posted by NickyYo View Post
    Where are the website files stored? is it var/www/html? if so does that cover PHP and MySQL?
    yes, by default, /var/www/html is the DocumentRoot of the Apache webserver. You can confirm by looking in the webserver config file:
    Code:
    grep ^DocumentRoot /etc/httpd/conf/httpd.conf
    PHP files can go anywhere under your DocumentRoot. MySQL is a backend database that knows nothing about Apache or your document root. You can write CGI scripts (in PHP, Perl, Python, etc.) that connect to the MySQL db and make queries, then return data back to the browser. Maybe that is what you are thinking.

    Do i need to install LAMP my self to run PHP etc on the server, if so where do i install it? would the internet directory be HTDOCS or the one above?
    All LAMP means is Linux, Apache, MySQL and PHP/Perl/Python. So if you need all those things, you can just do:
    Code:
    yum install httpd php mysql-server
    and that will install those packages, along with the numerous dependencies. Once you've got all that set up, then you have to go about and configure MySQL. Then you can start writing PHP/HTML pages that query your database, and ta-da, LAMP-stack in action.

    Should i do a system re-image to install just unbunto LTS ? or is CentOS 5.0 better? it has something called parrals with it..
    CentOS is perfectly fine as a LAMP server. Ubuntu is fine, too, but you've already got CentOS installed, so stick with it, i say.

  3. #3
    Blackfooted Penguin daark.child's Avatar
    Join Date
    Apr 2006
    Location
    West Yorks
    Posts
    4,393
    Hi and welcome to the forum.

    If you want to familiarise yourself with CentOS and installing server apps, I suggest you take a look at the article here. It will guide your through installing apache, php, mysql and other servers. The default document root for Apache is /var/www/html on RHEL and its derivatives. On some distributions it is /var/www/htdocs.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •