Author: youdi (Kevin. U)
For Daily maintenance convenience, we choose not to choose the rpm, but to use the tar.gz Method for installation.
We create a directory/data in the root file system to store Mysql Data:
# Mkdir data
Add mysql users and groups ,.
# Groupadd MySQL
# Useradd-G MySQL
Download the MySQL package:
# Cd/Data
# Wget http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.67.tar.gz/from/http://mysql.ntu.edu.tw/
# Tar zxvf mysql-5.0.67.tar.gz/
# Music mysql-5.0.67 mysql5src
Compile the compiled shell script makeit. Sh with the following code:
#! /Bin/sh
Cflags = "-O2-mcpu = pentiumpro" cxx = GCC cxxflags = "-O2-mcpu = pentiumpro-felide-constructors ". /configure -- prefix =/data/mysql5 -- With-charset = GBK -- With-extra-charsets = gb2312, big5 -- enable-thread-safe-client -- enable-local-infile -- enable-Handler -- With-client-ldflags =-all-static -- With-mysqld-ldflags =-all- static -- without-Debug -- without-InnoDB
Make
Make install
From the makeit. Sh script above, we can see that the MySQL installation path is/data/mysql5.
Run/data/mysql5src/scripts/mysql_install_db to install the MySQL system table.
To facilitate routine data maintenance:
CD/data/mysql5
Ln-s var/data/var
Chown-r MYSQL: MySQL VaR
CD/data/
Chown-r MYSQL: MySQL mysql5
CP/Data/mysql5/share/MySQL. Server/etc/rc. d/init. d
Chkconfig -- add mysql. Server
Add to system Lib:
VI/etc/lD. So. conf
Add:/data/mysql5/lib/MySQL
Ldconfig
Various software package dependencies may occur during compilation:
The most typical is
Ncurses:
Ftp://mirror.switch.ch/mirror/fedora/linux/core/5/i386/ OS /Fedora/RPMS/ncurses-devel-5.5-19.i386.
Ftp://mirror.switch.ch/mirror/fedora/linux/core/5/i386/ OS /Fedora/RPMS/ncurses-5.5-19.i386.rpm