Background note: phpMyAdmin is a very convenient tool for managing MySQL database through a browser
Installation method: All dependent software in this article is compiled and installed using the latest version of the source code.
Operating system: Centos7.2 x86_64 bit
1. Compile, install and configure httpd 2.4.7, due to software dependency, first install pcre apr and apr-util
tar zxvf pcre-8.41.tar.gz
cd pcre-8.41./configure --prefix=/opt/local/pcre-8.41
make && sudo make install
wget http://mirrors.hust.edu.cn/apache//apr/apr-1.6.2.tar.gz
tar zxvf apr-1.6.2.tar.gz
cd apr-1.6.2
# /bin/rm: cannot remove `libtoolT': No such file or directory
: /$RM "$cfgfile"Comment out
: /RM=\'$RM changed to RM='$RM -f'
make && sudo make install
cd apr-util-1.6.0./configure --prefix=/opt/local/apr-util-1.6.0--with-apr=/opt/local/apr-1.6.2--with-expat=/opt/local/expat
make && sudo make install
rpm -qa | grep apr ; yum erase apr -y
. /configure --prefix=/opt/local/apache2 --enable-module=shared --with-pcre=/opt/local/pcre-8.41--with-apr-util=/opt/local/apr-util-1.6.0--with-apr=/opt/local/apr-1.6.2
# ServerName localhost:80 Uncomment
Configure httpd.conf to support php7
(1) Add library file support
(2) Add to home page index
(3) Add file type support
Two, compile and install php
tar zxf php-7.1.8.tar.gz && cd php-7.1.8./configure --prefix=/opt/local/php-7.1.8--with-apxs2=/opt/local/apache2/bin/apxs --with-mysqli --with-pdo-mysql --enable-mbstring
# by--with-apxs2 option, it will be in/opt/local/apache2/modules/Generate libphp7.so file
make && sudo make install
Three, configure phpMyAdmin
wget https://files.phpmyadmin.net/phpMyAdmin/4.7.4/phpMyAdmin-4.7.4-all-languages.tar.gz
tar zxf phpMyAdmin-4.7.4-all-languages.tar.gz ; mv phpMyAdmin-4.7.4-all-languages phpMyAdmin
# The default location of the apache2 document is/opt/local/apache2/htdocs/,Copy phpMyAdmin to htdocs, omitting httpd.conf configuration, just visit phpMyAdmin directly in the browser
sudo cp -rf phpMyAdmin /opt/local/apache2/htdocs/
# Configure phpMyAdmin database connection
sudo cp /opt/local/apache2/htdocs/phpMyAdmin/config.sample.inc.php /opt/local/apache2/htdocs/phpMyAdmin/config.inc.php
sudo vim /opt/local/apache2/htdocs/phpMyAdmin/config.inc.php
The above is the whole content of this article, I hope it will be helpful to everyone's study.
Recommended Posts