강좌
클라우드/리눅스에 관한 강좌입니다.
리눅스 분류

리눅스 Application 설치

작성자 정보

  • 웹관리자 작성
  • 작성일

컨텐츠 정보

본문

 

리눅스설치후 서버보안셋팅


*
교육 참가를 하시기 전에 반드시 자료를 인쇄(프린트)하여 가지고 오시기 바랍니다. *

 

자료는 수퍼유저코리아의 “리눅스서버 교육”위하여 제작된 것입니다.

제작자 : "대한민국 서버관리자그룹" ----"수퍼유저코리아"    박성수

자료의 복사 배포를 금지합니다.

PS : 추가 설명을 듣지않으시고 본 자료만으로 설정하시면 원하지 않은 결과를 초래할 수도 있습니다.

자료번호         제              목

=======     =============================

 A001       아파치(Apache)편

 A002       PHP, PHP-Zender편

 A003       MySQL 데이터베이스 편

 A004       SMTP인증을 위한 DRAC

 A005       Qpopper편

 A006       Proftpd편

 A007       Tripwire편

 A008       libpng편

 A009       libpcap편

 A010       FreeType편

 A011       zlib편

 A012       GD편

 A013       PortSentry편

 A014       CHKROOTKIT편

 A015       WebAlizer편

=======    ============================

대한민국 서버관리자 그룹   -수퍼유저코리아-

www.superuser.co.kr

자료번호  : A001      아파치(Apache)편

######################################################

 교재번호 : A001   : 아파치

######################################################

./configure --prefix=/usr/local/apache --activate-module=src/modules/php4/libphp4.a

 

 

아파치 웹 서버 튜닝

 

설치하기전에 (configure전에...)

- apache/src/include/httpd.h: 

HARD_SERVER_LIMIT 256 -> 1280 

 

- apache/conf/httpd.conf: 

 

MaxKeepAliveRequests 100 -> 10000 

KeepAliveTimeout 15 -> 30 

MinSpareServers 5 -> 20 

MaxSpareServers 10 -> 40 

StartServers 5 -> 20 

MaxClients 256 -> 1024

 

# httpd.conf 에 다음과 같은 부분을 수정/추가 한다.

 

DirectoryIndex index.html index.htm index.php index.php3 index.cgi index.jsp

 

AddType application/x-tar .tgz

AddType application/x-httpd-php .php4 .php3 .php .htm .html .phtml .ph .inc

AddType application/x-httpd-php-source .phps

 

 

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

###. 아파치 cgi 실행옵션제거

 

    Options 부분에서 ExecCGI 제거

    AddHandler cgi-script .cgi   주석제거

 

 

###. httpd.conf파일을 이용하여 기본적인 아파치웹서버보안을 설정한다.

 

- Options 지시자중 Indexes를 제거한다.

 

- Options 지시자중 FollowSymLinks를 제거한다. : 심블릭링크파일의 설정을 허용하지 않는다. 

예)/home/sspark09/www/linkfile 이라는 파일이 ln -s /home/sspark/09/www/linkfile /etc/passwd라는 링크파일일 경우에 웹에서 linkfile을 로딩했을 경우에 /etc/passwd의 파일내용을 볼 수 있다. SymFollowLinks라는 지시자가 없을 경우에는 이런 링크파일의 사용을 웹에서는 허용하지 않는다.

 

- Options 지시자중 IncludesNoExec옵션을 추가한다. 이는 SSI의실행 태그중 exec나 cmd를 실행하지 못하게 한다.

 

- CGI는 특정 디렉토리에서만 실행가능하도록 설정한다. 게시판등에서 cgi실행파일을 웹서버에 올려두고서 이를 실행하게 되면 시스템의 정보가 쉽게 유출이 될 수 있다.  이를 막기 위하여 다음 예와 같은 설정으로 특정 디렉토리에서만 cgi가 실행가능하도록 한다.

 ScriptAlias /cgi-bin/ "//usr/local/apache/cgi-bin/"

 

- ServerTokens는 Apache서버에 접속했을 경우에 응답메시지의 헤더에 웹서버 버전, 설치된 응용프로그램등과 같은 정보를 전달한다. 이 정보들은 공격자들에게는 웹서버의 버전정보등을 유출함으로서 서버해킹을 용이하게 하는 문제를 야기할 수 있다. ServerTokens Full 이라고 되어 있다면 제거하고 ServerTokens Prod로 추가또는 수정한다. 기본적으로 ServerTokens키워드는 Apache 1.3이상에서 사용가능하며 일반적으로는 httpd.conf에 설정이 되어있지않다. 설정되어 있지 않을 경우에는 Full의 적용을 받게 되므로 전달가능한 모든 정보를 전달한다. 이를 ServerTokens Prod를 추가또는 수정함으로서 정보유출을 막을 수 있다. 

 

- 웹서버 구동중에 문제나 에러발생시(401, 403, 404등)에 보여줄 에러페이지를 redirect하여 원하는 페이지를 보여줄 수 있도록 한다. (광고나 홍보들을 위한 수단으로 사용한다.)

 

 

자료번호  : A002     PHP, PHP-Zender편

######################################################

 교재번호 : A002 : PHP

######################################################

######################   PHP  Ver : 4.2.3  ###########

 

PHP 컨피그옵션 1

 

./configure --with-apache=/usr/local/apache --with-gd=/usr/local --with-mysql=/usr/local/mysql --with-config-file- --enable-ftp --enable-socket --enable-track-vars=yes

 

error발생시에는 어떤 옵션에서 에러가 발생했는가를 확인후에,,조치할것....

 

 

PHP 컨피그옵션 2

 

./configure --with-apache=/usr/local/apache --with-gd=/usr/local --with-mysql=/usr/local/mysql --with-config-file- --enable-ftp

 

 

Zend Optimizer를 설치하여 사용하려면 configure옵션에 "--disable-debug"을 추가해야한다.

 

############### PHP Zend Optimizer : 현재버전 : 1.3.3 ########### 

설치버전 : 1.3.3

1. php설치시 사용 configure옵션 : ./configure --with-apache=/usr/local/apache --with-mysql=/usr/local/mysql --with-config-file- --enable-ftp --disable-debug

   으로 php를 설치한다.

   make

   make install

   한 후에 cp php.ini-dist /usr/local/lib/php.ini

 

2. ZendOptimizer-2[1].1.0a-Linux_glibc21-i386.tar.gz를 다운받는다.

   mkdir /usr/local/Zend

   mkdir /usr/local/Zend/lib

   tar xvfz ZendOptimizer-2[1].1.0a-Linux_glibc21-i386.tar.gz

   cd ZendOptimizer-2[1].1.0a-Linux_glibc21-i386

   ./install.sh

    여기서 대부분 다음과 같다.

 

STEP1

STEP2

STEP3

STEP4

STEP5

STEP6

STEP7

STEP8

STEP9

 

STEP10 :  설치후에 /usr/local/lib/php.ini파일을 열어서 맨 마지막부분에 Zend부분이 추가된 것을 확인한다.

 

STEP11 : 아래는 php.ini 파일에 Zend관련 추가된 행을 확인한 것이다.

 

STEP12 : 설치최종학인

 

Zend가 정상적으로 설치된 후에는 /usr/local/lib/php.ini파일은 /usr/local/Zend/etc/php.ini로 이동되고 원래위치인 /usr/local/lib/php.ini파일은 이동된 위치인 /usr/local/Zend/etc/php.ini파일로 링크되어 있다. 아래는 이를 확인한 것이다.

 

[root@su46 lib]# ls -l /usr/local/lib/

합계 32

drwxr-xr-x   18 root     root         4096  5월  9 23:16 php

lrwxrwxrwx    1 root     root           27  5월  9 23:23 php.ini -> /usr/local/Zend/etc/php.ini

-rw-r--r--    1 root     root        28372  5월  9 23:23 php.ini.optimizer-backup

[root@su46 lib]#

[root@su46 lib]#

[root@su46 lib]# ls -l /usr/local/Zend/

합계 12

drwxr-xr-x    2 root     root         4096  5월  9 23:23 doc

drwxr-xr-x    2 root     root         4096  5월  9 23:24 etc

drwxr-xr-x    2 root     root         4096  5월  9 23:23 lib

[root@su46 lib]#

[root@su46 lib]# ls -l /usr/local/Zend/etc

합계 28

-rw-r--r--    1 root     root        28470  5월  9 23:23 php.ini

[root@su46 lib]#

 

 

Zend설치시 문제해결

 

 ./install.sh로 시작한 설치과정에서 php버전을 못찾는다는 에러문구와 함께 php.ini파일의 위치를 확인하라는 메시지가 계속반복될 경우에는 apache가 시작되지않아서 그러므로 apache를 완벽히 설치한 후에 Apache를 시작시키고 Zend를 재설치한다.

 

 

자료번호  : A003   MySQL 데이터베이스 편

######################################################

 교재번호 : A003 : MYSQL

######################################################

#######################   MYSQL  Ver : 3.23.53  ######

 

#### 3.23.53버전으로 모두 셋팅한다.

주의1 : 위의 버전에서는 반드시 mysql 계정이 있어야함. 즉, mysql이라는 사용자의 권한으로 실행이됨, 보안상의 이유로 실행자체가 mysql이 하게됨.(useradd mysql만 하면됨, 즉, 홈디렉토리를 /usr/local/mysql/로 할 필요가 없음)

 

주의2 : chown -R mysql:mysql /usr/local/mysql/data 을 해줘야함.

즉 data디렉토리이하에는 mysql계정으로 실행되므로 데이터가 저장되는 위치, 즉 예를들어 data디렉토리에는 mysql이라는 계정의 사용자권한으로 저장이 되므로 mysql사용자에게 반드시 쓰기 권한이 있어야하기 때문임.

 

 

 

mysql 성능향상을 위한 컴파일튜닝

 

Mysql 튜닝1. ==> Memory상황에 맞는 설치옵션사용

 

Mysql설치시에 /etc/my.cnf라는 파일이 있다면 그 파일을 사용내의 컴파일옵션을 사용하여 컴파일을 하게됨. 따라서 서버사양과환경(특히 메모리)에 맞는 my.cnf파일을 만들어서 /etc/my.cnf로 복사한 후에 컴파일하면됨.

다행히도 support-files/디렉토리에 가면 메모리에 맞는 템플릿파일들이 몇개 존재함.

 

RAM이 1G~이상 이라면(support-files디렉토리에서) : cp my-huge.cnf /etc/my.cnf

RAM이 512M~1GB 라면(support-files디렉토리에서) : cp my-large.cnf /etc/my.cnf

RAM이 64M~128M라면(support-files디렉토리에서) : cp my-medium.cnf /etc/my.cnf

RAM이 64M 이하라면(support-files디렉토리에서) : cp my-small.cnf /etc/my.cnf

로 복사한 후에 설치하도록 한다.

 

 

Mysql 튜닝2. ==> 컴파일러 gcc대신 pgcc사용

 

그리고 컴파일시에 gcc보다는 pgcc를 사용하고 -O6옵션을 사용하게 되면 속도는 약 11%정도 빨지게됨. (Makefile내의 gcc를 pgcc로 대체하여 컴파일할 것.) 리눅스의 배포판에는 기본적으로 pgcc라는 컴파일러는 존재하지않음, 하지만 mysql압축을 풀면 mit-pthreads/pgcc에 존재함.이를 이용하여 컴파일할것...

 

pgcc로 컴파일방법

==> CC="pgcc" CFLAGS="-O2 -mpentiumpro" 를 먼저 실행

==> ./configure를 위의 옵션대로 실행.....

 

 

 

Mysql 튜닝3. ==> 컴파일에서의 옵션사용을 통한 튜닝

 

방법1.

./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --with-charset=euc_kr --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static

 

방법2.

./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --with-charset=euc_kr --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static --with-innodb --enable-ftp

 

설명

 

--prefix=/usr/local/mysql : Mysql의 설치위치

--localstatedir=/usr/local/mysql/data : Mysql의 데이터저장 위치

--with-charset=euc_kr  : 한글지원을 위한 옵션

--with-mysqld-ldflags=-all-static  공유라이브러리사용안함.

--with-client-ldflags=-all-static  공유라이브러리사용안함.

 

 

위의 -all-static 옵션은 공유라이브러리를 사용하지 못하도록 합니다. 공유라이브러리를 사용하게 되면 여러프로그램에서 하나의 라이브러리를 사용하여 메모리를 절약하는 장점은 있지만, 공유하는 만큼 속도는 느려지게 됨. -all-static옵션은 이런 공유라이브러리를 사용하지 못하도록 하여 속도를 증가시킴(장점, 속도증가 약 13%정도), 하지만 공유라이브러리를 사용하는것에 비해 메모리를 더 많이 차지하게됨(단점).

 

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

일반적인 Mysql 설치방법

설치위치 : /usr/local/mysql/

 

tar xvfpz mysql-3.22.24.tar.gz

cd mysql-3.22.24

./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --with-charset=euc_kr

make

make install

cd /usr/local/mysql/bin

./mysql_install_db

 

 

설치후 셋팅할 사항1 ==> 초기설치후 Mysql root패스워드 변경

 

./mysqladmin -u root password 12345

 

사용중 Mysql root패스워드 변경(3가지방법)

 

./mysqladmin -u root -p password 12345

mysql>set password for root=password('12345')

mysql>update user set password=password('12345') where user = 'root';

 

 

설치시 configure 옵션 참고사항

 

--with-innodb : trasction처리위한 옵션(속도는 느려지며, 로그파일의 크기가 쉽게커진다. )

 

 

## 설치후에 다음과 같은 에러가 발생할 경우의 원인과 조치방법 ##

 

에러로그 파일에

 

[root@su39 bin]# cat ../data/su39.nicekorea.co.kr.err

03022008:59:37  mysqld started

Fatal error: Can't change to run as user 'mysql' ;  Please check that the user exists!

030220  8:59:37  Aborting

 

030220  8:59:37  /usr/local/mysql/libexec/mysqld: Shutdown Complete

 

03022008:59:37  mysqld ended

 

03022008:59:54  mysqld started

030220 8:59:54  /usr/local/mysql/libexec/mysqld: Can't create/write to file '/usr/local/mysql/data/su39.nicekorea.co.kr.pid' (Errcode: 13)

030220  8:59:54  /usr/local/mysql/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)

030220 8:59:54  /usr/local/mysql/libexec/mysqld: Error on delete of '/usr/local/mysql/data/su39.nicekorea.co.kr.pid' (Errcode: 13)

03022008:59:54  mysqld ended

 

03022009:01:14  mysqld started

030220  9:01:14  /usr/local/mysql/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)

03022009:01:14  mysqld ended

 

[root@su39 bin]#

 

위의 에러는

 

1번 : useradd mysql

 

2번 :  chown -R mysql:mysql data   로서 해결할 수 있다.

 

 

자료번호  : A004   SMTP인증을 위한 DRAC

######################################################

 교재번호 : A004   : SMTP인증을 위한 DRAC

######################################################

#########   SENDMAIL 사용자 인증을 위한 DRAC 설치 ####

 

1. portmap 실행이 되어 있어야한다.

   실행 : /etc/rc.d/init.d/portmap start

   확인 : ps -ef | grep portmap

 

2. /usr/local/drac디렉토리에 drac_1.12.tar.gz 압축해제한다.

3. /usr/local/drac에 drac컴파일

   make

   make install

   make install-man

 

   확인 :  /usr/local/sbin/rpc.dracd 설치확인

   확인 :  /etc/rc.d/init.d/drac 확인

 

   drac 실행 : /etc/rc.d/init.d start

   drac 실행확인 : ps -ef | grep drac

 

 

** DRAC설치시에는 Makefile을 직접 서버상황에 맞게 설치해야한다. 특히  Makefile수정시 아래주의

 

INSTALL = install

EBIN = /usr/local/sbin

MAN = /usr/local/man/man

DEFS = -DSOCK_RPC -DFCNTL_LOCK -DGETHOST -DDASH_C

CC = gcc

RANLIB = :

CFLAGS = $(DEFS) -g

LDLIBS = -ldb

TSTLIBS = -L. -ldrac

RPCGENFLAGS = -C -I

MANLIB = 3

MANADM = 8

 

 

4. qpopper 설치 (옵션주의)

   ./configure --enable-specialauth --enable-bulletins=/var/spool/bulls --enable-servermode --enable-shy --enable-drac=/usr/local/drac

 

    make

 

    cp popper/popper /usr/local/lib/

    vi /etc/services

    cd /etc/xinetd.d

 

5. sendmail.cf 파일 수정

 

##################

#   local info   #

##################

의 적당한 위치 아래에  아래행 삽입

 

#SENDMAIL DRAC 설치 : 2004 01 29

Kdrac btree /etc/mail/drac

 

 

#####################################################################

###  check_rcpt -- check SMTP `RCPT TO:' command argument

######################################################################

SLocal_check_rcpt

위치 아래에  아래 복사 삽입할 것 (주의 : TAB)

# SENDMAIL DRAC 설치 : 2004 01 29

R$*     $: $&{client_addr}

R$+     $: $(drac $1 $: ? $)

R?      $@ ?

R$+     $@ $#OK

 

 

자료번호  : A005    Qpopper편

######################################################

 교재번호 : A005 : Qpopper

######################################################

######################  Qpopper  Ver : 4.0.4 #########

 

4.0.4버전도 기본 버전과 동일하게 설치하면 잘됨.....

 

./configure --enable-specialauth --enable-bulletins=/var/spool/bulls --enable-auto-delete --enable-servermode --enable-shy

 

 

--enable-specialauth     보안을 위해 암호화하거나 암호화된 shadow패스워드를 사용한다.

--enable-servermode      server mode 설치옵션, 기본은 xinetd모드 (Enable SERVER_MODE)

--enable-auto-delete     메일가져간 후에 가져간 메일 자동삭제(Automatically delete

 

 

### qpopper 4.0.4의 쓸만한 configure 옵션들...

 

 --enable-servermode      server mode 설치옵션, 기본은 xinetd모드 (Enable SERVER_MODE)

 --enable-bulletins=directory

                          Set the path for bulletin directory [/var/spool/bulls]

 --enable-bulldb=path     Set the path for bulletin directory and use database to

                              track bulletins [/var/spool/bulls]

 --enable-new-bulls=count Specify the maximum number of bulletins for new users [10]

 --enable-popbulldir=path Specify alternate directory for popbull files

  --with-pam=service-name  Use PAM authentication [pop3]

 --enable-apop=path       Set the pop.auth file path [/etc/pop.auth]

 --enable-scram=path      Include scram capability with AUTHDB file [/etc/pop.auth]

 --enable-popuid=pop      Set the owner of the pop.auth file. [pop]

 --enable-log-login       Log successful user authentications

 --enable-shy             qpopper버전 숨김, 보안을 위해 추천 (Hide qpopper version number )

 --enable-warnings        Enable additional compiler warnings

 --enable-hash-spool=1|2  Enable hashed spool directories [2]

 --enable-home-dir-mail=spool file

                          Mail spool file is in home directory [.mail]

 --enable-spool-dir=path  Spool directory [(search for it)]

 --enable-temp-drop-dir=path  

                          Directory for temporary mail drop [(spool directory)]

 --enable-cache-dir=path  Directory for cache files [(temp drop directory)]

 --enable-log-facility=name  

                          Log to specified facility [LOG_MAIL or LOG_LOCAL1]

 --enable-uw-kludge       Check for and hide UW 'Folder Internal Data' messages

 --enable-group-bulls     Group name is second part of bulletin file names

 --with-kerberos5=dir     Enable Kerberos 5 support

 --enable-any-kerberos-principal

                          Accept any Kerberos principal in POP request

 --enable-kuserok         Use kuserok() to vet users

 --enable-ksockinst       Use getsockinst() for Kerberos instance

 --enable-timing          Report elapsed time for login, init, and cleanup

 --with-drac=lib-path     Compile in DRAC support

 --enable-old-uidl        Use old UID encoding

 --disable-status         Don't write 'Status' or 'X-UIDL' headers

 --enable-keep-temp-drop  Don't delete temp drop files

 --disable-check-pw-max   Don't check for expired passwords

 --disable-old-spool-loc  Don't check for old spools in old location

 --enable-server-mode-group-include=group

                          Server mode set for users in this group

 --enable-server-mode-group-exclude=group

                          Server mode off for users in this group

 --enable-secure-nis-plus For use with secureNIS+

 --disable-optimizations  Turns off compiler optimizations

 --enable-standalone      Makes a standalone POP3 daemon instead of using inetd

 --enable-auth-file=path  허용할 사용자 설정파일 지정(Only users listed in the specified file have access)

 --enable-nonauth-file=path

                          허용하지 않을 사용자 설정파일 지정(Deny access to users listed in the specified file )

 --disable-update-abort   Don't enter UPDATE state on abort

 --enable-fast-update     Reduce I/O during server-mode updates

 --with-sslplus=path      Use SSL Plus from Certicom [/usr/local/sslplus]

 --with-sslplus-crypto=path

                          Crypto library to use with SSL Plus [securitybuilder]

 --with-openssl=path      Use OpenSSL [/usr/local/ssl]

 --with-gdbm=path         Use GDBM

 --disable-hash-dir-check Don't check if hashed spool dirs exist

 --enable-chunky-writes=0|1|2

                          Set default network write pooling [0]

 --enable-poppassd        Generate poppassd password-change daemon

 

 

3.x 버전 설치옵션

 

./configure --enable-specialauth --enable-bulletins=/var/spool/bulls --enable-servermode

make

 

cp popper/popper /usr/local/lib/

vi /etc/services

cd /etc/xinetd.d

 

에러해결1. 만약 로컬에서 telnet localhost 110 테스트가안될 경우에는

/etc/hosts.allow 파일설정을 다음과 같이 바꿔 본다.

[root@su12 popper]# cat /etc/hosts.allow

popper : ALL

 

에러해결2. /etc/xinetd.d/pop3 파일내에

        disable = no

이란 항목으 yes로 되어 있으면 절대로 안되며, 가능한 disable이란 행을 삭제해 버릴 것.

 

에러해결3. /etc/rc.d/init.d/ipchains stop

                             iptables stop

 

에러해결4. lokkit 에서 방화벽을 내린다.

 

에러해결5 . /etc/mail/relay-domains 에 도메인 등록

에러해결6. /etc/mail/trusted-users 에 사용자 등록

에러해결7. /usr/bin/elm 확인후 없다면 복사해 오거나 새로 설치

에러해결8. mailx 확인후 없다면 복사해 오거나 새로설치

에러해결9. /etc/mail/relay-domains에 등록되지 않은 도메인으로는 메일이 나가지 않음

 

에러메시지 Relay Denied 라고 나옴. 여기 등록하고 sendmail restart 해야함.

 

문제 : 나가는 것은 잘 안될때, pop서버 연결안될때...ipchains stop으로 해결할것..

 

[root@su36 mail]# /etc/rc.d/init.d/ipchains stop

Flushing all chains:                                       [  확인  ]

Removing user defined chains:                              [  확인  ]

IP CHAINS의 ACCEPT 정책들을 기본값으로 재설정 합니다:      [  확인  ]

 

문제 : pop서버 연결안될때...ipchains stop으로 해결할것..

 

/etc/hosts.allow 파일에 다음과 같이 해결할 것..

 

popper : ALL

 

 

자료번호  : A006    Proftpd편

######################################################

 교재번호 : A006  : Proftpd

######################################################

#########################   Proftpd  Ver :1.2.8 ######

 

tar xvfpz proftpd-1.2.8.tar.gz

cd proftpd-1.2.8

./configure --prefix=/usr/local/proftpd --enable-timeout-no-transfer --enable-timeout-idle --enable-autoshadow --enable-sendfile

make

make install

cd /usr/local/proftpd/sbin

./proftpd

vi /etc/rc.d/rc.local

 

 

유용한 옵션들

--disable-largefile     omit support for large files

--enable-auth-pam       enable PAM support (default=yes)

--enable-shadow         force compilation of shadowed password support

--enable-timeout-ident  set the default timeout (in secs) for RFC931

                          connections (default=10)

--enable-timeout-idle   set the default timeout (in secs) for idle

                          connections (default=600)

--enable-timeout-linger set the default timeout (in secs) for lingering

                          closes (default=180)

--enable-timeout-login  set the default timeout (in secs) for logging in

                          after connecting (default=300)

--enable-timeout-no-transfer

                          set the default timeout (in secs) for no data

                          transferred (default=300)

--enable-timeout-stalled

                          set the default timeout (in secs) for stalled

                          transfers (default=3600)

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

Proftpd  Ver :1.2.6

 

tar xvfpz proftpd-1.2.6.tar.gz

cd proftpd-1.2.6

./configure --prefix=/usr/local/proftpd --enable-autoshadow --enable-shadow

make

make install

cd /usr/local/proftpd/sbin

./proftpd

vi /etc/rc.d/rc.local

  

 

자료번호  : A007    Tripwire편

######################################################

 교재번호 : A007  : Tripwire

######################################################

#########################   Tripwire Ver 2.3-47  #####

 

tar xvfpz tripwire-2.3-47.bin.tar.gz

cd tripwire-2.3

./install.sh

tripwire --init

 

 

자료번호  : A008    libpng편

######################################################

 교재번호 : A008   : libpng

######################################################

########### libpng 설치   Ver : 1.0.8 ###########

 

tar xvfz libpng-1.0.8

cd scripts

cp makefile.linux ../makefile

cd ..

make test

make install

ls -l /usr/local/include

ls -l /usr/local/lib

 

 

자료번호  :  A009    libpcap편

######################################################

 교재번호 : A009   : libpcap

######################################################

############# libpcap 설치 Ver : 0.4   ############

 

tar xvfpz libpcap.tar.gz

cd libpcap-0.4/

./configure

make

make install

 

자료번호  : A010    FreeType편

######################################################

 교재번호 : A010  : FreeType

######################################################

############### FreeType 설치 Ver : 1.2 ##########

 

tar xvfpz freetype-1.2.tar.gz

./configure

make

make install

 

make시에 에러는 다음과 같이 해결할 것...

Makefile.in은 현재디렉토리밑의 test/arch/unix/Makefile.in에 존재한다.

 

주의 Makefile.in을 수정하고 나면 configure부터 다시 할것....

 

[root@minjung unix]# vi Makefile.in

# $(srcdir)/ftstring.c

# $(srcdir)/fttimer.c

# $(srcdir)/ftview.c

# $(srcdir)/ftzoom.c

PROGRAMS = ftview fttimer ftlint ftdump ftdump ftzoom ftstring ftstrpnm fterror

에러 방지를 위해 해줘야할 것은 X-windows와 관련된 위의 빨간색 부분들을 주석처리 또는 삭제를 하도록 한다.

 

 

 

자료번호  : A011    zlib편

######################################################

 교재번호 : A011   : zlib

######################################################

############## zlib설치 Ver : 1.1.4  ###########

 

tar xvfpz zlib-1.1.4.tar.gz

cd zlib-1.1.4

./configure

make

make test

make install

 

 

자료번호  :  A012    GD편

######################################################

 교재번호 : A012   : GD

######################################################

################  GD 설치 Ver : 1.8.4  ############

 

http://www.boutell.com/gd/

 

gd설치전에 zlib, libpng, freetype등이 설치되어있어야 한다.

 

gd 컴파일시에 에러가 나는 것은 보통 선설치조건들이 설치되지않아서 나는 것들이지만,

특별하게 jpeg등과 같은 에러가 나는 경우가 있다.

그럴때에는 Makefile내에서

 

libgd.a: gd.o gd_gd.o gd_gd2.o gd_io.o gd_io_dp.o gd_io_file.o gd_ss.o

        gd_io_ss.o gd_png.o gd_jpeg.o gdxpm.o gdfontt.o gdfonts.o gdfontmb.o gdfontl.o

        gdfontg.o gdtables.o gdft.o gdttf.o gdcache.o gdkanji.o wbmp.o

        gd_wbmp.o gdhelpers.o gd.h gdfontt.h gdfonts.h gdfontmb.h gdfontl.h

        gdfontg.h gdhelpers.h

        rm -f libgd.a

        $(AR) rc libgd.a gd.o gd_gd.o gd_gd2.o gd_io.o gd_io_dp.o

                gd_io_file.o gd_ss.o gd_io_ss.o gd_png.o gd_jpeg.o gdxpm.o

                gdfontt.o gdfonts.o gdfontmb.o gdfontl.o gdfontg.o

                gdtables.o gdft.o gdttf.o gdcache.o gdkanji.o wbmp.o

                gd_wbmp.o gdhelpers.o

        -ranlib libgd.a

 

위의 빨간색 부분과 같이 관련 라이버러리를 삭제하고 재컴파일하면 된다.

재 컴파일할때에는 반드시 make clean으로 이전에 생성된 object파일을 삭제한 후에 컴파일하도록 한다.

 

 

#### Ver 2.0.9

 

The simplest way to compile this package is:

 

  0. mv gd-2.0.9  gd

 

  1. `cd' to the directory containing the package's source code and type

    

관련자료

댓글 0
등록된 댓글이 없습니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,034 명
  • 현재 강좌수 :  35,788 개
  • 현재 접속자 :  308 명