Install LAMP stack on Ubuntu
STEP:1 INSTALL APACHE
Apache is a free open source software that runs over 50% of the world’s web servers.
To install apache, open the terminal and type in these commands:
sudo apt-get update
sudo apt-get install apache2
STEP:2 INSTALL MYSQL
MySQL is a powerful database management system used for organizing and retrieving data.
To install MySQL, open the terminal and type in these commands:
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
During the installation, MySQL will ask you to set a root password. If you miss the chance to set the password while the program is installing, it is very easy to set the password later from within the MySQL shell.
Once you have installed MySQL, we should activate it with this command:
sudo mysql_install_db
Finish up by running the MySQL set up script:
sudo /usr/bin/mysql_secure_installation
The prompt will ask you for your current root password.
Type it in.
Enter current password for root (enter for none): OK, successfully used password, moving on...
Then the prompt will ask you if you want to change the root password. Go ahead and choose N and move on to the next steps.
Once you're done with that you can finish up by installing PHP.
STEP:3 INSTALL PHP
PHP is an open-source web scripting language that is widely used to build dynamic web pages.
To install PHP, open the terminal and type in this command.
sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt
After you answer yes to the prompt twice, PHP will install itself.
apt-cache search php5-
Comments
Post a Comment