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

idled 1.16 (설치 및 운영 ) 1/2

작성자 정보

  • 웹관리자 작성
  • 작성일

컨텐츠 정보

본문

icon01.gif리눅스 서버 구축하기

<?XML:NAMESPACE PREFIX = O />

icon04.gif 1. 소스구하기

수퍼유저코리아 자료실

또는

http://www.cs.hope.edu/~crider/idled/

icon04.gif 2. 압축풀기


[root@kebia_1 local]# ls -l

-rw-r--r--    1 root     root        70864 Sep 26  2000 idled-1.16.tar.gz

[root@kebia_1 local]#

[root@kebia_1 local]#

[root@kebia_1 local]# gunzip idled-1.16.tar.gz

[root@kebia_1 local]#

[root@kebia_1 local]#

[root@kebia_1 local]# ls -l

-rw-r--r--    1 root     root       261120 Sep 26  2000 idled-1.16.tar

[root@kebia_1 local]#



icon04.gif

3. tar풀기

  

[root@kebia_1 local]# tar xvfp idled-1.16.tar


[root@kebia_1 local]#  ls -l

drwxr-xr-x    2 252      man          4096 May 17  1996 idled-1.16

-rw-r--r--    1 root     root       261120 Sep 26  2000 idled-1.16.tar

[root@kebia_1 local]#

[root@kebia_1 local]# cd idled-1.16

icon04.gif

4. Makefile 수정하기

 

 

[root@kebia_1 idled-1.16]# vi Makefile

# Makefile for Idled

#

 

# C compiler flags

CC = gcc                      <- 수정부분

RM = rm

INCLUDE =

 

######################################################################

#

# Definitions for different unices.

#

######################################################################

#

#  If your system keeps track of processes using procfs

#  (/proc), define HAVE_PROC_FS.  This determines what

#  method is used for checking to see if xlock is running.

#  Note that the /proc directory on Linux is not the correct

#  structure.  The procfs that is necessary is for the entire

#  contents of /proc to consist solely of files, probably with

#  their names being the process id's of the current processes,

#  and otherwise somehow coded.

#

#  If you don't HAVE_PROC_FS, perhaps one of the other search

#  methos for xlock_check will work.  In that case, if you

#  have KVM stuff (ie.  and lib kvm) define

#  PROC_SEARCH_1.

#

#  If zapping does not work, ie. the user does not get logged

#  out, you can try the 'ps' hack by defining PS_HACK.  The

#  "/bin/ps" line in zap.c may need to be adjusted to get

#  the proper parameters sent to ps for your system.  The

#  current setup should work fine for SunOS 4.x, perhaps others.

#

#  Define UTMPPID if your utmp file contains the process id

#  of the login shell for each entry.

/Linux

#CFMODE  = 664

#MMODE   = 644

 

######################################################################

####################  이부분(solaris)의 주석을 달고...  ###############

######################################################################

# SVR4  --  Solaris 2.x

# Use install3 for /usr/sbin/install

# and install1 for /usr/ucb/install

#DEFS += -DSYSV -DHAVE_PROC_FS -DUTMPPID -DHAVE_SETSID -DHAVE_UTMPX -DUTMPHOST -DRUDEKILL

#SPECLIBS =

#INSTTYPE = install3

 

#DEST    = /usr/local/bin

#CFDEST  = /usr/local/lib

#MDEST   = /usr/local/man

#LOGDEST = /var/log

 

#OWNER   = root

#CFOWNER = root

#MOWNER  = root

 

#GROUP   = root

#CFGROUP = root

 

#MODE    = 750

#CFMODE  = 664

#MMODE   = 644

 

######################################################################

######################### 이부분 (Linux)의 주석을 해제한다. ###########

######################################################################

# Linux

# Note:  NOT all version of Linux have yyrestart().  Remove the

#        -DHAVE_YYRESTART if you have problems.

# You should do a 'make clean' before 'make', so that parse.c

# and scan.c will be created on your system.

DEFS += -DSYSV -DUTMPPID -DUTMPHOST -DHAVE_SETSID -DHAVE_YYRESTART

SPECLIBS =

INSTTYPE = install1

#

DEST    = /usr/local/bin

CFDEST  = /usr/local/lib

MDEST   = /usr/local/man

LOGDEST = /var/log

#

OWNER   = root

CFOWNER = root

MOWNER  = root

#

GROUP   = root

CFGROUP = root

#

MODE    = 750

CFMODE  = 664

MMODE   = 644

 

######################################################################

######################################################################

# UnixWare 2.01 -- SVR4.2 MP  (probably other UnixWare 2.x too)

#DEFS = -DSYSV -DUTMPPID -DHAVE_SETSID

"Makefile" 588L, 17342C written

[root@kebia_1 idled-1.16]#

[root@kebia_1 idled-1.16]#

[root@kebia_1 idled-1.16]#


icon04.gif

5. 컴파일하기(make)

 

 

[root@kebia_1 idled-1.16]# make

gcc -DSYSV -DUTMPPID -DUTMPHOST -DHAVE_SETSID -DHAVE_YYRESTART  -DCONFIG="/usr/local/lib/idled.cf" -DLOGFILE="/var/log/idled.log"    -c -o insque.o insque.c

gcc -DSYSV -DUTMPPID -DUTMPHOST -DHAVE_SETSID -DHAVE_YYRESTART  -DCONFIG="/usr/local/lib/idled.cf" -DLOGFILE="/var/log/idled.log"    -c -o list.o list.c

gcc -DSYSV -DUTMPPID -DUTMPHOST -DHAVE_SETSID -DHAVE_YYRESTART  -DCONFIG="/usr/local/lib/idled.cf" -DLOGFILE="/var/log/idled.log"    -c -o parse.o parse.c

gcc -DSYSV -DUTMPPID -DUTMPHOST -DHAVE_SETSID -DHAVE_YYRESTART  -DCONFIG="/usr/local/lib/idled.cf" -DLOGFILE="/var/log/idled.log"    -c -o scan.o scan.c

scan.c:69: initializer element is not constant

scan.c:69: (near initialization for `yyin')

scan.c:69: initializer element is not constant

scan.c:69: (near initialization for `yyout')

make: *** [scan.o] Error 1

[root@kebia_1 idled-1.16]#



icon04.gif

6. 컴파일에러시 수정사항

 

 

[root@kebia_1 idled-1.16]# vi Makefile

# Makefile for Idled

#

 

# C compiler flags

CC = gcc

RM = rm

INCLUDE =

 

######################################################################

#

# Definitions for different unices.

#

######################################################################

#

#  If your system keeps track of processes using procfs

#  (/proc), define HAVE_PROC_FS.  This determines what

#  method is used for checking to see if xlock is running.

#  Note that the /proc directory on Linux is not the correct

#  structure.  The procfs that is necessary is for the entire

#  contents of /proc to consist solely of files, probably with

#  their names being the process id's of the current processes,

#  and otherwise somehow coded.

#

#  If you don't HAVE_PROC_FS, perhaps one of the other search

#  methos for xlock_check will work.  In that case, if you

#  have KVM stuff (ie.  and lib kvm) define

#  PROC_SEARCH_1.

#

#  If zapping does not work, ie. the user does not get logged

#  out, you can try the 'ps' hack by defining PS_HACK.  The

#  "/bin/ps" line in zap.c may need to be adjusted to get

#  the proper parameters sent to ps for your system.  The

#  current setup should work fine for SunOS 4.x, perhaps others.

#

#  Define UTMPPID if your utmp file contains the process id

#  of the login shell for each entry.

#CFDEST  = /usr/local/lib

#MDEST   = /usr/local/man

#LOGDEST = /var/log

 

#OWNER   = root

#CFOWNER = root

#MOWNER  = root

 

#GROUP   = root

#CFGROUP = root

 

#MODE    = 750

#CFMODE  = 664

#MMODE   = 644

 

######################################################################

######################################################################

# Linux

# Note:  NOT all version of Linux have yyrestart().  Remove the

#        -DHAVE_YYRESTART if you have problems.

# You should do a 'make clean' before 'make', so that parse.c

# and scan.c will be created on your system.

#DEFS += -DSYSV -DUTMPPID -DUTMPHOST -DHAVE_SETSID -DHAVE_YYRESTART

DEFS += -DSYSV -DUTMPPID -DUTMPHOST -DHAVE_SETSID

SPECLIBS =

INSTTYPE = install1

#

DEST    = /usr/local/bin

CFDEST  = /usr/local/lib

MDEST   = /usr/local/man

LOGDEST = /var/log

#

OWNER   = root

CFOWNER = root

MOWNER  = root

#

"Makefile" 589L, 17392C written

[root@kebia_1 idled-1.16]#

[root@kebia_1 idled-1.16]#

[root@kebia_1 idled-1.16]#

[root@kebia_1 idled-1.16]#

[root@kebia_1 idled-1.16]# make clean

rm -f a.out insque.o list.o parse.o scan.o idled.o warn.o xlock_check.o zap.o linetimelist.o core errs lint.errs Makefile.bak *.s tags

        parse.c scan.c idled y.tab.* lex.yy.c

[root@kebia_1 idled-1.16]#

[root@kebia_1 idled-1.16]#

[root@kebia_1 idled-1.16]#

[root@kebia_1 idled-1.16]# make

gcc -DSYSV -DUTMPPID -DUTMPHOST -DHAVE_SETSID -DHAVE_YYRESTART -DSYSV -DUTMPPID -DUTMPHOST -DHAVE_SETSID  -DCONFIG="/usr/local/lib/idled.cf" -DLOGFILE="/var/log/idled.log"    -c -o insque.o insque.c

yacc -d parse.y

mv y.tab.c parse.c

gcc -DSYSV -DUTMPPID -DUTMPHOST -DHAVE_SETSID -DHAVE_YYRESTART -DSYSV -DUTMPPID -DUTMPHOST -DHAVE_SETSID  -DCONFIG="/usr/local/lib/idled.cf" -DLOGFILE="/var/log/idled.log"    -c -o list.o list.c

gcc -DSYSV -DUTMPPID -DUTMPHOST -DHAVE_SETSID -DHAVE_YYRESTART -DSYSV -DUTMPPID -DUTMPHOST -DHAVE_SETSID  -DCONFIG="/usr/local/lib/idled.cf" -DLOGFILE="/var/log/idled.log"    -c -o parse.o parse.c

lex scan.l

mv lex.yy.c scan.c

gcc -DSYSV -DUTMPPID -DUTMPHOST -DHAVE_SETSID -DHAVE_YYRESTART -DSYSV -DUTMPPID -DUTMPHOST -DHAVE_SETSID  -DCONFIG="/usr/local/lib/idled.cf" -DLOGFILE="/var/log/idled.log"    -c -o scan.o scan.c

gcc -DSYSV -DUTMPPID -DUTMPHOST -DHAVE_SETSID -DHAVE_YYRESTART -DSYSV -DUTMPPID -DUTMPHOST -DHAVE_SETSID  -DCONFIG="/usr/local/lib/idled.cf" -DLOGFILE="/var/log/idled.log"    -c -o idled.o idled.c

idled.c:37:18: warning: "ut_xtime" redefined

/usr/include/bits/utmp.h:76:1: warning: this is the location of the previous definition

gcc -DSYSV -DUTMPPID -DUTMPHOST -DHAVE_SETSID -DHAVE_YYRESTART -DSYSV -DUTMPPID -DUTMPHOST -DHAVE_SETSID  -DCONFIG="/usr/local/lib/idled.cf" -DLOGFILE="/var/log/idled.log"    -c -o warn.o warn.c

gcc -DSYSV -DUTMPPID -DUTMPHOST -DHAVE_SETSID -DHAVE_YYRESTART -DSYSV -DUTMPPID -DUTMPHOST -DHAVE_SETSID  -DCONFIG="/usr/local/lib/idled.cf" -DLOGFILE="/var/log/idled.log"    -c -o xlock_check.o xlock_check.c

gcc -DSYSV -DUTMPPID -DUTMPHOST -DHAVE_SETSID -DHAVE_YYRESTART -DSYSV -DUTMPPID -DUTMPHOST -DHAVE_SETSID  -DCONFIG="/usr/local/lib/idled.cf" -DLOGFILE="/var/log/idled.log"    -c -o zap.o zap.c

gcc -DSYSV -DUTMPPID -DUTMPHOST -DHAVE_SETSID -DHAVE_YYRESTART -DSYSV -DUTMPPID -DUTMPHOST -DHAVE_SETSID  -DCONFIG="/usr/local/lib/idled.cf" -DLOGFILE="/var/log/idled.log"    -c -o linetimelist.o linetimelist.c

gcc -DSYSV -DUTMPPID -DUTMPHOST -DHAVE_SETSID -DHAVE_YYRESTART -DSYSV -DUTMPPID -DUTMPHOST -DHAVE_SETSID  -DCONFIG="/usr/local/lib/idled.cf" -DLOGFILE="/var/log/idled.log"  -o idled insque.o list.o parse.o scan.o idled.o warn.o xlock_check.o zap.o linetimelist.o

<

관련자료

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

공지사항


뉴스광장


  • 현재 회원수 :  60,056 명
  • 현재 강좌수 :  35,912 개
  • 현재 접속자 :  248 명