제가 주로 영상 인코딩을 할때 유마인 인코딩을 많이 사용합니다.
매우 편하고 화질도 그다지 나쁘지 않기 때문이지요.
이거 말고도 인코딩 프로그램은 많이 있습니다.
여러분의 취향대로 알아서 사용하세요.

설치시 기타 프로그램은 채크 하지 않는게 좋습니다. 컴퓨터만 무거워 집니다. ^^

설치가 완료되고 실행하면 아래 처럼 업데이트 하겠냐고 물어보는데 저는 하지 않고 그냥 사용합니다.
왜냐하면 크게 기능에 하자가 없고 귀찮습니다. 크게 향상 된 부분이 있다면 직접 받아서 수동으로
패치하는 스타일 입니다.

업데이트 취소하면 넘어가면 아래 처럼 속성을 설정하는 부분이 나옵니다.
여러분의 취향에 따라 하시면 되지만 저는 주로 영상폰으로 보기 위해서 다음과 같이
애플 5.5방식으로 해 놓고 인코딩 하는 경우가 많습니다.
여기서 중요한건 비트수하고 프레임 수를 얼마만큼 잘 설정해 주는냐에 따라 
화질이 결정되고 파일 용량도 결정한다는 사실을 생각 하시면서 설정해 주시기 바랍니다. 

아래 설정 방식은 제가 중요한 영상을 파일을 인코딩할때 직접 설정하는 사용자 방식입니다.
이 모드는 어느정도 영상 인코딩에 대한 기본 지식이 있는 분만 사용하는 방식입니다.
저같은 경우는 비트는 300에 프레임은 25-30으로 해 두고 해상도는 보통 400x300으로 해 두고
인코딩 합니다. 정말 중요한 비디오나 강의 영상을 씨디로 저장할때 사용하는 방식입니다.
중요한건 비트+프래임+해상도 3개가 인코딩 화질을 결정하는데 매우 중요하다는 사실입니다.
여러분이 많이 해 보시면 이해가 가실겁니다.

저장 공간 설정하고 생성규칙에 대한 설정 입니다.
별로 특별하게 설정할 부분은 많지 않습니다.

자막하고 같이 인코딩 할때 설정해 주는 옵션부분입니다.
이것도 별로 어려운 내용이 없고 특별히 설정해 주는 부분이 적습니다.

적용하고 나오면 아래처럼 메뉴에 파일 추가해서 인코딩할 파일을 션택해 줍니다.
중요한게 있는데 자막하고 인코딩할때 영상파일하고 자막파일하고 서로 파일이름이 같아야 합니다.
그래야만 인코딩할때 자막유무에서 재대로 선택이 되었다고 표시가 나온다는 사실을 잊지 마세요.

유마인인코딩의 좋은 점이 아래처럼 여러게를 한꺼번에 인코딩해 주는게 참 좋은 점입니다.
저같은 이렇게 보통 10-20개 정도를 선택해서 인코딩하게 해 놓고 다른 컴에서 작업을 합니다.
이유가 부하가 걸리면 작업시간이 길어집니다. 다른 작업은 하지 않는게 좋습니다.

 이제 이런식으로 여러분이 인코딩해 보세요. 재미있습니다.^^



지금 설명하는 방식은 일반 방식이 아니고 사용자 모드 방식입니다.
제가 가장 많이 사용하는 방법이고 추가적인 고급 설정이 용이 합니다.
제가 구체적인 설명을 하지 않아도 밑에 그림들에 설명글을 다 적어 두어서
그것만 읽어봐도 충분이 이해가 갑니다. 

vm웨어 버전을 선택하고 다음 진행. 

 임의의 가상머신 디스크 설치 옵션을 선택하고 다음 진행

 저는 원도우를 설치하므로 첫번째 마이크로소프트 부분을 선택하고
그 밑에 부 메뉴에서 서버2008를 선택하겠습니다.

저장할 가상머신 경로를 선택하고 다음 진행 

 사용할 프로세서는 일반적으로 대부분 한개만 사용합니다.
대형서버가 아닌이상 하나로도 충분합니다.

 권장 메모리 부분입니다. 서버2008은 1028메모리가 필요합니다.
그렇지만 재대로 사용할려면 그 이상 설정하는게 좋습니다.
나중에 너무 권장이하로 메모리를 설정하면 너무 느리고 부하가 걸려서
재대로 작업하기가 어렵습니다.

네트워크 부분인데 이건 두번째 변동주소 사용을 선택하세요 즉 VM웨어 자체적으로
부여하는 사설IP를 받아서 사용한다는 의미입니다.
나중에 VM웨어 편집메뉴에 가상 네트워크 편집 부분에 가시면 이해가 가실겁니다.

 밑에 그림처럼 SCSI방식의 LSI방식을 선택하고 다음으로 진행하세요.

 이제 새로운 가상 하드디스크를 생성하세요.

 하드디스크 타입을 선택하고 다음으로 진행 합니다.

 사용할 용량을 정해주고 다음으로 진행.

저장할 디스크 경로나 이름을 정해주고 다음 진행. 

이런식으로 자신이 사용할 가상하드웨어를 분류대로 추가해서 사용할수 있습니다.

이제 중요한 부분인데  OS부팅이미지 원본 파일을 지정해 주어야 합니다.
밑에 그림을 보시고 여러분이 설치하고자 하는 시스템설치 이미지를 추가해 주셔야 부팅이
됩니다.
몰론 floppy방식으로도 이미지를 불러와서 부팅할수 있지만 지금 이거 사용하는 사람은 별로
없고 대부분 시디이미지를 사용하는게 일반적입니다. 

 이제 설정이 다 끝났네여. 이제 부터 본격적으로 머신을 실행해서 OS를 설치하시면 됩니다.

 

일단 가상OS를 추가하기 전에 분류대로 정리하는게 편할 것이다.
예를 들면 원도우 2003서버라는 폴더을 만들고 그안에 여러개의 원도우2003서버 OS를 다중으로 생성해서 만들어 두면 관리하기가 수월하다. 나중에 보면 서버2003를 다중으로 부팅해서 공유네트워크 시스템을
병렬방식으로 구축하기 위한 것이다. 이건 너무 전문적인 얘기라서 내가 그냥 예로 설명한 것이다.
vm웨어에서 작업하시기 전에 폴더방식으로 정리하는걸 습관화 하시는게 좋을겁니다.

 예로 xp 서비스 3이라는 폴더를 그림처럼 만들수 있습니다.

 만든 폴더를 클릭하고 마우스 버튼을 클릭하면 메뉴에서 가상머신을 클릭한다.

가상디스크 생성 마법사가 열린다. 여기서 여러분이 원하는 방식의 설정을 해
주시면 됩니다. 

 밑에 그림을 참고 하시기 바라고 제가 그림에다 설명을 다 적어 두어서
자세한 설명은 하지 않겠습니다.
따라해 보시면 충분히 이해가 가실겁니다.

 만약 여러분이 원도우 시디키를 가지고 있다면 여기다 적어 넣어시면 나중에 설치하면서 자동으로
씨디키 입력과정을 생략하고 자동으로 넘어 갑니다. 왜냐하면 지금 그림처럼 이미 키에 대한 정보가
입력되어 있기 때문이죠. 무슨 말인지 아시겠죠.
그 다음에 호스트 계정 이름이 나오는데 이건 적지 않아도 되고 적으시면 더 좋겠죠
어드빈 관리자의 암호도 직접 입력할수 있습니다. 이렇게 입력되면
마찬가지로 OS설치시에 이 과정은 자동으로 생략이 되면서 다음 과정으로 넘어갑니다.

 가상디스크가 저장될 장소를 입력해 주시기 바랍니다.

 여기는 본격적인 가상하드웨어 디바이스를 설정하는 부분입니다.
이거는 제가 일일이 하나하나 설명하기가 참 어렵네여.
중요한 것은 하드디스크 부분입니다. 여기서 가상디스크 허용 용량을 20기가 했는데.
이건 여러분이 알아서 정해 주세요. 필요한 만큼 정해 주셔도 되고 나중에 만약 용량이 더 필요하다면
하나의 가상하드디스크를 따로 추가해서 사용할수 있습니다.

제가 최고로 많이 추가한게 6개까지 가상으로 달아본 적이 있습니다.
이해가 가실지 모르겠네요.

만들어진 가상머신을 실행하면 본격적인 시스템 설치가 시작됩니다.

밑에 그림에서 보듯이 가상머신을 실행을 누르시기 바랍니다. 

 부팅이 되면서 xp설치 창이 실행 되고 있는 모습니다.

 이런방식은 실재로 컴퓨터에 물리적으로 설치하는 것과 똑같은 방식이라는걸 알수 있습니다.
원도우 뿐만 아니고 유니스나 리눅스도 마찬가지로 사용할수 있습니다.
시스템 관리 쪽으로 공부하시는 분이라면 vm웨어 사용법은 반드시 알고 있어야 합니다.
제가 생각할때 이게 바로 기본입니다.

 여기까지가 OS 추가 방법 및 부팅 이미지 설정의 대략적인 설명입니다.
몰론 저는 이런 방식으로 하지않고 다른 방법으로 사용하지만 그건 초보자들에게는 좀 어렵습니다.
제가 지금까지 설명한 일반적인 방법만 알아도 사용하는데는 문제가 없습니다.

 

 

수리눅스는 서버OS로 제작한 버전입니다.

CentOS리눅스를 포팅해서 필요없는 팩키지는 제거하고 서버에 필요한 팩키지만 모아서 만든

리눅스라는 사실은 알고 계세요.

저는 역시 VM웨어를 사용해서 설치해 보겠습니다. 제가 사용하는 버전은 2버전입니다.

 

일단 부팅하면 boot라는 프롬프트가 뜨는데 엔터 치세요. 즉 일반 모드로 설치한다는 의미입니다.

두번째는 text모드에서 한다는 의미입니다.

 

파티션에 대한 설정 부분이 나옵니다. 여기서 여러분이 사용하는 하드디스크 사양을 선택해

주시면 됩니다.

 

밑에 그림처럼 여러분이 생성해 주시면 됩니다.

중요한건 /boot + / + swap 스왑메모리 이 3개는 꼭 생성하셔야 합니다. 이건 기본입니다.

몰론 임의로 따로 설정하는 법이 있지만 그렇게 많이 생성하면 불안하고 관리하기도 어렵습니다.

보통 저같은 경우는 /boot + / + /home + /usr + swap 이렇게 5개로 나누어서 작업을 하지만

초보자들의 경우는 3개만 설정해도 무난 합니다.

 

파티션이 마무리 되면 저장하고 나오면 됩니다.

밑에 그림은 IP에 대한 네트워크 설정 입니다.

보통 IPV4를 많이 사용하므로 그걸 선택하면 됩니다.

만약 IPV6도 사용하시길 원한다면 다 선택하셔도 됩니다.

 

지금 저는 vm웨어에서 그냥 설치하는 거라서 dhcp로 받아서 하겠습니다.

걱정하지 않아도 됩니다. 왜냐하면 나중에 네트워크는 설정에서 고정IP로 변경해 주면

그만입니다.

구지 여기서 할 필요는 없지만 보통 사용자들 중에 고정IP를 쓰는 분은 일부분입니다.

거의 동적IP를 많이 사용하므로 이걸로 하시면 됩니다. ^^

 

자동 DHCP로 부분을 선택하고 ok를 누룹니다.

 

관리자인 root 암호에 대한 설정 입니다.

여러분이 원하는 암호를 설정해 주시면 됩니다.

 

이제 본격적으로 팩키지 설치 과정이 들어갑니다.

모든 설치 과정이 끝나면 시스템이 재부팅 하면서 아래처럼 부팅과정이 나옵니다.

이제 마지막으로 방금전에 설정한 루트 암호로 로그인해서 작업하면 됩니다.

여기 까지 입니다. 솔직히 수리눅스는 아주 가볍고 서버로 사용하기에는 그만이지만

문제가 라이브러리의 의존성 문제나 호환성이 좀 많이 부족합니다.

그렇지만 저 사양 컴퓨터를 가지고 서버공부하실 분이라면 아주 좋습니다. ^^

♥Sunny♥/temp]# wget  ftp://ftp.sulinux.net/mysql/mysql-5.0.33.tar.gz
♥Sunny♥/temp]# tar xvfzp mysql-5.0.33.tar.gz
♥Sunny♥/temp]# cd mysql-5.0.33
♥Sunny♥/temp/mysql-5.0.33]# mkdir -p /home/mysql/data
♥Sunny♥/temp/mysql-5.0.33]# useradd -M -r -d /home/mysql/data -s /bin/bash -c "MySQL Server" -u 27 mysql
♥Sunny♥/temp/mysql-5.0.33]# rm -fr /home/mysql/data
♥Sunny♥/temp/mysql-5.0.33]# ./configure --prefix=/usr/local/mysql --localstatedir=/home/mysql/data --with-unix-socket-path=/home/mysql/mysql.sock \
--sysconfdir=/etc --disable-shared --disable-shared --enable-assembler --with-thread-safe-client --with-mysqld-user="mysql" \
--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --with-readline --without-debug --without-docs --without-bench --with-charset=euckr
♥Sunny♥/temp/mysql-5.0.33]# make
♥Sunny♥/temp/mysql-5.0.33]# make install
♥Sunny♥/temp/mysql-5.0.33]# /usr/local/mysql/bin/mysql_install_db
♥Sunny♥/temp/mysql-5.0.33]# install -m 644 ./include/my_config.h /usr/local/mysql/include/mysql
♥Sunny♥/temp/mysql-5.0.33]# cd support-files
♥Sunny♥/temp/mysql-5.0.33/support-files]# cp my-medium.cnf /etc/my.cnf
♥Sunny♥/temp/mysql-5.0.33/support-files]# chown root:sys /etc/my.cnf
♥Sunny♥/temp/mysql-5.0.33/support-files]# chmod 644 /etc/my.cnf
♥Sunny♥/temp/mysql-5.0.33/support-files]# chown -R root:mysql /usr/local/mysql
♥Sunny♥/temp/mysql-5.0.33/support-files]# chown -R mysql:mysql /home/mysql/data
♥Sunny♥/temp/mysql-5.0.33/support-files]# ln -s /usr/local/mysql/bin/mysql /usr/local/sbin/
♥Sunny♥/temp/mysql-5.0.33/support-files]# ln -s /usr/local/mysql/bin/mysqldump /usr/local/sbin/
♥Sunny♥/temp/mysql-5.0.33/support-files]# ln -s /usr/local/mysql/bin/mysqladmin /usr/local/sbin/
♥Sunny♥/temp/mysql-5.0.33/support-files]# chmod 700 /usr/local/mysql/bin/mysqladmin
♥Sunny♥/temp/mysql-5.0.33/support-files]# chmod 700 /usr/local/mysql/bin/mysqldump
♥Sunny♥/temp/mysql-5.0.33/support-files]# rm -f /usr/local/mysql/share/mysql/mysql-*.spec
♥Sunny♥/temp/mysql-5.0.33/support-files]# rm -f /usr/local/mysql/share/mysql/mysql-log-ratate
♥Sunny♥/temp/mysql-5.0.33/support-files]# strip /usr/local/mysql/libexec/mysqld
♥Sunny♥/temp/mysql-5.0.33/support-files]# echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf
♥Sunny♥/temp/mysql-5.0.33/support-files]# ldconfig
♥Sunny♥/usr/local/mysql/share/mysql]# cp -ab mysql.server /etc/init.d/mysqld
♥Sunny♥/usr/local/mysql/share/mysql]# chmod 700 /etc/init.d/mysqld
♥Sunny♥/usr/local/mysql/share/mysql]# chown root:root /etc/init.d/mysqld
♥Sunny♥/temp/mysql-5.0.33/support-files]# ln -s /tmp /usr/local/mysql/tmp
♥Sunny♥/usr/local/mysql/share/mysql]# chkconfig --add mysqld
♥Sunny♥/usr/local/mysql/share/mysql]# chkconfig --level 3 mysqld on
♥Sunny♥/usr/local/mysql/share/mysql]# service mysqld start

 

 

 

 

[root@ns♥Sunny♥/]# df -ha ==> 용량 확인
[root@ns♥Sunny♥/]# du -hs ==> -h -s <전체 총 용량만>
[root@ns♥Sunny♥/]# du -hs Sunny ==> <원하는 디렉만 용량 확인>
[root@ns♥Sunny♥/]# fdisk -l /dev/cciss/c0d0<스카시>
==> 전체 디스크 파티션 상태 확인
[root@ns♥Sunny♥/]# free -mt
[root@ns♥Sunny♥/]# dd if=/dev/zero of=tempswap bs=1k count=300000
==> 스왑공간 생성
[root@ns♥Sunny♥/]# chmod 600 tempswap ; mke2fs tempswap ; mkswap tempswap ; swapon tempswap ==> 스왑공간 추가 방법
[root@ns♥Sunny♥/]# free -mt ==> 시스템 전체 메모리 용량 모니터

 

u=소유자, g=소유그룹, o=other, a=all, r=읽기, w=쓰기, x=실행" [모드(8진수)]
8진수 모드에서 4 = 읽기, 2 = 쓰기, 1 = 실행을 의미한다.
8진수 모드는 소유자와 소유그룹, other에 대해서 8진수 3자리로 표현하는데 첫째 자리수가 소유자를 의미하고 둘째 자릿수가 소유 그룹,
셋째 자릿수가 other을 의미 특별한 퍼미션 setuid, setgid, sticky bit
실행 퍼미션에는 setuid와 setgid라는 특별한 퍼미션이 있다.
setuid는 심볼릭 모드로 's'로 표현되고 8진수 모드로는 4000으로 표현된다.
setuid 퍼미션이 설정되어 있는 실행 파일은 실행되는 동안에는 그 파일의 소유자 권한을 가지게 된다.
setgid의 8진수 모드는 2000 이고
-rwsr-xr-x 1 root root 25288 Feb 11 15:43 /bin/su
setuid 퍼미션을 설정할 때 ==> [root@sunny♥泰用哲學♥/]# chmod 4755 backup-List.sh
setgid 퍼미션을 설정할 때 ==> [root@sunny♥泰用哲學♥/]# chmod 2755 backup-List.sh
[root@sunny♥泰用哲學♥/]# umask ==> 기본퍼미션 모드 값을 정한다.
sticky bit도 특별한 퍼미션이다. other의 쓰기 권한에 대한 특별한 퍼미션인데 /tmp 디렉토리와 /var/tmp 디렉토리에의
퍼미션이 stickbit가 포함되어 있다.
sticky bit는 8진수 모드로는 1000으로 설정되고 심볼릭 모드로는 't' 또는 'T' 로 설정된다
drwxrwxrwt 9 root root 4096 May 14 04:24 /tmp
sticky bit를 설정할 때
[root@sunny♥泰用哲學♥/]# chmod 1707 backup-List.sh ==> chmod 1777 backup-List.sh
[root@sunny♥泰用哲學♥/]# chown Sunny<소유자>.root<소유그룹> system_install_OS.sh
[root@sunny♥泰用哲學♥/]# chown -R Sunny.root Server_Change_Configure ==> -R<재귀적>
[root@sunny♥泰用哲學♥/]# chmod -R 700 Server_Change_Configure/ ==> -R <재귀적> 퍼미션 적용 변경
[root@sunny♥泰用哲學♥/]# chmod -R 1700 Server_Change_Configure ==> <1-2-4> 슈퍼키 퍼미션 적용
[root@sunny♥泰用哲學♥/]# chattr -R<서브> +iA<+추가 -제거> proftpd-1.2.8-1kr.i686.rpm ==> 특수 모드로 적용
##### 아래 네트워크명령어는 매우 중요하므로 관리자는 필히 알아야 한다.

[root@ns♥PowerRoot♥/chroot]# ifconfig -a  ==> 현재 네트워크 정보 조회
ifconfig up or down : 네트워크 활성화 및 비활성화.
[root@ns♥PowerRoot♥/chroot]# ifconfig eth0 61.251.13.216 netmask 255.255.255.0 broadcast 255.255.255.255 up
[root@ns♥PowerRoot♥/chroot]# route -ne  ==> 현재 시스템 게이트웨이 상태 조회
[root@ns♥PowerRoot♥/chroot]# route add -net <네트워크 주소> netmask <넷매스크 값> dev <인터페이스 이름>  라우팅 정보 추가
[root@ns♥PowerRoot♥/chroot]# route del -net <네트워크 주소> netmask <넷매스크 값> dev <인터페이스 이름>  라우팅 정보 삭제
[root@ns♥PowerRoot♥/chroot]# route add default gw <기본 게이트웨이 주소> dev <인터페이스 이름>  기본 게이트웨이 추가
[root@ns♥PowerRoot♥/chroot]# route del default gw <기본 게이트웨이 주소> dev <인터페이스 이름>  기본 게이트웨이 삭제
[root@ns♥PowerRoot♥/chroot]# netstat -apo   ==> 일반적인 네트워크 소켓 정보 모니터 조회
[root@ns♥PowerRoot♥/chroot]# netstat -atupc  ==> 네트워크 상태 알아보기.  ==>  -a : 연결된 모든 소켓 출력. -t : tcp 연결 소켓 출력 -u : udp 소켓 출력
-p : 소켓과 연결된 프로그램 출력   -c : 연속적 출력   -r : 라우팅 테이블 출력 -i : 인터페이스 테이블 출력
[root@ns♥PowerRoot♥/chroot]# netconfig  ==> Gnu 모드에서 자동 설정해 주는 도구이다
[root@ns♥PowerRoot♥/chroot]# hostname ns.yeeyee.pe.kr ==> 호스트명을 명령을 통해 입력.

##### 수동으로 호스트명을 입력한다. 아래처럼
[root@ns♥PowerRoot♥/chroot]# cat << OS >> /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=linuxsunny.pe.kr
OS

##### 자신의 IP와 게이트웨이를 설정한다.
[root@ns♥PowerRoot♥/chroot]# cat << OS >> /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.0.3
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
OS

##### 호스트를 설정 한다. 아래처럼 ^^
[root@ns♥PowerRoot♥/chroot]# cat << OS >>  /etc/hosts
192.168.0.3     linuxsunny.pe.kr       sunny
#192.168.0.3    linuxsunny.pe.kr       taeyong
#192.168.0.3    linuxsunny.pe.kr       log
OS

#####  네임 서버명을 설정한다.
[root@ns♥PowerRoot♥/chroot]# vi /etc/resolv.conf
search local
nameserver 164.124.101.2
nameserver 211.238.160.25

#### 변경된 설정내용을 다시 읽어들이기 위해 서버데몬을 다시 시작한다.
[root@ns♥PowerRoot♥/chroot]# service network restart


[root@sunny♥泰用哲學♥/temp/hostsentry]# tar xvfzp hostsentry-0.02.tar.gz
[root@sunny♥泰用哲學♥/temp/hostsentry]# cd hostsentry-0.02
[root@sunny♥泰用哲學♥/temp/hostsentry/hostsentry-0.02]# vi Makefile
INSTALLDIR = /usr/local/hostsentry
[root@sunny♥泰用哲學♥/temp/hostsentry/hostsentry-0.02]# vi hostSentryConfig.py
CONFIG='/usr/local/hostsentry/hostsentry.conf'
[root@sunny♥泰用哲學♥/temp/hostsentry/hostsentry-0.02]# make
[root@sunny♥泰用哲學♥/temp/hostsentry/hostsentry-0.02]# make install
[root@sunny♥泰用哲學♥/temp/hostsentry/hostsentry/etc]# cp -f hostsentry.init /etc/init.d/hostsentry
[root@sunny♥泰用哲學♥/temp/hostsentry/hostsentry/etc]# vi /etc/init.d/hostsentry
start() {
cd /usr/local/hostsentry
stop() {
cd /usr/local/hostsentry
[root@sunny♥泰用哲學♥/temp/hostsentry]# chmod 700 /etc/rc.d/init.d/hostsentry
[root@sunny♥泰用哲學♥/temp/hostsentry]# chown 0.0 /etc/rc.d/init.d/hostsentry
[root@sunny♥泰用哲學♥/temp/hostsentry]# chkconfig --add hostsentry
[root@sunny♥泰用哲學♥/temp/hostsentry]# chkconfig --level 345 hostsentry on
[root@sunny♥泰用哲學♥/usr/local/hostsentry]# vi hostsentry.conf
==========================================================================
IGNORE_FILE = "/usr/local/hostsentry/hostsentry.ignore"
ACTION_FILE = "/usr/local/hostsentry/hostsentry.action"
MODULE_FILE = "/usr/local/hostsentry/hostsentry.modules"
MODULE_PATH = "/usr/local/hostsentry/modules"
WTMP_FILE = "/var/log/wtmp"
DB_FILE = "/usr/local/hostsentry/hostsentry.db"
DB_TTY_FILE = "/usr/local/hostsentry/hostsentry.tty.db"
============================================================================
[root@sunny♥泰用哲學♥/usr/local/hostsentry]# /etc/rc.d/init.d/hostsentry start
HostSentry (을)를 시작 중:                                 [  OK  ]




[root@sunny♥泰用哲學♥/temp/portsentry]# tar xvfzp portsentry-1.1.tar.gz
[root@sunny♥泰用哲學♥/temp/portsentry]# cd portsentry-1.1
[root@sunny♥泰用哲學♥/temp/portsentry/portsentry-1.1]# vi portsentry_config.h
#define CONFIG_FILE "/usr/local/etc/portsentry.conf"
[root@sunny♥泰用哲學♥/temp/portsentry/portsentry-1.1]# vi Makefile
CC = gcc
CFLAGS = -O3 -march=i686 -funroll-loops -fomit-frame-pointer -Wall
INSTALLDIR = /usr/local
CHILDDIR=/portsentry
[root@sunny♥泰用哲學♥/temp/portsentry/portsentry-1.1]# make linux
[root@sunny♥泰用哲學♥/temp/portsentry/portsentry-1.1]# make install
[root@sunny♥泰用哲學♥/temp/portsentry/portsentry-1.1]# install -m700 -s portsentry /usr/local/sbin
[root@sunny♥泰用哲學♥/temp/portsentry/portsentry-1.1]# mkdir -p -m700 /usr/local/etc/portsentry
[root@sunny♥泰用哲學♥/temp/portsentry/portsentry-1.1]# mkdir -p -m700 /var/log/portsentry
[root@sunny♥泰用哲學♥/temp/portsentry/portsentry-1.1]# touch /var/log/portsentry/portsentry.blocked.atcp
[root@sunny♥泰用哲學♥/temp/portsentry/portsentry-1.1]# touch /var/log/portsentry/portsentry.blocked.audp
[root@sunny♥泰用哲學♥/temp/portsentry/portsentry-1.1]# touch /var/log/portsentry/portsentry.blocked.sudp
[root@sunny♥泰用哲學♥/temp/portsentry/portsentry-1.1]# touch /var/log/portsentry/portsentry.blocked
[root@sunny♥泰用哲學♥/temp/portsentry/portsentry-1.1]# touch /var/log/portsentry/portsentry.history
[root@sunny♥泰用哲學♥/temp/portsentry]# vi /usr/local/etc/portsentry.conf
TCP_PORTS="1,11,81,82,83,1080,1720,1863,5190,8080"
UDP_PORTS="1,7,9,81,82,83,1080,1720,1863,5190,8080"
ADVANCED_PORTS_TCP="1024"
ADVANCED_PORTS_UDP="1024"
ADVANCED_EXCLUDE_TCP="113,139"
ADVANCED_EXCLUDE_UDP="520,138,137,67"
IGNORE_FILE="/etc/portsentry/portsentry.ignore"
HISTORY_FILE="/var/log/portsentry/portsentry.history"
BLOCKED_FILE="/var/log/portsentry/portsentry.blocked"
RESOLVE_HOST="0"
BLOCK_UDP="0"
BLOCK_TCP="1"
KILL_ROUTE="/sbin/route add -host $TARGET$ reject"
SCAN_TRIGGER="0"
PORT_BANNER="** UNAUTHORIZED ACCESS PROHIBITED **"
[root@sunny♥泰用哲學♥/temp/portsentry]# cp -f portsentry /etc/rc.d/init.d/portsentry
[root@sunny♥泰用哲學♥/temp/portsentry]# vi portsentry
# config: /etc/portsentry/portsentry.conf
SENTRYDIR=/usr/local/etc/portsentry
action "Starting $prog -$i: " /usr/local/sbin/portsentry -$i
[root@sunny♥泰用哲學♥/temp/portsentry]# chmod 700 /etc/rc.d/init.d/portsentry
[root@sunny♥泰用哲學♥/temp/portsentry]# chown 0.0 /etc/rc.d/init.d/portsentry
[root@sunny♥泰用哲學♥/temp/portsentry]# chkconfig --add portsentry
[root@sunny♥泰用哲學♥/temp/portsentry]# chkconfig --level 345 portsentry on
[root@sunny♥泰用哲學♥/temp/portsentry]# service portsentry start
Starting PortSentry -tcp:                                  [  OK  ]
Starting PortSentry -udp:                                  [  OK  ]

[root@sunny♥泰用哲學♥/temp]# yum -y install yum-priorities
[root@sunny♥泰用哲學♥/temp]# vi /etc/yum/pluginconf.d/priorities.conf
[main]
enabled = 1
check_obsoletes = 1
priority=2
[root@sunny♥泰用哲學♥/temp]# rpm -Uvh --nodeps
http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm
[root@sunny♥泰用哲學♥/temp]# rpm -ivh rpmforge-release-0.5.1-1.el5.rf.i386.rpm
[root@sunny♥泰用哲學♥/temp]# yum check-update
[root@sunny♥泰用哲學♥/temp]# yum -y install fuse fuse-ntfs-3g dkms dkms-fuse
[root@sunny♥泰用哲學♥/mnt]# mkdir windisk1 ; mkdir windisk2
[root@sunny♥泰用哲學♥/mnt]# mount -t ntfs-3g /dev/sdb1 windisk1
[root@sunny♥泰用哲學♥/mnt]# mount -t ntfs-3g /dev/sdb2 windisk2
[root@sunny♥泰用哲學♥/mnt/windisk2]# mount -l
/dev/sdb1 on /mnt/windisk1 type fuseblk (rw,allow_other,blksize=4096)
/dev/sdb2 on /mnt/windisk2 type fuseblk (rw,allow_other,blksize=4096) .... 정보확인
한글 설정
==> iocharset=utf8 : nls=utf8
==> iocharset=cp949 : nls=cp949
[root@sunny♥泰用哲學♥/mnt]# modprobe fuse
[root@sunny♥泰用哲學♥/mnt]# mount -t ntfs-3g -o nls=utf8 /dev/sdb1 windisk1
[root@sunny♥泰用哲學♥/mnt]# mount -t ntfs-3g -o nls=utf8 /dev/sdb2 windisk2

###### MySQL 6 Install ########
[root@sunny♥泰用哲學♥/temp]# wget ftp://ftp.sayclub.com/pub/mysql/Downloads/MySQL-6.0/mysql-6.0.10-alpha.tar.gz
[root@sunny♥泰用哲學♥/temp]# tar xvfzp mysql-6.0.10-alpha.tar.gz
[root@sunny♥泰用哲學♥/temp]# mkdir -p /usr/local/mysql_data
[root@sunny♥泰用哲學♥/temp]# useradd -M -r -d /usr/local/mysql_data -s /bin/bash -c "MySQL Server" -u 27 mysql
[root@sunny♥泰用哲學♥/temp]# rm -fr /usr/local/mysql_data
[root@sunny♥泰用哲學♥/temp]# cd mysql-6.0.10-alpha
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha]# ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql_data \
--sysconfdir=/etc --disable-shared  --with-mysqld-user=mysql --with-innodb --without-isam --without-debug \
--with-unix-socket-path=/usr/local/mysql_data/mysql.sock --with-charset=utf8
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha]# make
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha]# make install
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha]# install -m 644 ./include/my_config.h /usr/local/mysql/include/mysql
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha]# cd support-files
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# cp my-medium.cnf /etc/my.cnf
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# chown root:sys /etc/my.cnf
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# chmod 644 /etc/my.cnf
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# /usr/local/mysql/bin/mysql_install_db
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# chown -R root:mysql /usr/local/mysql
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# chown -R mysql:mysql /usr/local/mysql_data
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# ln -s /usr/local/mysql/bin/mysql /usr/local/sbin/
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# ln -s /usr/local/mysql/bin/mysqldump /usr/local/sbin/
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# ln -s /usr/local/mysql/bin/mysqladmin /usr/local/sbin/
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# chmod 700 /usr/local/mysql/bin/mysqladmin
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# chmod 700 /usr/local/mysql/bin/mysqldump
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# strip /usr/local/mysql/libexec/mysqld
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# ldconfig
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# cp -ab mysql.server /etc/init.d/dbServer
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# chmod 700 /etc/init.d/dbServer
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# chown root:root /etc/init.d/dbServer
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# chkconfig --add dbServer
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# chkconfig --level 3 dbServer on
내가 6.0을 설치하면서 이런 경우는 처음인데 pid 파일 에러가 나는 상황을 보고 한참 생각 하다가 결국
해결을 했는데 왜 이런 에러가 5.3버전 이후로 많이 발생하는지 정확히 모르겠다.
해결 방법은 다음과 같이 해 주면 실행 된다.
[root@sunny♥泰用哲學♥/etc]# vi my.cnf  ==> 열어서
다음 구문 옵션을 주석처리해 준다.
skip-federated  ==> #skip-federated 처리해 주고 저장한다.
기존해 생성했던 데이타베이스 파일을 모두 지우고 다시 생성해 준다.
[root@sunny♥泰用哲學♥/etc]# rm -fr /usr/local/mysql_data/*
[root@sunny♥泰用哲學♥/etc]# /usr/local/mysql/bin/mysql_install_db --user=mysql
[root@sunny♥泰用哲學♥/etc]# service dbServer start
Starting MySQL. SUCCESS!  ==> OK
[root@sunny♥泰用哲學♥/etc]# ps aux | grep mysql
..0:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/usr/local/mysql_data --pid-file=/usr/local/mysql_data/xxx.xxxxx.com.pid
..0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql_data --user=mysql --log-error=/usr/local/mysql_data/xxx.xxxxxx.com --pid-file=/usr/local/mysql_data/xxx.xxxxxx.com.pid --socket=/usr/local/mysql_data/mysql.sock --port=3306
==> 이렇게 나와야 한다.

#### APACHE 2 Install #####
[root@sunny♥泰用哲學♥/temp]# tar xvfjp httpd-2.2.6.tar.bz2
[root@sunny♥泰用哲學♥/temp]# cd httpd-2.2.6
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6]# SSL_BASE=/usr/local ./configure --prefix=/usr/local/apache2 \
--sysconfdir=/usr/local/etc --enable-module=so --enable-rule=SHARED_CORE --enable-module=ssl \
--enable-ssl=shared --with-mpm=prefork --enable-shared=max --enable-module=all
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6]# make
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6]# make install
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6]# cd support
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6/support]# cp apachectl /etc/init.d/webserver2
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6/support]# vi /etc/init.d/webserver2
# Comments to support chkconfig on RedHat Linux
# chkconfig: 2345 90 90
# description: A very fast and reliable WebServer engine.  ==> 입력
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6/support]# chkconfig --add webserver2
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6/support]# chkconfig --level 3 webserver2 on
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6/support]# chmod 700 /etc/init.d/webserver2
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6/support]# ln -s /usr/local/apache2/bin/apachectl /usr/local/sbin/apachectl2
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6/support]# ln -s /usr/local/apache2/bin/httpd /usr/local/sbin/httpd2
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6/support]# ln -s /usr/local/apache2/bin/htpasswd /usr/local/sbin/htpasswd2
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6/support]# ln -s /usr/local/apache2/bin/apxs /usr/local/sbin/apxs2
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6/support]# service webserver2 start
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6/support]# ps aux | grep httpd
root     16690  0.0  0.2   8988  1860 ?        Ss   21:00   0:00 /usr/local/apache2/bin/httpd -k start
daemon   16705  0.0  0.1   8988  1380 ?        S    21:00   0:00 /usr/local/apache2/bin/httpd -k start ...
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6/support]# nmap -sS -O -v localhost | grep 80
80/tcp   open  http  ==> 설정 완료

#### PHP 5 Install ######

[root@sunny♥泰用哲學♥/temp]# cd php-5.1.2
[root@sunny♥泰用哲學♥/temp/php-5.1.2]# ./configure --prefix=/usr/local/php2 --with-apxs2=/usr/local/apache2/bin/apxs
--with-config-file-path=/usr/local/php2 --with-mysql=/usr/local/mysql  --with-mysql-sock=/usr/local/mysql_data/mysql.sock
--with-gd --with-gd-dir=/usr/local/ --with-jpeg-dir=/usr --with-png --with-freetype-dir=/usr --with-mod_charset
--with-language=korean --with-charset=euc_kr --with-gdbm --with-xml --with-regex=php --with-iconv --enable-module=so
--enable-memory-limit --enable-track-vars --enable-ftp --enable-sockets --enable-trans-sid --enable-magic-quotes
--enable-sysvsem  --enable-sysvshm --enable-mailparse --enable-sigchild --enable-calender --enable-inline-optimization
--disable-debug --enable-mbstring --with-gettext --with-zlib-dir=/usr/local
[root@sunny♥泰用哲學♥/temp/php-5.1.2]# make ; make install
[root@sunny♥泰用哲學♥/temp/php-5.1.2]# cp php.ini-dist /usr/local/php2/php.ini
[root@sunny♥泰用哲學♥/temp/php-5.1.2]# ln -s /usr/local/php2/bin/php /usr/local/sbin/php2
[root@sunny♥泰用哲學♥/temp/php-5.1.2]# ln -s /usr/local/php2/bin/phpize /usr/local/sbin/phpize2
[root@sunny♥泰用哲學♥/temp/php-5.1.2]# ls -al /usr/local/apache2/modules
-rwxr-xr-x  1 root root 16585979  4월  3 21:50 libphp5.so
[root@sunny♥泰用哲學♥/temp/php-5.1.2]# vi /usr/local/etc/httpd/httpd.conf
LoadModule php5_module        modules/libphp5.so
<IfModule dir_module>
    DirectoryIndex DirectoryIndex index.html index.htm start.htm index.mht INDEX.MHT INDEX.HTML
index.php INDEX.HTM INDEX.PHP INDEX.JSP index.jsp
</IfModule>
####### ============== PHP 5 확장자 설정 ============== ###########
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
##################################################################
[root@sunny♥泰用哲學♥/temp/php-5.1.2]# service webserver2 restart
[root@sunny♥泰用哲學♥/temp/php-5.1.2]# cd /usr/local/apache2/htdocs/
[root@sunny♥泰用哲學♥/usr/local/apache2/htdocs]# vi index.php
<? phpinfo(); ?>
==>
http://localhost ==> 정보가 나오면 확인해 본다.
[root@sunny♥泰用哲學♥/usr/local/apache2/htdocs]# php2 -v
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies  ==> 정상적인 출력
[root@sunny♥泰用哲學♥/usr/local/apache2/htdocs]# yum -y install lynx
[root@sunny♥泰用哲學♥/usr/local/apache2/htdocs]# lynx
http://localhost
PHP Logo
PHP Version 5.1.2
System Linux xxx.xxxxxxxx.com 2.6.18-164.15.1.el5 #1 SMP Wed Mar 17 11:37:14 EDT 2010 i686...... 생략.
==> 콘솔 상태에서 web으로 접속해 폐이지를 볼수있는 프로그램이다.


[root@sunny♥泰用哲學♥/temp]# tar xvfzp ncftp-3.1.4-src.tar.gz
[root@sunny♥泰用哲學♥/temp]# cd ncftp-3.1.4
[root@sunny♥泰用哲學♥/temp/ncftp-3.1.4]# ./configure --prefix=/usr/local/ncftp
[root@sunny♥泰用哲學♥/temp/ncftp-3.1.4]# make
[root@sunny♥泰用哲學♥/temp/ncftp-3.1.4]# make install
[root@sunny♥泰用哲學♥/temp/ncftp-3.1.4]# ln -s /usr/local/ncftp/bin/ncftp /usr/local/sbin/
[root@sunny♥泰用哲學♥/temp/ncftp-3.1.4]# ncftp
ncftp> open
ftp://ftp.sulinux.net/
ncftp /FTP/proftpd/source > get proftpd-1.2.6rc1.tar.gz
내부사용명령
==============================================================================================
ascii      cat<파일내용보기>        help       lpage      open<연결>       quit<끝내기>       show
bgget      cd<이동명령>         jobs       lpwd<로컬위치조회>>       page       quote      site
bgput      chmod      lcd<로컬이동>        lrename    passive<패시브명령>    rename     type
bgstart    close<화면정리>      lchmod<로컬권한변경>     lrm<로컬파일삭제>       
pdir       rhelp      umask<파일생성모드변경>  binary     debug      lls<로컬조회명령> 
lrmdir<로컬디렉삭제>     pls        rm<파일삭제>         version <버전확인>
bookmark   dir<조회명령>        lmkdir<로컬토리생성>  ls<조회명령>         put<업로드>   
rmdir<삭제명령>  bookmarks  get<다운받기>        lookup     mkdir<디렉토리생성>     
pwd<현재위치조회>        set<환경변수조회>
==================================================
==========================================

+ Recent posts