1. Download the binary version. Many websites now have related downloads, which are about 384 Mb in size and about MB in decompression.
My downloaded version is: mysql-5.1.45-linux-i686-glibc23
2. The glibc2.3 version is required from the file name.
Shell> rpm-q glibc
3. Copy the mysql-5.1.45-linux-i686-glibc23 to/usr/local/mysql;
4. Change the/usr/local/mysql permission to chown mysql. mysql/usr/local/mysql.
5. cd/usr/local/mysql/script
6. vi mysql_install_db: Modify the mysql directory and data creation location:
Basedir = "/usr/local/mysql /"
Builddir = ""
Ldata = "/usr/local/mysql/data" # storage location of generated database files
Langdir = "/usr/local/mysql/share"
7. Run the script to create a database after modification.
8. modify data permissions:
Chown-R mysql. mysql/usr/local/mysql/data
9. Modify the my. cnf file:
Cp/usr/local/mysql/support-files/my-medium.cnf/etc/my5.cnf
[Client]
# Password = your_password
Port = 3308
Socket =/tmp/mysql5145.sock
# Here follows entries for some specific programs
# The MySQL server
[Mysqld]
Port = 3308
Socket =/tmp/mysql5145.sock
10. Start mysql:
/Usr/local/mysql/bin/mysqld_safe -- defaults-file = '/etc/my5145.cnf' -- user = mysql &
Echo/usr/local/mysql/bin/mysqld_safe -- defaults-file = '/etc/my5145.cnf' -- user = mysql &>/etc/rc. local
In this way, mysql can be started at startup.
10. Complete.
Compile and Install Multiple apache:
If apache is installed in/usr/local/apache.
Now install it in/usr/local/apache2.
1. mkdir/usr/local/apache2
2. Start Compilation:
./Configure -- prefix =/usr/local/apache2
3. make
4. make install
Install Multiple php versions:
The previous php4 is installed in/usr/local/php
Install php5 (php-5.2.11) now at/usr/local/php5
1. mkdir/usr/local/php5
. /Configure -- prefix =/usr/local/php5 -- with-apxs2 =/usr/local/apache2/bin/apxs -- with-mysql =/usr/local/mysql -- with-config- file-path =/usr/local/php5/lib-enable-track-vars -- enable-sockets -- with-zlib
2. make & make install
3. cp php. ini-dist/usr/local/php5/lib/php. ini
4. Edit/usr/local/apache2/conf/httpd. conf.
A. Modify the default listening port:
Listen 8080.
B. Modify the started users and groups.
User
Group
C. Add php support AddType.
D. Modify the search order of the home page.
DirectoryIndex index.html index. php
E. Added support for the default Chinese language.
DefaultCharset