호스팅에서 가장 많이 사용하는 리눅스는 ?
CentOS 입니다.
CentOS는 레드헷리눅스사(RHEL)의 엔터프라이즈급 버젼과 동일하다고 보면 됩니다.
설치방법을 알아 보겠습니다.
설치는 CentOS 5.x와 APM을 RPM으로 설치하는 방법입니다.
설치 문서는 요약되어 있으나, 설치를 해본 경험이 있으면 참고용으로 사용할 만 합니다.
centos 5.x + apm rpm 설치
1. apm 환경 알아보기
# yum list httpd* php* mysql*
2. apm 패키지 install
# yum install httpd httpd-devel php php-devel php-bcmath php-cli php-common php-mcrypt php-domxml php-gd php-imap php-mbstring php-mysql php-xmlrpc php-pear mysql mysql-server mysql-devel "Image*"
3. 설정
- httpd
/etc/httpd/conf/httpd.conf
3.x대의 아파치에서 MaxClients의 수 증가를 위해 소스컴파일을 했지만
아래와 같이 ServerLimit,MaxClients 를 수정하면 됨.
(MaxClients의 수는 ServerLimit보다 클 수 없다.)
====================================================
KeepAlive Off -> 그대로
<IfModule prefork.c>
ServerLimit 256 -> ServerLimit 1024
MaxClients 256 -> MaxClients 512
</IfModule>
AddDefaultCharset UTF-8 -> AddDefaultCharset EUC-KR
====================================================
- php
/etc/php.ini
=====================================================
register_globals = Off -> register_globals = On
allow_url_fopen = On -> 보안적용 Off
max_execution_time = 30 -> max_execution_time = 60
memory_limit = 8M -> memory_limit = 20M
register_long_arrays = Off -> On
=====================================================
- php.conf
/etc/httpd/conf.d/php.conf
=========================================================================
AddType application/x-httpd-php .php -> .inc .html .htm 등도 추가
DirectoryIndex index.php -> DirectoryIndex index.php index.html index.htm
=========================================================================
- mysql
/etc/my.cnf
=======================================================
[client]
default-character-set=euckr
[mysqld]
old_passwords=1
default-character-set=euckr
init_connect="set names euckr"
character-set-client-handshake = FALSE
또는 skip-character-set-client-handshake
=======================================================
default-character-set=euckr : 소스컴파일시 --with-charset=euckr로 한것과 같다.old_passwords=1 : 4.0대 이하에서 사용하던 password함수로 입력되어진 data와 호환을 하려고 하는 것이다.
init_connect="set names euckr" : 4.0이하의 db를 dump해서 4.1로 restore한 후 웹에서 깨질경우에 설정하는 파라미터.
character-set-client-handshake = FALSE : mysql root로 연동하더라도 latin1이 아닌 euckr로 적용된다.(character_set_client , character_set_connection 등)
'리눅스정보' 카테고리의 다른 글
htm이나 html 확장자를 php로 인식시키는 아파치 셋팅 (1) | 2010.08.21 |
---|---|
웹서비스에서 가장 많이 사용하는 리눅스는 어떤 리눅스일까? (0) | 2009.04.07 |
리눅스 SSH를 위한 가장 기본적인 명령어 (1) | 2009.03.10 |
yum을 이용한 APM 설치 방법 및 yum 명령 사용법 (0) | 2008.11.26 |
리눅스 배포판의 종류(1) (0) | 2008.10.13 |