I am using rhel5.1, which is a higher version of RedHat Enterprise Edition (higher I have seen 5.3 ). In rhel5.x and later versions, Red Hat has enhanced copyright control, mainly because the GUI manager of the software package is not used at will, but must be registered with red hat before using this function. Without the software package GUI manager, software management is greatly inconvenient, either registration or manual management of RPM software packages. Manual RPM software packages can be managed by no one, but by skilled system administrators. On this, I have an article, using the local CD release package as the source of software package management, better solve the problem: rhel5.0 software package management http://blog.why100000.com /? P = 481.
Rhel5.1 is similar to other Red Hat releases. After MySQL is installed, it is not like the overall organization of files in windows, but is split into different folders in Linux, it may be in line with the file management standards in Linux. The file distribution is as follows:
/Usr/bin MYSQL client programs and scripts
/Usr/sbin mysqld Server
/Var/lib/MySQL Log File, database
/Usr/share/doc/packages MySQL document
/Usr/include/MySQL include (header) File
/Usr/lib/MySQL database
/Usr/share/MySQL error message and Character Set File
/Usr/share/SQL-benchmark MySQL benchmark program
// Install and configure phpMyAdmin:
Note: phpmyadmin2.x is for versions earlier than PhP 5.2, and phpmyadmin3.x is for Versions later than or equal to PhP 5.2.
1. phpMyAdmin can run directly when the root user of MySQL has a blank password. But the root user must be set with a password!
Change the root user password to "mypassword ":
Mysqladmin-u Root Password mypassword
Then, you must configure the phpMyAdmin configuration file:
Copy config. Inc. sample. php to config. Inc. php, and modify the account, password, server address, and other necessary configurations.
2. The following message is displayed: "the configuration file requires a top secret phrase password (blowfish_secret:
"Blowfish_secret" uses any string as the Cookie's encrypted string. If no encryption key is available, the system displays "the configuration file needs a top secret phrase password (blowfish_secret)". The configuration is as follows:
Open the configuration file config. Inc. php and modify the configuration item:
$ Cfg ['servers'] [$ I] ['auth _ type'] = 'cooker'; // This is the case by default.
$ Cfg ['blowfish _ secret'] = 'mysecret'; ("mysecret" custom)
After modification, you can enter the user and password to log on.
3. The message "unable to load mcrypt extension" is displayed. <br/> check the PHP configuration.
Run the PHP-M command (you can also use the phpinfo () function) and find that this module is not installed. Install the mcrypt. So extension module of PHP.
Note: In rhel5.x, the PHP (version 5.1.6) configuration extension method is different from the "extension = XXXX. dll" comment in the PHP. ini file in windows.
Note that extension_dir = "/usr/lib/PHP/modules" in/etc/PHP. ini indicates that all the extension modules are placed here. Pay attention to the following section in "dynamic extensions:
;;;;
; Note: packaged extension modules are now loaded via the. ini files
; Found in the directory/etc/PHP. D; these are loaded by default.
;;;;
It indicates that the management extension in rhel5 is very different from that in windows. To open an extension, you need to create an INI file under/etc/PHP. D. For example, when a MySQL database is supported, a MySQL. ini file is displayed as follows:
; Enable MySQL extension module
Extension = mysql. So
Therefore, to support mcrypt extensions, you must have mcrypt under/usr/lib/PHP/modules. so file, at the same time in/etc/PHP. d. MySQL is available. INI file with the following content:
; Enable mcrypt extension module
Extension = mcrypt. So
However, this file does not exist in the rhel5 installation disc! This means that mcrypt support cannot be directly installed even if we have bypassed registration to manage software packages on our own! -- Linux is so bad! (Now I want to scream "Long live open source! !") This file needs to be found online (I want to scream "Long Live Network !"). Find the php-mcrypt-5.1.6-1.el5.i386.rpm file on the Internet (source I don't know, it should be RedHat, and the corresponding rhel5 version), run the package to view the command:
[Root @ localhost ~] # Rpm-qpl php-mcrypt-5.1.6-1.el5.i386.rpm
Warning: php-mcrypt-5.1.6-1.el5.i386.rpm: Header V3 DSA Signature: nokey, key ID 6f7eee0f
/Etc/PHP. d/mcrypt. ini
/Usr/lib/PHP/modules/mcrypt. So
As you can see, after the installation, the module File is located, and the corresponding directory and above analysis are always there. So run:
Rpm-IVH php-mcrypt-5.1.6-1.el5.i386.rpm
Aha ~~~ Error! Error message:
Libmcrypt. so.4 is needed by php-mcrypt-5.1.6-1.el5.i386
It seems that the php-mcrypt-5.1.6-1.el5.i386.rpm package depends on the libmcrypt package.
Continue to the Internet to search, download to the libmcrypt-2.5.7-2.fc3.i386.rpm software package, look at the bread is what stuffing:
[Root @ localhost ~] # Rpm-qpl libmcrypt-2.5.7-2.fc3.i386.rpm
Warning: libmcrypt-2.5.7-2.fc3.i386.rpm: Header V3 DSA Signature: nokey, key ID 1ac70ce6
/Usr/lib/libmcrypt. so.4
/Usr/lib/libmcrypt. so.4.4.7
/Usr/share/aclocal/libmcrypt. M4
/Usr/share/doc/libmcrypt-2.5.7
/Usr/share/doc/libmcrypt-2.5.7/authors
/Usr/share/doc/libmcrypt-2.5.7/copying. Lib
/Usr/share/doc/libmcrypt-2.5.7/changelog
/Usr/share/doc/libmcrypt-2.5.7/known-bugs
/Usr/share/doc/libmcrypt-2.5.7/news
/Usr/share/doc/libmcrypt-2.5.7/readme
/Usr/share/doc/libmcrypt-2.5.7/Thanks
/Usr/share/doc/libmcrypt-2.5.7/todo
/Usr/share/man/man3/mcrypt.3.gz
OK, libmcrypt. so.4 is in it. "... FC3 ..." It indicates that this package is produced by RedHat and may continue to support rhel5 (to this type of basic library, manufacturers generally repeat it, experience !). Install and try:
[Root @ localhost ~] # Rpm-IVH libmcrypt-2.5.7-2.fc3.i386.rpm
Warning: libmcrypt-2.5.7-2.fc3.i386.rpm: Header V3 DSA Signature: nokey, key ID 1ac70ce6
Preparing... ######################################## ### [100%]
1: libmcrypt ####################################### #### [100%]
Successful. Then install the mcrypt package:
[Root @ localhost ~] # Rpm-IVH php-mcrypt-5.1.6-1.el5.i386.rpm
Warning: php-mcrypt-5.1.6-1.el5.i386.rpm: Header V3 DSA Signature: nokey, key ID 6f7eee0f
Preparing... ######################################## ### [100%]
1: php-mcrypt ##################################### ###### [100%]
Also succeeded. Restart the apache service:
[Root @ localhost ~] # Httpd-K restart
Open the phpMyAdmin address.
After the software packages are manually installed, you can also see them in the Software Package Manager, indicating that the package management of the manual installation and graphical interface is essentially the same.
In order not to see "unable to load mcrypt extension ......" This prompt shows how much we have done in Linux! Windows is much easier. Copy libmcrypt. DLL to the DLLs directory and system32 directory, remove the comment in PHP. ini, and restart the web service. In Windows, the main reason is that you do not need to go to the Internet to find those things. It can be seen that PHP has much better support for Windows. In other words, Linux requires some discounts on PHP support. Do you know if it is a commercial consideration?
Appendix:
1. File distribution of MySQL 5.1 in Windows:
Bin client program and mysqld Server
Data Log Files, databases
Docs documentation
Examples sample programs and scripts
Include include (header) File
Lib Library
Scripts utility script
Share error message file
2. File distribution in UNIX systems:
Bin client program and mysqld Server
Data Log Files, databases
Docs documentation, changelog
Include include (header) File
Lib Library
Scripts mysql_install_db
Share/MySQL error message file
SQL-benchmark program
3. in Linux, after installing MySQL using the source code package (the source code needs to be configured and compiled) or binary package, you can usually install the file to/usr/local, that is, in the following subdirectory:
/Usr/local/bin client program and script
/Usr/local/include/MySQL include (header) File
/Usr/local/INFO Info format document
/Usr/local/lib/MySQL Library
/Usr/local/libexec mysqld Server
/Usr/local/share/MySQL error message file
/Usr/local/SQL-benchmark program and crash-me test
/Usr/local/var database and log files