In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The use of Phpmyadmin first requires a lamp or lnmp environment:
one。 First, set up the phpmyadmin running environment.
Now take the lamp environment as an example:
Install and deploy the lamp environment
1. Install Apache
Download and install
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 will report an error when it starts. At this time, change line 98 to ServerName localhost:80 in the vim httpd.conf file, and restart again will no longer prompt for an error. Netstat-lntup | grep httpd
3. Configure virtual host based on domain name
Cd / application/apache/conf/vim httpd.conf Modification 98 Line ServerName 127.0.0.1 ServerName 80 is modified so that the error will not be reminded when starting for the first time
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-yyum install openssl-devel openssl- yyum install zlib libxml libjpeg freetype libpng gd curl libiconv zlib-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 make 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 if there is any in the apache configuration file
[root@web02 conf] # grep libphp5 / application/apache/conf/httpd.conf LoadModule php5_module modules/libphp5.so [root@web02 conf] # ll / application/apache/modules/total 28980 Murray 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 connection php in the httpd.conf:apache profile
Vim / application/apache/conf/httpd.conf
1) 98 ServerName 127.0.0.1 application/x-httpd-php-source 802) 311 AddType application/x-httpd-php .php .phtmlAddType application/x-httpd-php-source .phps3) users (the key is unified UID, unified set of tools for web services at work) apache and nginx users UID are consistent under line 67 add User wwwGroup wwwuseradd www-s / sbin/nologin-M to set up user: id www4) 166DirectoryIndex index.php index.html
The MySQL here is: 192.168.56.42, which has been compiled and installed
Upload phpMyAdmin-4.0.5-all-languages.tar.gz to / application/apache2.2.31/htdocs, decompress tar xf phpMyAdmin-4.0.5-all-languages.tar.gzMv phpMyAdmin-4.0.5-all-languages.tar.gz phpmyadmin and rename it.
Deployment is complete at this point
three。 Demonstration results
Enter: http://192.168.56.42/phpmyadmin/ in the browser
At this time, the startup user of httpd is www.
[root@mysql-5 libraries] # lsof-iRU 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)
Note:
If pkill httpd
Using / etc/init.d/httpd start to start, it will cause the phpmyadmin interface not to open error 404.
Check the lsof-iRank 80 at this time.
[root@mysql-5 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)
Create a user and password to log in to phpmyadmin on the MySQL service on the 192.168.56.42 server
Mysql > grant all on *. * to phpmyadmin@'192.168.56.%' identified by '123456'
Modify the configuration file: so that you can remotely log in to the database account of phpmyadmin in 192.168.56.0 on the 24th segment of the network.
/ application/apache/htdocs/phpmyadmin/libraries/ config.default.php [root @ mysql-5 libraries] # cat-n config.default.php | sed-n '746p' 746$ cfg [' AllowArbitraryServer'] = true
Log in to the database 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.01sec)
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 to view the current wjw02 library, T2 table
Log in to MySQL database on 192.168.56.41 to view the 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 solution:
[root@mysql-5 libraries] # cat-n config.default.php | sed-n '160p' 160$ cfg [' Servers'] [$I] ['extension'] =' mysqli'; modified to: 160$ cfg ['Servers'] [$I] [' extension'] = 'mysql'
Add a short password of 123456 at configuration file 102 and there will be no error:
Root@mysql-5 libraries] # cat-n config.default.php | sed-n '102p' 102$ cfg [' blowfish_secret'] = '123456'
five。 Solutions to the lack of mcrypt extensions
Refer to netizens' documentation:
Http://blog.sina.com.cn/s/blog_4d0309640101ju0j.html
The following is an example of CentOS 6.0system.
1. Install a third-party yum source (these library files are not available in the default yum source and cannot be installed using yum) and 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 the system execution
Shutdown-r now
Remember to restart mysql, and login to phpmyadmin is done. There will be no lack of mcrypt extensions. Please check the PHP configuration!
Restart Apache
/ application/apache/bin/apachectl start
Lsof-iRO 80
Here to solve the problem.
Phpmyadmin Advanced Application reference documentation
Http://yongxi.blog.51cto.com/2352775/1762609
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.