일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- http
- Linux
- Disk
- Performance
- goaccess
- iptables
- rsync
- ext3
- 칭찬교육
- PERL
- CPU
- 솔라리스
- Bash
- Hack
- Cache
- cadre
- Kernel
- 디스크
- 좌절교육
- 쇼펜의상속자 #킨텍스메가쇼 #섬유향수탈취제
- pid
- rm -rf
- rm
- Python
- DNS
- PORT
- windows
- 리눅스
- apachetop
- ext4
- Today
- Total
Ben's
리눅스 서버 캐릭터셋 셋팅방법 본문
******************** APM charset 셋팅방법(euckr 의 예) ********************
1. mysql charset 셋팅
- /etc/my.cnf 수정
[mysqld]
init-connect="set names euckr"
[mysql]
no-auto-rehash
default-character-set = euckr
===========================================================================
2. apache httpd.conf 파일에서 아래 라인 주석해제
Include conf/extra/httpd-mpm.conf
Include conf/extra/httpd-languages.conf
3. apache MaxClient 증가시켜야함.(캐릭터셋과는 관련 없음)
- 참고로 이값을 256 이상 사용하기 위해서는 설치전 파라미터값 하나를 고쳐주고
컴파일후 설치되어야 함.
--------------------------------------------------------------------------
/root/src/httpd-2.2.4/server/mpm/prefork/prefork.c 수정후 컴파일 설치 필요
#define DEFAULT_SERVER_LIMIT 256 ==> #define DEFAULT_SERVER_LIMIT 9216
--------------------------------------------------------------------------
- /home/apache/conf/extra/httpd-languages.conf
# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 256 -> 512로 수정
MaxRequestsPerChild 0
</IfModule>
4. apache charset 셋팅
- /home/apache/conf/extra/httpd-languages.conf
AddCharset EUC-KR .euc-kr => 추가
AddDefaultCharset EUC-KR => 추가
=============================================================================
5. php charset 셋팅
vi /usr/local/Zend/etc/php.ini
default_charset = "euc-kr"
=============================================================================
Configuration File (php.ini) Path /usr/local/Zend/etc/php.ini
******************** APM charset 확인방법(euckr 의 예) ********************
1. php, apache: info.php 파일을 만들어 웹에서 불러보면 정보문서가 나오는데
아래값들을 보고 제대로 셋팅 되었는지 확인하면 된다.
PHP core
default_charset euc-kr euc-kr
HTTP Headers Information
Content-Type text/html; charset=euc-kr
2. mysql: 아래와 같이 확인하면 됨
[root@nhkotest bin]# ./mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 5.0.26
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> \s;
--------------
./mysql Ver 14.12 Distrib 5.0.26, for unknown-linux-gnu (x86_64) using EditLine wrapper
Connection id: 2
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.0.26
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: euckr
Db characterset: euckr
Client characterset: euckr
Conn. characterset: euckr
UNIX socket: /tmp/mysql.sock
Uptime: 38 min 13 sec
Threads: 1 Questions: 6 Slow queries: 0 Opens: 12 Flush tables: 1 Open tables: 6 Queries per second avg: 0.003
--------------
ERROR:
No query specified
단, mysql 4.0.x 은 캐릭터셋 변환시 무조건 재 컴파일 해줘야 합니다.
mysql 4.1.x 이상도 최초 utf-8 로 컴파일 되어 있으면 euckr 로 사용하려면 재컴파일 밖에 방법이 없습니다.
mysql 4.1.x 이상에서 최초 euckr 로 컴파일 되어 있으면 위와 같이 my.cnf 를 바꾸는 것만으로 변환이 가능합니다.
'리눅스' 카테고리의 다른 글
ubuntu linux vsftpd 설정방법 (0) | 2013.01.17 |
---|---|
ant 설치 (0) | 2013.01.17 |
memtest.c (0) | 2013.01.17 |
웹로그 (0) | 2013.01.17 |
ss VS netstat (0) | 2013.01.17 |