Install PHP, PhpMyAdmin Setup Part 2



Install PHP, PhpMyAdmin Setup Part 2

Install PHP, PhpMyAdmin Setup Part 2

dnf install https://rpms.remirepo.net/enterprise/remi-release-9.rpm
dnf config-manager –set-enabled remi
dnf install php php-{pdo,json,mbstring,mysqlnd,json,intl,ldap,gd,pecl-zip} -y
dnf install php-{curl,bz2,gmp} -y
dnf module reset php -y
dnf module install php:remi-8.2 -y
dnf module enable php:remi-8.2 -y
dnf install php-{fpm,mcrypt,mysql,imagick} -y
dnf update -y
systemctl restart httpd

php -v
systemctl restart httpd

Lav et PHP-dokument i /var/www/html området med navn phpinfo.php indeholdende:

cd /var/www/html/
or
cd /var/www/html/mhi
vim phpinfo.php
[Create a phpinfo file and look at the video]

systemctl restart httpd

Now go to client and write

http://www.linuxmhi.local/phpinfo.php

you can see the php page

Now install PHPMYADMIN tools
——————————————–
su

wget https://files.phpmyadmin.net/phpMyAdmin/5.2.0/phpMyAdmin-5.2.0-all-languages.zip
unzip phpMyAdmin-5.2.0-all-languages.zip
mv phpMyAdmin-5.2.0-all-languages /usr/share/phpMyAdmin
cd /usr/share/phpMyAdmin
mkdir tmp
chown -R apache: /usr/share/phpMyAdmin
chmod 777 tmp
cd ..
vim /etc/httpd/conf.d/phpmyadmin.conf
[Create the file,look at the video]

dnf update -y
systemctl restart httpd
systemctl daemon-reload

cd /usr/share/phpMyAdmin/
cp config.sample.inc.php config.inc.php

vim config.inc.php
$cfg[‘Servers’][$i][‘host’] =’sql.linuxmhi.local’; // MySQL FQDN or IP
$cfg[‘blowfish_secret’] = ‘wkKaVG2sqbg[4HY]ERyuwKFSg}b0brH3’;

https://phpsolved.com/phpmyadmin-blowfish-secret-generator/?g=%5binsert_php%5decho%20$code;%5b/insert_php%5d

chown apache: config.inc.php
systemctl restart httpd
systemctl daemon-reload

Adgang til SQL-server fra web
Åbn phpmyadmin fra din klient, og se om du kan logge ind på databaseserveren.

run sql matchine 192.168.10.170

linuxmhi.local/phpmyadmin

Username : mhi
Password :Passw0rd