Install LAMP in Ubuntu 2017. (Linux, Apache2, MySQL and PHP)
Saumya Brata Dutt
This is a guide to install LAMP Stack on your server or PC. I'm using Ubuntu 17.04. Please check the commands here.
INSTALL APACHE.
Debian 8 and Ubuntu 14 sudo apt-get update sudo apt-get install apache2 php5 libapache2-mod-php5
Debian 9 and Ubuntu 16/17 sudo apt-get update sudo apt-get install apache2 php libapache2-mod-php
CentOS 6
Install Apache and PHP:
sudo yum check-update sudo yum -y install httpd php Start the Apache service:
sudo service httpd start
Optional: Set the Apache service to start automatically:
sudo chkconfig httpd on
Test Apache and PHP http://[YOUR_EXTERNAL_IP_ADDRESS]
Debian/Ubuntu
sudo apt-get install mysql-server php5-mysql php-pear CentOS 6
Install MySQL and related components:
sudo yum -y install httpd mysql-server php php-mysql
Start the MySQL service:
sudo service mysqld start
Optional: Set the MySQL service to start automatically:
sudo chkconfig mysqld on
Configure MySQL
sudo mysql_secure_installation ... https://www.youtube.com/watch?v=g1n8VG-j7TA
14340620 Bytes