centos6.3源码安装mysql-5.5.34

1、安装make命令:

    [root@localhost mongodb]# yum install make -y

2、安装gcc编译器

    [root@localhost mongodb]# yum install gcc -y

3、安装gcc-c++编译器

    [root@localhost mongodb]# yum install gcc-c++ -y

4、安装bison

    [root@localhost local]# tar zxvf bison-2.4.1.tar

    [root@localhost local]# cd bison-2.4.1

    [root@localhost bison-2.4.1]# ./configure   

    [root@localhost bison-2.4.1]# make && make install

5、安装cmake

    [root@localhost local]# tar zxvf cmake-2.8.10.1.tar.gz 

    [root@localhost local]# cd cmake-2.8.10.1

    [root@localhost cmake-2.8.10.1]# ./configure

    [root@localhost cmake-2.8.10.1]# make && make install

6、安装ncurses

    [root@localhost local]# tar zxvf ncurses-5.8.tar.gz  

    [root@localhost local]# cd ncurses-5.8

    [root@localhost ncurses-5.8]# ./configure

    [root@localhost ncurses-5.8]# make && make install

7、安装mysql

    [root@localhost local]# tar mysql-5.5.34.tar.gz

    [root@localhost local]# mv mysql-5.5.34 mysql

    [root@localhost local]# cd mysql

    [root@localhost mysql]# mkdir data

    [root@localhost mysql]# cmake ./ -DCMAKE_INSTALL_PREFIX=/usr/local/mysql/ -DINSTALL_DATADIR=/usr/local/mysql/data/

    [root@localhost mysql]# make && make install

    [root@localhost mysql]# ./scripts/mysql_install_db --user=root

    [root@localhost mysql]# ./support-files/mysql.server start

    安装完成。

    [root@localhost mysql]# cp support-files/mysql.server /etc/init.d/mysql

    执行上面这一命令,以后就可以直接使用:service mysql start|restart|stop来启动|重启|停止mysql服务。

centos6.3源码安装mysql-5.5.34

上一篇:Oracle Client: TNS: Connect timeout ocurred.


下一篇:100个MySQL 的调节和优化的提示