OPERATING SYSTEMSOS Linux

How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 18.04

Hi everyone – We’ll mentor you to get your black belt doing Linux freelancing earning🐧

We’re interested for level up your current skills to become a giant Linux freelancer from home 🏠

We’re on a mission to empower Linux freelancing training around the globe.

How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu:

# Install Apache to check from web browser using 0.0.0.0 or localhost, check version, start,stop & restart Apache into Ubuntu
sudo apt update
sudo apt upgrade
sudo apt install apache2

sudo ufw allow in “Apache Full”
apache2 -v
sudo service apache2 start
sudo systemctl enable apache2
sudo service apache2 stop
sudo service apache2 start
sudo service apache2 restart
sudo apt install curl
sudo ufw allow ssh
sudo ufw allow 2222/tcp

# Visit: http://localhost/

# Install MySQL & check version, start,stop & restart Apache
sudo apt install mysql-server
sudo mysql_secure_installation
mysql –version

nano /etc/mysql/mysql.conf.d/mysqld.cnf
# And then change the bind-address line to 0.0.0.0
# Save and exit

sudo service mysql start
sudo service mysql enable
sudo service mysql stop
sudo service mysql start
sudo service mysql restart
sudo service mysql status
ufw allow from any to any port 3306 proto tcp
sudo systemctl restart mysql
sudo systemctl enable mysql

sudo mysql
CREATE DATABASE mydb;
CREATE USER ‘masum’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘01722G@usia’;
ALTER USER ‘masum’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘01722G@usia’;
GRANT CREATE, ALTER, DROP, INSERT, UPDATE, DELETE, SELECT on *.* TO ‘masum’@’localhost’ WITH GRANT OPTION;
use mydb;
FLUSH PRIVILEGES;
exit
sudo service mysql restart

# Install PHP & check version
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt install php7.2-fpm php7.2-common php7.2-mbstring php7.2-xmlrpc php7.2-soap php7.2-gd php7.2-xml php7.2-intl php7.2-mysql php7.2-cli php7.2-zip php7.2-curl
php –version
sudo apt install mlocate
locate php
whereis php

# Install PHPmyAdmin
sudo apt update
sudo apt upgrade -y
sudo apt update
sudo apt install phpmyadmin
sudo apt install -y php-mbstring
sudo apt-get install gettext

sudo nano /etc/apache2/apache2.conf
# Then add the following line to the end of the file:
Include /etc/phpmyadmin/apache.conf
# save ctrl+x then y and hit enter. Then restart apache:

sudo service apache2 restart
# visit: http://localhost/phpmyadmin/
Use user= masum
pass= 01722G@usia

source

ubuntu

Leave a Reply

Your email address will not be published. Required fields are marked *