首页 > 代码库 > lnmp-编译安装mysql

lnmp-编译安装mysql

[root@mysql ~]# yum install  ncurses-devel libaio-devel -y

[root@mysql cmake-3.6.1]# tar -xf cmake-3.6.1.tar.gz
[root@mysql cmake-3.6.1]# cd cmake-3.6.1
[root@mysql cmake-3.6.1]# gmake
[root@mysql cmake-3.6.1]# gmake install
[root@mysql cmake-3.6.1]# which cmake
/usr/local/bin/cmake


[root@mysql tools]# cd mysql-5.5.49
[root@mysql mysql-5.5.49]# useradd -s /sbin/nologin -M mysql
[root@mysql mysql-5.5.49]# id mysql
uid=500(mysql) gid=500(mysql) groups=500(mysql)

[root@mysql mysql-5.5.49]# ./configure
cmake . -DCMAKE_INSTALL_PREFIX=/application/mysql-5.5.49 -DMYSQL_DATADIR=/application/mysql-5.5.49/data -DMYSQL_UNIX_ADDR=/application/mysql-5.5.49/tmp/mysql.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DEXTRA_CHARSETS=gbk,gb2312,utf8,ascii -DENABLED_LOCAL_INFILE=ON -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_FEDERATED_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1-DWITHOUT_PARTITION_STORAGE_ENGINE=1 -DWITH_FAST_MUTEXES=1 -DWITH_ZLIB=bundled -DENABLED_LOCAL_INFILE=1 -DWITH_READLINE=1 -DWITH_EMBEDDED_SERVER=1 -DWITH_DEBUG=0
[root@mysql mysql-5.5.49]# make 
[root@mysql mysql-5.5.49]# make install 

 

lnmp-编译安装mysql