필요소스
cmake-2.8.x.tar.gz 다운 받습니다.
mysql-5.6.x.tar.gz 다운 받습니다.
mysql 5.5 이상 버전 부터 cmake 를 이용하여 설치 하기 때문에 cmake를 먼저 설치 후 mysql 설치를 진행 합니다.
#cd /usr/local/src
#groupadd mysql
#useradd -g mysql mysql
#tar zxvfp ./cmake-2.8.5.tar.gz
#cd ./cmake-2.8.5
#./bootstrap
#make
#make install
#cd ../
tar zxvfp ./mysql-5.6.12.tar.gz
cd ./mysql-5.6.12
cmake \
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
-DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DWITH_EXTRA_CHARSETS=all \
-DMYSQL_DATADIR=/usr/local/mysql/data \
-DENABLED_LOCAL_INFILE=1 \
-DWITH_MYISAM_STORAGE_ENGINE=1 \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_ARCHIVE_STORAGE_ENGINE=1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DWITH_MEMORY_STORAGE_ENGINE=1 \
-DWITH_READLINE=1 \
-DENABLED_LOCAL_INFILE=1 \
-DMYSQL_USER=mysql \
-DMYSQL_TCP_PORT=3306 \
-DENABLE_DOWNLOADS=1
#make
#make install
#cp -arp /usr/local/mysql/support-files/my-default.cnf /etc/my.cnf
#/usr/local/mysql/scripts/mysql_install_db –defaults-file=/etc/my.cnf –user=mysql –basedir=/usr/local/mysql/ –datadir=/usr/local/mysql/data/
# cp -arpf /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
소유권 그룹 권한등을 변경 하여 줍니다.
#chown -R mysql:mysql /usr/local/mysql/
#chmod 700 /etc/init.d/mysqld
#chmod 711 /usr/local/mysql
#chmod 700 /usr/local/mysql/data
#chmod 751 /usr/local/mysql/bin
#chmod 750 /usr/local/mysql/bin/*
#chmod 755 /usr/local/mysql/bin/mysql
#chmod 755 /usr/local/mysql/bin/mysqldump
mysql 명령어를 사용할 수 있게 환경변수를 등록하여 줍니다.
#vi /etc/profile
export PATH=$PATH:/usr/local/mysql/bin
:wq
#source /etc/profile
#chkconfig mysqld –add
#chkconfig mysqld on
#/etc/init.d/mysqld star