01-mysql5.5.32安装
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了01-mysql5.5.32安装相关的知识,希望对你有一定的参考价值。
[[email protected] ~]# whoami root [[email protected] ~]# uname -r 2.6.32-358.el6.x86_64 [[email protected] ~]# cat /etc/redhat-release CentOS release 6.4 (Final) [[email protected] ~]# ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:0C:29:0D:D5:9F inet addr:172.16.10.88 Bcast:172.16.255.255 Mask:255.255.0.0 inet6 addr: fe80::20c:29ff:fe0d:d59f/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:506 errors:0 dropped:0 overruns:0 frame:0 TX packets:91 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:41642 (40.6 KiB) TX bytes:10715 (10.4 KiB)
1).添加一个虚拟用户 mysql
[[email protected] ~]# useradd -r -s /sbin/nologin mysql [[email protected] ~]# id mysql uid=498(mysql) gid=498(mysql) groups=498(mysql) [[email protected] ~]# tail -1 /etc/passwd mysql:x:498:498::/home/mysql:/sbin/nologin
2).安装 openssl和openssl-devel 软件包
[[email protected] ~]# yum install openssl openssl-devel -y
3).安装ncurses-devel软件包
[[email protected] mysql-5.5.32]# yum install ncurses-devel -y
4).安装cmake-2.8.8编译工具 wget https://cmake.org/files/v2.8/cmake-2.8.0.tar.gz
[[email protected] tools]# ll total 29580 -rw-r--r--. 1 root root 5691656 Jun 13 10:26 cmake-2.8.8.tar.gz #软件包 -rw-r--r--. 1 root root 24596474 Jun 13 10:10 mysql-5.5.32.tar.gz [[email protected] tools]# tar xf cmake-2.8.8.tar.gz #解压软件 [[email protected] tools]# cd cmake-2.8.8 #切入到cmake-2.8.8目录里面 [[email protected] cmake-2.8.8]# pwd /root/tools/cmake-2.8.8 [[email protected] cmake-2.8.8]# ./configure ./bootstrap #开始编译
[[email protected] cmake-2.8.8]# make && make install #编译并开始安装.....
5).开始安装MySQL数据库
[[email protected] tools]# pwd /root/tools [[email protected] tools]# tar xf mysql-5.5.32.tar.gz [[email protected] tools]# ll total 29588 drwxr-xr-x. 13 root root 4096 Jul 14 21:23 cmake-2.8.8 -rw-r--r--. 1 root root 5691656 Jun 13 10:26 cmake-2.8.8.tar.gz drwxr-xr-x. 31 7161 wheel 4096 Jul 2 2013 mysql-5.5.32 -rw-r--r--. 1 root root 24596474 Jun 13 10:10 mysql-5.5.32.tar.gz [[email protected] tools]# cd mysql-5.5.32 cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/mydata/data -DSYSCONFDIR=/etc -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_READLINE=1 -DWITH_SSL=system -DWITH_ZLIB=system -DWITH_LIBWRAP=0 -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci
[[email protected] mysql-5.5.32]# echo $? 0 [[email protected] mysql-5.5.32]# make && make install #开始编译 并安装
以上是关于01-mysql5.5.32安装的主要内容,如果未能解决你的问题,请参考以下文章