To install the related package:
cd/home/oldboy/tools/
Rz-y
Tar XF cmake-2.8.8.tar.gz
CD cmaake-2.8.8
./configure
Gmake
Gmake Install
Cd..
Dependent Packages:
Yum Install Ncurses-devel-y
Start installing MySQL
Create users and Groups
Groupadd MySQL
Useradd mysql-s/sbin/nologin-m-G MySQL
Unzip compile MySQL
Tar XF mysql-5.5.32.tar.gz
CD mysql-5.5.32
CMake. -dcmake_install_prefix=/application/mysql-5.5.32 \
-dmysql_datadir=/application-5.5.32/data \
-dmysql_unix_addr=/application/mysql-5.5.32/tmp/mysql.sock \
-DEXTRA_CHARSETS=GBK,BGK2312,UTF8,ASCII \
-denabled_local_infile=on \
-dwith_innobase_storage_engine=1 \
-dwith_federated_storage_engine=1 \
-dwith_blackhole_storage_engine=1 \
-dwithout_example_storage_engine=1 \
-dwithout_partition_storage_engine=1 \
-dwith_fast_mutexes=1 \
-dwith_zlib=bundled \
-denabled_local_infile=1 \
-dwith_readline=1 \
-dwith_embedded_server=1 \
-dwith_debug=0
A character set that is not compiled:
#-ddefault_charset=utf8 \
#-ddefault_collatton=utf8_general_ci \
Make
Make install
Ln-s/application/mysql-5.5.32//application/mysql
Cd..
CP MYSQL-5.5.32/SUPPORT-FILES-FILES/MY-SMALL.CNF/ETC/MY.CNF
To configure environment variables:
Echo ' Export path=/application/mysql/bin: $PATH ' >>/etc/profile
Tail-1/etc/profile
Source/etc/profile
Failure problem: http://oldboy.51cto.com/2561410/1122867
Build MySQL Data file
Mkdir-p/application/mysql/dada
Authorizing MySQL users to access MySQL's installation directory
Chown-r mysql.mysql/application/mysql/data/
Adjust/TMP permissions, otherwise initialization will be wrong
Chmod-r 1777/tmp/
Install the MySQL database file, note the command path
cd/application/mysql/scripts/
./mysql_install_db--basedir=/application/mysql/--datadir=/application/mysql/data/--user=mysql
cd/home/oldboy/tools/mysql-5.5.32/
Copy the MySQL boot script to/ETC/INIT.D
CP Support-files/mysql.server/etc/init.d/mysqld
chmod +x/etc/init.d/mysqld
Start MySQL
/etc/init.d/mysqld start
MySQL CMake compilation single-instance installation