Install phpMyAdmin on Ubuntu Server 20.10

 Install phpMyAdmin on Ubuntu Server 20.10 :- 

Step 1: Install Apache

sudo apt update

sudo apt install apache2


sudo systemctl stop apache2.service

sudo systemctl start apache2.service

sudo systemctl enable apache2.service


http://localhost


Step 2: Install MariaDB

sudo apt install mariadb-server mariadb-client


sudo systemctl stop mariadb.service

sudo systemctl start mariadb.service

sudo systemctl enable mariadb.service



sudo mysql_secure_installation

When prompted, answer the questions below by following the guide.

Enter current password for root (enter for none): Just press the Enter

Set root password? [Y/n]: Y

New password: Enter password

Re-enter new password: Repeat password

Remove anonymous users? [Y/n]: Y

Disallow root login remotely? [Y/n]: N

Remove test database and access to it? [Y/n]:  Y

Reload privilege tables now? [Y/n]:  Y

Restart MariaDB server


sudo systemctl restart mariadb.service


sudo mysql


Then run the commands below to change to disable mysql_native_password module..


USE mysql;

UPDATE user SET plugin='' WHERE user ='root';

The save your changes 


FLUSH PRIVILEGES;

EXIT;


sudo systemctl restart mariadb.service


sudo mysql -u root -p  


(Any error type this :-   

shell> mysql -u root 

shell> mysql -u root -p

mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'aryan';  ]) 



GRANT ALL PRIVILEGES ON *.* TO 'superadmin'@'localhost' IDENTIFIED BY 'aryan';


Step 3: Install PHP 7.4 and Related Modules


Run the commands below to add the below third party repository to upgrade to PHP 7.4


sudo apt-get install software-properties-common

sudo add-apt-repository ppa:ondrej/php


Then update and upgrade to PHP 7.4

sudo apt update


Next, run the commands below to install PHP 7.4 and related modules.

sudo apt install php7.4 libapache2-mod-php7.4 php7.4-common php7.4-gmp php7.4-curl php7.4-intl php7.4-mbstring php7.4-xmlrpc php7.4-mysql php7.4-gd php7.4-bcmath php7.4-xml php7.4-cli php7.4-zip


After installing PHP 7.4, run the commands below to open PHP default config file for Apache2.

sudo nano /etc/php/7.4/apache2/php.ini


Then make the changes on the following lines below in the file and save. The value below are great settings to apply in your environments.


file_uploads = On

allow_url_fopen = On

short_open_tag = On

memory_limit = 256M

upload_max_filesize = 100M

max_execution_time = 360

max_input_vars = 1500

date.timezone = Asia/Kolkata


Step 4: Install phpMyAdmin

sudo apt install phpmyadmin


When prompted to choose the webserver, selecat apache2 and continue.

 [*] apache2 

When prompted again to allow debconfig-common to install a database and configure select No.

<No>     



sudo -H gedit /etc/apache2/apache2.conf

Then add the following line to the end of the file:

Include /etc/phpmyadmin/apache.conf


Then restart apache:


/etc/init.d/apache2 restart


http://localhost/phpmyadmin

user name : root

password  : aryan

Comments

Popular posts from this blog

How to install and configure OSSEC server and client

Autodesk Maya 2024 Install Windows 11

Wazuh Server Detecting unauthorized processes