[root@server bin]# ./apachectl start
httpd: Syntax error on line 99 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/modules/libphp5.so into server: /usr/local/apache/modules/libphp5.so: cannot restore segment prot after reloc: Permission denied

위와 같은 에러를 띄우며 php가 꼬여서 안 될 때





* 해결책 
# restorecon -R -v /usr/local/apache2/modules

[root@server bin]# /sbin/restorecon -R -v /usr/local/apache/modules
/sbin/restorecon reset /usr/local/apache/modules/mod_authn_dbm.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_ident.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_expires.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_filter.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_actions.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_authz_default.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_speling.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_ext_filter.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_dbd.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_rewrite.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_dumpio.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_authn_default.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_env.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_dir.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_userdir.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_autoindex.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_authz_user.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_authn_dbd.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_vhost_alias.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_authn_anon.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_logio.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_authz_groupfile.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_authn_file.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_headers.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_asis.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_deflate.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_cgi.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/GD.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_include.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_dav_fs.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_authz_dbm.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_setenvif.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_imagemap.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_authz_host.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_log_config.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_dav.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_auth_basic.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_mime.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_info.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_negotiation.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/libphp5.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_status.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_auth_digest.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_alias.so context root:object_r:usr_t->system_u:object_r:shlib_t
/sbin/restorecon reset /usr/local/apache/modules/mod_authz_owner.so context root:object_r:usr_t->system_u:object_r:shlib_t
[root@server bin]#

위와 같은 메시지가 띄면 해결 완료.





* 안될경우 
# cd /usr/local/apache2/modules
# restorecon -v libphp5.so
# chcon -t texrel_shlib_t libphp5.so


'Cacti > APM(Apache+PHP+MySQL)' 카테고리의 다른 글

MySQL 설치 시 에러 메시지를 띄우며 설치가 안 될 경우.  (0) 2009.06.04
PHP 설치  (0) 2009.02.13
Apache 설치  (0) 2009.02.13
MySQL 설치  (0) 2009.02.13
APM(Apache+PHP+MySQL) 설치 전에... 2번째...  (0) 2009.02.13
블로그 이미지

쭈꾸댕이

아직 어설픈 실력으로 나름 제가 하는 것에 대한 것들을 옮기는 공간입니다. 틀린 부분도 있을 수 있으니 이 점 양해하시고, 도움이 되셨으면 좋겠네요.

,





checking whether build environment is sane... configure: error: newly created file is older than distributed files!

설치 중 다음과 같은 에러 메시지가 뜨며 MySQL이 설치가 안 될 경우

MySQL이 개발된 날짜와 현재 시간이 논리적으로 오류가 발생한 경우 이런 에러 메시지를 나타낸다.

이때는 아래와 같은 명령어로 시간을 동기화 하여 에러 메시지를 없앨 수 있다.


/usr/bin/rdate -s time.bora.net



'Cacti > APM(Apache+PHP+MySQL)' 카테고리의 다른 글

Apache에서 php 구동이 안 될 때...  (0) 2009.12.09
PHP 설치  (0) 2009.02.13
Apache 설치  (0) 2009.02.13
MySQL 설치  (0) 2009.02.13
APM(Apache+PHP+MySQL) 설치 전에... 2번째...  (0) 2009.02.13
블로그 이미지

쭈꾸댕이

아직 어설픈 실력으로 나름 제가 하는 것에 대한 것들을 옮기는 공간입니다. 틀린 부분도 있을 수 있으니 이 점 양해하시고, 도움이 되셨으면 좋겠네요.

,





STEP 1.

[root@Cacti /]# pwd
/
[root@Cacti /]# cd /download/
[root@Cacti download]# ll
total 50240
drwxr-xr-x 12 celltwo users     4096 Feb 13 16:22 httpd-2.2.11
-rw-r--r--  1 root    root   6806786 Dec 13 23:35 httpd-2.2.11.tar.gz
drwxr-xr-x 39     503 users     4096 Feb 13 15:36 mysql-5.0.75
-rw-r--r--  1 root    root  32514150 Dec 19 03:01 mysql-5.0.75.tar.gz
-rw-r--r--  1 root    root  12046184 May  1  2008 php-5.2.6.tar.gz

[root@Cacti download]#


위와 같이 앞에서 PHP를 다운 받은 디렉토리로 이동을 한 후 압축을 해제 하자.

[root@Cacti download]# tar xvfz php-5.2.6.tar.gz
.......... 글 몇개 읽으면 알겠지만 길면 생략한다 ..............
php-5.2.6/CODING_STANDARDS
php-5.2.6/mkinstalldirs
php-5.2.6/README.TESTING2
php-5.2.6/footer
php-5.2.6/header
php-5.2.6/netware/
php-5.2.6/netware/start.c
php-5.2.6/netware/sendmail_nw.h
php-5.2.6/php5.spec.in
php-5.2.6/UPGRADING
php-5.2.6/cvsclean
php-5.2.6/README.EXTENSIONS
php-5.2.6/README.QNX
php-5.2.6/run-tests.php
php-5.2.6/acinclude.m4
php-5.2.6/README.SELF-CONTAINED-EXTENSIONS
php-5.2.6/stub.c
php-5.2.6/buildconf
php-5.2.6/stamp-h.in
php-5.2.6/README.input_filter
php-5.2.6/generated_lists
php-5.2.6/README.Zeus
php-5.2.6/INSTALL
php-5.2.6/TODO-PHP5
php-5.2.6/EXTENSIONS
php-5.2.6/server-tests-config.php
php-5.2.6/snapshot
php-5.2.6/php.gif
php-5.2.6/README.PARAMETER_PARSING_API
php-5.2.6/acconfig.h
php-5.2.6/README.PHP4-TO-PHP5-THIN-CHANGES
php-5.2.6/CREDITS
php-5.2.6/README.UPDATE_5_2
php-5.2.6/README.UNIX-BUILD-SYSTEM
php-5.2.6/buildconf.bat

[root@Cacti download]#




STEP 2.

configure를 하기 위해서 압축을 푼 php 디렉토리로 이동을 한 후 configure를 한다.

[root@Cacti download]# cd php-5.2.6
[root@Cacti php-5.2.6]# ./configure --prefix=/usr/local/server/php --with-apxs2=/usr/local/server/apache/bin/apxs --with-mysql=/usr/local/server/mysql --with-config-file-path=/usr/local/server/apache/conf --disable-debug --enable-safe-mode --enable-track-vars --enable-sockets --with-mod_charset --with-charset=utf8 --with-xml --with-language=korean --enable-mailparse --enable-calender --enable-sysvsem=yes --enable-sysvshm=yes --enable-ftp --enable-magic-quotes --enable-gd-native-ttf --enable-url-includes --enable-trans-id --enable-inline-optimization --enable-bcmath --with-jpeg --with-png --with-zlib --with-jpeg-dir=/usr --with-png-dir=/usr/lib --with-freetype-dir=/usr --with-libxml-dir=/usr --enable-exif --with-gd --with-ttf --with-gettext --enable-sigchild --enable-mbstring
................ 생략 ................
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool

Generating files
updating cache ./config.cache
creating ./config.status
creating php5.spec
creating main/build-defs.h
creating scripts/phpize
creating scripts/man1/phpize.1
creating scripts/php-config
creating scripts/man1/php-config.1
creating sapi/cli/php.1
creating main/php_config.h
creating main/internal_functions.c
creating main/internal_functions_cli.c
+--------------------------------------------------------------------+
| License:                                                           |
| This software is subject to the PHP License, available in this     |
| distribution in the file LICENSE.  By continuing this installation |
| process, you are bound by the terms of this license agreement.     |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point.                            |
+--------------------------------------------------------------------+

Thank you for using PHP.

Notice: Following unknown configure options were used:

--enable-track-vars
--with-mod_charset
--with-charset=utf8
--with-xml
--with-language=korean
--enable-mailparse
--enable-calender
--enable-url-includes
--enable-trans-id
--with-jpeg
--with-png
--with-freetype=dir=/usr

Check './configure --help' for available options

[root@Cacti php-5.2.6]#


--prefix=/usr/local/server/php는 php가 설치될 디렉토리 경로이다.
--with-apxs2=/usr/local/server/apache/bin/apxs는 Apache의 apxs를 이용해 아파치에 모듈을 적재한다.
--with-mysql=/usr/local/server/mysql은 MySQL과 연동한다.
--with-config-file-path=/usr/local/server/apache/conf는 php의 환경설정 파일인 php.ini가 생성 될 위치이다.

그 외 각종 라이브러리를 포함하는 옵션이다.



STEP 3.

make와 make install을 실행한다.

[root@Cacti php-5.2.6]# make && make install
................ 생략 .....................
/spprintf.lo main/php_sprintf.lo main/safe_mode.lo main/fopen_wrappers.lo main/alloca.lo main/php_scandir.lo main/php_ini.lo main/SAPI.lo main/rfc1867.lo main/php_content_types.lo main/strlcpy.lo main/strlcat.lo main/mergesort.lo main/reentrancy.lo main/php_variables.lo main/php_ticks.lo main/network.lo main/php_open_temporary_file.lo main/php_logos.lo main/output.lo main/streams/streams.lo main/streams/cast.lo main/streams/memory.lo main/streams/filter.lo main/streams/plain_wrapper.lo main/streams/userspace.lo main/streams/transports.lo main/streams/xp_socket.lo main/streams/mmap.lo Zend/zend_language_parser.lo Zend/zend_language_scanner.lo Zend/zend_ini_parser.lo Zend/zend_ini_scanner.lo Zend/zend_alloc.lo Zend/zend_compile.lo Zend/zend_constants.lo Zend/zend_dynamic_array.lo Zend/zend_execute_API.lo Zend/zend_highlight.lo Zend/zend_llist.lo Zend/zend_opcode.lo Zend/zend_operators.lo Zend/zend_ptr_stack.lo Zend/zend_stack.lo Zend/zend_variables.lo Zend/zend.lo Zend/zend_API.lo Zend/zend_extensions.lo Zend/zend_hash.lo Zend/zend_list.lo Zend/zend_indent.lo Zend/zend_builtin_functions.lo Zend/zend_sprintf.lo Zend/zend_ini.lo Zend/zend_qsort.lo Zend/zend_multibyte.lo Zend/zend_ts_hash.lo Zend/zend_stream.lo Zend/zend_iterators.lo Zend/zend_interfaces.lo Zend/zend_exceptions.lo Zend/zend_strtod.lo Zend/zend_objects.lo Zend/zend_object_handlers.lo Zend/zend_objects_API.lo Zend/zend_default_classes.lo Zend/zend_execute.lo sapi/cli/php_cli.lo sapi/cli/php_cli_readline.lo sapi/cli/getopt.lo main/internal_functions_cli.lo -lcrypt -lcrypt -lrt -lmysqlclient -lpng -lz -ljpeg -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt  -o sapi/cli/php

Build complete.
Don't forget to run 'make test'.

Installing PHP SAPI module:       apache2handler
/usr/local/server/apache/build/instdso.sh SH_LIBTOOL='/usr/local/server/apache/build/libtool' libphp5.la /usr/local/server/apache/modules
/usr/local/server/apache/build/libtool --mode=install cp libphp5.la /usr/local/server/apache/modules/
cp .libs/libphp5.so /usr/local/server/apache/modules/libphp5.so
cp .libs/libphp5.lai /usr/local/server/apache/modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish /download/php-5.2.6/libs'
chmod 755 /usr/local/server/apache/modules/libphp5.so
[activating module `php5' in /usr/local/server/apache/conf/httpd.conf]
Installing PHP CLI binary:        /usr/local/server/php/bin/
Installing PHP CLI man page:      /usr/local/server/php/man/man1/
Installing build environment:     /usr/local/server/php/lib/php/build/
Installing header files:          /usr/local/server/php/include/php/
Installing helper programs:       /usr/local/server/php/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/server/php/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /usr/local/server/php/lib/php/
[PEAR] Console_Getopt - installed: 1.2.3
[PEAR] Archive_Tar    - installed: 1.3.2
[PEAR] Structures_Graph- installed: 1.0.2
pear/PEAR can optionally use package "pear/XML_RPC" (version >= 1.4.0)
[PEAR] PEAR           - installed: 1.7.1
Wrote PEAR system config file at: /usr/local/server/php/etc/pear.conf
You may want to add: /usr/local/server/php/lib/php to your php.ini include_path
Installing PDO headers:          /usr/local/server/php/include/php/ext/pdo/

[root@Cacti php-5.2.6]#




STEP 4.

PHP의 환경 설정을 한다. /usr/local/server/apache/conf에 php.ini라는 이름으로 복사 한다.

[root@Cacti php-5.2.6]# cp php.ini-dist /usr/local/server/apache/conf/php.ini
[root@Cacti php-5.2.6]#


Apache와 연동을 위해서 httpd.conf 파일을 수정을 해야 한다.

[root@Cacti php-5.2.6]# vi /usr/local/server/apache/conf/httpd.conf
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#  
<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>


위와 같은 부분에 아래와 같이 추가 시켜준다.

# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#  
<IfModule dir_module>
    DirectoryIndex index.html index.php
</IfModule>



<IfModule mime_module>
    #
    # TypesConfig points to the file containing the list of mappings from
    # filename extension to MIME-type.
    #
    TypesConfig conf/mime.types

    #
    # AddType allows you to add to or override the MIME configuration
    # file specified in TypesConfig for specific file types.
    #
    #AddType application/x-gzip .tgz
    #
    # AddEncoding allows you to have certain browsers uncompress
    # information on the fly. Note: Not all browsers support this.
    #
    #AddEncoding x-compress .Z
    #AddEncoding x-gzip .gz .tgz
    #
    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    #
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
   
    #
    # AddHandler allows you to map certain file extensions to "handlers":
    # actions unrelated to filetype. These can be either built into the server
    # or added with the Action directive (see below)
    #
    # To use CGI scripts outside of ScriptAliased directories:
    # (You will also need to add "ExecCGI" to the "Options" directive.)
    #
    #AddHandler cgi-script .cgi
   
    # For type maps (negotiated resources):
    #AddHandler type-map var
   
    #
    # Filters allow you to process content before it is sent to the client.
    #
    # To parse .shtml files for server-side includes (SSI):
    # (You will also need to add "Includes" to the "Options" directive.)
    #
    #AddType text/html .shtml
    #AddOutputFilter INCLUDES .shtml
</IfModule>

위 와 같은 문구에 아래와 같이 추가 시켜준다.

<IfModule mime_module>
    #
    # TypesConfig points to the file containing the list of mappings from
    # filename extension to MIME-type.
    #
    TypesConfig conf/mime.types

    #
    # AddType allows you to add to or override the MIME configuration
    # file specified in TypesConfig for specific file types.
    #
    #AddType application/x-gzip .tgz
    #
    # AddEncoding allows you to have certain browsers uncompress
    # information on the fly. Note: Not all browsers support this.
    #
    #AddEncoding x-compress .Z
    #AddEncoding x-gzip .gz .tgz
    #
    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    #
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
   
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps

    #
    # AddHandler allows you to map certain file extensions to "handlers":
    # actions unrelated to filetype. These can be either built into the server
    # or added with the Action directive (see below)
    #
    # To use CGI scripts outside of ScriptAliased directories:
    # (You will also need to add "ExecCGI" to the "Options" directive.)
    #
    #AddHandler cgi-script .cgi
   
    # For type maps (negotiated resources):
    #AddHandler type-map var
   
    #
    # Filters allow you to process content before it is sent to the client.
    #
    # To parse .shtml files for server-side includes (SSI):
    # (You will also need to add "Includes" to the "Options" directive.)
    #
    #AddType text/html .shtml
    #AddOutputFilter INCLUDES .shtml
</IfModule>




STEP 5.

PHP가 설치가 완료 되었으니 테스트를 해 본다.

[root@Cacti php-5.2.6]# /etc/init.d/httpd restart
httpd not running, trying to start
[root@Cacti php-5.2.6]#


테스트 페이지를 만들어서 php의 정보를 보여주는 함수를 사용해 본다.

[root@Cacti php-5.2.6]# vi /usr/local/server/apache/htdocs/phpinfo.php
<? phpinfo(); ?>


아래와 같이 웹서버에 출력이 되면, PHP 설치가 완료 된다.

블로그 이미지

쭈꾸댕이

아직 어설픈 실력으로 나름 제가 하는 것에 대한 것들을 옮기는 공간입니다. 틀린 부분도 있을 수 있으니 이 점 양해하시고, 도움이 되셨으면 좋겠네요.

,





STEP 1.

[root@Cacti /]# cd download/
[root@Cacti download]# ll
total 50236
-rw-r--r--  1 root root   6806786 Dec 13 23:35 httpd-2.2.11.tar.gz
drwxr-xr-x 39  503 users     4096 Feb 13 15:36 mysql-5.0.75
-rw-r--r--  1 root root  32514150 Dec 19 03:01 mysql-5.0.75.tar.gz
-rw-r--r--  1 root root  12046184 May  1  2008 php-5.2.6.tar.gz

[root@Cacti download]#



설치에 앞서 Apache가 있는 경로에서 압축을 푼다.

[root@Cacti download]# tar xvfz httpd-2.2.11.tar.gz
.... 길어서 생략 ....
httpd-2.2.11/modules/metadata/NWGNUexpires
httpd-2.2.11/modules/metadata/NWGNUusertrk
httpd-2.2.11/modules/NWGNUmakefile
httpd-2.2.11/modules/README
httpd-2.2.11/modules/debug/
httpd-2.2.11/modules/debug/NWGNUmodbucketeer
httpd-2.2.11/modules/debug/mod_bucketeer.c
httpd-2.2.11/modules/debug/config.m4
httpd-2.2.11/modules/debug/Makefile.in
httpd-2.2.11/modules/debug/mod_bucketeer.dsp
httpd-2.2.11/modules/debug/NWGNUmoddumpio
httpd-2.2.11/modules/debug/mod_dumpio.c
httpd-2.2.11/modules/debug/NWGNUmakefile
httpd-2.2.11/modules/debug/mod_dumpio.dsp
httpd-2.2.11/modules/debug/README
httpd-2.2.11/README
httpd-2.2.11/apachenw.mcp.zip
httpd-2.2.11/buildconf
httpd-2.2.11/libhttpd.dsp
httpd-2.2.11/LAYOUT
httpd-2.2.11/.deps
[root@Cacti download]# cd httpd-2.2.11
[root@Cacti httpd-2.2.11]#




STEP 2.

configure를 실행한다.

[root@Cacti httpd-2.2.11]# ./configure --prefix=/usr/local/server/apache --enable-mods-shared=all --enable-so --enable-rewrite
........... 여기도 길어서 생략 ...............
creating test/Makefile
config.status: creating docs/conf/httpd.conf
config.status: creating docs/conf/extra/httpd-autoindex.conf
config.status: creating docs/conf/extra/httpd-dav.conf
config.status: creating docs/conf/extra/httpd-default.conf
config.status: creating docs/conf/extra/httpd-info.conf
config.status: creating docs/conf/extra/httpd-languages.conf
config.status: creating docs/conf/extra/httpd-manual.conf
config.status: creating docs/conf/extra/httpd-mpm.conf
config.status: creating docs/conf/extra/httpd-multilang-errordoc.conf
config.status: creating docs/conf/extra/httpd-ssl.conf
config.status: creating docs/conf/extra/httpd-userdir.conf
config.status: creating docs/conf/extra/httpd-vhosts.conf
config.status: creating include/ap_config_layout.h
config.status: creating support/apxs
config.status: creating support/apachectl
config.status: creating support/dbmmanage
config.status: creating support/envvars-std
config.status: creating support/log_server_status
config.status: creating support/logresolve.pl
config.status: creating support/phf_abuse_log.cgi
config.status: creating support/split-logfile
config.status: creating build/rules.mk
config.status: creating build/pkg/pkginfo
config.status: creating build/config_vars.sh
config.status: creating include/ap_config_auto.h
config.status: executing default commands
[root@Cacti httpd-2.2.11]#

--prefix=/usr/local/server/apache는 /usr/local/server/apache에 설치한다.

--enable-mods-shared=all은 DSO모드라고 한다는데, 모듈이 추가로 설치 되었을 때 다시 컴파일 하지 않고 추가 할 수 있어서 좋다고 한다.

--enable-so는 DSO모드를 활성화 한다고 한다.

--enable-rewrite는 URL 재작성 모듈을 활성화 한다.



STEP 3.

make와 make install을 한다.

[root@Cacti httpd-2.2.11]# make && make install
......... 생략 ...........
make[2]: Entering directory `/download/httpd-2.2.11/support'
make[2]: Leaving directory `/download/httpd-2.2.11/support'

Installing configuration files
mkdir /usr/local/server/apache/conf
mkdir /usr/local/server/apache/conf/extra
mkdir /usr/local/server/apache/conf/original
mkdir /usr/local/server/apache/conf/original/extra
Installing HTML documents
mkdir /usr/local/server/apache/htdocs
Installing error documents
mkdir /usr/local/server/apache/error
Installing icons
mkdir /usr/local/server/apache/icons
mkdir /usr/local/server/apache/logs
Installing CGIs
mkdir /usr/local/server/apache/cgi-bin
Installing header files
Installing build system files
Installing man pages and online manual
mkdir /usr/local/server/apache/man
mkdir /usr/local/server/apache/man/man1
mkdir /usr/local/server/apache/man/man8
mkdir /usr/local/server/apache/manual
make[1]: Leaving directory `/download/httpd-2.2.11'
[root@Cacti httpd-2.2.11]#





STEP 4.

Apache를 자동 실행하기 위해 설정하고, chkconfig를 할 수 있게 하기 위해서 실행스크립트 파일에 순서대로 추가한다.

[root@Cacti httpd-2.2.11]# cp /usr/local/server/apache/bin/apachectl /etc/init.d/httpd
[root@Cacti httpd-2.2.11]# vi /etc/init.d/httpd

#!/bin/sh
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#    
http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# Apache control script designed to allow an easy command line interface
# to controlling Apache.  Written by Marc Slemko, 1997/08/23

위 내용에 아래와 같이 추가한다.

#!/bin/sh
#
# chkconfig: 2345 90 90
# description: init file for Apache server daemon
# processname: /usr/local/server/apache/bin/apachectl
# config: /usr/local/server/apache/conf/httpd.conf
# pidfile: /usr/local/server/apache/logs/httpd.pid

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#    
http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# Apache control script designed to allow an easy command line interface
# to controlling Apache.  Written by Marc Slemko, 1997/08/23


[root@Cacti httpd-2.2.11]# chkconfig --add httpd
[root@Cacti httpd-2.2.11]# chkconfig --list | grep httpd
httpd           0:off   1:off   2:on    3:on    4:on    5:on    6:off
[root@Cacti httpd-2.2.11]#




STEP 5.

Apache의 환경을 설정한다.

[root@Cacti httpd-2.2.11]# vi /usr/local/server/apache/conf/httpd.conf
<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch. 
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User daemon
Group daemon

</IfModule>
</IfModule>

위 부분을 아래(참고로 위 부분을 찾아서 변경하세요 ^^)와 같이 변경 한다.

<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch. 
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User nobody
Group nobody

</IfModule>
</IfModule>


# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
#ServerName
www.example.com:80

위 부분을 아래와 같이 주석을 제거해 준다. 그리고 IP에 맞게 웹서버를 등록 해 준다.

필자의 경우에는 DNS 서버를 올리지 않았기 때문에 IP를 입력 하였다.

# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#

ServerName 192.168.100.2:80



이제 Apache 설치는 완료 되었으며 Apache를 실행하면 된다.

[root@Cacti httpd-2.2.11]# /etc/init.d/httpd start
[root@Cacti httpd-2.2.11]#


웹서버가 뜨는 것을 확인 할 수 있다.

위 스샷과 같이 안 나온다면, 리눅스 설치 시 방화벽에 http 포트를 열어주었는지 확인을 해 보기 바란다.
블로그 이미지

쭈꾸댕이

아직 어설픈 실력으로 나름 제가 하는 것에 대한 것들을 옮기는 공간입니다. 틀린 부분도 있을 수 있으니 이 점 양해하시고, 도움이 되셨으면 좋겠네요.

,





STEP 1.

[root@Cacti download]# pwd
/download
[root@Cacti download]# ll
total 50232
-rw-r--r-- 1 root root  6806786 Dec 13 23:35 httpd-2.2.11.tar.gz
-rw-r--r-- 1 root root 32514150 Dec 19 03:01 mysql-5.0.75.tar.gz
-rw-r--r-- 1 root root 12046184 May  1  2008 php-5.2.6.tar.gz

[root@Cacti download]#

위 경로에서 다운 받은 mysql 파일의 압축을 푼다.

[root@Cacti download]# tar xvfz mysql-5.0.75.tar.gz
..... 너무 길어서 생략..........
mysql-5.0.75/win/data/mysql/help_relation.MYI
mysql-5.0.75/win/data/mysql/help_relation.MYD
mysql-5.0.75/win/data/mysql/help_keyword.frm
mysql-5.0.75/win/data/mysql/help_keyword.MYI
mysql-5.0.75/win/data/mysql/help_keyword.MYD
mysql-5.0.75/win/data/mysql/time_zone_name.frm
mysql-5.0.75/win/data/mysql/time_zone_name.MYI
mysql-5.0.75/win/data/mysql/time_zone_name.MYD
mysql-5.0.75/win/data/mysql/time_zone.frm
mysql-5.0.75/win/data/mysql/time_zone.MYI
mysql-5.0.75/win/data/mysql/time_zone.MYD
mysql-5.0.75/win/data/mysql/time_zone_transition.frm
mysql-5.0.75/win/data/mysql/time_zone_transition.MYI
mysql-5.0.75/win/data/mysql/time_zone_transition.MYD
mysql-5.0.75/win/data/mysql/time_zone_transition_type.frm
mysql-5.0.75/win/data/mysql/time_zone_transition_type.MYI
mysql-5.0.75/win/data/mysql/time_zone_transition_type.MYD
mysql-5.0.75/win/data/mysql/time_zone_leap_second.frm
mysql-5.0.75/win/data/mysql/time_zone_leap_second.MYI
mysql-5.0.75/win/data/mysql/time_zone_leap_second.MYD
mysql-5.0.75/win/data/mysql/proc.frm
mysql-5.0.75/win/data/mysql/proc.MYI
mysql-5.0.75/win/data/mysql/proc.MYD
mysql-5.0.75/win/data/mysql/procs_priv.frm
mysql-5.0.75/win/data/mysql/procs_priv.MYI
mysql-5.0.75/win/data/mysql/procs_priv.MYD
mysql-5.0.75/win/data/test/

[root@Cacti download]#




MySQL을 실행 할 계정을 만든다.

[root@Cacti download]# useradd -M -s /bin/false mysql
[root@Cacti download]#




STEP 2.

configure를 해 준다.

[root@Cacti download]# cd mysql-5.0.75
[root@Cacti mysql-5.0.75]# ./configure --prefix=/usr/local/server/mysql --with-extra-charsets=all
........ 길어서 생략 ........
config.status: creating read/Makefile
config.status: creating rem/Makefile
config.status: creating row/Makefile
config.status: creating srv/Makefile
config.status: creating sync/Makefile
config.status: creating thr/Makefile
config.status: creating trx/Makefile
config.status: creating usr/Makefile
config.status: creating ib_config.h
config.status: ib_config.h is unchanged
config.status: executing depfiles commands

MySQL has a Web site at http://www.mysql.com/ which carries details on the
latest release, upcoming features, and other information to make your
work or play with MySQL more productive. There you can also find
information about mailing lists for MySQL discussion.

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.

Thank you for choosing MySQL!

[root@Cacti mysql-5.0.75]#


--prefix=/usr/local/server/mysql 은 /usr/local/server/mysql에 바이너리를 설치하는 옵션이다.

--with-charset=utf8은 기본 문자셋을 utf8로 지정한다.

--with-extra-charsets=all은 모든 캐릭터셋을 설치한다.




STEP 3.

configure 한 것을 make 와 make install을 한다.

[root@Cacti mysql-5.0.75]# make && make install
...... 이것 역시 길어서 생략 .......
test -z "/usr/local/server/mysql/share/mysql" || mkdir -p -- "/usr/local/server/mysql/share/mysql"
 /usr/bin/install -c 'mysql.server' '/usr/local/server/mysql/share/mysql/mysql.server'
 /usr/bin/install -c 'mysqld_multi.server' '/usr/local/server/mysql/share/mysql/mysqld_multi.server'
make[4]: Leaving directory `/download/mysql-5.0.75/support-files'
make[3]: Leaving directory `/download/mysql-5.0.75/support-files'
make[2]: Leaving directory `/download/mysql-5.0.75/support-files'
Making install in server-tools
make[2]: Entering directory `/download/mysql-5.0.75/server-tools'
Making install in instance-manager
make[3]: Entering directory `/download/mysql-5.0.75/server-tools/instance-manager'
make[4]: Entering directory `/download/mysql-5.0.75/server-tools/instance-manager'
test -z "/usr/local/server/mysql/libexec" || mkdir -p -- "/usr/local/server/mysql/libexec"
  /bin/sh ../../libtool --preserve-dup-deps --mode=install /usr/bin/install -c 'mysqlmanager' '/usr/local/server/mysql/libexec/mysqlmanager'
/usr/bin/install -c mysqlmanager /usr/local/server/mysql/libexec/mysqlmanager
make[4]: Nothing to be done for `install-data-am'.
make[4]: Leaving directory `/download/mysql-5.0.75/server-tools/instance-manager'
make[3]: Leaving directory `/download/mysql-5.0.75/server-tools/instance-manager'
make[3]: Entering directory `/download/mysql-5.0.75/server-tools'
make[4]: Entering directory `/download/mysql-5.0.75/server-tools'
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
make[4]: Leaving directory `/download/mysql-5.0.75/server-tools'
make[3]: Leaving directory `/download/mysql-5.0.75/server-tools'
make[2]: Leaving directory `/download/mysql-5.0.75/server-tools'
make[1]: Leaving directory `/download/mysql-5.0.75'

[root@Cacti mysql-5.0.75]#




STEP 4.

MySQL에서 사용할 환경 설정 파일을 /etc에 복사를 한다.
my-huge.cnf : 메모리가 1G-2G 사이 일 때
my-large.cnf : 메모리가 512M 일 때
my-medium.cnf : 64~256M 사이 일 때
my-small.cnf : 메모리가 64보다 작을 때 사용한다.

[root@Cacti mysql-5.0.75]# cp support-files/my-huge.cnf /etc/my.cnf
[root@Cacti mysql-5.0.75]#




STEP 5.

MySQL을 관리 할 데이터베이스를 생성한다.

[root@Cacti mysql-5.0.75]# cd /usr/local/server/mysql/
[root@Cacti mysql]# ls
bin  include  info  lib  libexec  man  mysql-test  share  sql-bench
[root@Cacti mysql]# bin/mysql_install_db --user=mysql
Installing MySQL system tables...
090213 15:51:06 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
090213 15:51:06 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
OK
Filling help tables...
090213 15:51:06 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
090213 15:51:06 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/local/server/mysql/bin/mysqladmin -u root password 'new-password'
/usr/local/server/mysql/bin/mysqladmin -u root -h Cacti password 'new-password'

Alternatively you can run:
/usr/local/server/mysql/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr/local/server/mysql ; /usr/local/server/mysql/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/local/server/mysql/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
[root@Cacti mysql]#




STEP 6.

MySQL이 설치 된 디렉토리 권한을 다시 설정한다.

[root@Cacti mysql]# chown -R root .
[root@Cacti mysql]# chown -R mysql var
[root@Cacti mysql]# chgrp -R mysql .
[root@Cacti mysql]#



STEP 7.

MySQL 명령어를 편하게 사용 할 수 있게 환경변수에 등록한다.

[root@Cacti mysql]# vi ~/.bash_profile

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin:/usr/local/server/mysql/bin

export PATH
unset USERNAME




다음 번에 다시 로그인 할 때 환경변수는 적용 된다.

즉시 적용하고 싶다면 아래와 같은 명령어를 써 준다.

[root@Cacti mysql]# source ~/.bash_profile
[root@Cacti mysql]#




STEP 8.

chkconfig를 이용하여 재부팅이 되어도 MySQL이 자동으로 실행 될 수 있게 설정한다.

[root@Cacti mysql]# cp share/mysql/mysql.server /etc/init.d/mysqld
[root@Cacti mysql]# chkconfig --add mysqld
[root@Cacti mysql]#


등록 된 것을 확인 해 본다.

[root@Cacti mysql]# chkconfig --list | grep mysqld
mysqld          0:off   1:off   2:on    3:on    4:on    5:on    6:off
[root@Cacti mysql]#




STEP 9.

처음으로 MySQL을 실행하면 root의 암호를 설정해야 한다.

암호 설정 후 MySQL을 실행시키면 된다.

[root@Cacti mysql]# /etc/init.d/mysqld start
Starting MySQL.                                            [  OK  ]
[root@Cacti mysql]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.75-log Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> exit
Bye
[root@Cacti mysql]#

MySQL을 실행하고 exit로 빠져 나오는 과정을 보았다.


이제 MySQL의 root 암호를 설정해 보자.

[root@Cacti mysql]# mysqladmin -u root password 루트패스워드입력
[root@Cacti mysql]#


MySQL을 실행하면 암호가 설정되어서 MySQL을 사용 할 수 없다.

[root@Cacti mysql]# mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[root@Cacti mysql]#


[root@Cacti mysql]# mysql -u root -p
Enter password: 루트패스워드입력
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.0.75-log Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>



MySQL이 설치가 되었다.

블로그 이미지

쭈꾸댕이

아직 어설픈 실력으로 나름 제가 하는 것에 대한 것들을 옮기는 공간입니다. 틀린 부분도 있을 수 있으니 이 점 양해하시고, 도움이 되셨으면 좋겠네요.

,





STEP 1.

APM을 설치하기에 앞서 라이브러리나 컴파일러가 있어야 한다.

우선 컴파일러를 설치하기에 앞서 컴파일러가 설치 되어있는지를 확인 한다.

[root@Cacti download]# rpm -qa gcc* cpp* compat-gcc* flex*
compat-gcc-34-g77-3.4.6-4
gcc-objc-4.1.2-42.el5
compat-gcc-34-3.4.6-4
gcc-gfortran-4.1.2-42.el5
gcc-4.1.2-42.el5
gcc-c++-4.1.2-42.el5
cpp-4.1.2-42.el5
compat-gcc-34-c++-3.4.6-4
flex-2.5.4a-41.fc6
gcc-gnat-4.1.2-42.el5
[root@Cacti download]#




만약에 설치가 되어있지 않다면 yum을 이용하여 아래와 같이 설치를 해 준다.

[root@Cacti download]# yum -y install gcc cpp gcc-c++ compat-gcc-32-g77 flex
Setting up Install Process
Parsing package install arguments
Package gcc - 4.1.2-42.el5.i386 is already installed.
Package cpp - 4.1.2-42.el5.i386 is already installed.
Package gcc-c++ - 4.1.2-42.el5.i386 is already installed.
No package compat-gcc-32-g77 available.
Package flex - 2.5.4a-41.fc6.i386 is already installed.
Nothing to do
[root@Cacti download]#

필자의 경우 이미 설치가 되어 있다고 나오고 있다.



STEP 2.

이제 라이브러리를 설치를 하기에 앞서 라이브러리가 설치 되어있는지 확인을 한다.

[root@Cacti download]# rpm -qa libpeg* libpng* freetype* gd-*
libpng-1.2.10-7.1.el5_0.1
freetype-2.2.1-19.el5
[root@Cacti download]#

필자의 경우 libpng 와 freetype만 설치 된 것을 확인 할 수 있다.

devel 패키지가 설치되어 있지 않기 때문에 yum을 이용하여 설치를 할 것이다.



[root@Cacti download]# yum install libjpeg* libpng* freetype* gd-*
Setting up Install Process
Parsing package install arguments
Package libjpeg - 6b-37.i386 is already installed.
Package libpng - 2:1.2.10-7.1.el5_0.1.i386 is already installed.
Package freetype - 2.2.1-19.el5.i386 is already installed.
Package gd - 2.0.33-9.4.el5_1.1.i386 is already installed.
Resolving Dependencies
--> Running transaction check
---> Package libjpeg-devel.i386 0:6b-37 set to be updated
---> Package libpng-devel.i386 2:1.2.10-7.1.el5_0.1 set to be updated
---> Package gd-progs.i386 0:2.0.33-9.4.el5_1.1 set to be updated
---> Package freetype.i386 0:2.2.1-20.el5_2 set to be updated
---> Package freetype-demos.i386 0:2.2.1-20.el5_2 set to be updated
---> Package freetype-devel.i386 0:2.2.1-20.el5_2 set to be updated
---> Package gd-devel.i386 0:2.0.33-9.4.el5_1.1 set to be updated
--> Processing Dependency: libX11-devel for package: gd-devel
--> Processing Dependency: fontconfig-devel for package: gd-devel
--> Processing Dependency: libXpm-devel for package: gd-devel
--> Running transaction check
---> Package libX11-devel.i386 0:1.0.3-9.el5 set to be updated
--> Processing Dependency: xorg-x11-proto-devel >= 7.1-2 for package: libX11-devel
--> Processing Dependency: libXau-devel for package: libX11-devel
--> Processing Dependency: libXdmcp-devel for package: libX11-devel
---> Package libXpm-devel.i386 0:3.5.5-3 set to be updated
---> Package fontconfig-devel.i386 0:2.4.1-7.el5 set to be updated
--> Running transaction check
---> Package xorg-x11-proto-devel.i386 0:7.1-9.el5.centos set to be updated
--> Processing Dependency: mesa-libGL-devel for package: xorg-x11-proto-devel
---> Package libXdmcp-devel.i386 0:1.0.1-2.1 set to be updated
---> Package libXau-devel.i386 0:1.0.1-3.1 set to be updated
--> Running transaction check
---> Package mesa-libGL-devel.i386 0:6.5.1-7.5.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 freetype-demos          i386       2.2.1-20.el5_2   updates           154 k
 gd-devel                i386       2.0.33-9.4.el5_1.1  base               97 k
 gd-progs                i386       2.0.33-9.4.el5_1.1  base               24 k
Updating:
 freetype                i386       2.2.1-20.el5_2   updates           313 k
Installing for dependencies:
 fontconfig-devel        i386       2.4.1-7.el5      base              168 k
 freetype-devel          i386       2.2.1-20.el5_2   updates           151 k
 libX11-devel            i386       1.0.3-9.el5      base              666 k
 libXau-devel            i386       1.0.1-3.1        base               11 k
 libXdmcp-devel          i386       1.0.1-2.1        base              7.5 k
 libXpm-devel            i386       3.5.5-3          base               31 k
 libjpeg-devel           i386       6b-37            base              105 k
 libpng-devel            i386       2:1.2.10-7.1.el5_0.1  base              182 k
 mesa-libGL-devel        i386       6.5.1-7.5.el5    base              465 k
 xorg-x11-proto-devel    i386       7.1-9.el5.centos  base              253 k

Transaction Summary
=============================================================================
Install     13 Package(s)        
Update       1 Package(s)        
Remove       0 Package(s)        

Total download size: 2.6 M
Is this ok [y/N]: y
Downloading Packages:
(1/14): gd-devel-2.0.33-9 100% |=========================|  97 kB    00:00    
(2/14): freetype-devel-2. 100% |=========================| 151 kB    00:00    
(3/14): freetype-demos-2. 100% |=========================| 154 kB    00:00    
(4/14): libXau-devel-1.0. 100% |=========================|  11 kB    00:00    
(5/14): freetype-2.2.1-20 100% |=========================| 313 kB    00:00    
(6/14): gd-progs-2.0.33-9 100% |=========================|  24 kB    00:00    
(7/14): libpng-devel-1.2. 100% |=========================| 182 kB    00:00    
(8/14): fontconfig-devel- 100% |=========================| 168 kB    00:00    
(9/14): libXpm-devel-3.5. 100% |=========================|  31 kB    00:00    
(10/14): libX11-devel-1.0 100% |=========================| 666 kB    00:00    
(11/14): libXdmcp-devel-1 100% |=========================| 7.5 kB    00:00    
(12/14): mesa-libGL-devel 100% |=========================| 465 kB    00:00    
(13/14): xorg-x11-proto-d 100% |=========================| 253 kB    00:00    
(14/14): libjpeg-devel-6b 100% |=========================| 105 kB    00:00    
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID e8562897
Importing GPG key 0xE8562897 "CentOS-5 Key (CentOS 5 Official Signing Key) <
centos-5-key@centos.org>" from http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating  : freetype                     ####################### [ 1/15]
  Installing: freetype-devel               ####################### [ 2/15]
  Installing: fontconfig-devel             ####################### [ 3/15]
  Installing: libXau-devel                 ####################### [ 4/15]
  Installing: libpng-devel                 ####################### [ 5/15]
  Installing: libjpeg-devel                ####################### [ 6/15]
  Installing: gd-progs                     ####################### [ 7/15]
  Installing: freetype-demos               ####################### [ 8/15]
  Installing: xorg-x11-proto-devel         ####################### [ 9/15]
  Installing: libXdmcp-devel               ####################### [10/15]
  Installing: libX11-devel                 ####################### [11/15]
  Installing: libXpm-devel                 ####################### [12/15]
  Installing: mesa-libGL-devel             ####################### [13/15]
  Installing: gd-devel                     ####################### [14/15]
  Cleanup   : freetype                     ####################### [15/15]

Installed: freetype-demos.i386 0:2.2.1-20.el5_2 gd-devel.i386 0:2.0.33-9.4.el5_1.1 gd-progs.i386 0:2.0.33-9.4.el5_1.1
Dependency Installed: fontconfig-devel.i386 0:2.4.1-7.el5 freetype-devel.i386 0:2.2.1-20.el5_2 libX11-devel.i386 0:1.0.3-9.el5 libXau-devel.i386 0:1.0.1-3.1 libXdmcp-devel.i386 0:1.0.1-2.1 libXpm-devel.i386 0:3.5.5-3 libjpeg-devel.i386 0:6b-37 libpng-devel.i386 2:1.2.10-7.1.el5_0.1 mesa-libGL-devel.i386 0:6.5.1-7.5.el5 xorg-x11-proto-devel.i386 0:7.1-9.el5.centos
Updated: freetype.i386 0:2.2.1-20.el5_2
Complete!
[root@Cacti download]#

의존성과 관련된 여러 패키지가 자동으로 설치되었으니 신경쓰지 말도록 하자.

솔직히 필자도 폭 넓은 지식을 바탕으로 쓴 것이 아니므로 모른다. ^^



'Cacti > APM(Apache+PHP+MySQL)' 카테고리의 다른 글

MySQL 설치 시 에러 메시지를 띄우며 설치가 안 될 경우.  (0) 2009.06.04
PHP 설치  (0) 2009.02.13
Apache 설치  (0) 2009.02.13
MySQL 설치  (0) 2009.02.13
APM(Apache+PHP+MySQL) 설치 전에...  (0) 2009.02.13
블로그 이미지

쭈꾸댕이

아직 어설픈 실력으로 나름 제가 하는 것에 대한 것들을 옮기는 공간입니다. 틀린 부분도 있을 수 있으니 이 점 양해하시고, 도움이 되셨으면 좋겠네요.

,





STEP 1.

APM이란 웹서버를 구성할 때 가장 많이 쓰이는 Apache, PHP, MySQL의 첫 글자를 인용해 만든 명칭이다.

APM을 설치하기에 앞서 rpm으로 설치 되어있는 APM을 삭제한다.


아래와 같은 명령어를 사용하여 APM이 설치 되었는지 확인 한다.

rpm으로 Apache가 설치 되어 있다면 삭제하고 웹상에서 다운 받아서 설치를 할 예정이다.

[root@Cacti /]# rpm -qa httpd php mysql
httpd-2.2.3-11.el5_1.centos.3
[root@Cacti /]#



STEP 2.

APM을 제거 하기 전에 내가 설치 한 서버에 APM 중 무엇이 설치 되었는지를 위의 과정에서 확인 하였다.

현재 필자가 설치 한 서버에는 Apache만 설치 되어있기 때문에 Apache만 삭제할 것이다.

[root@Cacti /]# yum remove -y httpd
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package httpd.i386 0:2.2.3-11.el5_1.centos.3 set to be erased
--> Processing Dependency: httpd for package: system-config-httpd
--> Processing Dependency: httpd >= 2.2.0 for package: gnome-user-share
--> Running transaction check
---> Package gnome-user-share.i386 0:0.10-6.el5 set to be erased
---> Package system-config-httpd.noarch 5:1.3.3.3-1.el5 set to be erased
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Removing:
 httpd                   i386       2.2.3-11.el5_1.centos.3  installed         2.8 M
Removing for dependencies:
 gnome-user-share        i386       0.10-6.el5       installed          89 k
 system-config-httpd     noarch     5:1.3.3.3-1.el5  installed         2.1 M

Transaction Summary
=============================================================================
Install      0 Package(s)        
Update       0 Package(s)        
Remove       3 Package(s)        

Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing   : httpd                        ######################### [1/3]
  Erasing   : gnome-user-share             ######################### [2/3]
  Erasing   : system-config-httpd          ######################### [3/3]

Removed: httpd.i386 0:2.2.3-11.el5_1.centos.3
Dependency Removed: gnome-user-share.i386 0:0.10-6.el5 system-config-httpd.noarch 5:1.3.3.3-1.el5
Complete!
[root@Cacti /]#




STEP 3.

Apache를 다운 받기 위해 download를 받을 디렉토리를 생성하겠다.

[root@Cacti /]# mkdir /download
[root@Cacti /]# cd download/
[root@Cacti download]#




STEP 4.

Apache를 다운 받는다.

아래는 사이트에서 사라질 수 있으므로, 개인적으로 백업 해 둔 파일 입니다.



[root@Cacti download]# wget http://mirror.apache.or.kr/httpd/httpd-2.2.11.tar.gz
--14:06:29--  http://mirror.apache.or.kr/httpd/httpd-2.2.11.tar.gz
Resolving mirror.apache.or.kr... 222.239.120.166
Connecting to mirror.apache.or.kr|222.239.120.166|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6806786 (6.5M) [application/x-gzip]
Saving to: `httpd-2.2.11.tar.gz'

100%[=========================================================================================================================================>] 6,806,786   8.58M/s   in 0.8s  

14:06:30 (8.58 MB/s) - `httpd-2.2.11.tar.gz' saved [6806786/6806786]

[root@Cacti download]# ll
total 6660
-rw-r--r-- 1 root root 6806786 Dec 13 23:35 httpd-2.2.11.tar.gz
[root@Cacti download]#



STEP 5.

PHP를 다운 받는다.

아래는 사이트에서 사라질 수 있으므로, 개인적으로 백업 해 둔 파일 입니다.



[root@Cacti download]# wget http://kr2.php.net/get/php-5.2.6.tar.gz/from/this/mirror
--14:16:28--  http://kr2.php.net/get/php-5.2.6.tar.gz/from/this/mirror
Resolving kr2.php.net... 211.43.210.124
Connecting to kr2.php.net|211.43.210.124|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location:
http://kr2.php.net/distributions/php-5.2.6.tar.gz [following]
--14:16:28-- 
http://kr2.php.net/distributions/php-5.2.6.tar.gz
Connecting to kr2.php.net|211.43.210.124|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12046184 (11M) [application/x-tar]
Saving to: `php-5.2.6.tar.gz'

100%[=========================================================================================================================================>] 12,046,184  10.8M/s   in 1.1s  

14:16:29 (10.8 MB/s) - `php-5.2.6.tar.gz' saved [12046184/12046184]

[root@Cacti download]# ll
total 18440
-rw-r--r-- 1 root root  6806786 Dec 13 23:35 httpd-2.2.11.tar.gz
-rw-r--r-- 1 root root 12046184 May  1  2008 php-5.2.6.tar.gz
[root@Cacti download]#



STEP 6.

MySQL을 다운 받는다.

[root@Cacti download]# wget http://www.mysql.org/get/Downloads/MySQL-5.0/mysql-5.0.75.tar.gz/from/http://mysql.byungsoo.net/
--14:18:30--  http://www.mysql.org/get/Downloads/MySQL-5.0/mysql-5.0.75.tar.gz/from/http://mysql.byungsoo.net/
Resolving www.mysql.org... 213.136.52.82, 213.115.162.82
Connecting to
www.mysql.org|213.136.52.82|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location:
http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.75.tar.gz/from/http://mysql.byungsoo.net/ [following]
--14:18:31-- 
http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.75.tar.gz/from/http://mysql.byungsoo.net/
Resolving dev.mysql.com... 213.136.52.29
Connecting to dev.mysql.com|213.136.52.29|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location:
http://mysql.byungsoo.net/Downloads/MySQL-5.0/mysql-5.0.75.tar.gz [following]
--14:18:34-- 
http://mysql.byungsoo.net/Downloads/MySQL-5.0/mysql-5.0.75.tar.gz
Resolving mysql.byungsoo.net... 218.234.17.87
Connecting to mysql.byungsoo.net|218.234.17.87|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 32514150 (31M) [application/x-tar]
Saving to: `mysql-5.0.75.tar.gz'

100%[=========================================================================================================================================>] 32,514,150   199K/s   in 3m 33s

14:22:10 (149 KB/s) - `mysql-5.0.75.tar.gz' saved [32514150/32514150]

[root@Cacti download]# ll
total 50232
-rw-r--r-- 1 root root  6806786 Dec 13 23:35 httpd-2.2.11.tar.gz
-rw-r--r-- 1 root root 32514150 Dec 19 03:01 mysql-5.0.75.tar.gz
-rw-r--r-- 1 root root 12046184 May  1  2008 php-5.2.6.tar.gz
[root@Cacti download]#

위 과정을 끝으로 APM에 필요한 파일을 모두 다운 받았으며, 이제 한가지씩 설치를 해보도록 하자.


'Cacti > APM(Apache+PHP+MySQL)' 카테고리의 다른 글

MySQL 설치 시 에러 메시지를 띄우며 설치가 안 될 경우.  (0) 2009.06.04
PHP 설치  (0) 2009.02.13
Apache 설치  (0) 2009.02.13
MySQL 설치  (0) 2009.02.13
APM(Apache+PHP+MySQL) 설치 전에... 2번째...  (0) 2009.02.13
블로그 이미지

쭈꾸댕이

아직 어설픈 실력으로 나름 제가 하는 것에 대한 것들을 옮기는 공간입니다. 틀린 부분도 있을 수 있으니 이 점 양해하시고, 도움이 되셨으면 좋겠네요.

,