Difference between revisions of "CentOS 8.x phpMyAdmin"
From Notes_Wiki
(Created page with "<yambe:breadcrumb self="phpMyAdmin">CentOS 8.x Web based tools|Web based tools</yambe:breadcrumb> =CentOS 8.x phpMyAdmin= To setup phpMyAdmin use: # Install required packages...") |
m |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 8.x]] > [[CentOS 8.x Web based tools|Web based tools]] > [[CentOS 8.x phpMyAdmin]] | |||
To setup phpMyAdmin use: | To setup phpMyAdmin use: | ||
Line 34: | Line 33: | ||
#:: chmod 777 /usr/share/phpmyadmin/tmp | #:: chmod 777 /usr/share/phpmyadmin/tmp | ||
#:</pre> | #:</pre> | ||
# Create '<tt>/etc/httpd/conf.d/phpmyadmin.conf</tt>' with | # Create '<tt>/etc/httpd/conf.d/phpmyadmin.conf</tt>' with <source type="conf"> | ||
Alias /phpmyadmin /usr/share/phpmyadmin | |||
<Directory /usr/share/phpmyadmin/> | |||
AddDefaultCharset UTF-8 | |||
<IfModule mod_authz_core.c> | |||
# Apache 2.4 | |||
<RequireAny> | |||
Require all granted | |||
</RequireAny> | |||
</IfModule> | |||
<IfModule !mod_authz_core.c> | |||
# Apache 2.2 | |||
Order Deny,Allow | |||
Deny from All | |||
Allow from 127.0.0.1 | |||
Allow from ::1 | |||
</IfModule> | |||
</Directory> | |||
<Directory /usr/share/phpmyadmin/setup/> | |||
<IfModule mod_authz_core.c> | |||
# Apache 2.4 | |||
<RequireAny> | |||
Require all granted | |||
</RequireAny> | |||
</IfModule> | |||
<IfModule !mod_authz_core.c> | |||
# Apache 2.2 | |||
Order Deny,Allow | |||
Deny from All | |||
Allow from 127.0.0.1 | |||
Allow from ::1 | |||
</IfModule> | |||
</Directory> | |||
</source> | |||
# Start and enable httpd | # Start and enable httpd | ||
#:<pre> | #:<pre> | ||
Line 84: | Line 82: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 8.x]] > [[CentOS 8.x Web based tools|Web based tools]] > [[CentOS 8.x phpMyAdmin]] |
Latest revision as of 04:18, 22 May 2023
Home > CentOS > CentOS 8.x > Web based tools > CentOS 8.x phpMyAdmin
To setup phpMyAdmin use:
- Install required packages
- dnf -y install wget epel-release php httpd tar php-mysqlnd expect php-json php-xml
- Download latest version of phpMyAdmin from https://www.phpmyadmin.net/downloads/ For Example
- wget https://files.phpmyadmin.net/phpMyAdmin/5.1.0/phpMyAdmin-5.1.0-english.tar.gz
- Extract the downloaded archive using tar. For example:
- tar xzf phpMyAdmin-5.1.0-english.tar.gz
- Move extracted folder to /usr/share/phpmyadmin location. For example
- mv phpMyAdmin-5.1.0-english /usr/share/phpmyadmin
- Go to /usr/share/phpmyadmin and rename config file.
- cd /usr/share/phpmyadmin
- mv config.sample.inc.php config.inc.php
- Edit config.inc.php file and insert 32 byte random secret for '$cfg['blowfish_secret']'. For example 'mkpasswd -l 32 -s 0'
- $cfg[‘blowfish_secret’]=’brsfgegjvxwRCoeeencssmmsq1athw7n’;
- Create temporary folder and set appropriate permissions
- mkdir /usr/share/phpmyadmin/tmp
- chown -R apache:apache /usr/share/phpmyadmin
- chmod 777 /usr/share/phpmyadmin/tmp
- Create '/etc/httpd/conf.d/phpmyadmin.conf' with
Alias /phpmyadmin /usr/share/phpmyadmin <Directory /usr/share/phpmyadmin/> AddDefaultCharset UTF-8 <IfModule mod_authz_core.c> # Apache 2.4 <RequireAny> Require all granted </RequireAny> </IfModule> <IfModule !mod_authz_core.c> # Apache 2.2 Order Deny,Allow Deny from All Allow from 127.0.0.1 Allow from ::1 </IfModule> </Directory> <Directory /usr/share/phpmyadmin/setup/> <IfModule mod_authz_core.c> # Apache 2.4 <RequireAny> Require all granted </RequireAny> </IfModule> <IfModule !mod_authz_core.c> # Apache 2.2 Order Deny,Allow Deny from All Allow from 127.0.0.1 Allow from ::1 </IfModule> </Directory>
- Start and enable httpd
- systemctl start httpd
- systemctl enable httpd
- Optionally configure SELinux, Firewall and restrict access to phpMyAdmin to some IPs/via password
Refer:
Home > CentOS > CentOS 8.x > Web based tools > CentOS 8.x phpMyAdmin