How to Install and Setup LAMP on CentOS VPS

LAMP (Linux - Apache - MySQL - PHP) is a common webserver software stack for Linux. Installing the basic components is simple, just access your server via SSH and run the following commands:

# yum install httpd

# yum install php

# yum install mysql-server mysql

# service httpd start

# service mysqld start

To check if the setup was successful, access http://xx.xx.xx.xx (your server's IP address) in a browser. You should see a default Apache page. You can test PHP by creating a file in /var/www/html:
# vi /var/www/html/test.php
And adding the following content:
<?php phpinfo(); ?>
Access http://xx.xx.xx.xx/test.php in your browser. If you see information about your PHP installation displayed without any errors, you're done! 

 

  • payment
  • 0 brukere syntes dette svaret var til hjelp
Var dette svaret til hjelp?

Relaterte artikler

How to Setup LAMP on Debian/Ubuntu VPS

LAMP  is a webserver software stack common on Linux servers (LAMP stands for Linux – Apache –...

How to Import/Export MySQL Databases with SSH

 export a MySQL database, access your VPS via SSH and run:   # mysqldump -u username -p...

How to Change MySQL Root/User Password

If you have installed MySQL yourself and have never set a root password, you can do so by running...

Powered by WHMCompleteSolution