'php'에 해당되는 글 2건

카테고리 없음
mongodb를 source로 컴파일해서 사용할려고 하면 아래와 같은 warning이 등장한다.

"warning: some regex utf8 things will not work.  pcre build doesn't have --enable-unicode-properties"

아래와 같이 확인 해보면 "No Unicode properties support" 라고 확인할 수 있다.
# pcretest -C
PCRE version 6.6 06-Feb-2006
Compiled with
  UTF-8 support
  No Unicode properties support
  Newline character is LF
  Internal link size = 2
  POSIX malloc threshold = 10
  Default match limit = 10000000
  Default recursion depth limit = 10000000
  Match recursion uses stack
rpm으로 pcre를 업그레이드해서 unicode를 support 하도록 해보자.
상세 내용은 아래 링크에서 참조할 수 있다.
http://chrisjean.com/2009/01/31/unicode-support-on-centos-52-with-php-and-pcre/
wget으로 rpm을 다운 받자.
# wget http://vault.centos.org/5.1/updates/SRPMS/pcre-6.6-2.el5_1.7.src.rpm
rpm을 풀어서 소스를 수정
# rpm -ivh pcre-6.6-2.el5_1.7.src.rpm
vi로 pcre.spec을 수정
# vi /usr/src/redhat/SPECS/pcre.spec
%configure --enable-utf8 <- 이렇게만 되어있는 곳에 --enable-unicode-properties를 추가하자
"%configure --enable-utf8 --enable-unicode-properties"



 
rpm을 다시 빌드하자
# rpmbuild -ba /usr/src/redhat/SPECS/pcre.spec
rpm 설치
# rpm -Uvh /usr/src/redhat/RPMS/i386/pcre-6.6-2.7.i386.rpm /usr/src/redhat/RPMS/i386/pcre-devel-6.6-2.7.i386.rpm
확인
# pcretest -C




PCRE version 6.6 06-Feb-2006
Compiled with
  UTF-8 support
  Unicode properties support
  Newline character is LF
  Internal link size = 2
  POSIX malloc threshold = 10
  Default match limit = 10000000
  Default recursion depth limit = 10000000
  Match recursion uses stack

카테고리 없음

퍼옴

// --------------------------------------------------------------------------- 
OS : CentOS release 5.2 

* OS 설치시 package Group 내가 선택한 것.. 
- Editors 
- Engineering and Scientific 
- Development Tools 
- Administration Tools 
- System Tools 


mysql 설치 
mysql-5.0.24 

configure 시 오류 메세지 
오류 메세지 : checking for termcap functions library... configure: error: No curses/termcap library found 
해결 방법 : yum -y install ncurses-devel 

./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --with-charset=euckr --enable-thread-safe-client 
make && make install 

# cd /usr/local/mysql/bin 
# ./mysql_install_db 
# useradd -M mysql 
# chown -R mysql:mysql /usr/local/mysql/data 
# /usr/local/mysql/bin/mysqld_safe & 
# cd /usr/local/mysql/bin 
# ./mysqladmin -u root password 암호 
# ./mysql -u root -p mysql 

apache 설치 
httpd-2.0.63 
접속자 수 최대로 올리기 
# vi server/mpm/prefork/prefork.c 
[EDITOR]#define DEFAULT_SERVER_LIMIT 256 을 
[EDITOR]#define DEFAULT_SERVER_LIMIT 1280 으로 수정 
저장하고 아웃 
# vi server/mpm/worker/worker.c 
[EDITOR]#define DEFAULT_SERVER_LIMIT 16 을 
[EDITOR]#define DEFAULT_SERVER_LIMIT 20 으로 수정 
저장하고 아웃 
./configure --prefix=/usr/local/apache2 --enable-so --enable-modules=so --with-mpm=worker --enable-rewrite 
make && make install 


php 설치 
php-5.2.6 
configure 시 오류 
오류 메세지 : configure: error: xml2-config not found. Please check your libxml2 installation 
해결 방법 : yum install libxml2 libxml2-devel -y 

오류 메세지 : configure: error: Please reinstall the BZip2 distribution 
해결 방법 : yum -y install bzip2-devel 

오류 메세지 : configure: error: libjpeg.(a|so) not found. 
해결 방법 : yum -y install libjpeg-devel 

오류 메세지 : configure: error: libpng.(a|so) not found. 
해결 방법 : yum -y install libpng-devel 

오류 메세지 : configure: error: freetype.h not found. 
해결 방법 : yum -y install freetype-devel 

오류 메세지 : configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information. 
해결 방법 : yum -y install libc-client-devel 

오류 메세지 : configure: error: Kerberos libraries not found. 
해결 방법 : yum -y install krb5-devel 

오류 메세지 : configure: error: Cannot find OpenSSL's <evp.h> 
해결 방법 : yum -y install openssl-devel 

./configure --enable-bcmath --enable-ftp --enable-filepro --enable-libxml2 --enable-memory-limit --enable-sockets --enable-spl --enable-sysvsem --enable-sysvshm --enable-track-vars --enable-versioning --enable-wddx --disable-cli --disable-debug --disable-dmalloc --disable-posix --disable-rpath --with-apxs2=/usr/local/apache2/bin/apxs --with-bz2 --with-freetype-dir --with-gd --with-gettext --with-imap=shared --with-jpeg-dir --with-kerberos --with-libxml-dir --with-mod-charset --with-mysql=/usr/local/mysql --with-png-dir --with-ttf --with-zlib --with-mysqli=/usr/local/mysql/bin/mysql_config --with-imap-ssl=/usr/lib --with-openssl 
ssl 추가시  


apache httpd.conf 설정 

NameVirtualHost *:80 
ServerName *:80 

KeepAlive On 
KeepAliveTimeout 2 
(2초간 접속을 끊지 않고 기다린다..) 

Timeout 30 
(dos 공격 방지) 

ServerLimit 20 --> 서버 갯수를 설정 
StartServers 20 --> 아파치를 처음 시작할때 생성하는 서버 갯수 
MaxClients 500 --> ThreadsPerChild * StartServers 값 
ThreadsPerChild 25 --> 서버 하나가 만들어 낼수 있는 쓰레드 갯수입니다. 최대 64개 
MinSpareThreads 25 --> 서버 하나가 만들어 낼수 있는 쓰레드의 최소 갯수입니다. 보통은 ThreadsPerChild 와 맞추어 줌 
MaxSpareThreads 500 --> 시스템 전체에서 만들어 낼수 있는 쓰레드 갯수의 최대치 


<VirtualHost *:80> 
    AddType application/x-httpd-php .php .html .inc .htm 
    #php 를 인식 시킬 확장자 명 
    ServerAdmin 이메일 
    #서버 관리자 이메일 
    DocumentRoot /home/test 
    #html 을 읽을 위치 
    ServerName 도메인 
    #도메인 주소 
#  php_admin_value auto_prepend_file /home/test/move_url/move_page.html 
    #도메인 접근시 최초 열어볼 페이지 주소 
#  RewriteEngine on 
    #Rewrite Engine 사용 여부 
#  RewriteRule ^/([a-zA-Z0-9]+)$ /home/test/rewrite.html?rewrite=$i 
    #Rewrite 사용시 load 할 페이지 주소 
    php_admin_flag register_globals On 
    #register_global 설정 
</VirtualHost> 

apache modules directory에서
#> chcon -c -v -R -u system_u -r object_r -t textrel_shlib_t libphp5.so

1
블로그 이미지

개발자

우와신난다