Tutorial on installing phpMyAdmin under Linux centos7

Tutorial on installing phpMyAdmin under Linux centos7

yum install httpd php mariadb-server –y

Record some problems encountered when installing phpMyAdmin after setting up the lamp operating environment

1. Download the phpMyAdmin compressed package from the official website

wget -c https://files.phpmyadmin.net/phpMyAdmin/4.9.3/phpMyAdmin-4.9.3-all-languages.tar.gz

2. Unzip to /var/www/html/

tar -zxvf phpMyAdmin-4.9.3-all-languages.tar.gz -C /var/www/html/

3. Rename

cd /var/www/html/
mv phpMyAdmin-4.9.3-all-languages ​​phpMyAdmin

This step can usually be accessed normally through localhost/phpMyAdmin, but sometimes there are always other problems.

4. Go to the phpMyAdmin installation directory and copy the simple configuration file config.sample.inc.php of phpmyadmin as the default configuration file config.inc.php

Copying Files

cp config.sample.inc.php config.inc.php

Editing the Configuration File

vim config.inc.php

The configuration file now requires a password phrase, find

$cfg['blowfish_secret'] = ''; //Add a few characters here at random. If it is too short, there will be an error message.
$cfg['Servers'][$i]['auth_type'] = 'cookie'; //The default is fine here. $cfg['Servers'][$i]['host'] = 'localhost'; //You can change it to your own IP address or domain name. It doesn't matter if you don't change it.

5. If an error message appears

The variable $cfg['TempDir'] (./tmp/) is not accessible. phpMyAdmin cannot cache template files, so it will run slowly.

Create a new tmp folder in the phpMyAdmin directory

mkdir tmp
chmod 777 tmp

6. It may prompt that some extensions are missing

Install the PHP database extension package

yum install php-mysql

Install the package that supports the multibyte string extension

yum install php-mbstring -y

Install the package that supports the multi-encryption extension

yum install php-mcrypt –y

7. Other computers need to open port 80 or close the firewall to access

Open port 80

firewall-cmd --zone=public --add-port=80/tcp --permanent
//--zone scope, --add-port=80/tcp add port/protocol, --permanent permanent effect

Restart the firewall

systemctl restart firewalld

Or just turn off the firewall

Check the firewall status

systemctl status firewalld

Stop the firewall

systemctl stop firewalld

Turn off Enable Firewall

systemctl disable firewalld

8. If the Forbidden prompt appears, it may be blocked by selinux.

Check if SELinux is running

gettenforce

in the case of

enforcing //Enforcement mode, domain/type will be restricted permissive //Permissive mode, there will be warnings but no restrictions domain/type disabled //Disabled state, not running

settenforce 0 //Convert to permissive mode, which is equivalent to temporarily shutting down SELinuxx settenforce 1 //Convert to mandatory mode

Set SELINUX=disables to disable it from booting

vim /etc/selinux/config

Summarize

The above is the tutorial on how to install phpMyAdmin under Linux centos7 introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • Aliyun Linux compile and install php7.3 tengine2.3.2 mysql8.0 redis5 process detailed explanation
  • Detailed tutorial on installing phpstorm2020 under linux mint including JDK part
  • Detailed steps to install xml extension in php under linux
  • Detailed explanation of how to install PHP7 on Linux
  • Install PHP7.3 version under Linux system

<<:  WeChat applet calculator example

>>:  Detailed explanation of the role and working principle of MySQL master-slave replication

Recommend

Vue implements online preview of PDF files (using pdf.js/iframe/embed)

Preface I am currently working on a high-quality ...

Solutions to MySQL batch insert and unique index problems

MySQL batch insert problem When developing a proj...

Detailed explanation of SQL injection - security (Part 2)

If there are any errors in this article or you ha...

How to quickly modify the root password under CentOS8

Start the centos8 virtual machine and press the u...

How to configure https for nginx in docker

Websites without https support will gradually be ...

Detailed explanation of the basic usage of the Linux debugger GDB

Table of contents 1. Overview 2. gdb debugging 2....

Summary of basic knowledge points of Linux group

1. Basic Introduction of Linux Group In Linux, ev...

Problems encountered when uploading images using axios in Vue

Table of contents What is FormData? A practical e...

RHEL7.5 mysql 8.0.11 installation tutorial

This article records the installation tutorial of...

In-depth explanation of nginx location priority

location expression type ~ indicates to perform a...

Simple web page code used in NetEase blog

How to use the code in NetEase Blog: First log in...