RHEL5.7 64-bit source code compilation installation mysql-5.5.42 encountered problems

Source: Internet
Author: User
Tags openssl openssl version

Since MySQL is compiled from version 5.5 after the source code is installed with CMake, make, made install installed, not./configure,make,make install installation, so to see if the system is not cmake this command, Red Hat Enterprise 5 is not installed by default, so you need to install it manually (Red Hat 6 is installed by default). CMake installation method on the Internet search on the line.

The official method for installing MySQL is as follows:

# preconfiguration setupshell> groupadd mysqlshell> useradd -r -g  mysql mysql# Beginning of source-build specific instructionsshell>  tar zxvf mysql-version.tar.gzshell> cd mysql-versionshell> cmake . shell> makeshell> make install# end of source-build specific  Instructions# postinstallation setupshell> cd /usr/local/mysqlshell> chown  -r mysql .shell> chgrp -r mysql .shell> scripts/mysql_install_ db --user=mysqlshell> chown -r root .shell> chown -r mysql  Data# next command is optionalshell> cp support-files/my-medium.cnf /etc /my.cnfshell> bin/mysqld_safe --user=mysql &# next command is  Optionalshell> cp suppoRt-files/mysql.server /etc/init.d/mysql.server 


When you compile it, add the following parameters:

CMake. -dcmake_install_prefix=/usr/local/mysql-dmysql_datadir=/data/mydata-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


Compile failed while executing make:

[69%] Building C Object VIO/CMAKEFILES/VIO.DIR/VIOSSL.C.O

/root/mysql-5.5.42/vio/viossl.c:in function Assl_doa:

/root/mysql-5.5.42/vio/viossl.c:175:error:assl_op_no_compressiona undeclared (first use with this function)

/root/mysql-5.5.42/vio/viossl.c:175:error: (Each undeclared identifier was reported only once

/root/mysql-5.5.42/vio/viossl.c:175:error:for each function it appears in.)

MAKE[2]: * * * [VIO/CMAKEFILES/VIO.DIR/VIOSSL.C.O] Error 1

MAKE[1]: * * * [Vio/cmakefiles/vio.dir/all] Error 2

Make: * * * [ALL] Error 2

This is because the OpenSSL version is too low, mysql5.5 cannot be compiled under openssl-1.0.0 and lower versions. Viewed under OpenSSL version Openssl-0.9.8,openssl version-a.

If you do not need SSL to remove WITH_SSL configuration items, you can also upgrade the OpenSSL version, and a more convenient way to make a patch before cmake.

Upgrade OpenSSL:

Download from ftp://ftp.openssl.org/source/

TAR-XVF openssl-1.0.2a.tar.gz

CD openssl-1.0.2a

./config shared Zlib

Make

Make install

mv/usr/bin/openssl/tmp/

Ln-s/usr/local/ssl/bin/openssl/usr/bin/openssl

Ln-s/usr/local/ssl/include/openssl//usr/include/openssl

echo "/usr/local/ssl/lib" >>/etc/ld.so.conf

Ldconfig-v | grep OpenSSL

View version:

OpenSSL version-a

Recompile:

Execute First:

Make clean

RM CMakeCache.txt

And then start over again, to find or not succeed (after the upgrade is not successful in the end what reason?) )。 Finally, the-dwith_ssl=system is removed and the compilation succeeds.

Here are the parameters to remove Dwith_ssl=system:

CMake. -dcmake_install_prefix=/usr/local/mysql-dmysql_datadir=/data/mydata-dsysconfdir=/etc-dwith_innobase_storage_ Engine=1-dwith_archive_storage_engine=1-dwith_blackhole_storage_engine=1-dwith_readline=1-dwith_zlib=system- Dwith_libwrap=0-dmysql_unix_addr=/tmp/mysql.sock-ddefault_charset=utf8-ddefault_collation=utf8_general_ci

RHEL5.7 64-bit source code compilation installation mysql-5.5.42 encountered problems

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.