MySQL 5.5 부터 컴팔 옵션이 바뀌었네요..

 

설치전 bison과 ncurses-devel 패키지를 설치 해주십니다.

#yum -y install bison ncurses-devel


먼저 cmake 부 터 설치 하여야 합니다. 

# wget http://www.cmake.org/files/v3.0/cmake-3.0.0.tar.gz

# wget http://www.cmake.org/files/v2.8/cmake-2.8.9.tar.gz

# tar xvf cmake-2.8.9.tar.gz

# cd cmake-2.8.9

# ./bootstrap

 

cmake 설치시 요류가 날경우  gcc의 c++ 이 없거나 버전이 낮은 경우 입니다.

최신버전으로 업그래이드 해줍니다.

# yum -y install gcc-c++

# ./bootstrap 

# gmake && gmake install

 



 http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.22.tar.gz

이전 버전에는 configure로 환경을 잡던 것이 cmake로 바꼇네요.

/usr/local/bin/cmake \

-DCMAKE_INSTALL_PREFIX=/usr/local/mysql \

-DDEFAULT_CHARSET=utf8 \

-DDEFAULT_COLLATION=utf8_general_ci \

-DWITH_EXTRA_CHARSETS=all \

-DMYSQL_DATADIR=/usr/local/mysql/data \

-DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.socket

 

/usr/local/bin/cmake \

-DCMAKE_INSTALL_PREFIX=/home/local/mysql \

-DDEFAULT_CHARSET=utf8 \

-DDEFAULT_COLLATION=utf8_general_ci \

-DWITH_EXTRA_CHARSETS=all \

-DMYSQL_DATADIR=/home/local/mysql/data \

-DMYSQL_UNIX_ADDR=/home/local/mysql/mysql.socket




/usr/local/bin/cmake \

-DCMAKE_INSTALL_PREFIX=/svc/AOA/MYSQL \

-DDEFAULT_CHARSET=utf8 \

-DDEFAULT_COLLATION=utf8_general_ci \

-DWITH_EXTRA_CHARSETS=all \

-DMYSQL_DATADIR=/svc/AOA/MYSQL_DATA \

-DMYSQL_UNIX_ADDR=/svc/AOA/MYSQL_DATA/mysql.socket 

-Denable-thread-safe-client




#make && make install

 

shell> groupadd mysql

shell> useradd -r -g mysql mysql

shell> cd /usr/local

shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz

shell> ln -s full-path-to-mysql-VERSION-OS mysql

shell> cd mysql

shell> chown -R mysql .

shell> chgrp -R mysql .

shell> scripts/mysql_install_db --user=mysql


<< 모든 작업 완료 후 >>

shell> chown -R root .

shell> chown -R mysql data

# Next command is optional


PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !

To do so, start the server, then issue the following commands:


./bin/mysqladmin -u root password 'new-password'

./bin/mysqladmin -u root -h say_shop password 'new-password'


Alternatively you can run:

./bin/mysql_secure_installation


which will also give you the option of removing the test

databases and anonymous user created by default.  This is

strongly recommended for production servers.


See the manual for more instructions.


You can start the MySQL daemon with:

cd . ; ./bin/mysqld_safe &


You can test the MySQL daemon with mysql-test-run.pl

cd ./mysql-test ; perl mysql-test-run.pl



shell> cp support-files/my-medium.cnf /etc/my.cnf

shell> bin/mysqld_safe --user=mysql &

# Next command is optional

shell> cp support-files/mysql.server /etc/init.d/mysql.server


서비스 등록

chkconfig --add mysql.server

chkconfig --level 35 mysql.server on

chkconfig --list mysql.server



이 다음부터 유저 생성하고 하는 것은 기존과 동일한 것 같습니다.

또 변동 사항이 있을 경우 공유 하겠습니다.

 

참고로 MySQL Source tarball 좌표는

http://cdn.mysql.com/Downloads/MySQL-5.5/mysql-5.5.27.tar.gz

입니다.

+ Recent posts