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

리눅스서버 어플리케이션 리뷰 SW9개편

작성자 정보

  • 웹관리자 작성
  • 작성일

컨텐츠 정보

본문

리눅스서버 어플리케이션 리뷰 SW9개편


작성자 : (주)수퍼유저코리아, http://www.superuser.co.kr 서버팀


Tripwire편

top



Tripwire Ver 2.3-47 #####

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

cd tripwire-2.3

./install.sh

tripwire --init

 

■ libpng편

top


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


■ libpcap편

top


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

tar xvfpz libpcap.tar.gz

cd libpcap-0.4/

./configure

make

make install


■ FreeType편

top


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와 관련된 위의 빨간색 부분들을 주석처리 또는 삭제를 하도록 한다.


■ zlib편

top


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

tar xvfpz zlib-1.1.4.tar.gz

cd zlib-1.1.4

./configure

make

make test

make install


■ GD편

top


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 `./configure' to configure the package for your system.
If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself.
Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for.

2. Type `make' to compile the package.

3. Optionally, type `make check' to run any self-tests that come with the package.

4. Type `make install' to install the programs and any data files and documentation.

5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainlyfor the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution.

반드시 1.8.4이상 버전을 사용할 것.....

설치위치 : /usr/local/

tar xvfpz gd-1.8.4.tar.gz

mv gd-1.8.4 gd

cd gd

./configure ,,,실행안되면 그냥 건너뜀.

make

make install

#### GD 1.5버전 설치 참조...

tar xvfpz gd1_5.tar.gz

cd gd1.5/

make

cp libgd.a /usr/local/lib/

mkdir /usr/local/include/

cp *.h /usr/local/include/

GD설치이전에 zlib이 설치되어 있어야함....


■ PortSentry편

top


PortSentry Ver 1.1 #########

tar xvfpz portsentry-1.1.tar.gz

cd portsentry-1.1

make linux

make install

cd /usr/local/psionic/portsentry

./portsentry -tcp

./portsentry -udp

vi /etc/rc.d/rc.local


■ CHKROOTKIT편

top


chkrootkit : Ver 0.37 ########

다운로드사이트 : http://www.chkrootkit.org/

설치법

tar xvfz chkrootkit.tar.gz

cd chkrootkit-0.37

vi로 아래 파일들을 열어서 로그파일의 위치 수정해줄것..

check_wtmpx.c에서 수정해야할 행...

#define WTMP_FILENAME "/var/log/wtmp"

#define WTMPX_FILENAME "/var/log/wtmpx"

chklastlog.c에서 수정해야할 행...

#ifdef __FreeBSD__

#define WTMP_FILENAME "/var/log/wtmp"

#define LASTLOG_FILENAME "/var/log/lastlog"

#endif

#ifdef __OpenBSD__

#define WTMP_FILENAME "/var/log/wtmp"

#define LASTLOG_FILENAME "/var/log/lastlog"

#endif

#ifndef WTMP_FILENAME

#define WTMP_FILENAME "/var/log/wtmp"

#endif

#ifndef LASTLOG_FILENAME

#define LASTLOG_FILENAME "/var/log/lastlog"

#endif


chkwtmp.c에서 수정해야할 행...

#ifdef __FreeBSD__

#define WTMP_FILENAME "/var/log/wtmp"

#else

#ifndef WTMP_FILENAME

#define WTMP_FILENAME "/var/log/wtmp"

#endif

#endif

그리고 다음과 같이 컴파일한다.

make sense


■ WebAlizer편

top


Webalizer 설치 Ver 2.01-10 #####

선설치요건 : gd가 설치되어있어야한다.

이 설치방법은 웹호스팅서버에서 여러개의 도메인들을 한번에 자동으로(cron에 의한 실행) 실행하기 위한 설치임....

개별 호스팅고객들이 개인의 웹사이트만을 분석하기 위한 방법은 이 설치예를 참고하면 간단히 할 수 있음.

강좌 참조 : www.superuser.co.kr의 weblog파트 참조

설치위치 : /usr/local/webalizer

현재설치버전 : webalizer-2.01-10-src.tgz

먼저 webalizer-2.01-10-src.tgz를 /usr/local/에 가져다 두고 작업한다.

따라서 현재 설치위치는 /usr/local이 된다.

1. ./configure --with-language=korean

2. make

3. make install

참고 : make install시에 다음과 같은 에러가 발생할 수 있다.

[root@wowcnc webalizer]# make install

/usr/bin/install -c webalizer /usr/local/bin/webalizer

/usr/bin/install -c -m 644 webalizer.1 /usr/local/man/man1/webalizer.1

/usr/bin/install: cannot create regular file `/usr/local/man/man1/webalizer.1': 그런 파일이나 디렉토리가 없음

make: *** [install] 오류 1

[root@wowcnc webalizer]# mkdir /usr/local/man/man1/

mkdir: cannot create directory `/usr/local/man/man1': 그런 파일이나 디렉토리가 없음

[root@wowcnc webalizer]# mkdir /usr/local/man/

[root@wowcnc webalizer]# mkdir /usr/local/man/man1/

위의 에러는 /usr/local/man/man1 이라는 디렉토리가 존재하지 않아서 발생하는 에러이므로 /usr/local/man/man1 디렉토리를 생성해주고 다시 make install하면 됨.

4. mkdir /usr/local/webalizer/conf

/usr/local/webalizer/conf/ 에 생성되는 개별도메인들의 conf 파일 예

---------------domain.co.kr.conf 의 예

[root@wowcnc conf]# cat domain.co.kr.conf | more

### 수정해야할 부분

### 개별 호스팅가입자에게 맞게 셋팅하면됩니다.

LogFile /home/domain/www_log/access_log

OutputDir /home/domain/www/weblog

HistoryName www.domain.co.kr

ReportTitle WWW.DOMAIN.CO.KR 웹로그분석

HostName DOMAIN.CO.KR

######### 수정해야할 부분 끝

######## by written SUPERUSER KOREA (수퍼유저코리아)

####### EMAIL : webmaster@superuser.co.kr

####### http://www.superuser.co.kr

#LogType clf

#Incremental no

#IncrementalName webalizer.current

#HTMLExtension html

PageType htm*

PageType cgi

...중략....


5. mkdir /usr/local/webalizer/bin

/usr/local/webalizer/bin/webalizer.sh의 예

[root@wowcnc bin]# cat webalizer.sh

/usr/local/bin/webalizer -c /usr/local/webalizer/conf/domain.co.kr.conf > /home/domain/www/weblog/domain.co.kr

/usr/local/bin/webalizer -c /usr/local/webalizer/conf/domain1.co.kr.conf > /home/domain1/www/weblog/domain1.co.kr

/usr/local/bin/webalizer -c /usr/local/webalizer/conf/domain2.co.kr.conf > /home/domain2/www/weblog/domain2.co.kr

....중략...

6. cron에 등록해야할 것..

00 03 * * * su - root -c '/usr/local/webalizer/bin/webalizer.sh'

7. 그리고 개별 홈디렉토리에 반드시 있어야하는 디렉토리들....(없으면 생성할것...)

/home/domain/www_log <= access_log 웹로그 소스파일

/home/domain/www/weblog <= access_log 웹로그파일을 분석한 결과파일 저장위치.


 
copyright.gif

관련자료

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

공지사항


뉴스광장


  • 현재 회원수 :  60,037 명
  • 현재 강좌수 :  35,806 개
  • 현재 접속자 :  110 명