자바
 

eAccelerator 설치 세팅법

최고관리자 2016-01-23 (토) 17:57 10년전 55  
eAccelerator project는 Turck MMCache for PHP version 2.4.6 is released  2003-11-04 이후에 개발이 중단되자

그 소스로 계속 개발하는 것이라고 홈페이지에 써 있습니다.


성능도 좋고 뛰어난 무료인 eAccelerator사용을 적극추천 합니다.
Release-0.9.5 버전부터는 안정적이였으며, 지금 0.9.6.1 까지 나왔습니다.

1.0 버번은 php6버전에 개발될 예정이며, 0.9.4가 php4를 지원했고  0.9.5 이후는 php5를 지원했어요

 

현재까지 최신버전 다운로드는 아래와 같습니다.

http://bart.eaccelerator.net/source/0.9.6.1/eaccelerator-0.9.6.1.tar.bz2

 

아래는 제가 설치했던 그대로의 설치과정입니다.

쭉~ 보면서 해보세요.

 

다운받고 압축을 풀면 아래와 같은 디렉토리가 생깁니다.

[root@localhost local]# wget http://bart.eaccelerator.net/source/0.9.6.1/eaccelerator-0.9.6.1.tar.bz2

 

[root@localhost local]# tar -xf eaccelerator-0.9.6.1.tar.bz2
[root@localhost local]# ll
total 184
drwxr-xr-x 2 root root  4096 Mar 10  2009 bin
drwxrwxr-x 4  500  500  4096 Jun  1 05:25 eaccelerator-0.9.6.1
-rw-r--r-- 1 root root 106049 Jun  1 05:25 eaccelerator-0.9.6.1.tar.bz2
drwxr-xr-x 2 root root  4096 Mar 10  2009 etc
drwxr-xr-x 2 root root  4096 Mar 10  2009 games
drwxr-xr-x 2 root root  4096 Mar 10  2009 include
drwxr-xr-x 2 root root  4096 Mar 10  2009 lib
drwxr-xr-x 2 root root  4096 Mar 10  2009 libexec
drwxr-xr-x 2 root root  4096 Mar 10  2009 sbin
drwxr-xr-x 4 root root  4096 Dec 21  2009 share
drwxr-xr-x 2 root root  4096 Mar 10  2009 src

 

[root@localhost local]# cd eaccelerator-0.9.6.1

[root@localhost eaccelerator-0.9.6.1]# export PHP_PREFIX="/usr"
[root@localhost eaccelerator-0.9.6.1]# $PHP_PREFIX/bin/phpize
Configuring for:
PHP Api Version:        20041225
Zend Module Api No:      20050922
Zend Extension Api No:  220051025

 

[root@localhost eaccelerator-0.9.6.1]# ./configure  --enable-eaccelerator=shared  --with-php-config=$PHP_PREFIX/bin/php-config

 

make 했을때 에러나 나옵니다. 홈페이지에 버그리포트가 작성되어 있지만 전 그냥 0.9.6 을 다운받아서 설치를 다시 했습니다.

[root@localhost eaccelerator-0.9.6.1]# make

/usr/local/eaccelerator-0.9.6.1/ea_store.c:683: error: 'zend_property_info' has no member named 'ce'

 

[root@localhost local]# wget http://bart.eaccelerator.net/source/0.9.6/eaccelerator-0.9.6.tar.bz2

[root@localhost local]# tar xf eaccelerator-0.9.6.tar.bz2

[root@localhost local]# cd eaccelerator-0.9.6

[root@localhost eaccelerator-0.9.6]# $PHP_PREFIX/bin/phpize

 

[root@localhost eaccelerator-0.9.6]# ./configure  --enable-eaccelerator=shared  --with-php-config=$PHP_PREFIX/bin/php-config

 

[root@localhost eaccelerator-0.9.6.1]# make 엔터하면 아래와 같이 설치되었다고 나옵니다.

Libraries have been installed in:
  /usr/local/eaccelerator-0.9.6/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
  - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
    during execution
  - add LIBDIR to the `LD_RUN_PATH' environment variable
    during linking
  - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
  - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.

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

Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).

 

[root@localhost eaccelerator-0.9.6]# make install
Installing shared extensions:    /usr/lib/php/modules/

 

설치가 완전히 끝났습니다.

환경 설정을 해주면 사용 할 수 있습니다.

 

[root@localhost eaccelerator-0.9.6]# mkdir /tmp/eaccelerator
[root@localhost eaccelerator-0.9.6]# chmod 0777 /tmp/eaccelerator
[root@localhost eaccelerator-0.9.6]# ll /tmp/eaccelerator/
total 0

 

이제 php.ini 화일 열어서 설정 해줍니다.

[root@localhost eaccelerator-0.9.6]# vi /etc/php.ini

 

  extension="eaccelerator.so"
  eaccelerator.shm_size="16"
  eaccelerator.cache_dir="/tmp/eaccelerator"
  eaccelerator.enable="1"
  eaccelerator.optimizer="1"
  eaccelerator.check_mtime="1"
  eaccelerator.debug="0"
  eaccelerator.filter=""
  eaccelerator.shm_max="0"
  eaccelerator.shm_ttl="0"
  eaccelerator.shm_prune_period="0"
  eaccelerator.shm_only="0"
  eaccelerator.compress="1"
  eaccelerator.compress_level="9"
; eaccelerator.admin.name="xxxx"
; eaccelerator.admin.password = ""


이제 아파치 재 시작해주면 됩니다.

[root@localhost eaccelerator-0.9.6]# /etc/init.d/httpd restart

 

위에서 ll /tmp/eaccelerator/ 하면 아무것도 없었지만 아파치 재 시작 후 아래와 같은 디렉토리 들이 생겼습니다.

디렉토리가 생겼다면 성공적으로 설치가 된것입니다.

축하드려요^^*

 

[root@localhost eaccelerator-0.9.6]# ll /tmp/eaccelerator/
total 64
drwxrwxrwx 18 root root 4096 Aug 20 10:36 0
drwxrwxrwx 18 root root 4096 Aug 20 10:36 1
drwxrwxrwx 18 root root 4096 Aug 20 10:36 2
drwxrwxrwx 18 root root 4096 Aug 20 10:36 3
drwxrwxrwx 18 root root 4096 Aug 20 10:36 4
drwxrwxrwx 18 root root 4096 Aug 20 10:36 5
drwxrwxrwx 18 root root 4096 Aug 20 10:36 6
drwxrwxrwx 18 root root 4096 Aug 20 10:36 7
drwxrwxrwx 18 root root 4096 Aug 20 10:36 8
drwxrwxrwx 18 root root 4096 Aug 20 10:36 9
drwxrwxrwx 18 root root 4096 Aug 20 10:36 a
drwxrwxrwx 18 root root 4096 Aug 20 10:36 b
drwxrwxrwx 18 root root 4096 Aug 20 10:36 c
drwxrwxrwx 18 root root 4096 Aug 20 10:36 d
drwxrwxrwx 18 root root 4096 Aug 20 10:36 e
drwxrwxrwx 18 root root 4096 Aug 20 10:36 f

 

phpinfo() 했을때 아래와 같이 나옵니다.

 

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
    with eAccelerator v0.9.6, Copyright (c) 2004-2010 eAccelerator, by eAccelerator

 

 

설치 후에 성능 검사를 결과 입니다.

지금 DDos공격을 받고 있어 홈페이지가 엄청 느림니다.

그래서 eaccelerator를 설치하게 된거구요.

 

[root@localhost eaccelerator-0.9.6]# ab -n50 -dS "도메인/index.php"
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking ah.to (be patient).....done


Server Software:        Apache/2.2.3
Server Hostname:        도메인
Server Port:            80

Document Path:          /index.php
Document Length:        508 bytes

Concurrency Level:      1
Time taken for tests:  12.499737 seconds
Complete requests:      50
Failed requests:        0
Write errors:          0
Total transferred:      46430 bytes
HTML transferred:      25400 bytes
Requests per second:    4.00 [#/sec] (mean)
Time per request:      249.995 [ms] (mean)
Time per request:      249.995 [ms] (mean, across all concurrent requests)
Transfer rate:          3.60 [Kbytes/sec] received

Connection Times (ms)
              min  avg  max
Connect:        0    0    0
Processing:  237  249  453
Total:        237  249  453


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

vsftpd 설정 상위 못가게하기 | root로 접속하기 | root만 상위로 가기

상위 디렉토리로 못가게 하기

chroot_local_user=YES

 

root로 접속하기

vi /etc/vsftpd/vsftpd.conf

chroot_list_enable=YES 주석을 제거

chroot_list_enable=YES


vi /etc/vsftpd/user_list

#root <-- 주석처리 해주시고


 vi /etc/vsftpd/ftpusers

#root 주석 처리해 주면 됩니다.

 

root만 상위 디렉토리로 가기

chroot_list_file=/etc/vsftpd/chroot_list 주석 제거

vi /etc/vsftpd/chroot_list 로 새파일 열어서

root 적으시면 됩니다.


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

bind-9.3.6 설치와 설정하기 named 구축

bind-9.3.6-4.P1.el5_4.2 설치

 

 yum -y install bind\* 하시면 bind에 대한건 다 설치합니다.

  또는

 # yum -y install bind bind-libs ypbind yp-tools bind-utils bind-chroot bind-devel

하세요.

 

 yum -y install caching-nameserver 설치하면 설정 파일이 생성됩니다.

 2개 명령으로 설치 완료 입니다^^




외부 포트허용

# iptables -A INPUT -p tcp -m tcp --sport 53 -j ACCEPT


# iptables -A INPUT -p tcp -m udp --sport 53 -j ACCEPT




vi /etc/named.caching-nameserver.conf 화일을 열어서 몇가지 수정해주면 됩니다.

 

options {
        listen-on port 53 { 127.0.0.1; };  >> listen-on port 53 { any; };
        listen-on-v6 port 53 { ::1; };
        directory      "/var/named";
        dump-file      "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";

        // Those options should be used carefully because they disable port
        // randomization
        // query-source    port 53; << 주석 없애기 query-source    port 53;
        // query-source-v6 port 53; << 주석 없애기 query-source-v6 port 53;
        allow-query    { localhost; }; >> allow-query    { any; };
        allow-query-cache { localhost; };
};

 

// 로그파일 쌓이는것이 필요없으신분은 logging 부분 전부를 주석처리하면됩니다.
logging { 
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
view localhost_resolver {
        match-clients      { localhost; }; >> match-clients      { any; };
        match-destinations { localhost; }; >> match-destinations { any; };
        recursion yes; >> recursion no;
        include "/etc/named.rfc1912.zones";
};


저장하고 vi /etc/named.rfc1912.zones 열어서 설정합니다.

설정되어 있는 값들은 건들지 마시고 맨 아래줄에 추가합니다.

 

여기서 자신의 IP를 반대로 적으면됩니다.

112.175.232.xxx 였다면 아래와 같이 적으면됩니다. file명을 알아서.rev로 만드세요.

zone "232.175.112.in-addr.arpa" IN { type master; file "xxkr.com.rev"; allow-update { none; }; };

 

호스트네임으로 사용하는 도메인을 잴 먼저 적습니다.

in이 들어가 있는것이 다름니다.

zone "xxkr.com" IN { type master; file "196.zone"; allow-update { none; }; };




다음줄부터는 사용할 도메인을 쭉~ 적어 넣으면됩니다.

ah.to도메인을 설정할때 아래와 같이 합니다.

zone "ah.to"{ type master; file "xx2.zone"; allow-update { none; }; };

 

이제 cd /var/named/chroot/var/named 로 이동해서 위에적었던 파일을 생성해 주면 끝나요.

vi xxkr.com.rev 안에 내용에 아래와 같이 적으면됩니다.

앞에 숫자는 위에서 IP 꺼꾸로 적고 맨마지막건 안적었는데 여기에 넣으면됩니다.

165            IN      PTR    xx.xxkr.com. 이렇게요.

 

== 카피할 부분 ==

$TTL    86400
@              IN      SOA    xx2.xxkr.com.      root.xxkr.com. (
                        31 ; serial
                        3H    ; refresh
                        15M      ; retry
                        1W    ; expire
                        1D      ; Minimun
                        )
                IN      NS      xx.xxkr.com
                IN      NS      xx2.xxkr.com.
                IN      NS      ns.ssanhost.com.
                IN      NS      ns1.ssanhost.com.

localhost      IN      A      127.0.0.1
165            IN      PTR    xx.xxkr.com.
167            IN      PTR    xx2.xxkr.com.
165            IN      PTR    ns.ssanhost.com.
167            IN      PTR    ns1.ssanhost.com.

 

저장하고 나와서 위에 file 에 적인 vi xx2.zone 해서 아래와 같이 만듭니다.

 

$TTL    14400
@              IN      SOA    xx2.xxkr.com.        root.xxkr.com. (
                        23 ; serial
                        3H    ; refresh
                        15M      ; retry
                        1W    ; expire
                        1D      ; Minimun
                        )
                IN      NS      xx.xxkr.com.
                IN      NS      xx2.xxkr.com.
                IN      MX  10  mail
;
@              IN      A      114.108.132.211
xx              IN      A      112.175.232.165
xx2            IN      A      114.108.132.211
www            IN      A      114.108.132.211
*              IN      A      114.108.132.211

 

저장하고




chown root:named *  꼭해주세요.




/etc/init.d/named restart 엔터하면 설치가 끝났습니다.




dig 로 작동여부 확인

# dig 도메인

버전확인

# dig @ns.rain.iss txt version.bind

이름
비밀번호
자동등록방지
우측의 글자를 입력하세요.
hi
이전글  다음글  목록 답변 글쓰기
 
 
ragoman@naver.com