#Linux #Ubuntu #Apache #MySQL
Please #Subscribe my channel and help me to reach 10000 subscribers.
Full Installation command given bellow:
Step 1: Install Apache2
sudo apt-get update
sudo apt-get install apache2
Adjust the Firewall to Allow Web Traffic
Next, assuming that you have followed the initial server setup instructions and enabled the UFW firewall, make sure that your firewall allows HTTP and HTTPS traffic. You can check that UFW has an application profile for Apache like so:
sudo ufw app list
If you look at the Apache Full profile, it should show that it enables traffic to ports 80 and 443:
sudo ufw app info "Apache Full"
Allow incoming HTTP and HTTPS traffic for this profile:
sudo ufw allow in "Apache Full"
How To Find your Server's Public IP Address
If you do not know what your server's public IP address is, there are a number of ways you can find it. Usually, this is the address you use to connect to your server through SSH.
From the command line, you can find this a few ways. First, you can use the iproute2 tools to get your address by typing this:
ip addr show eth0 | grep inet | awk '{ print $2; }' | sed 's/\/.*$//'
An alternative method is to use an outside party to tell you how it sees your server. You can do this by asking a specific server what your IP address is:
sudo apt install curl
curl [host_ip]
Step 2: Install MySQL
sudo apt install mysql-server
When the installation is complete, run a simple security script that comes pre-installed with MySQL which will remove some dangerous defaults and lock down access to your database system. Start the interactive script by running:
sudo mysql_secure_installation
This will ask if you want to configure the VALIDATE PASSWORD PLUGIN.
If you prefer to use a password when connecting to MySQL as root, you will need to switch its authentication method from auth_socket to mysql_native_password. To do this, open up the MySQL prompt from your terminal:
sudo mysql
Next, check which authentication method each of your MySQL user accounts use with the following command:
SELECT user,authentication_string,plugin,host FROM mysql.user;
To configure the root account to authenticate with a password, run the following ALTER USER command. Be sure to change password to a strong password of your choosing:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
Then, run FLUSH PRIVILEGES which tells the server to reload the grant tables and put your new changes into effect:
FLUSH PRIVILEGES;
Check the authentication methods employed by each of your users again to confirm that root no longer authenticates using the auth_socket plugin:
SELECT user,authentication_string,plugin,host FROM mysql.user;
Step 3: Install php
sudo apt update
sudo apt install php libapache2-mod-php php-mysql
In most cases, you will want to modify the way that Apache serves files when a directory is requested. Currently, if a user requests a directory from the server, Apache will first look for a file called index.html. We want to tell the web server to prefer PHP files over others, so make Apache look for an index.php file first.
To do this, type this command to open the dir.conf file in a text editor with root privileges:
sudo nano /etc/apache2/mods-enabled/dir.conf
After this, restart the Apache web server in order for your changes to be recognized. Do this by typing this:
sudo systemctl restart apache2
You can also check on the status of the apache2 service using systemctl:
sudo systemctl status apache2
Press Q to exit this status output.
Step 4: Install phpmyadmin
sudo apt update
sudo apt install phpmyadmin php-mbstring php-gettext
You can now access the web interface by visiting your server's domain name or public IP address followed by /phpmyadmin:
[ Ссылка ]
If you like my like my video please don't forget to #subscribe , #like
############################################
Install & Uninstall exe file in Ubuntu: [ Ссылка ]
Android Studio on Ubuntu: [ Ссылка ]
Eclipse installlation on Ubuntu: [ Ссылка ]
Xampp installation on Ubuntu: [ Ссылка ]
Top 10 code editor installation: [ Ссылка ]
Uninstall ubuntu software Link: [ Ссылка ]
linux file permission Link: [ Ссылка ]
Netbeans install Link: [ Ссылка ]
Codeblocks install Link: [ Ссылка ]
kazam Install Link: [ Ссылка ]
Google-chorme install Link: [ Ссылка ]
Video-editor install Link: [ Ссылка ]
Compress & Extract tar.gz file: [ Ссылка ]
Sort command uses Link: [ Ссылка ]
ls command uses Link: [ Ссылка ]
grep command uses Link: [ Ссылка ]
Show ip two different OS: [ Ссылка ]
Basic command router switch: [ Ссылка ]
#################################################
Ещё видео!