Tomcat 5.5.27 설치

Posted at 2009/05/28 17:37 // in Programming // by 엔신
서블릿과 JSP를 다루기 위해 웹서버인 Tomcat을 설치하여야 한다.
윈도우 기준으로 설명한다.

1. 다운로드
톰캣 사이트에서 Tomcat 5.5.27을 다운로드 받을수 있다.
톰캣을 설치하기 위해서는 JRE 또는 JDK가 설치되어 있어야 한다.
설치형이 아니므로 C드라이브에 압축을 풀고 경로명을 간단하게 줄인다.
C:\apache-tomcat 이라거나 C:\tomcat 이라거나...

2. 서블릿파일 복사하기
C:\apache-tomcat\common\lib\servlet-api.jar
위경로의 파일을 파일을 복사하여
C:\Java\jdk1.6.0_13\lib
경로에 붙여넣기

3. 시스템 환경 변수 등록
그리고 시스템 환경변수 설정

변수이름 : CATALINA_HOME
변수 값 : C:\apache-tomcat

변수이름 : JAVA_HOME
변수 값 : C:\Java\jdk1.6.0_13

변수이름 : CLASSPATH
변수 값 : C:\apache-tomcat\common\lib\jsp-api.jar
를 등록하거나 js-api.jar 파일을 C:\Java\jdk1.6.0_13\lib\servlet-api.jar 경로에 복사하여 경로를 설정.

본인의 경우 JDK 경로가 C:\Java\jdk1.6.0_13이다. 이렇게 3개의 환경변수를 등록하면 된다.

4. 톰캣 서버 포트 변경
C:\apache-tomcat\conf\server.xml
파일을 수정한다.
    <Connector port="8080" maxHttpHeaderSize="8192"
파일 내용에서 port 8080으로 된 것을 8090으로 변경
8080의 경우 프록시나 오라클과 충돌이 날 수 있다.

5.서브 디렉토리 생성하기
기본 디렉토리 파일 복사하여 서브디렉토리 생성하기
C:\apache-tomcat\webapps\jsp-examples\WEB-INF에서
classes - 폴더
lib - 폴더
web.xml
를 복사하여
C:\apache-tomcat\webapps\test007\WEB-INF
경로에다가 붙여넣기 한다.

web.xml 파일의 내용을 아래 내용만 남겨놓는다
<?xml version="1.0" encoding="ISO-8859-1"?>

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">

</web-app>
test007/ 경로에 index.html 파일을 만들고
웹브라우저로 http://127.1.1.1:8090/test007/index.html 경로로 접속하여 본다.

6. 다른 시스템 디렉토리를 서브 디렉토리로 사용하기(1)
C:\apache-tomcat\conf\web.xml
파일에서 아래 두 내용에서 invoker가 주석 처리 되어 있는데 그 주석을 제거한다
    <servlet>
        <servlet-name>invoker</servlet-name>
        <servlet-class>
          org.apache.catalina.servlets.InvokerServlet
        </servlet-class>
        <init-param>
            <param-name>debug</param-name>
            <param-value>0</param-value>
        </init-param>
        <load-on-startup>2</load-on-startup>
    </servlet>
이 곳과 아래 내용
    <servlet-mapping>
        <servlet-name>invoker</servlet-name>
        <url-pattern>/servlet/*</url-pattern>
    </servlet-mapping>

C:\apache-tomcat\conf\Catalina\localhost\test008.xml
파일을 생성하고 내용을 넣는다.
<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="C:\test008"
         privileged="true" antiResourceLocking="false" antiJARLocking="false">
</Context>
위와 같이하고 xml 설정 파일을 reload하기 위해 톰캣을 재시작한다.
이렇게 하면 이제 웹에서는
http://127.1.1.1:8090/test008/index.html
와 같은 경로로 하위 폴더 접근이 가능해진다.

6. 다른 시스템 디렉토리를 서브 디렉토리로 사용하기(2)
위와 같은 서브디렉토리를 만드는 결과는 같지만, 방법만 다르다.

C:\apache-tomcat\conf\server.xml
파일에서
</host 로 검색하여 그 문장 바로 위에
<Context path="/test008" docBase="D:\test008"/>
를 삽입한다.
톰캣을 재시작하면 정상적으로 서브디렉토리 사용이 가능해진다.


이올린에 북마크하기
2009/05/28 17:37 2009/05/28 17:37

ubuntu 9.04에 conky 설치

Posted at 2009/05/21 00:19 // in Linux // by 엔신
사용자 삽입 이미지

conky란 바탕화면에서 오른쪽에 나오는 시스템 모니터링 도구이다.
설치는 지크님의 글을 참조하였다.

프로그램 설치
sudo apt-get install conky
sudo apt-get install devilspie


// devilspie는 바탕화면이 conky를 덮어버리는 현상을 해결하기 위한 것
그 외에도 특정 어플리케이션을 데스크탑 화면에서 실행시키기 위한 프로그램

지크님의 conky에서 hdd 부분만 나에게 맞게 수정하였음

~ 경로에 생성해주는 .conky 파일

more..


터미널 창에서 아래와 같이 파일 생성
mkdir ~/.devilspie
touch ~/.devilspie/conky.ds


conky.ds 파일 내용

more..



시스템 -> 기본 설정 -> 시작 응용프로그램에 conky와 devilspie를 추가 등록한다.

재부팅하면 정상적으로 작동됨.
이올린에 북마크하기
2009/05/21 00:19 2009/05/21 00:19

Nessus 설치, 사용법

Posted at 2008/12/11 10:33 // in Security // by 엔신

http://boanchanggo.tistory.com/14


Nessus 대하여 설치법과 자세한 설명이 나와 있습니다. 참고하여 설치하여 보았습니다.

Nessus 서버 관리자들이 즐겨 사용하는 취약점 분석 도구입니다. 데몬 형식이라 Nessus 서버에 설치를 하여 Service 가동시켜준 Nessus Client 통해 Nessus Server Target PC Scanning 요청 하여야 합니다.(Server 자체를 Scanning 수도 있음)


http://www.nessus.org/

홈페이지이며, 라이센스의 경우 ProfessionalFeed와 HomeFeed로 나누어져 있습니다.

ProfessionalFeed의 경우 상용이고 HomeFeed는 무료로 email 등록을 통하여 등록할 수 있습니다.


데몬을 가동시킬 서버를 CentOS 5.2 정하여 RPM 받은 설치하여 진행한 내용입니다.

설치하기 이전에 사이트를 통해 아래와 같은 프로그램이 먼저 설치되어 있어야 한다고 하여 확인 설치하였습니다.(생각입니다만, 아래 프로그램들은 client 리눅스에서 사용할 사용되는 프로그램인 같습니다)


    sharutils-4.2.1-14.i386.rpm

    glib-devel-1.2.10-10.i386.rpm

    freetype-devel-2.1.3-6.i386.rpm

    fontconfig-devel-2.1-9.i386.rpm

    XFree86-devel-4.3.0-2.i386.rpm

    gtk+-devel-1.2.10-25.i386.rpm

    gdk-pixbuf-0.18.0-7.i386.rpm


    yum 통해 설치하였고, XFree86 경우 yum list에는 존재하지 않아서 무시하고 설치하였으나 프로그램의 작동에는 아무런 문제가 없었습니다.


////////////////////////////////////////////////////////////////////////////

[root@notasusual ~]# rpm -Uvh Nessus-3.2.1-es5.i386.rpm

준비 중...              ########################################### [100%]

   1:Nessus                                                            (  1%########################################### [100%]

nessusd (Nessus) 3.2.1. for Linux

(C) 1998 - 2008 Tenable Network Security, Inc.


Processing the Nessus plugins...

[##################################################]


All plugins loaded

 - Please run /opt/nessus//sbin/nessus-adduser to add an admin user

 - Register your Nessus scanner at http://www.nessus.org/register/ to obtain

   all the newest plugins

 - You can start nessusd by typing /sbin/service nessusd start


//////////////////////////////////////////////////////////////////////////////////////////////////


설치 후에 nessus-adduser 통하여 Nessus Server 접속 시에 사용자 계정을 등록하고, plugins 업데이트를 위해 등록하라는 안내가 나옵니다. 위에서 얘기하였듯이 HomeFeed 무료기때문에 등록하게 되면 이메일로 key 전달되고 운영체제 별로 등록 방법이 안내되어 있으므로 운영체제에 맞는 등록 방법을 복사하여 입력하면 간단하게 등록이 됩니다. 후에는 /sbin/serice nessusd start 하여 데몬을 가동시켜주어야 한다고 안내되고 있습니다.


추가적으로 데몬의 가동에 생각보다 시간이 오래 소요되었습니다. 저의 경우에만 그런지 모르겠지만 데몬을 가동시키자 5 정도가 지나서야 서비스가 정상적으로 실행됐다는 안내가 나왔습니다.

그러니, 가동 후에 아무런 반응이 없을 시에는 다른 콘솔 창을 띄워 넣고 top 명령을 사용하여 nessus 프로세스의 점유율을 확인하여 보십시오. 상위에 링크되어 있다면 idle 상태가 아니기 때문에 가동중인 것입니다.


아래는 위의 3가지 항목에 대한 등록 장면입니다.


[root@notasusual ~]# /opt/nessus/bin/nessus-fetch --register 79C9-****-****-****-****

Your activation code has been registered properly - thank you.

Now fetching the newest plugin set from plugins.nessus.org...

Your Nessus installation is now up-to-date.

If auto_update is set to 'yes' in nessusd.conf, Nessus will

update the plugins by itself.

[root@notasusual ~]# /opt/nessus/sbin/nessus-adduser

Using /var/tmp as a temporary file holder


Add a new nessusd user

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


Login : darkhi

Authentication (pass/cert) [pass] :

Login password :

Login password (again) :


User rules

----------

nessusd has a rules system which allows you to restrict the hosts

that darkhi has the right to test. For instance, you may want

him to be able to scan his own host only.


Please see the nessus-adduser(8) man page for the rules syntax


Enter the rules for this user, and hit ctrl-D once you are done :

(the user can have an empty rules set)



Login             : darkhi

Password          : ***********

DN                :

Rules             :



Is that ok ? (y/n) [y] y

user added.

[root@notasusual ~]#


If auto_update is set to 'yes' in nessusd.conf, Nessus will

update the plugins by itself.

auto_update=yes 옵션으로 인하여 자동으로 업데이트 되도록 설정되어 있습니다. 옵션을 끄고 싶다면 /opt/nessus/etc/nessus/nessusd.conf파일에서 no 수정하여 주시면 됩니다.


가동이 되었다면 홈페이지에서 윈도우용 Client 받은 설치하면 됩니다. 굳이 윈도우용을 설치할 필요는 없지만, 윈도우용이 사용하기 편하기 때문에 윈도우 용을 추천합니다.



사용자 삽입 이미지
[Nessus Client 화면]


Nessus Client 설치한 실행하여 Nessus Server 접속하는 장면입니다. 여기서는 Target 아닌 Nessus Server ip 적고 위에서 등록한 사용자 계정을 입력하여 주면 됩니다.



사용자 삽입 이미지
[Target IP 지정 화면]


Connect…  하여 연결이 되었다면, 위처럼 좌측에 + 버튼을 이용하여 Target IP를 지정한 후 Scan Now 입력하면 Scan하여 열린 Port 별로 취약점이나 Risk 정도를 Report하여 줍니다.


Connect 하였는데 연결이 되지 않는다면, WireShark 패킷을 떠보게 되면 자세히 있습니다.

보낸 패킷은 제대로 SYN하지만, 돌아오는 패킷은 Destination unreachable (Host administratively prohibited)라고 있습니다. 쉽게 말하자면 목적지 호스트와의 통신이 관리 목적상 금지되었다는 내용입니다.

원인은 Nessus 데몬이 설치된 Server 방화벽이 존재하기 때문입니다. Server 방화벽을 꺼주면 됩니다.

끄는 방법은 CentOS 계열에서는 service iptables stop 명령어를 사용하거나 setup 들어가서 방화벽 설정에서 disable 시켜주면 됩니다.



사용자 삽입 이미지
[Report 형식]


위의 모습처럼 Report 작성되어집니다. 상용 프로그램처럼 최신 취약점에 대한 정보가 plugin 으로 업데이트되어 제공되기 때문에 빠르고 자세한 정보를 취득할 있습니다. 단점으로는 Server 존재하여야 한다는 단점이 있습니다. 공격보다는 방어를 위한 분석도구로 있습니다.

이올린에 북마크하기
2008/12/11 10:33 2008/12/11 10:33

lighttpd + php fastcgi + xcache 설치하기

Posted at 2008/04/06 21:51 // in Linux // by 엔신
APM이라는 말이 널리 이용될정도로 Apache + PHP + MySQL을 이용한 웹서비스들이 많이 생겼습니다.

Apache라는 웹서버는 초기 강력한 기능등으로 웹서버의 카테고리 킬러로 통할정도로 높은 점유율을 보유하고 있었습니다.

그런데 이 Apache가 범용적인 기능을 많이 보유하고 있고 또 메모리나 자원 점유율이 높은 편입니다.

아파치 1.x는 process단위이고 2.x는 thread를 이용하여 조금더 나아졌지만 자원 소모량등이 많은 것은 여전합니다.

이에 반해 lighttpd 는 non-blocking I/O로 단일 프로세스에서 실행되어 보다 가볍고 빠르다는 장점이 있습니다.

그리고 PHP를 다룰때 fastcgi기반으로 사용하기에 아파치의 mod_php와 비슷하거나 훨씬 빨라졌습니다.

lighttp는 apache의 모듈을 거의 다 쓸수 있다고 하네요. (실제 제게 필요한 모듈들은 다 있습니다)

lighttp에 php (enable fastcgi)를 연동하고 최근 각광받는 xcache를 이용하여 기존의 아파치+PHP보다 가볍고 빠른 웹서버 구축에 대해서 간단히 글을 쓰겠습니다.



php 설치
여기서는 php 5.2.0 을 기준으로 설치하도록 하겠습니다.
./configure의 옵션은 적당히 알아서 해주시면 됩니다. ( \ 역슬래시는 줄나눔의 의미이니 주의하세요)

view plaincopy to clipboardprint?
wget http://kr2.php.net/get/php-5.2.0.tar.gz/from/this/mirror  
tar xvfz php-5.2.0.tar.gz  
cd php-5.2.0  
./configure \  
--prefix=/usr/local/php  \  
--with-exec-dir=/usr/bin  \  
--with-mysql  \  
--with-sqlite  \  
--with-config-file-path=/etc  \  
--disable-debug  \  
--enable-sockets  \  
--with-png-dir=/usr/lib  \  
--with-freetype-dir=/usr/include/freetype2  \  
--enable-mod-charset  \  
--enable-calendar  \  
--enable-sysvsem=yes  \  
--enable-sysvshm=yes  \  
--enable-ftp  \  
--enable-magic-quotes  \  
--enable-gd-native-ttf  \  
--enable-inline-optimization  \  
--enable-bcmath  \  
--with-zlib  \  
--with-jpeg-dir=/usr/src  \  
--with-gd  \  
--with-ttf  \  
--with-gettext  \  
--enable-sigchild  \  
--with-libxml-dir=/usr/local/src/libxml2-2.6.11  \  
--with-zlib-dir=/usr/local/src/zlib-1.2.1  \  
--with-iconv  \  
--enable-fastcgi \  
--enable-force-cgi-redirect  
make  
make install  

wget http://kr2.php.net/get/php-5.2.0.tar.gz/from/this/mirror
tar xvfz php-5.2.0.tar.gz
cd php-5.2.0
./configure \
--prefix=/usr/local/php  \
--with-exec-dir=/usr/bin  \
--with-mysql  \
--with-sqlite  \
--with-config-file-path=/etc  \
--disable-debug  \
--enable-sockets  \
--with-png-dir=/usr/lib  \
--with-freetype-dir=/usr/include/freetype2  \
--enable-mod-charset  \
--enable-calendar  \
--enable-sysvsem=yes  \
--enable-sysvshm=yes  \
--enable-ftp  \
--enable-magic-quotes  \
--enable-gd-native-ttf  \
--enable-inline-optimization  \
--enable-bcmath  \
--with-zlib  \
--with-jpeg-dir=/usr/src  \
--with-gd  \
--with-ttf  \
--with-gettext  \
--enable-sigchild  \
--with-libxml-dir=/usr/local/src/libxml2-2.6.11  \
--with-zlib-dir=/usr/local/src/zlib-1.2.1  \
--with-iconv  \
--enable-fastcgi \
--enable-force-cgi-redirect
make
make install

이렇게 하면 php의 설치가 완료됩니다.
--enable-fastcgi, --enable-force-cgi-redirect는 필수입니다.

php.ini 파일은 /etc 디렉토리에 있는 것으로 설정하였습니다.
Zend Optimizer, eAccelerator등의 설치에 대해서는 소개하지 않습니다. :)

xcache 설치
xcache는 제로보드XE와 같은 class/object기반의 프로그램들을 보다 빠르고 가볍게 해주는 캐쉬 프로그램입니다.
APC나 eaccelerator 속도도 더 빠르다고 알려져 있구요.
php5.2.0에 돌아가는 xcache 1.2.1 을 기준으로 설치법을 알려드립니다.

wget http://xcache.lighttpd.net/pub/Releases/1.2.1/xcache-1.2.1.tar.gz
tar xvfz xcache-1.2.1.tar.gz
cd xcache-1.2.1
phpize
./configure --enable-xcache --enable-xcache-coverager
make
make install
cat xcache.ini >> /etc/php.ini

위에서 phpize나 configure시에 php 실행파일들의 경로 문제가 생길 수 있습니다.
1번처럼 php를 /usr/local/php/bin 에 실행파일이 생기게 했다면 아래와 같이 미리 PATH를 지정해주세요.

export PATH="$PATH:/usr/local/php/bin"

그 다음 /etc/php.ini 파일을 여세요.
만약 zend optimizer등을 설치하였다면 xcache 설정중 zend_extension이 zend optimizer보다 위에 있어야 합니다.

저는 아래와 같이 설정하였습니다.

view plaincopy to clipboardprint?
[xcache-common]  
zend_extension = /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/xcache.so  
[xcache.admin]  
xcache.admin.auth = On  
xcache.admin.user = "관리자 아이디"  
xcache.admin.pass = "md5 hash 비밀번호"  
[xcache]  
xcache.shm_scheme =        "mmap"  
xcache.size  =                64M  
xcache.count =                 4  
xcache.slots =                8K  
xcache.ttl   =                 0  
xcache.gc_interval =           0  
xcache.var_size  =            64M  
xcache.var_count =             4  
xcache.var_slots =            8K  
xcache.var_ttl   =             0  
xcache.var_maxttl   =          0  
xcache.var_gc_interval =     300  
xcache.test =                Off  
xcache.readonly_protection = On  
;xcache.mmap_path =    "/tmp/xcache"  
xcache.mmap_path =    "/dev/zero"  
xcache.coredump_directory =   ""  
xcache.cacher =               On  
xcache.stat   =               On  
xcache.optimizer =           On  
[xcache.coverager]  
xcache.coverager =          On  
xcache.coveragedump_directory = ""  

[xcache-common]
zend_extension = /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/xcache.so
[xcache.admin]
xcache.admin.auth = On
xcache.admin.user = "관리자 아이디"
xcache.admin.pass = "md5 hash 비밀번호"
[xcache]
xcache.shm_scheme =        "mmap"
xcache.size  =                64M
xcache.count =                 4
xcache.slots =                8K
xcache.ttl   =                 0
xcache.gc_interval =           0
xcache.var_size  =            64M
xcache.var_count =             4
xcache.var_slots =            8K
xcache.var_ttl   =             0
xcache.var_maxttl   =          0
xcache.var_gc_interval =     300
xcache.test =                Off
xcache.readonly_protection = On
;xcache.mmap_path =    "/tmp/xcache"
xcache.mmap_path =    "/dev/zero"
xcache.coredump_directory =   ""
xcache.cacher =               On
xcache.stat   =               On
xcache.optimizer =           On
[xcache.coverager]
xcache.coverager =          On
xcache.coveragedump_directory = ""


위의 설정중 xcache.admin.user와 xcache.admin.pass는 xcache 관리자 페이지를 사용할 경우 입력해주면 됩니다.
참고로 관리자 페이지는 xcache 소스중 admin 이라는 디렉토리에 있고 이 admin 디렉토리를 웹에서 접근할 수 있는 곳에 복사해주시면 됩니다.

xcache.size나 xcache.var_size는 적절히 해주시면 됩니다.
xcache.count와 xcache.var_count는 cpu process의 수를 적어주시면 됩니다.

cat /proc/cpuinfo |grep -c processor

위와 같이 명령어를 입력하면 프로세스의 수가 나옵니다.

lighttp 설치
공식사이트 : http://www.lighttpd.net
설치방법 ( 2007년 12월 24일 현재 최신 버전 기준)
view plaincopy to clipboardprint?
wget http://www.lighttpd.net/download/lighttpd-1.4.18.tar.gz    
tar xvfz lighttpd-1.4.18.tar.gz  
cd lighttpd-1.4.13  
./configure --with-pcre  
make  
make install  
cp doc/lighttpd.conf /etc  

wget http://www.lighttpd.net/download/lighttpd-1.4.18.tar.gz
tar xvfz lighttpd-1.4.18.tar.gz
cd lighttpd-1.4.13
./configure --with-pcre
make
make install
cp doc/lighttpd.conf /etc
위와 같이 하면 설치가 완료됩니다.

설정 파일
위 설치방법에서 lighttpd.conf 파일을 /etc 로 이동시켰습니다.
vi /etc/lighttpd.conf 해서 수정 작업 들어갑니다.

lighttpd의 경우 기본적으로 아파치에서 유용하게 사용되는 모듈들을 포함하고 있고 이를 사용하는 것은 lighttpd.conf 파일의 주석을 제거함으로 바로 사용가능합니다.

일단 lighttpd.conf 파일의 제일 위 부분을 보면 아래와 같습니다.

view plaincopy to clipboardprint?
server.modules              = (  
                              "mod_rewrite",  
#                               "mod_redirect",  
#                               "mod_alias",  
                               "mod_access",  
#                               "mod_cml",  
#                               "mod_trigger_b4_dl",  
                              "mod_auth",  
#                               "mod_status",  
#                               "mod_setenv",  
                              "mod_fastcgi",  
#                               "mod_proxy",  
                              "mod_simple_vhost",  
#                               "mod_evhost",  
#                               "mod_userdir",  
#                               "mod_cgi",  
                              "mod_compress",  
#                               "mod_ssi",  
#                               "mod_usertrack",  
#                               "mod_expire",  
#                               "mod_secdownload",  
#                               "mod_rrdtool",  
                               "mod_accesslog"  
                             )  

server.modules              = (
                              "mod_rewrite",
#                               "mod_redirect",
#                               "mod_alias",
                               "mod_access",
#                               "mod_cml",
#                               "mod_trigger_b4_dl",
                              "mod_auth",
#                               "mod_status",
#                               "mod_setenv",
                              "mod_fastcgi",
#                               "mod_proxy",
                              "mod_simple_vhost",
#                               "mod_evhost",
#                               "mod_userdir",
#                               "mod_cgi",
                              "mod_compress",
#                               "mod_ssi",
#                               "mod_usertrack",
#                               "mod_expire",
#                               "mod_secdownload",
#                               "mod_rrdtool",
                               "mod_accesslog"
                             )

# 은 주석을 의미합니다.
즉 필요치 않은 모듈은 #을 줄앞에 붙여줌으로서 사용하지 않도록 하면 됩니다.

그외 설정은 아래를 따르면 됩니다.

view plaincopy to clipboardprint?
server.document-root = "/home/..../public_html"; # document root 지정  
server.error_log = "/var/log/lighttpd/error.log"; # 에러 로그 저장. 디렉토리 생성해주세요.  
index-file.name = ( "index.php", "index.html", "index.htm", "default.htm") # index file 지정  
mimetype.assign = ... # 그냥 두시면 됩니다.  
accesslog.filename = "/var/log/lighttpd/access.log"; # access log 저장  
url.access-deny = ( "~", ".inc") # 특정 파일 형식에 대해 접근 금지 시킬 수 있습니다.  
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) # mod_fastcgi나 mod_cgi 사용시 지정될 파일입니다.  
 
# 아파치의 vhost와 같은 정의를 아래와 같이 쉽게 할 수 있습니다. 도메인에 대한 document-root 지정  
# 1개 이상의 vhost일 경우 아래 3라인을 복사해서 주죽 써나가시면 됩니다.  
# 좀 더 쉽게 하려면 가상호스트 모듈 mod_evhost를 이용하면 됩니다.  
$HTTP["host"] == "www2.zerophp.com" {  
       server.document-root = "/home/DOMAINS/WWW"  
}  
 
# mod_evhost 사용시 vhost 지정  
# %3 는 subdomain 1의 이름입니다. 아래와 같은 패턴이 정의되어 있습니다.  
# %% => % sign  
# %0 => domain name + tld  
# %1 => tld  
# %2 => domain name without tld  
# %3 => subdomain 1 name  
# %4 => subdomain 2 name  
evhost.path-pattern = "/var/www/hosts/%3/"  
 
server.username = "nobody" # 웹서버가 사용한 uid  
server.groupname = "nobody" # 웹서버가 사용할 gif  
 
# 아래가 php의 fastcgi 연결 부분입니다.  
# 다른 부분은 그대로 두고 --enable-fastcgi, --enable-force-cgi-redirect 옵션으로 컴파일한 php 실행 파일 경로만 신경쓰시면 됩니다.  
fastcgi.server = ( ".php" => ( "localhost" => ( "socket" => "/var/run/lighttpd/php-fastcgi.socket", "bin-path" => "/usr/local/php/bin/php" )))  

server.document-root = "/home/..../public_html"; # document root 지정
server.error_log = "/var/log/lighttpd/error.log"; # 에러 로그 저장. 디렉토리 생성해주세요.
index-file.name = ( "index.php", "index.html", "index.htm", "default.htm") # index file 지정
mimetype.assign = ... # 그냥 두시면 됩니다.
accesslog.filename = "/var/log/lighttpd/access.log"; # access log 저장
url.access-deny = ( "~", ".inc") # 특정 파일 형식에 대해 접근 금지 시킬 수 있습니다.
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) # mod_fastcgi나 mod_cgi 사용시 지정될 파일입니다.

# 아파치의 vhost와 같은 정의를 아래와 같이 쉽게 할 수 있습니다. 도메인에 대한 document-root 지정
# 1개 이상의 vhost일 경우 아래 3라인을 복사해서 주죽 써나가시면 됩니다.
# 좀 더 쉽게 하려면 가상호스트 모듈 mod_evhost를 이용하면 됩니다.
$HTTP["host"] == "www2.zerophp.com" {
       server.document-root = "/home/DOMAINS/WWW"
}

# mod_evhost 사용시 vhost 지정
# %3 는 subdomain 1의 이름입니다. 아래와 같은 패턴이 정의되어 있습니다.
# %% => % sign
# %0 => domain name + tld
# %1 => tld
# %2 => domain name without tld
# %3 => subdomain 1 name
# %4 => subdomain 2 name
evhost.path-pattern = "/var/www/hosts/%3/"

server.username = "nobody" # 웹서버가 사용한 uid
server.groupname = "nobody" # 웹서버가 사용할 gif

# 아래가 php의 fastcgi 연결 부분입니다.
# 다른 부분은 그대로 두고 --enable-fastcgi, --enable-force-cgi-redirect 옵션으로 컴파일한 php 실행 파일 경로만 신경쓰시면 됩니다.
fastcgi.server = ( ".php" => ( "localhost" => ( "socket" => "/var/run/lighttpd/php-fastcgi.socket", "bin-path" => "/usr/local/php/bin/php" )))


거의 대부분 기본 설정을 쓰시면 됩니다.
다만 사용하려는 모듈의 지정과 fastcgi.server, vhost 등 실제 값이 필요한 부분만 설정해주시면 됩니다.

실행은 다음과 같이 하면 됩니다.

lighttpd -f /etc/lighttpd.conf



일단 php with fastcgi, xcache, lighttpd 설치와 설정에 대해서 간단히 적었습니다.

더 상세히 적고 싶지만 저 역시 아직 공부하는 중이라 필요한 부분들만 적었습니다.

서버 관리를 하신다면 그렇게 어렵지 않을 거라 생각합니다.

참고로.. 제로보드XE에서 주소를 이쁘게 하는 mod_rewrite를 lighttpd에서도 쓸수 있는데 이걸 각 서브도메인별로 지정하는걸 모르겠네요.

일단 저는 lighttpd.conf에 지정해 놓았습니다.

먼저 server.module에서 mod_rewrite를 사용하게 해 놓으시구요.



view plaincopy to clipboardprint?
url.rewrite = (  
               "^/([a-zA-Z0-9_]+)/files/attach/images/(.*)" => "./files/attach/images/$2",  
               "^/([a-zA-Z0-9_]+)/modules/(.*)" => "./modules/$2",  
               "^/([a-zA-Z0-9_]+)/common/(.*)" => "./common/$2",  
               "^/([a-zA-Z0-9_]+)/([[:digit:]]+)page$" => "./index.php?mid=$1&page=$2",  
               "^/rss/([[:digit:]]+){0,14}/([[:digit:]]+){0,14}/([[:digit:]]+)$" => "./index.php?module=rss&act=rss&start_date=$1&end_date=$2&page=$3",  
               "^/rss/([[:digit:]]+)$" => "./index.php?module=rss&act=rss&page=$1",  
               "^/rss$" => "./index.php?module=rss&act=rss",  
               "^/admin$" => "./index.php?module=admin",  
               "^/([a-zA-Z0-9_]+)/api$" => "./index.php?mid=$1&act=api",  
               "^/([[:digit:]]+)$" => "./index.php?document_srl=$1",  
               "^/([[:digit:]]+)/([a-zA-Z0-9_]+)$" => "./index.php?document_srl=$1&act=$2",  
                "^/([[:digit:]]+)/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)$" => "./index.php?document_srl=$1&act=$3&key=$2",  
               "^/([a-zA-Z0-9_]+)/([[:digit:]]+)$" => "./index.php?mid=$1&document_srl=$2",  
               "^/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)$" => "./index.php?mid=$1&act=$2",  
               "^/([a-zA-Z0-9_]+)/page/([[:digit:]]+)$" => "./index.php?mid=$1&page=$2",  
               "^/([a-zA-Z0-9_]+)/category/([[:digit:]]+)$" => "./index.php?mid=$1&category=$2",  
               "^/([a-zA-Z0-9_]+)/category/([[:digit:]]+)/page/([[:digit:]]+)$" => "./index.php?mid=$1&category=$2&page=$3",  
               "^/([a-zA-Z0-9_]+)/([[:digit:]]+)/([[:digit:]]+)$" => "./index.php?mid=$1&search_target=regdate&search_keyword=$2$3",  
                "^/([a-zA-Z0-9_]+)/([[:digit:]]+)/([[:digit:]]+)/([[:digit:]]+)$" => "./index.php?mid=$1&search_target=regdate&search_keyword=$2$3$4",  
               "^/([a-zA-Z0-9_]+)/tag/(.*)$" => "./index.php?mid=$1&search_target=tag&search_keyword=$2",  
                "^/([a-zA-Z0-9_]+)/writer/(.*)$" => "./index.php?mid=$1&search_target=nick_name&search_keyword=$2",  
               "^/([a-zA-Z0-9_]+)(/){0,1}$" => "./index.php?mid=$1" ) 

http://www.82i.com/@/zboard.php?id=faq&page=1&sn1=&divpage=1&sn=off&ss=on&sc=on&select_arrange=headnum&desc=asc&no=42

이올린에 북마크하기
2008/04/06 21:51 2008/04/06 21:51

CentOS (Redhat Enterprise)에서 lighttpd 설치

Posted at 2008/04/06 21:46 // in Linux // by 엔신
UNIX 2007/01/26 00:14
이번에 회사에서 새 서버들을 구매해서 IDC에 들어왔습니다. Dell PowerEdge SC1435로 AMD기반 옵테론 CPU라서 FreeBSD보다는 Linux가 좋을거 같더군요. 전에도 델서버 들어왔었는데 FreeBSD에서 네트워크 디바이스가 정상적으로 동작을 안하더군요. 델서비스에 연락했더니 Redhat Enterprise Linux(RHEL)구해서 설치하라고 해서 설치했었는데 네트워크 드라이버를 따로 구해서 설치해야되더군요. 서버에는 원래 엑스를 설치를 잘 안해서 고생했습니다. 일단 이미 설치된 다른 서버에 X 설치하고 웹에서 다운로드하는데 문서가 exe 파일이더군요! 황당 --; 집으로 VNC로 연결하여 실행하여 풀어보니 별거 없더군요 --; 설치했던 서버는 PE2950이었습니다. 다행히 USB 메모리가 있어서 네트워크를 잡을수 있었습니다...  그때 RHEL4를 받아서 설치했었는데 유료사용자가 아니면 업그레이드가 안되더군요. 그래서 이번에는 RHEL 소스를 이용하여 바이너리 호환이 되는 CentOS (Community Enterprise OS) AMD64 버전을 받아서 설치했습니다.

서버 여러대 설치하느라 시간이 좀 남아서(DVD 한장만 궈서갔음) FreeBSD 6.2(AMD64)도 설치해봤는데 별 이상없이 깔리더군요. 근데 SC1435에 PS/2 포트가 없어서 USB포트로 키보드와 마우스를 연결(Y케이블 이용해서 PS/2 키보드와 마우스연결)했는데 뺐다가 끼면 키보드와 마우스가 인식이 안되더군요.. 관리편의상 동시에 들어오는 서버는 같은 OS를 설치하는게 편하기 때문에 다시 밀고 CentOS를 설치하고, 업데이트까지 무사히 마치고 왔습니다. 업데이트는 정말 편하더군요. (#yum update) 그리고 네트워크 드라이버도 추가 설치없이 바로 잡히더군요.

이제 CentOS(AMD64)에서 lighttpd와 친구들 설치 방법에 대해서 설명드릴께요^^

AMD64의 php는 fastcgi가 컴파일안되어 있어서 lighttpd와 php를 fastcgi와 연결하기 위해서 php를 컴파일했습니다.


# cd /opt
# wget http://isoredirect.centos.org/centos/4/os/SRPMS/php-4.3.9-3.15.src.rpm
# rpm -i php-4.3.9-3.15.src.rpm
# vi /usr/src/redhat/SPECS/php.spec
      --enable-force-cgi-redirect \
     앞줄에
      --enable-fastcgi \
     를 넣어줍니다.


# rpmbuild --rebuild /opt/php-4.3.9-3.15.src.rpm

이때 필요한 패키지를 설치하고 해야할수도 있습니다. 오류에 뭐가 필요하다고 나옵니다.
 ( # yum update aspell-devel httpd-devel pcre-devel ...)
컴파일 완료되면 /usr/src/redhat/RPMS/x86_64 (또는 i386)에 바이너리 rpm이 생깁니다.

컴파일후 원하는 패키지를 업데이트 합니다. 버전번호 때문에 업그레이드가 안되면 --force를 이용해서 강제로 업데이트하면 됩니다.


lighttpd는 src rpm을 받아서 컴파일 합니다.


# wget http://www.lighttpd.net/download/lighttpd-1.4.13-1.src.rpm
# rpmbuild --rebuild lighttpd-1.3.15-1.src.rpm


xcache 역시 src rpm을 받아서 설치합니다.

# wget http://www.jasonlitka.com/media/files/SRPMS/php-xcache-1.2.0_0.2.src.rpm
# rpmbuild --rebuild php-xcache-1.2.0_0.2.src.rpm

rpm 바이너리 파일은 /usr/src/redhat/RPMS/x86_64 나 i386 등에 생깁니다. 적당히 원하는 패키지를 설치해주면 됩니다. 5대 서버에 설치하느라 한곳에서 컴파일하고 다음 스크립트를 이용하여 여러서버에 설치하였습니다.


#!/bin/sh
# install_lighttpd.sh

/usr/sbin/apachectl stop

rpm -ivh lighttpd-1.4.13-1.x86_64.rpm
rpm -Uvh --force php-4.3.9-3.15.x86_64.rpm php-devel-4.3.9-3.15.x86_64.rpm  php-pear-4.3.9-3.15.x86_64.rpm php-ldap-4.3.9-3.15.x86_64.rpm  php-mysql-4.3.9-3.15.x86_64.rpm
rpm -ivh php-xcache-4.3.9_1.2.0-0.2.x86_64.rpm

mkdir -p /etc/lighttpd
cp ./lighttpd.conf /etc/lighttpd
adduser -s /sbin/nologin www
/sbin/chkconfig httpd off
/sbin/chkconfig --add lighttpd
/sbin/chkconfig lighttpd on

touch /var/log/lighttpd.access.log
touch /var/log/lighttpd.error.log

chown www:www /var/log/lighttpd.access.log
chown www:www /var/log/lighttpd.error.log

/etc/init.d/lighttpd start

lighttpd.conf는 freebsd에서 사용하던걸 그대로 가져와서 server.event-handler 등 몇가지만 바꿨습니다. 주석등의 라인은 삭제했습니다.


# lighttpd.conf
server.modules              = (
                              "mod_redirect",
                              "mod_alias",
                              "mod_access",
                             "mod_status",
                             "mod_fastcgi",
                             "mod_userdir",
                              "mod_accesslog" )
server.document-root = "/var/www/html/"
accesslog.filename          = "/var/log/lighttpd.access.log"
server.errorlog             = "/var/log/lighttpd.error.log"
index-file.names            = ( "index.php", "index.html",
                              "index.htm", "default.htm" )
server.event-handler = "linux-sysepoll"
mimetype.assign             = (
 생략...
)

userdir.path = "public_html"
url.access-deny             = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
server.pid-file            = "/var/run/lighttpd.pid"
server.username            = "www"
server.groupname           = "www"
fastcgi.server              = ( ".php" =>
                              ( "localhost" =>
                                (
                                 "socket" => "/tmp/php-fastcgi.socket",
                                 "bin-path" => "/usr/bin/php",
                                 "min-procs" => 1,
                                 "max-procs" => 2,
                                 "max-load-per-proc" => 4,
                                 "idle-timeout" => 10,
                                 "bin-environment" => ( "PHP_FCGI_CHILDREN" => "16",
                                                        "PHP_FCGI_MAX_REQUESTS" => "2000" )
                                )
                             )
                            )

server.max-fds = 4096

그리고 로그가 계속 쌓이지 않도록 /etc/logrotate.d/lighttpd 파일을 만들었습니다.

/var/log/lighttpd.*.log {
 rotate 30
 daily
 missingok
 notifempty
 compress
 sharedscripts
 postrotate
      touch /var/log/lighttpd.access.log
      touch /var/log/lighttpd.error.log
      chown www:www /var/log/lighttpd.access.log
      chown www:www /var/log/lighttpd.error.log
      /bin/kill -HUP `cat /var/run/lighttpd.pid 2>/dev/null` 2> /dev/null || true
 endscript
}


참고 URL:
http://www.cyberciti.biz/tips/redhat-enterprise-linux-lighttpd-fastcgi-php.html
http://www.jasonlitka.com/2006/12/20/php-caching-and-acceleration-with-xcache/

http://www.82i.com/@/zboard.php?id=faq&page=1&sn1=&divpage=1&sn=off&ss=on&sc=on&select_arrange=headnum&desc=asc&no=39

이올린에 북마크하기
2008/04/06 21:46 2008/04/06 21:46

MySQL 설치/사용시 나는 에러 유형별 대처방법

Posted at 2008/02/24 13:02 // in DBMS // by 엔신
[ MySQL 설치/사용시 나는 에러 유형별 대처방법 ]

1. ./configure 시에 에러가 날때..

증상 : checking for tgetent in -lncurses... no
checking for tgetent in -lcurses... no
checking for tgetent in -ltermcap... no
checking for termcap functions library... configure: error: No curses/termcap library found
[root@localhost mysql-4.0.13]# make
make: *** No targets specified and no makefile found. stop.

왜 이런 메세지가 뜨는건가요?

해결책 : gcc가 없던지 아니면 패스가 안잡혀있는 경우입니다.

증상2 : configure: error: no acceptable C compiler found in $PATH
바로위에 에러메세지가 뜨는데요.,,  설치를잘못한건가요?

[root@localhost mysql-4.0.13]make를 실행하니까..

make: *** No targets specified and no makefile found.  멈춤.
메세지가 뜨네요....

해결책2 : 리눅스에 gcc가 설치됐는지 확인해보세요.

rpm -qa|grep gcc

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

2. 소스 설치시 NOTE: This is a MySQL binary distribution. 라는 메시지가 나오며

증상 : It's ready to run, you don't need to configure it! 나옵니다. 이유가?

해결책 : 바이너리를 받으셨네요. 컴파일이 필요없는.. 그러니깐 이미 컴파일한 겁니다.
걍 압축풀고 적당한 위치로 이동시키면 됩니다.

tar zxvf mysql-xx.xx.tar.gz
mv mysql-xx.xx /usr/local/
ln -s /usr/local/mysqlxx.xx /usr/local/mysql

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

3. mysql을 실행하면 2번 에러가...

증상 : ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/m
ysql.sock' (2) 무슨 에러인지요?

해결법 : 데몬 구동시 ./safe_mysqld --user=mysql & 한번 해보세요.

그래도 에러가 나면 ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock 해보세요.

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

4. mysql.sock 중에 40번에러가 뭐져?

증상 : ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/m
ysql.sock' (40)

해결법 : chown mysql.mysql -R /var/lib/mysql 를 하시기 바랍니다.

그리고 참고로 php에서의 mysql socket 은 /etc/php.ini 에서 경로를 수정할 수 있습니다.

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

5. mysql 데몬이 죽어버릴때

증상: ./mysqld_safe & 실행했습니다.
    chown mysql .. <-- 비슷한 오류가 뜨면서 데몬이 죽어버립니다..

해결법 : 레드햇 리눅스라면 groupadd 와 useradd 에 '-r' 옵션을 사용해 보세요..

# useradd -r -d /usr/local/mysql mysql

이렇게 하면 500 보다 작은 UID, GID를 가진 mysql 그룹과
사용자가 생성됩니다.

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

6. mysql 실행시 데몬 바로 죽음

증상 : 030527 22:33:39  mysqld started
030527 22:33:39  Can't start server: Bind on TCP/IP port: 주소가 이미 사용 중입니다
030527 22:33:39  Do you already have another mysqld server running on port: 3306 ?
030527 22:33:39  Aborting
030527 22:39:50  /usr/local/mysql/libexec/mysqld: Shutdown 이 완료됨!
030527 22:39:50  mysqld ended

해결법 : 3306 포트에 이미 다른 mysqld 가 실행되고 있습니다.

/mysql/scripts/mysql_config 을 열어서 포트번호 수정하세요.

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

7. mysql-4.0.12 설치후 데몬이 안띄워지고 바로 죽네요..

증상 : 정상적으로 소스 설치하고 나서,,
   /usr/local/mysql/bin 에서 아래와 같이 실행하면,,, 데몬이 시작하자 마자 바로 죽습니다.
   ./safe_mysqld Starting mysqld daemon with databases from /usr/local/mysql/var
   mysqld ended

그래서 에러 메세지를 보기 위해 /usr/local/mysql/var 로 이동하여 도매인.err 파일을
열어보니,, 아래와 같은 메세지가 있더군요.

mysqld started
InnoDB: Started
Fetal error: Can't open privilege tables: Can't find file: ' ./mysql/host.frm'(errno: 13)'
Aborting

해결법 : mysql_install_db 스크립트를 실행해서 초기 테이블을 생성해야 합니다.

       ./mysql_install_db 하시면 됩니다.

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

8. mysql sock 에러 문제의 확실한 해결법

증상 : 접속하면 >/var/lib/mysql/mysql.sock 어쩌구 저쩌구 (111) 어쩌구 저쩌구..
머 이런 에러 나면서 접속 안되신 분들 많으실 겁니다.

해결법 : 문제는 간단합니다. 디렉토리 퍼미션 문제입니다.....

killall mysqld

chmod 755 -R /var/lib/mysql

chown mysql.mysql -R /var/lib/mysql

safe_mysqld --language=korean &

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

9. make 명령어를 실행하면 설치가 해제가 되거든요

증상 : make[2]: *** No rule to make target `ctype-euc_kr.lo', needed by `bmove_upp.lo'. 멈춤.

make[2]: 나감 `/usr/local/down/mysql-3.23.38/libmysql' 디렉토리

make[1]: *** [all-recursive] 오류 1

make[1]: 나감 `/usr/local/down/mysql-3.23.38' 디렉토리

make: *** [all-recursive-am] 오류 2

해결법 : 먼저 LD_LIBRARY_PATH에 모든 라이브러리 경로가 들어가 있어야 합니다.

이런 경우때문에 필요한 라이브러리를 찾지못해 에러가 납니다.

거의 필요한 패키지를 설치했는데도 에러가 나면

LD_LIBRARY_PATH를 확인해볼 필요가 있답니다.

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

10. mysql 설치시 gcc에러나는데 해결책 좀

증상 : 에러 내용과 커맨드는 아래와 같습니다.

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

checking for c++... c++
checking whether the C++ compiler (c++   ) works... no
configure: error: installation or configuration problem: C++ compiler cannot create executables.

해결책 : red hat 8.0 설치시 gcc,gcc++등 여러가지 설치가 안되는게 많더군요.

rpm으로 찾아서 다 설치하고 나서 컴파일 하면 됩니다.

rpmfind.net에서 찾으실 수 있습니다. 에러 보고 하나하나 다 설치하시면 됩니다.

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

11. 인스톨 설치도중 103 에러

증상 : an error occured move data process: -103
compenent : server
mySQL 4.0 설치할 때 잘되다가 이것되문에 설치가 안되네요..
이전에 깔았던 mySQL 3.23 때문에 그런지.. 영.. 모르겠네요.

해결책 : mysql이 설치된 폴더를 완전시 삭제하신 후에 다시 받으셔서 설치해보세요.

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

12. mysql설치 시 invalid user 오류가..

증상 : chown: mysql: invalid user
Starting mysqld daemon with databases from /usr/local/mysql/data
030417 11:42:35  mysqld ended

데몬실행시 이런 에러가 뜨네요...
어떻게 해결하면 되죠?

해결책 : mysql 이란 유져가 유효하지 않다라는 에러로
현재 mysql이란 계정이 존재하지 않기때문에 나는 에러입니다.

설치하신 후 mysql이란 그룹과 유저를 생성해주시고
/usr/local/mysql/ 아래 디렉토리에 대한 권한도 주셔야 제대로 동작할 것 입니다.

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

13. mysql 4.0.12 설치 시 "Check your system clock" 오류

증상 : mysql 4.0.12를 설치하는데...
> ./configure --prefix=/usr/local/mysql --with-charset=euc_kr
이렇게 했는데 다음과 같은 메세지가 나옵니다.
checking build system type... i686-pc-linux
checking host system type... i686-pc-linux
checking target system type... i686-pc-linux
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... configure: error: newly created file is older than distributed files!
Check your system clock
왜 그런건지 알려주세요..

해결법 : mysql이 개발된 시간보다 현재시간이 늦어서(?) 생기는 문제입니다.

시간설정으로 간단히 해결할 수 있습니다.

인터넷(네트웍)이 되는 상황이라면
rdate -s time.nuri.net (잘못된 시간 설정을 올바르게 바꾸는 명령)를 하시고
(time.nuri.net <== 이부분은 다른서버를 이용하셔도 무방)
아니면 date 명령어로 시간을 현재시간으로 설정해주세요...

예) date 06111800 (6월 11일 저녁6시)

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

14. 설치시 configure: error: no acceptable cc found in $PATH 에러

증상 : ./configure 하면 중간에
configure: error: no acceptable cc found in $PATH
이라는 글씨가 써지면서 멈춰버리더군요. 다른 버전을 설치해도 마찬가지입니다.

해결법 : cc 즉 c complier 가 없다는 말입니다

c 컴파일러가 PATH에 안잡혀 있을 수 있습니다. path를 추가하거나 gcc를 다시 설치하십시요.

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

15. config시 ERROR: 1062 Duplicate entry 'localhost-root' for key 1

증상 : mysql 소스설치 config시
다음과 같은 에러가 나는데요..
rpm버전 삭제했는데 데몬이 살아 있나?
ps -ax | grep mysql 하면 암것도 안나오거든요.

ERROR: 1062 Duplicate entry 'localhost-root' for key 1
ERROR: 1062 Duplicate entry 'localhost-root' for key 1
030312 14:58:03 ./bin/mysqld: Shutdown Complete

해결책 : 캐시에 이전데몬이 살아있기 때문입니다.
kill 명령으로 프로세스를 완전히 죽이신 다음 다시 설치하시면 됩니다.

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

16. configure 에러로 "error : No curses/termcap library found" 무슨 에러죠?

증상 : checking for termcap functions library...

configure: error : No curses/termcap library found

해결책 : libtermcap-devel-xxx 패키지가 필요해서 발생하는 에러입니다.

설치시디를 넣으시고 설치를 하시면 해결됩니다.


http://blog.daum.net/kanto235/13992741

이올린에 북마크하기
2008/02/24 13:02 2008/02/24 13:02