CentOS 7 에서 MySQL 8.0.29 설치 (gcc 관련 에러시에만 참고)
1. 필요 패키지 설치
# yum -y group install "Development Tools"
# yum -y install openssl openssl-devel ncurses ncurses-base ncurses-libs ncurses-devel perl bison
2. gcc 설치 (gcc 4.8.5 -> 7.3.0)
# yum -y install centos-release-scl
# yum -y install devtoolset-7-gcc*
# scl enable devtoolset-7 bash
# gcc --version
* 어떤 경우 gcc 8.3 우선 설치하고 scl.... 명령으로 7.3 으로 다운하여 사용하니 되기도 함
* 위와 같이 설치가 되지 않을 경우 아래와 같이 리포지토리 파일을 수동으로 생성합니다.
# vi /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo
# CentOS-SCLo-rh.repo # # Please see http://wiki.centos.org/SpecialInterestGroup/SCLo for more # information [centos-sclo-rh] name=CentOS-7 - SCLo rh #baseurl=http://mirror.centos.org/centos/7/sclo/$basearch/rh/ mirrorlist=http://mirrorlist.centos.org?arch=$basearch&release=7&repo=sclo-rh gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo [centos-sclo-rh-testing] name=CentOS-7 - SCLo rh Testing baseurl=http://buildlogs.centos.org/centos/7/sclo/$basearch/rh/ gpgcheck=0 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo [centos-sclo-rh-source] name=CentOS-7 - SCLo rh Sources baseurl=http://vault.centos.org/centos/7/sclo/Source/rh/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo [centos-sclo-rh-debuginfo] name=CentOS-7 - SCLo rh Debuginfo baseurl=http://debuginfo.centos.org/centos/7/sclo/$basearch/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo |
# vi /etc/yum.repos.d/CentOS-SCLo-scl.repo
# CentOS-SCLo-sclo.repo # # Please see http://wiki.centos.org/SpecialInterestGroup/SCLo for more # information [centos-sclo-sclo] name=CentOS-7 - SCLo sclo # baseurl=http://mirror.centos.org/centos/7/sclo/$basearch/sclo/ mirrorlist=http://mirrorlist.centos.org?arch=$basearch&release=7&repo=sclo-sclo gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo [centos-sclo-sclo-testing] name=CentOS-7 - SCLo sclo Testing baseurl=http://buildlogs.centos.org/centos/7/sclo/$basearch/sclo/ gpgcheck=0 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo [centos-sclo-sclo-source] name=CentOS-7 - SCLo sclo Sources baseurl=http://vault.centos.org/centos/7/sclo/Source/sclo/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo [centos-sclo-sclo-debuginfo] name=CentOS-7 - SCLo sclo Debuginfo baseurl=http://debuginfo.centos.org/centos/7/sclo/$basearch/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo |
yum update 로 적용하고 다시 위로 올라가 재설치를 합니다.
[필수] MySQL 8.0.29 설치에 필요한 패키지를 추가 설치합니다.
# yum -y install devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-binutils
3. cmake 설치
# cd /usr/local/src
# wget https://github.com/Kitware/CMake/releases/download/v3.16.2/cmake-3.16.2.tar.gz
# tar -zxvf cmake-3.16.2.tar.gz
# cd cmake-3.16.2
# ./bootstrap
# gmake
# make install
# cmake --version
4. mysql 설치
MySQL 8.0.29 는 설치도중 boost_1_77_0 을 다운로드 받아 압축 풀고 진행하는데,
내부 네트워크에서 인터넷 연결 안될 경우 수동으로 파일을 받아서 옮긴 뒤 아래와 같이 진행하면 됩니다.
(# wget https://boostorg.jfrog.io/artifactory/main/release/1.77.0/source/boost_1_77_0.tar.bz2 ) 다운로드경로
# bunzip2 boost_1_77_0.tar.bz2
# tar xvf boost_1_77_0.tar
# mv boost_1_77_0 /usr/local/src/mysql-8.0.29/include/boost_1_77_0/
(생략)
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/mysql/data -DENABLED_LOCAL_INFILE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DSYSCONFDIR=/etc -DDEFAULT_CHARSET=utf8 -DWITH_SSL=system -DMYSQL_TCP_PORT=3306 -DWITH_EXTRA_CHARSETS=all -DDEFAULT_COLLATION=utf8_general_ci -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/usr/local/src/mysql-8.0.29/include/boost_1_77_0 -DFORCE_INSOURCE_BUILD=1
(생략)
'리눅스 > MySQL' 카테고리의 다른 글
xtrabackup 을 이용한 MySQL 8.0.28 Replication 구성하기 (0) | 2022.07.28 |
---|---|
[MySQL 에러] ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails 해결 (0) | 2022.06.30 |
CentOS 7 에서 MySQL client 8.0.21 설치하기 (caching_sha2_password 지원) (0) | 2022.06.09 |
MySQL 실시간 쿼리 확인 (0) | 2022.05.25 |
[MySQL] Slave_IO_Running: Connecting 조치 방법 (0) | 2022.05.11 |