«   2021/05   »
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
05-08 07:43
Notice
Today
9
Total
1,423,023
관리 메뉴

변군이글루

[APM] apm 설치(mysql, apache, php, zend) 본문

* 리눅스

[APM] apm 설치(mysql, apache, php, zend)

변군 변군이글루 2013. 6. 17. 23:09

[APM] apm 설치(mysql, apache, php, zend)

1. 필수 라이브러리 설치
[root@byungun mysql-5.1.49]# yum -y install gd gd-devel libpng libpng-devel libjpeg libjpeg-devel freetype freetype-devel fontconfig  fontconfig-devel libxml2 libxml2-devel openssl openssl-devel gmp gmp-devel mhash mhash-devel libmcrypt libmcrypt-devel

2. MySQL 설치
[root@byungun mysql-5.1.49]# useradd -m -c "MySQL Server" -d /usr/local/mysql -s /bin/false -u 27 mysql
[root@byungun mysql-5.1.49]# ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --with-charset=euckr --with-extra-charsets=all

---------------------------------------------------------
config.status: executing libtool commands
/bin/rm: cannot remove `libtoolT': No such file or directory
config.status: executing default commands
---------------------------------------------------------

[root@byungun mysql-5.1.49]# yum -y install termcap libtermcap libtermcap-devel
[root@byungun mysql-5.1.49]# yum -y install libtool
[root@byungun mysql-5.1.49]# yum install ncurses-devel
[root@byungun mysql-5.1.49]# yum -y install libtool-ltdl

[root@byungun mysql-5.1.49]# autoreconf --force --install
Using `AC_PROG_RANLIB' is rendered obsolete by `AC_PROG_LIBTOOL'
client/Makefile.am: installing `./compile'
[root@byungun mysql-5.1.49]# aclocal
[root@byungun mysql-5.1.49]# libtoolize --automake --force
[root@byungun mysql-5.1.49]# automake --force --add-missing

---------------------------------------------------------
config.status: executing default commands

Thank you for choosing MySQL!

Remember to check the platform specific part of the reference manual
for hints about installing MySQL on your platform.
Also have a look at the files in the Docs directory.

---------------------------------------------------------

[root@byungun mysql-5.1.49]# yum -y install make
[root@byungun mysql-5.1.49]# make
[root@byungun mysql-5.1.49]# make install
[root@byungun mysql-5.1.49]# cp /usr/local/mysql/share/mysql/my-huge.cnf /etc/my.cnf
[root@byungun mysql-5.1.49]# /usr/local/mysql/bin/mysql_install_db
[root@byungun mysql-5.1.49]# cd /usr/local/mysql
[root@byungun mysql]# chown mysql.mysql data -R
[root@byungun mysql]# ls -al
drwx------  4 mysql mysql 4096  8월  4 02:00 data
[root@byungun mysql]# /usr/local/mysql/bin/mysqld_safe &
[1] 15654
[root@byungun mysql]# 100804 02:02:46 mysqld_safe Logging to '/usr/local/mysql/data/byungun.err'.
100804 02:02:46 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
[root@byungun mysql]# ps -ef | grep mysql
root     15654  2470  0 02:02 pts/0    00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe
mysql    15753 15654  0 02:02 pts/0    00:00:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --log-error=/usr/local/mysql/data/byungun.err --pid-file=/usr/local/mysql/data/byungun.pid --socket=/tmp/mysql.sock --port=3306
root     15757  2470  0 02:03 pts/0    00:00:00 grep mysql
[root@byungun mysql]# ln -s /usr/local/mysql/bin/mysql /usr/bin/
[root@byungun mysql]# /usr/local/mysql/bin/mysqladmin -u root password "비밀번호"
[root@byungun mysql]# mysql -u root -p mysql
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.49-log Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

3. Apache 설치
[root@byungun httpd-2.2.11]# useradd -c "Apache" -u 48 -s /sbin/nologin apache
[root@byungun httpd-2.2.11]# vi server/mpm/prefork/prefork.c
[root@byungun httpd-2.2.11]# vi server/mpm/worker/worker.c
[root@byungun httpd-2.2.11]# ./configure --prefix=/usr/local/apache2 --enable-so --enable-rewrite --enable-ssl --enable-proxy --enable-modules=all
[root@byungun httpd-2.2.11]# make
[root@byungun httpd-2.2.11]# make install
[root@byungun httpd-2.2.11]# /usr/local/apache2/bin/apachectl start
httpd: Could not reliably determine the server's fully qualified domain name, using 210.103.175.41

for ServerName
[root@byungun httpd-2.2.11]# ps -ef | grep httpd
root     18403     1  0 02:23 ?        00:00:00 /usr/local/apache2/bin/httpd -k start
daemon   18404 18403  0 02:23 ?        00:00:00 /usr/local/apache2/bin/httpd -k start
daemon   18405 18403  0 02:23 ?        00:00:00 /usr/local/apache2/bin/httpd -k start
daemon   18406 18403  0 02:23 ?        00:00:00 /usr/local/apache2/bin/httpd -k start
daemon   18407 18403  0 02:23 ?        00:00:00 /usr/local/apache2/bin/httpd -k start
daemon   18408 18403  0 02:23 ?        00:00:00 /usr/local/apache2/bin/httpd -k start
root     18412  2470  0 02:23 pts/0    00:00:00 grep httpd
[root@byungun httpd-2.2.11]# /usr/local/apache2/bin/apachectl -l
Compiled in modules:
  core.c
  mod_authn_file.c
  mod_authn_dbm.c
  mod_authn_anon.c
  mod_authn_dbd.c
  mod_authn_default.c
  mod_authz_host.c
  mod_authz_groupfile.c
  mod_authz_user.c
  mod_authz_dbm.c
  mod_authz_owner.c
  mod_authz_default.c
  mod_auth_basic.c
  mod_auth_digest.c
  mod_dbd.c
  mod_dumpio.c
  mod_ext_filter.c
  mod_include.c
  mod_filter.c
  mod_substitute.c
  mod_deflate.c
  mod_log_config.c
  mod_log_forensic.c
  mod_logio.c
  mod_env.c
  mod_mime_magic.c
  mod_cern_meta.c
  mod_expires.c
  mod_headers.c
  mod_ident.c
  mod_usertrack.c
  mod_unique_id.c
  mod_setenvif.c
  mod_version.c
  mod_proxy.c
  mod_proxy_connect.c
  mod_proxy_ftp.c
  mod_proxy_http.c
  mod_proxy_ajp.c
  mod_proxy_balancer.c
  mod_ssl.c
  prefork.c
  http_core.c
  mod_mime.c
  mod_dav.c
  mod_status.c
  mod_autoindex.c
  mod_asis.c
  mod_info.c
  mod_cgi.c
  mod_dav_fs.c
  mod_vhost_alias.c
  mod_negotiation.c
  mod_dir.c
  mod_imagemap.c
  mod_actions.c
  mod_speling.c
  mod_userdir.c
  mod_alias.c
  mod_rewrite.c
  mod_so.c
[root@byungun httpd-2.2.11]# ls /usr/local/apache2/modules/
httpd.exp

4. PHP 설치
------------------------------------------------------------------------------
checking if we should use cURL for url streams... no
checking for cURL in default path... not found
configure: error: Please reinstall the libcurl distribution -
    easy.h should be in <curl-dir>/include/curl/
------------------------------------------------------------------------------

[root@byungun php-5.2.8]# yum -y install curl-devel

------------------------------------------------------------------------------
checking for QDBM support... no
configure: error: DBA: Could not find necessary header file(s).
------------------------------------------------------------------------------

[root@byungun php-5.2.8]# yum -y install gdbm-devel

[root@byungun php-5.2.5]# ./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache2/bin/apxs --enable-sysvshm=yes --enable-sysvsem=yes --enable-debug=no --with-ttf --with-png-dir=/usr --with-zlib-dir --with-jpeg-dir=/usr --with-gdbm=/usr --enable-ftp --enable-mbstring --enable-sockets --enable-wddx --with-freetype-dir=/usr --enable-bcmath --with-curl --with-mcrypt --enable-mbregex --enable-exif --with-gd --enable-gd-native-ttf --enable-calendar --with-openssl --with-libxml-dir

------------------------------------------------------------------------------
z -lm -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt  -o libphp5.la
/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status
make: *** [libphp5.la] 오류 1
------------------------------------------------------------------------------
[root@byungun php-5.2.5]# yum install libtool-ltdl-devel

[root@byungun php-5.2.5]# make
[root@byungun php-5.2.5]# make install
[root@byungun php-5.2.8]# cp /usr/local/src/php-5.2.8/php.ini-dist /usr/local/php/lib/php.ini
[root@byungun php-5.2.8]# ls -al /usr/local/php/lib/php.ini
-rw-r--r-- 1 root root 45106  8월  4 09:06 /usr/local/php/lib/php.ini

httpd.conf 파일 설정
- 자동 추가
# Example:
# LoadModule foo_module modules/mod_foo.so
LoadModule php5_module        modules/libphp5.so
#

- 수동 추가
AddType application/x-httpd-php .ph .php .php3 .inc .asp .html
AddType application/x-httpd-php-source .phps

# AddHandler allows you to map certain file extensions to "handlers":


<IfModule dir_module>
    DirectoryIndex index.html index.htm index.php
</IfModule>

5. Zend 설치
[root@byungun ZendOptimizer-3.3.3-linux-glibc23-i386]# sh install.sh

 

/usr/local/php/lib/ 입력

6. 설치 패키지 버전 확인
[root@byungun ~]# /usr/local/mysql/bin/mysqladmin --version
/usr/local/mysql/bin/mysqladmin  Ver 8.42 Distrib 5.1.49, for pc-linux-gnu on i686
[root@byungun ~]# /usr/local/apache2/bin/apachectl -v
Server version: Apache/2.2.11 (Unix)
Server built:   Aug  4 2010 02:22:04
[root@byungun ~]# /usr/local/php/bin/php -v
PHP 5.2.8 (cli) (built: Aug  4 2010 09:04:17)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
    with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
    with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies
[root@byungun ~]#

2 Comments
  • 프로필사진 Favicon of https://sangchul.kr 변군 변군이글루 2013.06.17 23:10 신고 -- MySQL 용도별 카피
    my-small.cnf : 64M
    my-medium.cnf 128-256M
    my-large.cnf 512M
    my-huge.cnf 1~2G
  • 프로필사진 Favicon of https://sangchul.kr 변군 변군이글루 2013.06.17 23:10 신고 ./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache2/bin/apxs --with-gdbm --with-ttf --with-png-dir=/usr --with-zlib --with-jpeg-dir=/usr/lib --with-freetype-dir=/usr --with-iconv --with-curl --with-mcrypt --with-gd --with-openssl --with-libxml-dir --with-xpm-dir --with-mm --enable-xml --enable-bcmath --with-gettext --with-mhash --enable-sysvshm=yes --enable-sysvsem=yes --enable-magic-quotes --enable-debug=no --enable-inline-optimization --enable-mbregex --enable-exif --enable-gd-native-ttf --enable-calendar --enable-ftp --enable-mbstring --enable-sockets --enable-wddx
댓글쓰기 폼