Linux

KT-cloud CentOS7에 MySQL 4 소스컴파일( 실패 )

아이티제어 2022. 3. 5. 17:38

컴파일러 설치

yum install gcc gcc-c++ pcre-devel expat-devel zlib-devel openssl-devel

소스컴파일 위한 컴파일러 설치

MySQL4소스파일 서버로 복사 

scp  -P 22  ./mysql-4.1.22.tar.gz   root@211.123.123.22:/home/mysql4

압축풀기 

tar xfpz  ./mysql-4.1.22.tar.gz

컨피겨 

 configure: error: No curses/termcap library found

 #yum  install ncurses >>이미 최신 인스톨되었다함.

 

git clone https://github.com/TheCoderMerlin/Curses.git
Curses
./make.sh
./make.sh: line 2: makeSwift: command not found
MakeShift  없단다.

 swift  다운설치

git clone https://github.com/tachoknight/swift-rpm.git
cd swift-rpm
 ./rpm-from-source.sh
//오류
./rpm-from-source.sh: line 48: rpmbuild: command not found

rpmbuild  설치

 yum install rpm-build

 swift  다운설치 재시도

[root@NkCloudKt1 swift-rpm]# ./rpm-from-source.sh
..중략..
error: Failed build dependencies:
        clang is needed by swift-4.1.1-RELEASE4.1.1.x86_64
        libicu-devel is needed by swift-4.1.1-RELEASE4.1.1.x86_64
        cmake is needed by swift-4.1.1-RELEASE4.1.1.x86_64
        libuuid-devel is needed by swift-4.1.1-RELEASE4.1.1.x86_64
        libedit-devel is needed by swift-4.1.1-RELEASE4.1.1.x86_64
        swig is needed by swift-4.1.1-RELEASE4.1.1.x86_64
        libbsd-devel is needed by swift-4.1.1-RELEASE4.1.1.x86_64
        libxml2-devel is needed by swift-4.1.1-RELEASE4.1.1.x86_64
        libsqlite3x-devel is needed by swift-4.1.1-RELEASE4.1.1.x86_64
        python-devel is needed by swift-4.1.1-RELEASE4.1.1.x86_64
        ninja-build is needed by swift-4.1.1-RELEASE4.1.1.x86_64

 

==결론..swing 버전이 달라서 더이상 진행을 못함.

 

 cd /usr/bin/
[root@NkCloudKt1 bin]# ./mysql_install_db &
[1] 16992
[root@NkCloudKt1 bin]# Installing MariaDB/MySQL system tables in '/home/hdb2/var/lib/mysql' ...
220305 17:35:39 [Note] /usr/libexec/mysqld (mysqld 5.5.68-MariaDB) starting as process 17012 ...
OK
Filling help tables...
220305 17:35:39 [Note] /usr/libexec/mysqld (mysqld 5.5.68-MariaDB) starting as process 17022 ...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:

'/usr/bin/mysqladmin' -u root password 'new-password'
'/usr/bin/mysqladmin' -u root -h NkCloudKt1 password 'new-password'

Alternatively you can run:
'/usr/bin/mysql_secure_installation'

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the MariaDB Knowledgebase at http://mariadb.com/kb or the
MySQL manual for more instructions.

You can start the MariaDB daemon with:
cd '/usr' ; /usr/bin/mysqld_safe --datadir='/home/hdb2/var/lib/mysql'

You can test the MariaDB daemon with mysql-test-run.pl
cd '/usr/mysql-test' ; perl mysql-test-run.pl

Please report any problems at http://mariadb.org/jira

The latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:
http://dev.mysql.com
Consider joining MariaDB's strong and vibrant community:
https://mariadb.org/get-involved/

^C
[1]+  Done                    ./mysql_install_db
[root@NkCloudKt1 bin]#


[root@NkCloudKt1 bin]# pwd
/usr/bin
[root@NkCloudKt1 bin]# yum list installed | grep mysql
php-mysql.x86_64                        5.4.16-48.el7                  @base
[root@NkCloudKt1 bin]# yum list installed | grep mariadb
mariadb.x86_64                          1:5.5.68-1.el7                 @base
mariadb-libs.x86_64                     1:5.5.68-1.el7                 @base
mariadb-server.x86_64                   1:5.5.68-1.el7                 @base