CentOS 7.0 compilation installation MySQL 5.6.22 process not completed ~ ~ Continuous

Source: Internet
Author: User
Tags mysql download

MySQL Download directory/usr/local/src
MySQL Extract directory/usr/local/bin/mysql

GitHub Https://github.com/mysql/mysql-server

Installation instructions for MySQL website
Http://dev.mysql.com/doc/refman/5.6/en/source-installation.html

Required requirements for installing MySQL
CMake make3.75 above GCC 4.2.1 or more Perl
Curses Ncurses-devel

Latest 3.1.1 CMake
http://www.cmake.org/

Download page
http://www.cmake.org/download/

Download Catalogue/USR/LOCAL/SRC
wget http://www.cmake.org/files/v3.1/cmake-3.1.1.tar.gz

[Email protected] src]# wget http://www.cmake.org/files/v3.1/cmake-3.1.1.tar.gz--2015-01-28 10:40:27--/http Www.cmake.org/files/v3.1/cmake-3.1.1.tar.gz parsing host www.cmake.org (www.cmake.org) ... 66.194.253.19 connecting www.cmake.org (www.cmake.org) |66.194.253.19|:80 ... is connected. An HTTP request has been made and is waiting for a response ... $ OK Length: 5959421 (5.7M) [application/x-gzip] saving to: "Cmake-3.1.1.tar.gz" 100%[====================================== ] 5,959,421 494kb/s spents 11s2015-01-28 10:40:39 (524 kb/s)-Saved "cmake-3.1.1.tar.gz" [5959421/5959421])


Unzip directory/usr/local/bin/cmake-3.1.1

[Email protected] Src]tar ZXVF cmake-3.1.1.tar.gz-c/usr/local/bin

Go to unzip Directory
[Email protected] src]# cd/usr/local/bin/cmake-3.1.1
[[email protected] cmake-3.1.1]# ls
Auxiliary Compileflags.cmake Help
Bootstrap Configure Licenses
Cmakecpack.cmake Contributing.rst Modules
CMakeCPackOptions.cmake.in Copyright.txt Readme.rst
Cmakegraphvizoptions.cmake Ctestconfig.cmake Source
CMakeLists.txt CTestCustom.cmake.in Templates
Cmakelogo.gif Dartconfig.cmake Tests
Cmake_uninstall.cmake.in Doxygen.config Utilities

[Email protected] Cmake-3.1.1]./bootstrap
[Email protected] Cmake-3.1.1]make
[[Email protected] Cmake-3.1.1]make Install

Make
http://www.gnu.org/software/make/
Download
wget http://ftp.gnu.org/gnu/make/make-4.1.tar.gz

[Email protected] src]# wget http://ftp.gnu.org/gnu/make/make-4.1.tar.gz--2015-01-28 11:22:09--http://ftp.gnu.org/ Gnu/make/make-4.1.tar.gz parsing host ftp.gnu.org (ftp.gnu.org) ... 208.118.235.20, 2001:4830:134:3::b is connecting ftp.gnu.org (ftp.gnu.org) |208.118.235.20|:80 ... is connected. An HTTP request has been made and is waiting for a response ... $ OK Length: 1878787 (1.8M) [application/x-gzip] saving to: "Make-4.1.tar.gz" 100%[====================================== ] 1,878,787 33.1kb/s spents 65s2015-01-28 11:23:16 (28.0 kb/s)-Saved "make-4.1.tar.gz" [1878787/1878787])

Extract

[[email protected] Src]tar zxvf make-4.1.tar.gz-c/usr/local/bin[[email protected] src]# cd/usr/local/bin/ Make-4.1[[email protected] make-4.1]# lsabout-nls dep.h load.c README. VMSACINCLUDE.M4 dir.c main.c README. W32ACLOCAL.M4 Doc make.1 remake.calloca.c dosbuild.bat makefile.am remote-cstms.camiga.c expand.c Makefile.ami Remote-stub.camiga.h file.c makefile.com rule.car.c filedef.h makefile.dos rule.harscan.c function.c Makefile.in Scoptionsauthors getloadavg.c Makefile.vms signame.cbuild.sh.in getopt1.c makeint.h smakefilebuild_w32.bat getopt.c Make.lnk strcache.ccommands.c getopt.h Make_msvc_net2003.sln subproc.batcommands.h gettext.h make_msvc_ Net2003.vcproj testsconfig glob misc.c variable.cconfig.ami gmk-default.h NEWS variable.hconfigh.dos GMK-DEFAULT.SCM Nmakefile version.cconfig.h.in gnumake.h output.c Vmsdir.hconfig.h-vms guile.c output.h vmsfunctions.cconfig.h.w32 Hash.c po vmsify.cconfigure hash.h read.c vmsjobs.cconfigure.ac implicit.c README Vpath.cconfiguRe.bat INSTALL README. Amiga w32copying job.c readme.customsdebug.h job.h README. Dosdefault.c loadapi.c README. OS2

[Email protected] Make-4.1]./configure
[Email protected] Make-4.1]make
[[Email protected] Make-4.1]make Install

M4
http://www.gnu.org/software/m4/

Download
wget http://ftp.gnu.org/gnu/m4/m4-latest.tar.gz

[Email protected] src]# wget http://ftp.gnu.org/gnu/m4/m4-latest.tar.gz
--2015-01-28 11:37:14--http://ftp.gnu.org/gnu/m4/m4-latest.tar.gz
Parsing host ftp.gnu.org (ftp.gnu.org) ... 208.118.235.20, 2001:4830:134:3::b
Connecting ftp.gnu.org (ftp.gnu.org) |208.118.235.20|:80 ... is connected.
An HTTP request has been made and is waiting for a response ... OK
Length: 1820658 (1.7M) [Application/x-gzip]
Saving to: "M4-latest.tar.gz"

100%[======================================>] 1,820,658 40.8kb/s spents 42s

2015-01-28 11:37:57 (42.6 kb/s)-Saved "m4-latest.tar.gz" [1820658/1820658])

Extract
[Email protected] src]# tar zxvf m4-latest.tar.gz-c/usr/local/bin

cd/usr/local/bin/m4-1.4.17

[Email protected] ~]# cd/usr/local/bin/m4-1.4.17
[[email protected] m4-1.4.17]# ls
ACINCLUDE.M4 Build-aux Configure Gnumakefile makefile.am tests
ACLOCAL.M4 c-boxes.el configure.ac INSTALL makefile.in THANKS
AUTHORS cfg.mk COPYING Lib NEWS TODO
BACKLOG ChangeLog Doc M4 README
Bootstrap checks Examples maint.mk src

[Email protected] ~]./configure
[Email protected] ~]make
[[Email protected] ~]make Install

Bison 3.0.4
http://www.gnu.org/software/bison/

http://ftp.gnu.org/gnu/bison/

Download
wget http://ftp.gnu.org/gnu/bison/bison-3.0.4.tar.gz

[Email protected] src]# wget http://ftp.gnu.org/gnu/bison/bison-3.0.4.tar.gz--2015-01-28 11:03:56--/http Ftp.gnu.org/gnu/bison/bison-3.0.4.tar.gz parsing host ftp.gnu.org (ftp.gnu.org) ... 208.118.235.20, 2001:4830:134:3::b is connecting ftp.gnu.org (ftp.gnu.org) |208.118.235.20|:80 ... is connected. An HTTP request has been made and is waiting for a response ... $ OK Length: 3354179 (3.2M) [application/x-gzip] saving to: "Bison-3.0.4.tar.gz" 100%[====================================== ] 3,354,179 41.0kb/s spents 71s2015-01-28 11:05:08 (45.8 kb/s)-Saved "bison-3.0.4.tar.gz" [3354179/3354179])

Extract
Tar zxvf bison-3.0.4.tar.gz-c/usr/local/bin

[Email protected] src]# tar zxvf bison-3.0.4.tar.gz-c/usr/local/bin


[Email protected] src]# cd/usr/local/bin/bison-3.0.4
[[Email protected]ocalhost bison-3.0.4]# ls
About-nls ChangeLog-1998 djgpp lib packaging src
ACLOCAL.M4 ChangeLog-2012 Doc M4 PO Tests
AUTHORS Configure etc maint.mk README THANKS
Build-aux configure.ac examples makefile.am readme-alpha TODO
Cfg.mk COPYING gnumakefile makefile.in readme-release
ChangeLog Data INSTALL NEWS Runtime-po

M4 must be installed here to run
[Email protected] Bison-3.0.4]./configure

[Email protected] Bison-3.0.4]make
[[Email protected] Bison-3.0.4]make Install

Ncurses-devel (RPM installation)
Two URLs found download just one of them.
Http://pkgs.org/download/ncurses-devel
Http://rpmfind.net/linux/rpm2html/search.php?query=ncurses-devel

Download
wget ftp://rpmfind.net/linux/centos/7.0.1406/os/x86_64/Packages/ncurses-devel-5.9-13.20130511.el7.x86_64.rpm

[Email protected] src]# wget ftp://rpmfind.net/linux/centos/7.0.1406/os/x86_64/packages/ncurses-devel-5.9- 13.20130511.el7.x86_64.rpm--2015-01-28 14:28:29--ftp://rpmfind.net/linux/centos/7.0.1406/os/x86_64/Packages/ Ncurses-devel-5.9-13.20130511.el7.x86_64.rpm=> "ncurses-devel-5.9-13.20130511.el7.x86_64.rpm" is parsing the host Rpmfind.net (rpmfind.net) ... 195.220.108.108 connecting Rpmfind.net (rpmfind.net) |195.220.108.108|:21 ... is connected. Logging in anonymous ... Login Successful! ==> Syst ... Complete. ==> PWD ... Complete. ==> TYPE I ... Complete. ==> CWD (1)/linux/centos/7.0.1406/os/x86_64/packages ... Complete. ==> SIZE ncurses-devel-5.9-13.20130511.el7.x86_64.rpm ... 729820==> PASV ... Complete. ==> RETR ncurses-devel-5.9-13.20130511.el7.x86_64.rpm ... Complete. Length: 729820 (713K) (informal data) 100%[======================================>] 729,820 275kb/s spents 2.6s2015-01-28 14:28:36 ( 275 kb/s)-"ncurses-devel-5.9-13.20130511.el7.x86_64.rpm" saved [729820]


Install or upgrade a RPM package
RPM-IVH rpm File "Install"
RPM-UVH rpm File "Update"

[Email protected] src]# RPM-IVH ncurses-devel-5.9-13.20130511.el7.x86_64.rpm in preparation ... ############################### # # [100%] Upgrading/installing ... 1:ncurses-devel-5.9-13.20130511.el7################################# [100%]


Download mysql 5.66.22
[Email protected] src]wget http://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.22.tar.gz
Extract
[Email protected] Src]tar ZXVF mysql-5.6.22.tar.gz-c/usr/local/bin
Go to Catalog
[Email protected] src]# cd/usr/local/bin/mysql-5.6.22
[[email protected] mysql-5.6.22]# ls
BUILD dbug libmysqld Regex unittest
Build-cmake Docs libservices Scripts VERSION
Client Doxyfile-perfschema man SQL vio
CMake Extra Mysql-test Sql-bench win
CMakeLists.txt include Mysys Sql-common zlib
Cmd-line-utils Install-source Mysys_ssl Storage
Config.h.cmake Install-win-source Packaging strings
Configure.cmake libevent Plugin Support-files
COPYING Libmysql README Tests

[Email protected] mysql-5.6.22]# CMake.
--Running CMake version 3.1.1
--MySQL 5.6.22
--Packaging as:mysql-5.6.22-linux-x86_64
--Have_visibility_hidden
--Have_visibility_hidden
--Have_visibility_hidden
--Using CMake version 3.1.1
--Not building NDB
--Library mysqlclient depends on OSLIBS-LPTHREAD;M;DL
--Library MySQLServer depends on OSLIBS-LPTHREAD;M;CRYPT;DL
--Cmake_build_type:relwithdebinfo
--Compile_definitions:have_config_h
--Cmake_c_flags:-wall-wextra-wformat-security-wvla-wwrite-strings-wdeclaration-after-statement
--Cmake_cxx_flags:-wall-wextra-wformat-security-wvla-woverloaded-virtual-wno-unused-parameter
--Cmake_c_flags_relwithdebinfo:-o3-g-fabi-version=2-fno-omit-frame-pointer-fno-strict-aliasing-ddbug_off
--Cmake_cxx_flags_relwithdebinfo:-o3-g-fabi-version=2-fno-omit-frame-pointer-fno-strict-aliasing-ddbug_off
--Configuring done
--Generating done
--Build files has been written to:/usr/local/bin/mysql-5.6.22

[Email protected] Mysql-5.6.22]make
[[Email protected] Mysql-5.6.22]make Install

Default installation path/usr/local/mysql/


[Email protected] mysql-5.6.22]# Cd/usr/local/mysql
[[email protected] mysql]# ls
Bin data include Lib Mysql-test scripts Sql-bench
COPYING docs install-binary man README share Support-files

Copy Mysql.server to startup directory Init.d
[email protected] mysql]# CP Support-files/mysql.server/etc/init.d/mysql
[[email protected] mysql]# chkconfig MySQL on
Start MySQL
[[Email protected] mysql]# service MySQL start
Starting MySQL. error! The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid).

Reference
Http://blog.rekfan.com/articles/186.html

The following is a reference record ~

Error message: Install directory under/usr/local/mysql
[[email protected] mysql]# ls
Bin data include Lib Mysql-test scripts Sql-bench
COPYING docs install-binary man README share Support-files
[[Email protected] mysql]# CD data
[[email protected] data]# ls
Localhost.localdomain.err Test
[Email protected] data]# VI localhost.localdomain.err
150128 17:11:06 Mysqld_safe starting mysqld daemon with databases From/usr/local/mysql/data
2015-01-28 17:11:06 0 [Warning] TIMESTAMP with implicit the DEFAULT value is deprecated. Use--
Explicit_defaults_for_timestamp server option (see documentation for more details).
2015-01-28 17:11:06 6958 [ERROR] Fatal error:can ' t change to run as user ' MySQL '; Check that the user exists!

2015-01-28 17:11:06 6958 [ERROR] Aborting

2015-01-28 17:11:06 6958 [Note] Binlog End
2015-01-28 17:11:06 6958 [Note]/usr/local/mysql/bin/mysqld:shutdown complete

150128 17:11:06 mysqld_safe mysqld from PID File/usr/local/mysql/data/localhost.localdomain.pid ended

Install MySQL

Groupadd MySQL #添加mysql组

useradd-g MySQL mysql-s/bin/false #创建用户mysql并加入到mysql组, does not allow MySQL users to log in directly to the system

Mkdir-p/data/mysql #创建MySQL数据库存放目录

Chown-r Mysql:mysql/data/mysql #设置MySQL数据库存放目录权限

Mkdir-p/usr/local/mysql #创建MySQL安装目录

CD/USR/LOCAL/SRC #进入软件包存放目录

Tar zxvf mysql-5.6.19.tar.gz #解压

CD mysql-5.6.19 #进入目录

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

Make #编译

Make install #安装

RM-RF/ETC/MY.CNF #删除系统默认的配置文件 (if not removed by default)

Cd/usr/local/mysql #进入MySQL安装目录

./scripts/mysql_install_db--user=mysql--basedir=/usr/local/mysql--datadir=/data/mysql #生成mysql系统数据库

Ln-s/usr/local/mysql/my.cnf/etc/my.cnf #添加到/etc directory soft connection

CP./SUPPORT-FILES/MYSQL.SERVER/ETC/RC.D/INIT.D/MYSQLD #把Mysql加入系统启动

chmod 755/etc/init.d/mysqld #增加执行权限

Chkconfig mysqld on #加入开机启动

Vi/etc/rc.d/init.d/mysqld #编辑

Basedir=/usr/local/mysql #MySQL程序安装路径

Datadir=/data/mysql #MySQl数据库存放目录

Service mysqld Start #启动

Vi/etc/profile #把mysql服务加入系统环境变量: Add the following line at the end

Export path= $PATH:/usr/local/mysql/bin

Source/etc/profile

The following two lines link the MYSLQ library file to the default location of the system, so you can compile software like PHP without specifying the MySQL library file address.

Ln-s/usr/local/mysql/lib/mysql/usr/lib/mysql

Ln-s/usr/local/mysql/include/mysql/usr/include/mysql

Mkdir/var/lib/mysql #创建目录

Ln-s/tmp/mysql.sock/var/lib/mysql/mysql.sock #添加软链接

Mysql_secure_installation #设置Mysql密码, press Y to enter the password 2 times according to the prompt

/etc/my.cnf

[Mysqld]
Datadir=/var/lib/mysql
Socket=/var/lib/mysql/mysql.sock
# Disabling Symbolic-links is recommended to prevent assorted security risks
Symbolic-links=0
# Settings user and group was ignored when Systemd was used.
# If you need to run mysqld under a different user or group,
# Customize your systemd unit file for mariadb according to the
# instructions in HTTP://FEDORAPROJECT.ORG/WIKI/SYSTEMD

[Mysqld_safe]
Log-error=/var/log/mariadb/mariadb.log
Pid-file=/var/run/mariadb/mariadb.pid

#
# include all files from the Config directory
#
!includedir/etc/my.cnf.d

CMake. \
-dcmake_install_prefix =/usr/local/mysql \
-dmysql_datadir=/usr/local/mysql/data \
-DSYSCONFDIR=/ETC \
-dwith_myisam_storage_engine=1 \
-dwith_innobase_storage_engine=1 \
-dwith_memory_storage_engine=1 \
-dwith_readline=1 \
-dmysql_nuix_addr=/var/lib/mysql.sock \
-dmysql_tcp_port=3306 \
-denabled_local_infile=1 \
-dwith_partition_storage_engine=1 \
-dextra_charsets=all \
-ddefault_charset=utf8 \
-ddefault_collation=utf8_general_ci

CMake error:the Source Directory "/usr/local/bin/mysql-5.6.22/=/usr/etc" does not exist.
Specify--HELP for usage, or press the Help button on the CMake GUI.

Write the confusion has not finished finishing the main error is the novice to play this good pressure ~

CentOS 7.0 compilation installation MySQL 5.6.22 process not completed ~ ~ Continuous

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.