수리눅스는 서버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<환경변수조회>
==================================================
==========================================

나 같은 경우는 X-windows를 별로 사용하지 않는 편이다.
지금은 보안적으로 많이 개선 되었다고 하지만 여전히 X는 위험부담이
존재하고 시스템 전체 용량이 무거워지고 불안해지는 단점을 가지고 있기 때문이다.
그래서 나는 주로 설치시 Server 하고 Server-GUI 관련만 체크하고
설치 한다. 그다음에 아래 처럼 최신 라이브러리 관련 개발 팩키지만 받아서
추가로 설치해  준다.
필요한 업데이타 팩키지 설치해야 나중에 컴파일 할때 에러가 발생하는
상황을 최소화하기 위해서 이다.
[root@localhost ~]# yum -y groupinstall "Development Tools"
[root@localhost ~]# yum -y groupinstall "Development Libraries"
[root@localhost ~]# yum -y install  gcc cpp gcc-c++ compat-gcc-* flex
[root@localhost ~]# yum -y install libjpeg-devel libpng-devel freetype-devel gd-devel ncurses-devel libmcrypt* libxml2*
[root@localhost ~]# yum -y install openssl* bzip2* curl* libc-client-devel mhash*
[root@localhost ~]# yum -y update  ==> 마무리 총 업데이트
[root@localhost ~]# yum -y clean all ==> 캐시 저장 목록을 초기화

◐◑◐◑◐◑-PHP_4 버전-◐◑◐◑◐◑◐◑

▣▣▣▣-1. 일반적인 사용 옵션 <독립방식>-▣▣▣▣
./configure --with-apxs=/usr/local/aache/bin/apxs \
--disable-debug --enable-ftp --enable-inline-optimization \
--enable-magic-quotes --enable-mbstring \
--enable-mm=shared --enable-safe-mode --enable-track-vars \
--enable-trans-sid --enable-wddx=shared \
--enable-xml --with-dom --with-gd --with-gettext \
--with-mysql=/usr/local/mysql --with-regex=system \
--with-xml --with-zlib-dir=/usr/lib \
--with-language=korean --with-charset=euckr \
--with-config-file-path=/usr/local/apache/conf

▣▣▣▣-2. [SSL+OPENSSL+JAVA] 설치 전용 옵션 <독립설치>-▣▣▣▣
./configure  --with-apxs=/usr/local/apache/bin/apxs \
--with-config-file-path=/usr/local/apache/conf \
--with-mysql=/usr/local/mysql --with-zlib-dir=/usr/local \
--with-jpeg-dir=/usr/local --with-png-dir=/usr/local \
--with-openssl=/usr/local/ssl --with-gif-dir=/usr/local \
--with-tif-dir=/usr/local --with-java=/usr/local/java \
--with-gd=/usr/local --with-freetype=/usr/local/include/freetype2 \ 
--with-ming=/usr/local --with-cpdflib=/usr/local \
--with-gettext --with-kerberos --with-swf-dir=/usr/local/swf \
--with-mm=/usr/local/mm --with-mhash=/usr/local \
--with-mcrypt=/usr/local --with-mod_charset --with-charset=euc_kr \
--with-regex=php --with-xml --with-imap=/usr/local/imap \
--with-imap-ssl=/etc/mail/certs --with-ttf=/usr/local \
--with-t1lib=/usr/local --enable-module=so --enable-gd-native-ttf \
--enable-ftp --enable-sockets --enable-sysvsem  --enable-sysvshm \
--enable-track-vars --enable-freetype-4bit-antialias-hack \
--enable-calendar --enable-sigchild --enable-magic-quotes \
--enable-trans-sid --enable-inline-optimization --enable-bcmath

◐◑◐◑◐◑◐◑-PHP_5 버전[openssl+webssl]-◐◑◐◑◐◑◐◑

CFLAGS='-O2 -I/usr/local/openssl -DEAPI' ./configure \
--with-apxs=/usr/local/apache/bin/apxs \
--disable-debug --enable-ftp \
--enable-inline-optimization --enable-magic-quotes \
--enable-mbstring --enable-mm=shared --enable-safe-mode --enable-track-vars \
--enable-trans-sid --enable-wddx=shared --enable-xml --with-dom --with-gd  \
--with-gettext --with-mysql=/usr/local/mysql  \
--with-regex=system --with-xml --with-zlib-dir=/usr/lib \
--with-language=korean --with-charset=euc_kr \
--with-config-file-path=/usr/local/httpd/conf

♥♥♥♥♥♥-CENTOS5버전 PHP-5 [주로 내가 사용하는 옵션]-♥♥♥♥♥♥♥♥♥

★★-1. apache 소스 하고 같이 설치시 옵션-★★
./configure --prefix=/usr/local/php --with-apache=../apache_1.3.37 \
--with-exec-dir=/usr/local/bin --with-config-file-path=/usr/local/apache/conf \
--with-mysql=/usr/local/mysql --with-gd --with-gd-dir=/usr/local/  \
--with-jpeg-dir=/usr --with-png --with-freetype-dir=/usr --with-openssl \
--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/lib

★★-2. 독립적으로 따로 설치시 사용옵션-★★
./configure --prefix=/usr/local/php --with-apxs=/usr/local/apache/bin/apxs \
--with-config-file-path=/usr/local/apache/conf --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



☆☆☆☆☆☆☆☆☆ 버전별 컴파일 설치 내용 ☆☆☆☆☆☆☆☆☆

◐◑◐◑◐◑  <옵션 설명> ◐◑◐◑◐◑

--prefix=/usr/local/apache2  ==> Apache 설치 경로 지정
--sysconfdir=/usr/local/apache2/conf
--enable-module=so   ==> DSO(Dynamic Shared Objects) 동적공유객체로 Apache 설치
--enable-so - DSO(Dynamic Shared Objects) 동적공유객체로 Apache 설치, 모듈 자동제어
--enable-rule=SHARED_CORE - DSO(Dynamic Shared Objects) 동적공유객체로 Apache 설치, 모듈자동제어
--enable-module=ssl - ssl 인증서 모듈을 설치한다.
--enable-ssl=shared - ssl 인증서 모듈을 설치한다.
--with-mpm=prefork - 다중처리모듈의 방식을 prefork 방식으로 지정한다. 자세한 내용은

◐◑◐◑◐◑ Apache-1버전 연동 설치◐◑◐◑◐◑

SSL_BASE=/usr/local/openssl ./configure --prefix=/usr/local/apache \
--sysconfdir=/usr/local/apache/conf --activate-module=src/modules/php5/libphp5.a \
--enable-module=ssl --enable-shared=ssl --enable-module=rewrite \
--enable-shared=rewrite --enable-rule=SHARED_CORE \
--enable-module=so --enable-shared=max

◐◑◐◑◐◑ Apache-2버전 ◐◑◐◑◐◑

SSL_BASE=/usr/local/openssl ./configure --prefix=/usr/local/httpd \
--enable-shared=max --enable-rule=SHARED_CORE \
--enable-modules=so --enable-so

▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣
▣▣▣▣▣▣ Apache1버전 [주로 내가 사용하는 옵션] ▣▣▣▣▣▣
▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣▣
독립설치옵션
================================================================================================
./configure --prefix=/usr/local/apache --enable-module=all \
--enable-shared=max  --enable-module=rewrite  --enable-shared=rewrite  --enable-module=proxy \
--enable-shared=proxy --enable-rule=SHARED_CORE --enable-module=so
==================================================================================================
httpd-2.2.6]# /usr/local/apache2/bin/apxs -i -a -c mod_logio.c  ==> 수동컴파일 방식
apxs가 없을경우에 수동 다른 방식
/modules/dav/fs]# cp mod_dav_fs.c /usr/local/apache2/include
/modules/dav/fs]# cp repos.c /usr/local/apache2/include
/modules/dav/fs]# cd /usr/local/apache2/include
/apache2/include]# gcc -fpic -DSHARED_MODULE -l/usr/include/apache2 -DEAPI -c mod_dav_fs.c
/apache2/include]# gcc -shared -o mod_dav_fs.so mod_dav_fs.o
/apache2/include]# mv mod_dav_fs.so /usr/local/apache2/modules
/apache2/include]# chmod 755 /usr/local/apache2/modules/mod_dav_fs.so

+ Recent posts