MySQL-5.7安裝

來源:互聯網
上載者:User

標籤:UI   eve   chmod   basedir   ash   uil   find   config   解決   


2.1 下載mysql

1 網址:https://www.mysql.com/2 [[email protected] ~]# mkdir -p /root/soft/MySQL3 [[email protected] ~]# cd /root/soft/MySQL/4 [[email protected] MySQL]# wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-boost-5.7.20.tar.gz

2.2 下載openssl

1 網址:https://www.openssl.org/2 [[email protected] MySQL]# wget https://www.openssl.org/source/openssl-1.0.2l.tar.gz

2.3 安裝openssl

1 [[email protected] MySQL]# tar xf openssl-1.0.2l.tar.gz 2 [[email protected] MySQL]# cd openssl-1.0.2l3 [[email protected] openssl-1.0.2l]# ./config --prefix=/usr/local/openssl --openssldir=/usr/local/ssl -fPIC no-gost no-shared no-zlib4 [[email protected] openssl-1.0.2l]# make5 [[email protected] openssl-1.0.2l]# make install

2.4 安裝mysql

 1 [[email protected] openssl-1.0.2l]# clear  2 [[email protected] openssl-1.0.2l]# cd .. 3 [[email protected] MySQL]# tar xf mysql-boost-5.7.20.tar.gz  4 [[email protected] MySQL]# cd mysql-5.7.20/ 5 [[email protected] mysql-5.7.20]# cp boost/ /usr/local/boost -R 6 [[email protected] mysql-5.7.20]# yum install cmake 7 [[email protected] mysql-5.7.20]# mkdir -p /data 8 [[email protected] mysql-5.7.20]# chmod 777 /data/ 9 [[email protected] mysql-5.7.20]# cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DWITH_BOOST=/usr/local/boost -DMYSQL_DATADIR=/data -DDEFAULT_CHARSET=utf8 -DWITH_SSL=/usr/local/openssl -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=110 [[email protected] mysql-5.7.20]# make11 [[email protected] mysql-5.7.20]# make install

2.5 初始化mysql

1 [[email protected] mysql-5.7.20]# useradd mysql -s /sbin/nologin 2 [[email protected] mysql-5.7.20]# /usr/local/mysql/bin/mysqld --initialize --datadir=/data/ --user=mysql --basedir=/usr/local/mysql/ --collation-server=utf8_general_ci

2.6 報錯和解決之道

問題:

1 [[email protected] openssl-1.0.2l]# ./config --prefix=/usr/local/openssl --openssldir=/usr/local/ssl -fPIC no-gost no-shared no-zlib2 Operating system: x86_64-whatever-linux23 You need Perl 5.

解決;

1 [[email protected] openssl-1.0.2l]# yum install perl perl-devel

問題;

 1 [[email protected] openssl-1.0.2l]# make 2 making all in crypto... 3 make[1]: Entering directory `/root/soft/Apache/openssl-1.0.2l/crypto‘ 4 /usr/bin/perl ../util/mkbuildinf.pl "gcc -I. -I.. -I../include -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -fPIC -m64 -DL_ENDIAN -O3 -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM" "linux-x86_64" >buildinf.h 5 gcc -I. -I.. -I../include -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -fPIC -m64 -DL_ENDIAN -O3 -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -c -o cryptlib.o cryptlib.c 6 make[1]: gcc: Command not found 7 make[1]: *** [cryptlib.o] Error 127 8 make[1]: Leaving directory `/root/soft/Apache/openssl-1.0.2l/crypto‘ 9 make: *** [build_crypto] Error 110 [[email protected] openssl-1.0.2l]# 

解決:

1 [[email protected] openssl-1.0.2l]# yum install gcc gcc-c++

問題:

1 -- Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH) 2 CMake Error at cmake/readline.cmake:64 (MESSAGE):3 Curses library not found. Please install appropriate package,

解決:

1 [[email protected] mysql-5.7.20]# yum install ncurses ncurses-devel2 [[email protected] mysql-5.7.20]# rm -f CMakeCache.txt

MySQL-5.7安裝

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.