mysql server 소스설치하기

ITWeb/서버관리 2011. 9. 7. 13:40

# XEN VM 설치 시 adsec 으로 설치를 했다면..

my-small.cnf 를 my.cnf 로 복사

./mysql_install_db --user=계정 (일반적으로는 mysql 계정임)

/var/log/mysqld.log 권한 변경, /var/run/mysqld 권한 변경 (계정을 변경했을 경우)

 

# 다운로드

    http://www.mysql.com/downloads/mysql/

 

# 압축풀기

    tar -xvzf mysql-5.1.56.tar.gz

 

# configure & make

    cd mysql-5.1.56

    ./configure --prefix=/home/계정/db/mysql --localstatedir=/home/계정/db/mysql/var --sysconfdir=/home/계정/db/mysql/etc --datadir=/home/계정/db/mysql/share --with-charset=utf8 --with-mysqld-user=계정 --enable-thread-safe-client --enable-shared --enable-profiling --enable-local-infile --with-plugins=innobase,myisam,csv,partition --enable-largefile --with-pic  --with-big-tables --with-extra-charsets=all

# 에러발생

checking for termcap functions library... configure: error: No curses/termcap library found

    이와 같은 에러 발생 시 아래 SW 설치 필요

# root 로 설치

    yum -y install ncurses-devel

# 계정 설치

    make

    make install

 

# my.cnf 생성

    cd /home/계정/db/mysql

    mkdir etc

    cp ./share/mysql/my-huge.cnf ./etc/my.cnf

 

# DB 생성

    cd /home/계정/db/mysql/bin

    ./mysql_install_db

# mysql_install_db 실행 시 오류 발생

    5.1 버전 부터는 with-plugins 옵션이 추가 되어서 inndb 와 myisam 에 대한 지정이 필요하다.

    --with-plugins=innobase,myisam

 

# MySQL start/stop

MySQL Start, Stop 명령

-       Start : mysql/bin/mysqld_safe &

-       Stop : mysql/bin/mysqladmin --user=userid --password=pwd shutdown
(root
권한을 가진 user계정으로 실행)


Fine tuning of the installation directories:
  --bindir=DIR            user executables [EPREFIX/bin]
  --sbindir=DIR           system admin executables [EPREFIX/sbin]
  --libexecdir=DIR        program executables [EPREFIX/libexec]
  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
  --libdir=DIR            object code libraries [EPREFIX/lib]
  --includedir=DIR        C header files [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
  --infodir=DIR           info documentation [DATAROOTDIR/info]
  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR            man documentation [DATAROOTDIR/man]
  --docdir=DIR            documentation root [DATAROOTDIR/doc/mysql]
  --htmldir=DIR           html documentation [DOCDIR]
  --dvidir=DIR            dvi documentation [DOCDIR]
  --pdfdir=DIR            pdf documentation [DOCDIR]
  --psdir=DIR             ps documentation [DOCDIR]

Program names:
  --program-prefix=PREFIX            prepend PREFIX to installed program names
  --program-suffix=SUFFIX            append SUFFIX to installed program names
  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names

System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
  --target=TARGET   configure for building compilers for TARGET [HOST]

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-shared[=PKGS]  build shared libraries [default=yes]
  --enable-static[=PKGS]  build static libraries [default=yes]
  --enable-fast-install[=PKGS]
                          optimize for fast installation [default=yes]
  --disable-dependency-tracking  speeds up one-time build
  --enable-dependency-tracking   do not reject slow dependency extractors
  --disable-libtool-lock  avoid locking (might break parallel builds)
  --enable-mysql-maintainer-mode
                          Enable a MySQL maintainer-specific development
                          environment
  --disable-community-features
                          Disable additional features provided by the user
                          community.
  --disable-thread-safe-client
                          Compile the client without threads.
  --enable-assembler      Use assembler versions of some string
                          functions if available.
  --enable-profiling      Build a version with query profiling code (req.
                          community-features)
  --enable-local-infile   Enable LOAD DATA LOCAL INFILE (default: disabled)
  --disable-grant-options Disables the use of --init-file, --skip-grant-tables and --bootstrap options
  --disable-largefile     Omit support for large files
  --enable-debug-sync     Build a version with Debug Sync Facility

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-pic              try to use only PIC/non-PIC objects [default=use
                          both]
  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
  --with-charset=CHARSET
                          Default character set, use one of:
                          binary
                          armscii8 ascii big5 cp1250 cp1251 cp1256 cp1257
                          cp850 cp852 cp866 cp932 dec8 eucjpms euckr gb2312 gbk geostd8
                          greek hebrew hp8 keybcs2 koi8r koi8u
                          latin1 latin2 latin5 latin7 macce macroman
                          sjis swe7 tis620 ucs2 ujis utf8
  --with-collation=COLLATION
                          Default collation
  --with-extra-charsets=CHARSET,CHARSET,...
                          Use charsets in addition to default (none, complex,
                          all, or a list selected from the above sets)
  --without-uca           Skip building of the national Unicode collations.

  --with-debug[=full]     Enable various amounts of debugging support (full
                          adds a slow memory checker).
  --with-system-type      Set the system type, like "sun-solaris10"
  --with-machine-type     Set the machine type, like "powerpc"
  --with-darwin-mwcc      Use Metrowerks CodeWarrior wrappers on OS X/Darwin
  --with-other-libc=DIR   Link against libc and other standard libraries
                          installed in the specified non-standard location
                          overriding default. Originally added to be able to
                          link against glibc 2.2 without making the user
                          upgrade the standard libc installation.
  --with-server-suffix    Append value to the version string.
  --with-pthread          Force use of pthread library.
  --with-named-thread-libs=ARG
                          Use specified thread libraries instead of
                          those automatically found by configure.
  --with-named-curses-libs=ARG
                          Use specified curses libraries instead of
                          those automatically found by configure.
  --with-unix-socket-path=SOCKET
                          Where to put the unix-domain socket.  SOCKET must be
                          an absolute file name.
  --with-tcp-port=port-number
                          Which port to use for MySQL services (default 3306)
  --with-mysqld-user=username
                          What user the mysqld daemon shall be run as.
  --with-zlib-dir=no|bundled|DIR
                          Provide MySQL with a custom location of compression
                          library. Given DIR, zlib binary is assumed to be in
                          $DIR/lib and header files in $DIR/include.
  --with-libwrap=DIR      Compile in libwrap (tcp_wrappers) support
  --with-valgrind         Valgrind instrumentation [default=no]
  --with-error-inject     Enable error injection in MySQL Server
  --with-fast-mutexes     Compile with fast mutexes (default is disabled)
  --with-atomic-ops=rwlocks|smp|up
                          Implement atomic operations using pthread rwlocks or
                          atomic CPU instructions for multi-processor
                          (default) or uniprocessor configuration
  --with-mysqld-ldflags   Extra linking arguments for mysqld
  --with-client-ldflags   Extra linking arguments for clients
  --with-mysqld-libs   Extra libraries to link with for mysqld
  --with-lib-ccflags      Extra CC options for libraries
  --with-low-memory       Try to use less memory to compile to avoid
                          memory limitations.
  --with-comment          Comment about compilation environment.
  --with-big-tables       Support tables with more than 4 G rows even on 32
                          bit platforms
  --with-max-indexes=N    Sets the maximum number of indexes per table,
                          default 64
  --with-ssl=DIR    Include SSL support
  --with-plugins=PLUGIN[[[,PLUGIN..]]]
                          Plugins to include in mysqld. (default is: none)
                          Must be a configuration name or a comma separated
                          list of plugins.
                          Available configurations are: none max max-no-ndb
                          all.
                          Available plugins are: partition daemon_example
                          ftexample archive blackhole csv example federated
                          heap innobase innodb_plugin myisam myisammrg
                          ndbcluster.
  --without-plugin-PLUGIN Disable the named plugin from being built.
                          Otherwise, for plugins which are not selected for
                          inclusion in mysqld will be built dynamically (if
                          supported)
  --with-plugin-PLUGIN    Forces the named plugin to be linked into mysqld
                          statically.
  --with-ndb-sci=DIR      Provide MySQL with a custom location of sci library.
                          Given DIR, sci library is assumed to be in $DIR/lib
                          and header files in $DIR/include.

  --with-ndb-test       Include the NDB Cluster ndbapi test programs

  --with-ndb-docs       Include the NDB Cluster ndbapi and mgmapi documentation

  --with-ndb-port       Port for NDB Cluster management server

  --with-ndb-port-base  Base port for NDB Cluster transporters

  --without-ndb-debug   Disable special ndb debug features
  --with-ndb-ccflags=CFLAGS
                          Extra CFLAGS for ndb compile

  --without-ndb-binlog       Disable ndb binlog
  --without-server        Only build the client.
  --with-embedded-server  Build the embedded server (libmysqld).
  --without-query-cache   Do not build query cache.
  --without-geometry      Do not build geometry-related parts.
  --with-embedded-privilege-control
                          Build parts to check user's privileges.
                          Only affects embedded library.
  --with-mysqlmanager     Build the mysqlmanager binary: yes/no (default:
                          build if server is built.)
  --without-docs          Skip building of the documentation.
  --without-man          Skip building of the man pages.
  --without-readline      Use system readline instead of bundled copy.
  --without-libedit       Use system libedit instead of bundled copy.

:

qdbm & gdbm 소스설치하기.

ITWeb/서버관리 2011. 9. 7. 13:37

# 다운로드

    http://www.filewatcher.com/m/qdbm-1.8.77.tgz.599617.0.0.html


# 압축풀기

    tar -xvzf qdbm-1.8.77.tar.gz

 

# configure & make

    cd qdbm-1.8.77

    ./configure --prefix=/home/계정/app/qdbm

    make

    make install

# 다운로드

    http://mirror.yongbok.net/gnu/gdbm/


# 압축풀기

    tar -xvzf gdbm-1.8.3.tar.gz

 

# configure & make

    cd gdbm-1.8.3

    ./configure --prefix=/home/계정/app/gdbm

    make

    make install 

:

freetype 소스설치하기

ITWeb/서버관리 2011. 9. 7. 13:37

# 다운로드

    http://sourceforge.net/projects/freetype/files/

 

# 압축풀기

    tar -xvzf freetype-2.4.3.tar.gz

 

# configure & make

    cd freetype-2.4.3

    ./configure --prefix=/home/계정/app/freetype

    make

    make install

:

mhach 소스설치.

ITWeb/서버관리 2011. 9. 7. 13:36

# 다운로드

    http://sourceforge.net/projects/mhash/files/


# 압축풀기

    tar -xvzf mhash-0.9.9.tar.gz

 

# configure & make

    cd mhash-0.9.9

    ./configure --prefix=/home/계정/app/mhash

    make

    make install

:

libmcrypt 소스설치.

ITWeb/서버관리 2011. 9. 7. 13:35

# 다운로드

    http://sourceforge.net/projects/mcrypt/files/

 

# 압축풀기

    tar -xvzf libmcrypt-2.5.8.tar.gz

 

# configure & make

    cd libmcrypt-2.5.8

    ./configure --prefix=/home/계정/app/libmcrypt

    make

    make install

: