2. DBMS이야기/02. MySQL

Installing MySQL on Unix/Linux Using Generic Binaries

OSSW(Open Source System SoftWare 2014. 6. 14. 18:50

Chapter 1 Installing MySQL on Unix/Linux Using Generic Binaries

오라클의 MySQL 바이너리 배포판을 제공합니다. 이러한 바이너리로 압축된 tar 파일의 형태로 배포되는 다수의 플랫폼 (tar.gz 등의 확장자를 가진 파일)뿐만 아니라, 선택한 플랫폼에 대한 플랫폼 별 패키지 형식의 바이너리 가 있습니다.


이 절에서는 압축 된 tar 파일 바이너리 배포판에서의 MySQL의 설치를 다루고 있습니다. 다른 플랫폼 특정 패키지 형식의 경우, 다른 플랫폼 별 섹션을 참조하십시오. 예를 들어, Windows 분포에서는, 마이크로 소프트 윈도우에서 Installing을 보십시오.


MySQL의를 구하려면, MySQL의를 얻는 방법을 참조하십시오. 


MySQL의 압축 된 tar 파일 바이너리 배포판의 이름 형태는 mysql-VERSION-OS.tar.gz입니다.VERSION은 (예를 들어, 5.6.20) 숫자이며, OS는 (pc-linux-i686이나 winx64와 같은) 운영 체제의 유형을 나타냅니다. 


압축 된 tar 파일 바이너리 배포판에서 MySQL을 설치하려면 시스템이 GNU의 gunzip으로 분산압축을 풀고, 적당한 tar로 압축을 풀어야 합니다. 당신의 타르 프로그램이 z 옵션을 지원하는 경우는 압축을 풀고 파일을 압축 해제 할 수 있습니다. 


GNU 타르는 작동하는 것으로 알려져 있습니다. 일부 운영 체제와 함께 제공되는 표준 타르는 MySQL의 분포에서 긴 파일 이름을 압축 해제 할 수 없습니다. 당신은 GNU 타르를 다운로드 및 설치하거나, 가능한 경우, GNU 타르의 사전 설치된 버전을 사용해야합니다. 보통은 gnutar, gtar, tar와 같은 GNU를 사용할 수 있거나, Free Software디렉토리인 /usr/sfw/bin이나 /usr/local/bin을 사용할 수 있습니다. GNU 타르는 http://www.gnu.org/software/tar/에서 사용할 수 있습니다.


경고 

이전 운영 체제 기본 패키지 관리 시스템인 yum이나 apt-get을 사용하여 MySQL을 설치 한 경우, 당신은 네이티브 바이너리를 사용하여 설치하는 데 문제가 발생할 수 있습니다. 이전 MySQL의 이전 설치를 (패키지 관리 시스템을 사용하여) 완전히 제거하고 데이터 파일의 이전 버전과 같은 추가 파일이 제거되어 있는지 확인합니다. 또한 / etc / my.cnf 또는  etc / MySQL의 디렉토리 같은 구성 파일이 삭제되었는지 확인해야합니다.


당신이 문제를 겪고 버그 리포트를 제출해야하는 경우, 버그 또는 문제를보고하는 방법에 대한 지침을 사용하십시오. 


유닉스에서 압축 된 tar 파일 바이너리 배포판을 설치하는 경우는 설치 위치 (일반적으로 / usr / local / mysql)에 압축을 푼다. 이 다음 표에 표시된 디렉토리를 생성합니다.



Table 1.1 MySQL Installation Layout for Generic Unix/Linux Binary Package

DirectoryContents of Directory
binClient programs and the mysqld server
dataLog files, databases
docsManual in Info format
manUnix manual pages
includeInclude (header) files
libLibraries
scriptsmysql_install_db
shareMiscellaneous support files, including error messages, sample configuration files, SQL for database installation
sql-benchBenchmarks

 mysqld 바이너리의 디버그 버전은 mysqld-debug로 사용할 수 있습니다. 소스 배포판에서 MySQL의 자신의 디버그 버전을 컴파일하려면, 디버깅 지원을 사용하려면 해당 구성 옵션을 사용합니다. 소스에서 컴파일에 대한 자세한 내용은 MySQL을 소스 설치를 참조하십시오. 


MySQL의 바이너리 배포판을 설치하고 사용하려면, 기본 명령 순서는 다음과 같습니다 :

shell> groupadd mysql
shell> useradd -r -g mysql mysql
shell> cd /usr/local
shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
shell> bin/mysqld_safe --user=mysql &
# Next command is optional
shell> cp support-files/mysql.server /etc/init.d/mysql.server


mysql_install_db는 기본 설치 디렉토리에있는 my.cnf라는 기본 옵션 파일을 작성합니다. 이 파일은 my - default.cnf라는 배포 패키지에 포함 된 템플릿에서 생성됩니다. 자세한 내용은 샘플의 기본 서버 구성 파일 사용을 참조하십시오. 


바이너리 배포판을 설치하기위한 선행 기술에 대한 보다 자세한 버전은 다음과 같습니다.


주의 

이 절차는 시스템에 루트 (관리자) 권한이 있다고 가정합니다. 또는, 당신은 sudo(리눅스) 또는 pfexec (오픈 솔라리스) 명령을 사용하여 각 명령을 미리 픽스할 수 있습니다. 


절차는 MySQL의 계정에 대한 암호를 설정하지 않습니다. 절차를 수행 한 후, 초기 MySQL의 계정에 toSecuring 진행합니다.





BY lee ji eun

http://dev.mysql.com/doc/mysql-startstop-excerpt/5.6/en/binary-installation.html


Chapter 1 Installing MySQL on Unix/Linux Using Generic Binaries

Oracle provides a set of binary distributions of MySQL. These include binary distributions in the form of compressed tar files (files with a .tar.gz extension) for a number of platforms, as well as binaries in platform-specific package formats for selected platforms.

This section covers the installation of MySQL from a compressed tar file binary distribution. For other platform-specific package formats, see the other platform-specific sections. For example, for Windows distributions, seeInstalling MySQL on Microsoft Windows.

To obtain MySQL, see How to Get MySQL.

MySQL compressed tar file binary distributions have names of the form mysql-VERSION-OS.tar.gz, whereVERSION is a number (for example, 5.6.20), and OS indicates the type of operating system for which the distribution is intended (for example, pc-linux-i686 or winx64).

To install MySQL from a compressed tar file binary distribution, your system must have GNU gunzip to uncompress the distribution and a reasonable tar to unpack it. If your tar program supports the z option, it can both uncompress and unpack the file.

GNU tar is known to work. The standard tar provided with some operating systems is not able to unpack the long file names in the MySQL distribution. You should download and install GNU tar, or if available, use a preinstalled version of GNU tar. Usually this is available as gnutargtar, or as tar within a GNU or Free Software directory, such as /usr/sfw/bin or /usr/local/bin. GNU tar is available from http://www.gnu.org/software/tar/.

Warning

If you have previously installed MySQL using your operating system native package management system, such asyum or apt-get, you may experience problems installing using a native binary. Make sure your previous MySQL previous installation has been removed entirely (using your package management system), and that any additional files, such as old versions of your data files, have also been removed. You should also check the existence of configuration files such as /etc/my.cnf or the /etc/mysql directory have been deleted.

If you run into problems and need to file a bug report, please use the instructions in How to Report Bugs or Problems.

On Unix, to install a compressed tar file binary distribution, unpack it at the installation location you choose (typically /usr/local/mysql). This creates the directories shown in the following table.

Table 1.1 MySQL Installation Layout for Generic Unix/Linux Binary Package

DirectoryContents of Directory
binClient programs and the mysqld server
dataLog files, databases
docsManual in Info format
manUnix manual pages
includeInclude (header) files
libLibraries
scriptsmysql_install_db
shareMiscellaneous support files, including error messages, sample configuration files, SQL for database installation
sql-benchBenchmarks

Debug versions of the mysqld binary are available as mysqld-debug. To compile your own debug version of MySQL from a source distribution, use the appropriate configuration options to enable debugging support. For more information on compiling from source, see Installing MySQL from Source.

To install and use a MySQL binary distribution, the basic command sequence looks like this:

shell> groupadd mysql
shell> useradd -r -g mysql mysql
shell> cd /usr/local
shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
shell> bin/mysqld_safe --user=mysql &
# Next command is optional
shell> cp support-files/mysql.server /etc/init.d/mysql.server

mysql_install_db creates a default option file named my.cnf in the base installation directory. This file is created from a template included in the distribution package named my-default.cnf. For more information, see Using a Sample Default Server Configuration File.

A more detailed version of the preceding description for installing a binary distribution follows.

Note

This procedure assumes that you have root (administrator) access to your system. Alternatively, you can prefix each command using the sudo (Linux) or pfexec (OpenSolaris) command.

The procedure does not set up any passwords for MySQL accounts. After following the procedure, proceed toSecuring the Initial MySQL Accounts.