Update Server:
apt update && apt upgrade -y
Set hostname:
hostnamectl set-hostname ex.example.com
Install Apache:
sudo apt install apache2
sudo ufw allow in "Apache"
Install MySQL:
sudo apt install mysql-server
sudo mysql_secure_installation
if error then open new terminal
sudo killall -9 mysql_secure_installation
mysql
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123Admin';
exit
Install Php:
sudo apt install php libapache2-mod-php php-mysql php-mbstring php-zip php-gd php-json php-curl
Creating a Virtual Host:
sudo mkdir /var/www/ex.example.com
sudo chown -R $USER:$USER /var/www/ex.example.com
sudo nano /etc/apache2/sites-available/ex.example.com.conf
paste
#### I'm replacing angled bracket with square bracket ####
[VirtualHost *:80]
ServerName ex.example.com
ServerAlias www.ex.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/ex.example.com
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
[/VirtualHost]
sudo a2ensite ex.example.com
sudo a2dissite 000-default
sudo apache2ctl configtest
sudo systemctl reload apache2
nano /var/www/ex.example.com/index.html
paste
#### I'm replacing angled bracket with square bracket ####
[html]
[head]
[title]your_domain website[/title]
[/head]
[body]
[h1]Hello World![/h1]
[p]This is the landing page of [strong[your_domain[/strong].[/p]
[/body]
[/html]
sudo nano /etc/apache2/mods-enabled/dir.conf
update
DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm
sudo systemctl reload apache2
Install Phpmyadmin:
apt install phpmyadmin
Access phpmyadmin:
ex.example.com/phpmyadmin
Watch video How to install PhPMyAdmin in Ubuntu online without registration, duration hours minute second in high quality. This video was added by user Quickloss3 04 February 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 194 once and liked it 5 people.