Database learning-Linux Mysql source package installation system environment: Operating System: RedHatEL6DBSoft: Mysql5.6.4-m7Mysql in linux There are two installation methods, one is Binary (Binary ), in addition
Database learning-Linux Mysql source package installation system environment: Operating System: RedHatEL6DBSoft: Mysql5.6.4-m7Mysql in linux There are two installation methods, one is Binary (Binary ), in addition
There are two installation methods for Mysql in linux: Binary (Binary) and Source (Source package). This article uses the Source Install method.
1. Preparations before installation
Decompress the installation package
[Oracle @ ogg ~] $ Ls
Mysql-5.6.4-m7 mysql-5.6.4-m7.tar.gz mysql-5.6.4-m7.tar.zip ogg oradiag_oracle Readme --? + ?. Htm
[Oracle @ ogg ~] $ Mysql-5.6.4-m7 cd
[Oracle @ ogg mysql-5.6.4-m7] $ lsBUILD CMakeLists.txt COPYING extra libmysql mysql-test README SQL-plugin support-files vibuild-CMAKE cmd-line-utils dbug include libmysqld mysys regex SQL-common tests winclient config. h. cmake Docs INSTALL-SOURCE libservices packaging scripts storage unittest zlibcmake configure. cmake Doxyfile-perfschema INSTALL-WIN-SOURCE man plugin SQL strings VERSION
[Oracle @ ogg mysql-5.6.4-m7] $ tar zxvf mysql-5.6.4-m7.tar.gz
Mysql-5.6.4-m7/mysql-test/lib/My/SafeProcess/mysql-5.6.4-m7/mysql-test/lib/My/SafeProcess/safe_process.ccmysql-5.6.4-m7/mysql-test/lib/My/SafeProcess/safe_kill_win.ccmysql-5.6.4-m7/mysql- test/lib/ME/SafeProcess/safe_process_win.ccmysql-5.6.4-m7/mysql-test/lib/My/SafeProcess/Base. pmmysql-5.6.4-m7/mysql-test/lib/My/SafeProcess/CMakeLists.txt ......
View the official installation documentation: INSTALL-SOURCE
To install and use a MySQL binary distribution, the basic command
Sequence looks like this:
Shell> groupadd mysqlshell> useradd-r-g mysql mysqlshell> cd/usr/localshell> tar zxvf/path/to/mysql-VERSION-OS.tar.gzshell> ln-s full-path-to-mysql-VERSION -OS mysqlshell> cd mysqlshell> chown-R mysql. shell> chgrp-R mysql. shell> scripts/mysql_install_db -- user = mysqlshell> chown-R root. shell & gt; chown-R mysql data # Next command is optionalshell & gt; 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
For example, with a compressed tar file source distribution on Unix, the basic installation command
Sequence looks like this:
# Preconfiguration setupshell> groupadd mysqlshell> useradd-r-g 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 & gt; chown-R mysql data # Next command is optionalshell & gt; 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
2. Prepare the tools and library files required for source code installation (RedHat installation CD)
[Root @ ogg ~] # Rpm-qa | grep makeautomake-1.11.1-1.2.el6.noarchmake-3.81-19.el6.i686 [root @ ogg ~] # Rpm-qa | grep bisonbison-2.4.1-5.el6.i686 [root @ ogg ~] # Rpm-qa | grep gccgcc-c ++-4.4.4-13. el6.i686libgcc-4.4.4-13. el6.i686gcc-4.4.4-13. el6.i686gcc-gfortran-4.4.4-13.el6.i686compat-libgcc-296-2.96-144.el6.i686 [root @ ogg ~] # Rpm-qa | grep cmake [root @ ogg ~] # Rpm-qa | grep ncurncurses-base-5.7-3.20090208.el6.i686ncurses-libs-5.7-3.20090208.el6.i686ncurses-5.7-3.20090208.el6.i686ncurses-devel-5.7-3.20090208.el6.i686 Mount RedHat installation disc [root @ ogg ~] # Mount/dev/cdrom/media/mount: block device/dev/sr0 is write-protected, mounting read-only [root @ ogg ~] # Cd/media/[root @ ogg media] # cd Server/[root @ ogg Server] # lsPackages repodata TRANS. TBL [root @ ogg Server] # cd Packages/[root @ ogg Packages] # ls | grep makeautomake-1.11.1-1.2.el6.noarch.rpmcmake-2.6.4-5.el6.i686.rpmimake-1.0.2-11.el6.i686.rpmmake-3.81-19.el6.i686.rpmmakebootfat-1.4-10.el6.i686.rpmpacemaker-1.1.2-7.el6.i686.rpmpacemaker-libs-1.1.2-7.el6.i686.rpm installation cmake [root @ ogg Packages] # rpm-ivh/media/Server/Packages /cmake-2.6.4-5.el6.i686.rpmwarning: /media/Server/Packages/cmake-2.6.4-5.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEYPreparing... ######################################## ### [100%] 1: cmake ####################################### #### [100%] [root @ ogg Packages] #
3. Install the source code to check the compiling environment