CentOS6.9安装MySQL5.1(二)准备工作与编译工作

CentOS6.9安装MySQL5.1(二)准备工作与编译工作

移动源码包到/usr/local/src/

mv mysql-5.1.72.tar.gz /usr/local/src/

cd /usr/local/src

解压

tar xf mysql-5.1.72.tar.gz

进入解压的目录

cd mysql-5.1.72

配置环境

./configure --prefix=/usr/local/mysql/

报错 :

configure: error: in `/usr/local/src/mysql-5.1.72':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

没有gcc编译器,用yum安装一下,其实还需要g++(C++语言的编译器)

yum -y install gcc gcc-c++

如果用光盘软件池,用

yum -y install --disablerepo=\* --enablerepo=c6-media gcc gcc-c++

安装完成试一试是否有gcc和g++,版本已然够了,有的软件需要更高版本的gcc和g++,需要用额外的软件池或者用源码编译gcc(这个举动太疯狂,大约需要一下午的时间,还不见得能搞完)

gcc --version 

g++ --version

如果不安装g++,也能编译,但是会出现怪问题。

然后

!./configure

利用历史命令功能再做一次configure,报错:

configure: error: No curses/termcap library found

 yum -y install ncurses-devel

然后再进行configure,看到这些:

Thank you for choosing MySQL!

Remember to check the platform specific part of the reference manual
for hints about installing MySQL on your platform.
Also have a look at the files in the Docs directory.

这是配置完成了,确保一下

echo $?

0

配置完成了。

make 

滚屏一堆,mysql用make --quiet照样滚屏一堆,不像nginx和apache。

make[2]: Leaving directory `/usr/local/src/mysql-5.1.72/server-tools/instance-manager'
make[1]: Leaving directory `/usr/local/src/mysql-5.1.72/server-tools'
Making all in win
make[1]: Entering directory `/usr/local/src/mysql-5.1.72/win'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/local/src/mysql-5.1.72/win'

还是确保一下,

echo $?

没安装g++的,得到2

make install

echo $?确认

安装完成了。

猜你喜欢

转载自blog.csdn.net/lintengfeidemaozi/article/details/81702334
今日推荐