The use of phpMyAdmin first requires a lamp or a LNMP environment:
First, to build the phpMyAdmin operating environment.
Now take the lamp environment as an example:
Install the deployment lamp environment
1. Installing Apache
Download installation
yum install zlib-devel -ywget http://mirror.bit.edu.cn/apache/httpd/httpd-2.2.31.tar.gztar xf httpd-2.2.31.tar.gz cd httpd-2.2.31./configure --prefix=/application/apache2.2.31 --enable-deflate --enable-expires --enable-headers --enable-modules=most --enable-so --with-mpm=worker --enable-rewritemakemake installln -s /application/apache2.2.31/ /application/apachels -l /application/
2. Start the service
/application/apache/bin/apachectl start 启动时会报错,这时,在 vim httpd.conf文件中把98行改为 ServerName localhost:80,再次重启就不再提示报错了。netstat -lntup|grep httpd
3. Configuring a domain-based virtual host
cd /application/apache/conf/vim httpd.conf 修改98行ServerName 127.0.0.1:80 这样修改,第一次启动时,就不提醒错误
4.php Quick Installation
Wget-o/etc/yum.repos.d/epel.repo Http://mirrors.aliyun.com/repo/epel-6.repoyum Install Freetype-devel Libjpeg-turbo-devel libpng-devel gd-devel libcurl-devel libxslt-devel libmcrypt-devel mhash mhash-devel mcrypt libxslt-devel-y Yum Install openssl-devel openssl-yyum install zlib libxml libjpeg freetype libpng Gd Curl Libiconv ZL Ib-devel libxml2-devel libjpeg-devel freetype-devel libpng-devel gd-devel curl-devel-ymkdir-p/application/toolscd/ Application/toolswget Http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gztar zxvf libiconv-1.14.tar.gz CD Libiconv-1.14./configure--prefix=/usr/local/libiconv make do install CD. /tar XF php-5.3.27.tar.gzcd php-5.3.27./configure--prefix=/application/php-5.3.27--with-apxs2=/application/apache /bin/apxs--with-mysql=mysqlnd--with-xmlrpc--with-openssl--with-zlib--with-freetype-dir--with-gd--with-jpeg-dir --with-png-dir--with-iconv-dir=/usr/local/libiconv--enable-short-tags--enable-sockets--enable-zend-multibyte-- Enable-sOAP--enable-mbstring--enable-static--enable-gd-native-ttf--with-curl--with-xsl--enable-ftp-- With-libxml-dirmakemake installln-s/application/php-5.3.27/application/php\cp/application/tools/php-5.3.27/ Php.ini-production/application/php/lib/php.ini
Check that the Apache configuration file has
[[email protected] conf]# grep libphp5 /application/apache/conf/httpd.conf LoadModule php5_module modules/libphp5.so[[email protected] conf]# ll /application/apache/modules/total 28980-rw-r--r--. 1 root root 9280 Oct 29 08:09 httpd.exp-rwxr-xr-x. 1 root root 29660983 Oct 29 09:46 libphp5.so
Two. Configure the settings for the PHP connection in the Httpd.conf:apache configuration file
Vim/application/apache/conf/httpd.conf
1)98 ServerName 127.0.0.1:802)311 AddType application/x-httpd-php .php .phtmlAddType application/x-httpd-php-source .phps3)用户 (关键是统一UID,工作中web服务统一一套工具)apache和nginx的用户UID是一致的67行下增加User wwwGroup wwwuseradd www -s /sbin/nologin -M建立用户:id www4)166DirectoryIndex index.php index.html
The MySQL here is: 192.168.56.42, has been compiled and installed.
上传phpMyAdmin-4.0.5-all-languages.tar.gz到/application/apache2.2.31/htdocs下解压 tar xf phpMyAdmin-4.0.5-all-languages.tar.gzMv phpMyAdmin-4.0.5-all-languages.tar.gz phpmyadmin 改名
To this deployment complete
Three. Presentation results
In the browser input: http://192.168.56.42/phpmyadmin/
At this point, the httpd start user is www
[Email protected] libraries]# lsof-i:80
COMMAND PID USER FD TYPE DEVICE size/off NODE NAME
httpd 13442 Root 4u IPv6 211012 0t0 TCP : http (LISTEN)
httpd 13444 www 4u IPv6 211012 0t0 TCP : http (LISTEN)
httpd 13445 www 4u IPv6 211012 0t0 TCP : http (LISTEN)
httpd 13446 www 4u IPv6 211012 0t0 TCP : http (LISTEN)
Attention:
If Pkill httpd,
Use/etc/init.d/httpd start to start, will cause the phpMyAdmin interface can not open error 404
View LSOF–I:80 Now
[[email protected] libraries]# lsof -i:80COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMEhttpd 13381 root 4u IPv6 210479 0t0 TCP *:http (LISTEN)httpd 13383 apache 4u IPv6 210479 0t0 TCP *:http (LISTEN)httpd 13384 apache 4u IPv6 210479 0t0 TCP *:http (LISTEN)httpd 13385 apache 4u IPv6 210479 0t0 TCP *:http (LISTEN)httpd 13386 apache 4u IPv6 210479 0t0 TCP *:http (LISTEN)httpd 13387 apache 4u IPv6 210479 0t0 TCP *:http (LISTEN)httpd 13388 apache 4u IPv6 210479 0t0 TCP *:http (LISTEN)httpd 13389 apache 4u IPv6 210479 0t0 TCP *:http (LISTEN)httpd 13390 apache 4u IPv6 210479 0t0 TCP *:http (LISTEN)
The MySQL service on the 192.168.56.42 server creates a login phpMyAdmin user and password
mysql> grant all on *.* to [email protected]‘192.168.56.%‘ identified by ‘123456‘;
Modify the configuration file: This allows remote access to the 192.168.56.0/24 network segment of the phpMyAdmin database account
/application/apache/htdocs/phpmyadmin/libraries/config.default.php[[email protected] libraries]# cat -n config.default.php|sed -n ‘746p‘ 746 $cfg[‘AllowArbitraryServer‘] = true;
Log on to the database operation on MySQL server 192.168.56.41:
mysql> select * from wjw02.t2;+----+-------------+| id | name |+----+-------------+| 1 | tomcat || 2 | fire || 4 | ball || 5 | tom || 6 | cat || 7 | gog || 8 | pig || 10 | tiger || 11 | go || 12 | booss || 13 | tomcat12 || 15 | tomcat1 || 17 | tomcat234 || 19 | tomcat34456 |+----+-------------+14 rows in set (0.01 sec)
mysql> select * from wjw01.t1;+----+---------+| id | name |+----+---------+| 1 |sansan || 2 | bobo || 3 | pig || 4 | apple || 5 | ball || 6 | peer || 7 | water || 9 | tomcat |+----+---------+8 rows in set (0.00 sec)
Remote Login Database:
Log in to the MySQL service on the remote 192.168.56.41, view the current wjw02 library, T2 table
192.168.56.41 log on to MySQL database to view table data:
mysql> select * from wjw02.t2;+----+-------------+| id | name |+----+-------------+| 1 | tomcat || 2 | fire || 4 | ball || 5 | tom || 6 | cat || 7 | gog || 8 | pig || 10 | tiger || 11 | go || 12 | booss || 13 | tomcat12 || 15 | tomcat1 || 17 | tomcat234 || 19 | tomcat34456 |+----+-------------+14 rows in set (0.00 sec)
four. Error warning prompt resolution :
[[email protected] libraries]# cat -n config.default.php|sed -n ‘160p‘ 160 $cfg[‘Servers‘][$i][‘extension‘] = ‘mysqli‘;修改为:160 $cfg[‘Servers‘][$i][‘extension‘] = ‘mysql‘
Add the short password 123456 at profile 102, and you will not be prompted with an error:
[email protected] libraries]# cat -n config.default.php|sed -n ‘102p‘ 102 $cfg[‘blowfish_secret‘] = ‘123456‘;
Five. Solutions to the problem of missing mcrypt extensions
Refer to the user documentation:
Http://blog.sina.com.cn/s/blog_4d0309640101ju0j.html
The following is a CentOS 6.0 system as an example to illustrate
1, install the third party yum source (the default Yum source does not have these library files, you can not use Yum installation) to execute the following command
wget http://www.atomicorp.com/installers/atomic
Execute the following command
Sh./atomic
2. Execute the following command to install
Yum Install Php-mcrypt Libmcrypt libmcrypt-devel
3. Restart System execution
Shutdown-r now
Remember that you need to restart MySQL, the landing phpmyadmin will no longer appear missing mcrypt extension. Please check the PHP configuration!
Re-launch Apache
/application/apache/bin/apachectl start
Lsof-i:80
To solve the problem here
phpMyAdmin Advanced Application Reference documentation
http://yongxi.blog.51cto.com/2352775/1762609
phpmyadmin+mysql-5.6.16.tar.gz use