'ITWeb/서버관리'에 해당되는 글 125건

  1. 2011.09.07 openssl 소스설치하기.
  2. 2011.09.07 [httpd] mod_disk_cache.c:91: undefined reference to `ap_cache_generate_name'
  3. 2011.09.07 berkeley db 소스설치하기
  4. 2011.09.07 CentOS network proxy 설정
  5. 2011.09.07 yum proxy 설정
  6. 2011.09.07 httpd source 로 설치하기.
  7. 2011.09.07 Server hostname 변경
  8. 2011.09.07 CentOS 설치 도움 링크
  9. 2011.09.07 계정관리
  10. 2011.09.07 [CentOS] VNC로 설치 하기.

openssl 소스설치하기.

ITWeb/서버관리 2011. 9. 7. 13:34
걍.. 요즘은 yum 으로 default 설치 하시는게 좋은 것 같습니다.

# 다운로드

    http://www.openssl.org/source/

 

# 설치

    root 로 설치

 

# 압축풀기

    tar -xvzf openssl-1.0.0d.tar.gz

 

# configure & make

    cd openssl-1.0.0d

    ./config --openssldir=/usr/local/ssl shared threads zlib

    make

    make install

 

# ld.so.conf 수정

    vi /etc/ld.so.conf

        파일 하단에 아래 내용 추가

        include /usr/local/ssl/lib

 

# lib load

    /sbin/ldconfig 실행

:

[httpd] mod_disk_cache.c:91: undefined reference to `ap_cache_generate_name'

ITWeb/서버관리 2011. 9. 7. 13:33
오타 또는 옵션을 빼먹기 쉽습니다.. ^^;

configure 옵션에 --enable-cache 옵션을 주지 않고 다른 cache 옵션을 주게 되면 make 시에 아래와 같은 오류가 발생 합니다.

 

넣는다고 넣었는데.. 빼먹는 경우가 간혹 있으니 주의 하세요!!

 

modules/cache/.libs/libmod_disk_cache.a(mod_disk_cache.o): In function
`data_file':
/u00/httpd-2.2.6/modules/cache/mod_disk_cache.c:91: undefined reference to
`ap_cache_generate_name'
modules/cache/.libs/libmod_disk_cache.a(mod_disk_cache.o): In function
`header_file':
/u00/httpd-2.2.6/modules/cache/mod_disk_cache.c:73: undefined reference to
`ap_cache_generate_name'
modules/cache/.libs/libmod_disk_cache.a(mod_disk_cache.o): In function
`store_headers':
/u00/httpd-2.2.6/modules/cache/mod_disk_cache.c:906: undefined reference to
`ap_cache_cacheable_hdrs_out'
/u00/httpd-2.2.6/modules/cache/mod_disk_cache.c:928: undefined reference to
`ap_cache_cacheable_hdrs_out'

 
:

berkeley db 소스설치하기

ITWeb/서버관리 2011. 9. 7. 13:32

# 다운로드

    http://www.oracle.com/technetwork/database/berkeleydb/downloads/index-082944.html

 

# 압축풀기

    tar -xvzf db-4.8.30.NC.tar.gz

 

# configure & make

    cd db-4.8.30.NC

    make clean

    cd build_unix

    ../dist/configure --prefix=/home/계정/app/bdb --enable-cxx --enable-shared --enable-static

    make

    make install

:

CentOS network proxy 설정

ITWeb/서버관리 2011. 9. 7. 13:30

1. cd /etc

2. vi profile

3. 아래 코드 삽입 (/bin/bash 사용)

    http_proxy=프락시정보등록
    export http_proxy

 

기본 GUI 환경에서 세팅을 먼저 진행한 후 설정 정보 이기 때문에 동작 여부 확인 필요함.

:

yum proxy 설정

ITWeb/서버관리 2011. 9. 7. 13:30

yum 사용시 사내 방화벽으로 인해 proxy 설정을 해야 합니다.

(또는 시스템 network proxy 설정을 하시면 됩니다.)

방법은 아래와 같습니다.

 

# yum.conf에 proxy 정보 등록

    1. cd /etc

    2. vi yum.conf

        설정 파일 제일 하단에.. 아래 내용 추가

    3. proxy=프락시정보등록(http://......)

        저장하고 나온 후 실행 하면 정상 동작 합니다.

    4. yum list or yum -y update

:

httpd source 로 설치하기.

ITWeb/서버관리 2011. 9. 7. 13:29

# GNU SW 설치

    http://mirror.yongbok.net/gnu

 

# Apache configure 참고 문서

    http://httpd.apache.org/docs/2.0/programs/configure.html

    설치 경로에서 configure 하면 나오는 내용 참고 (본 문서 하단에 첨부함.)

 

1. tar -xvzf httpd-2.2.17.tar.gz

2. cd /home/계정/app

3. mkdir httpd-2.2.17

4. cd /home/계정/dist/httpd-2.2.17

5. ./configure --prefix=/home/계정/app/httpd-2.2.17 --enable-auth-dbm --enable-dav --enable-dav-fs --enable-deflate --enable-cache --enable-disk-cache --enable-expires --enable-ext-filter --enable-file-cache --enable-headers --enable-info --enable-logio --enable-mem-cache --enable-mime-magic --enable-proxy --enable-proxy-connect --enable-proxy-http --enable-proxy-balancer --enable-rewrite --enable-so --enable-speling --enable-ssl --enable-unique-id --enable-usertrack --enable-vhost-alias --enable-bucketeer --with-mpm=worker --with-ssl=/usr/local/ssl --with-z=/usr/local/zlib --enable-dumpio  

5. make

6. make install

7. ln -s /home/계정/app/httpd-2.2.17 httpd


./configure --help 를 통해서 옵션을 확인 하고 설치 하시면 됩니다.
위에 옵션들은 최적화된 옵션이 아니기 때문에 똑같이 설정 하실 경우 성능에 대한 보장은 책임 지지 않습니다.. ㅋ
 

:

Server hostname 변경

ITWeb/서버관리 2011. 9. 7. 09:55

아래와 같이 하면 변경이 가능합니다.

변경 후 reboot 하셔야 합니다.

 

1. root user 로 로그인

2. cd /etc/sysconfig

3. vi network

4. shutdown -r now

 

 

usage: reboot [-n] [-w] [-d] [-f] [-h] [-i]

        -n: don't sync before halting the system

        -w: only write a wtmp reboot record and exit.

        -d: don't write a wtmp record.

        -f: force halt/reboot, don't call shutdown.

        -h: put harddisks in standby mode.

        -i: shut down all network interfaces.

 

 

 

Usage:    shutdown [-akrhHPfnc] [-t secs] time [warning message]
                  -a:      use /etc/shutdown.allow
                  -k:      don't really shutdown, only warn.
                  -r:      reboot after shutdown.
                  -h:      halt after shutdown.
                  -P:      halt action is to turn off power.
                  -H:      halt action is to just halt.
                  -f:      do a 'fast' reboot (skip fsck).
                  -F:      Force fsck on reboot.
                  -n:      do not go through "init" but go down real fast.
                  -c:      cancel a running shutdown.
                  -t secs: delay between warning and kill signal.
                  ** the "time" argument is mandatory! (try "now") **

 

:

CentOS 설치 도움 링크

ITWeb/서버관리 2011. 9. 7. 09:54

CentOS 설치 시 참고 하면 도움이 많이 됩니다.

또한 서버 관리에 대한 지식이 없는 사람도 문서를 따라 진행 하시면 쉽게 설정을 할 수 있습니다.

 

1. 기본 홈페이지 : http://www.centos.org/

2. Document 페이지 : http://www.centos.org/docs/5/

3. Deployment 페이지 : http://www.centos.org/docs/5/html/5.2/Deployment_Guide/

:

계정관리

ITWeb/서버관리 2011. 9. 7. 09:54

[참고사이트]

http://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-users-tools.html

 

1. account 생성

    useradd 계정명 -m -b /home/계정명 -d /home/계정명 -s /bin/bash

    passwd 계정명 후 암호 입력

:

[CentOS] VNC로 설치 하기.

ITWeb/서버관리 2011. 9. 7. 09:52

※ 설정 방법에 대한 자세한 내용은 아래 링크 참조

    기본 설치 방법 : http://www.jopenbusiness.com/mediawiki/index.php/CentOS#.EC.84.A4.EC.B9.98_.EA.B0.80.EC.9D.B4.EB.93.9C

    VNC 설치 방법 : http://www.jopenbusiness.com/mediawiki/index.php/CentOS#VNC_Server_.EC.84.A4.EC.B9.98

 

Basic Info.

- ftp 정보 : ftp.yongbok.net

- centos path : centos/5.6/os/x86_64

 

1. tightVNC viewer 를 다운 받는다.

http://sourceforge.net/projects/vnc-tight/files/TightVNC-win32/1.2.9/tightvnc-1.2.9_x86_viewer.zip/download

 

※ 사내 보안정책으로 관련 홈페이지에 접근이 제한된다. 주의 요망!

 

 

 

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

 

CentOS Network 설정

VNC Server 설치

VNC (Virtual Network Computing)는 원격으로 Linux의 GUI 화면으로 접속할 수 있도록 한다.

  • VNC Server 설치
#--- CentOS에 root로 로그인 한다.
yum -y install vnc-server
  • vi /etc/sysconfig/vncservers
VNCSERVERS="1:root"    #--- 1번부터 5901 port를 사용 한다.
VNCSERVERARGS[1]="-geometry 1152x864"   #--- 추가 옵션 : -nolisten -nohttpd -localhost
  • VNC Server 사용자 password 생성
cd
mkdir .vnc
cd .vnc
vncpasswd
#--- 여기서 암호를 입력 한다.
service vncserver restart
  • 방화벽에서 해당 사용자의 port를 오픈하여야 한다.
#--- /etc/sysconfig/vncservers에 등록된 1번부터 5901 port를 사용 한다.
  • VNC Client에서 접속 시
VNC Viewer로 접속시 "IP:5901"로 접속 한다.
TightVNC Viewer로 접속시 "IP:1"로 접속 한다.
  • 처음 접속이 완료되면 xstartup 파일이 생성된다. 이를 수정하여 예쁜화면을 사용하자.
cd
cd .vnc
vi xstartup
    ### twm &                #--- 이 라인을 주석 처리(삭제) 한다.
    gnome-session &          #--- 이 라인을 추가 한다.
service vncserver restart
  • 설치 정보
  • 설치 폴더 :
  • 실행 파일 : /usr/bin/
  • 환경 설정 : /etc/sysconfig/vncservers
  • 기동 종료 : /etc/init.d/vncserver start, stop, restart
  • 서비스 확인 :
  • 참고 문헌

주요 SW 설치

암호 변경

passwd

CentOS용 프로그램

  • 시스템 라이브러리 설치
yum -y install zlib curl   
yum -y install gcc g++ cpp gcc-c++ compat-gcc-34-g77
yum -y install libxml2 libxml2-devel
yum -y install gd gd-devel
yum -y install freetype freetype-devel
yum -y install libpng libpng-devel
yum -y install libjpeg libjpeg-devel
yum -y install fontconfig  fontconfig-devel
yum -y install mhash mhash-devel
yum -y install libmcrypt libmcrypt-devel
yum -y install openssl openssl-devel
yum -y install gmp gmp-devel
yum -y install flex
yum -y install libtermcap-devel ncurses-devel libc-client-devel bzip2-devel
  • 필요한 경우 컴파일러를 설치 한다.
yum -y install gcc gcc-c++ termcap libtermcap libtermcap-devel gdbm-devel

vsftpd 설치

  • vsftp 현황 확인
yum list | grep vsftpd               #--- 설치 가능한 package 확인
yum list installed | grep vsftpd     #--- 설치된 package 확인
  • vsftpd 설치
yum -y install vsftpd
rpm -qa | grep vsftpd                #--- vsftpd 설치 확인
  • 아래 설치 정보에 정리된 블랙 리스트에서 ftp를 사용할 사용자를 빼준다.
  • vi /etc/vsftpd/ftpusers
  • vi /etc/vsftpd/user_list
  • 방화벽에서 20, 21 port를 개방 한다.
system-config-securitylevel
  • FTP 클라이언트에서 접속이 디렉토리 목록이 표시되지 않을 경우
  • FTP Client 설정에서 문자셋을 UTF-8로 강제로 설정하고 접속 한다.
  • 설치 정보
  • 실행 파일 : /usr/sbin/
  • 환경 파일 : /etc/vsftpd/vsftpd.conf
  • 블랙 리스트 : /etc/vsftpd/ftpusers, /etc/vsftpd/user_list
  • 기동 종료 : /etc/init.d/vsftpd start, stop, restart, status
  • 서비스 확인 : ps -ef | grep vsftpd | grep -v grep
  • showinfo_vsftp.bash
#!/bin/bash
echo 'vsftp 버전     : vsftp 2.0.5'
echo '환경 파일      : vi /etc/vsftpd/vsftpd.conf'
echo '블랙 리스트    : /etc/vsftpd/ftpusers, /etc/vsftpd/user_list'
echo '기동 종료      : service vsftpd restart'
echo '서비스 확인    : ps -ef | grep vsftpd | grep -v grep'
: