Compiling and installing MARIADB

Source: Internet
Author: User
Tags curl gettext openssl

Because MySQL is cmake compiled, so mariadb also want to cmake compile

Install CMake First

650) this.width=650; "title=" image "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M01/79/09/ Wkiom1afhkoweoo5aacuc5c6usg724.png "width=" 511 "height=" 224 "/>

Depends on the installation of the library and compilation tools.

Yum install-y apr* autoconf automake bison bzip2 bzip2* cloog-ppl compat* cpp Curl Curl-devel fontconfig Fontconfig-devel FreeType freetype* freetype-devel gcc gcc-c++ gtk+-devel gd gettext gettext-devel glibc kernel kernel-headers keyutils ke Yutils-libs-devel krb5-devel libcom_err-devel libpng libpng-devel libjpeg* libsepol-devel libselinux-devel libstdc++- Devel libtool* libgomp libxml2 libxml2-devel libxpm* libtiff libtiff* make MPFR ncurses* ntp OpenSSL openssl-devel patch p Cre-devel perl php-common php-gd policycoreutils telnet t1lib t1lib* nasm nasm* zlib-devel gd-devel

650) this.width=650; "title=" image "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/m02/79/07/wkiol1afhmfyfryraafz_xke_- G871.png "width=" 527 "height=" 161 "/>

Set up users, user groups, folders

Groupadd MySQL

useradd-g MySQL mysql-s/bin/false

Mkdir-p/data/mysql

Chown-r Mysql:mysql/data/mysql

Mkdir-p/usr/local/mysql

650) this.width=650; "title=" image "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M02/79/09/ Wkiom1afhkytj57xaadpwmx9ong953.png "width=" 477 "height=" 148 "/>

and then compile

CMake. -dcmake_install_prefix=/usr/local/mysql-dmysql_datadir=/data/mysql-dsysconfdir=/etc

650) this.width=650; "title=" image "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M00/79/09/wKiom1aFHK6zNqWIAACKIk8_ Xki160.png "width=" 466 "height=" 166 "/>

Then install

Make

650) this.width=650; "title=" image "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M00/79/07/ Wkiol1afhnoszb88aaenmhjgisw620.png "width=" 457 "height=" 189 "/>

Make install

650) this.width=650; "title=" image "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M01/79/07/ Wkiol1afhnfjv69baaekpeiobro965.png "width=" 452 "height=" 129 "/>

Remove MY.CNF from your system

650) this.width=650; "title=" image "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M02/79/09/ Wkiom1afhlqaa4auaaanpsackko682.png "width=" 244 "height="/>

There is a Support-files folder in the Unzip directory.

650) this.width=650; "title=" image "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M00/79/07/ Wkiol1afhokhnakvaagqvq-wgqu760.png "width=" 455 "height=" 246 "/>

It's got a config file inside it.

650) this.width=650; "title=" image "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M01/79/09/wKiom1aFHMTxtk8_ Aacnmvkblwi971.png "width=" 459 "height=" "/>"

Copy one to/etc in a random way.

Copy the file to the boot Startup folder

650) this.width=650; "title=" image "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M00/79/07/ Wkiol1afhoewxrxdaabccaxngka640.png "width=" 444 "height=" "/>"

Then edit mysqld

650) this.width=650; "title=" image "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M00/79/0B/ Wkiom1afqurcgutfaabkvxqullg932.png "width=" 244 "height=" 113 "/>

2 lines after modification

Generate Authorization Form

650) this.width=650; "title=" image "style=" border-top:0px; border-right:0px; border-bottom:0px; border-left:0px; Display:inline "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M00/79/0A/ Wkiol1afuy2wqxgnaacuzsk412q994.png "" 528 "height=" 122 "/>

granting permissions

650) this.width=650; "title=" image "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M01/79/07/ Wkiol1afho6zldc8aaa53rahloi937.png "width=" 446 "height=" "/>

Perform

650) this.width=650; "title=" image "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M01/79/09/wKiom1aFHNDgtnqPAABbb_ Snzye762.png "width=" 420 "height="/>

Adding environment variables

Echo ' Export path= $PATH:/usr/local/mysql/bin ' >>/etc/profile && source/etc/profile

650) this.width=650; "title=" image "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M02/79/09/wKiom1aFHNXhHGtkAAA8BKH4_ Ja636.png "width=" 580 "height="/>

Interactive Settings Database Mysql_secure_installation

650) this.width=650; "title=" image "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M02/79/07/ Wkiol1afhp3wy1fnaagchnjjywc794.png "width=" 541 "height=" 246 "/>

Error occurred

650) this.width=650; "title=" image "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M00/79/09/ Wkiom1afhn-z-t1faabaiufrofe901.png "width=" 519 "height="/>

Just shut down SELinux.

Querying SELinux status with Getenforce

650) this.width=650; "title=" image "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M01/79/07/wKioL1aFHP_ B8-7iaabbydis9l4003.png "width=" 506 "height=" "/>"

Temporarily close selinux with Setenforce

650) this.width=650; "title=" image "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M00/79/07/ Wkiol1afhp-hgkyvaacbzknwuo0214.png "width=" 514 "height="/>

or permanently modify

/etc/sysconfig/selinux

/etc/selinux/config

650) this.width=650; "title=" image "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M02/79/09/ Wkiom1afhpcxtc0yaae4tfhttj8491.png "width=" 403 "height=" 212 "/>

Modified is permanently modified

Then reboot.

650) this.width=650; "title=" image "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M00/79/07/wKioL1aFHRTy-FdqAAHL_ R6ucrc498.png "width=" 424 "height=" 380 "/>

Finally, success

650) this.width=650; "title=" image "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M01/79/0B/ Wkiom1afqzwbcmabaaczstmtgn8948.png "width=" "height=" 137 "/>

Compiling and installing MARIADB

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.