|
(1). ftp 서비스 diable/enable 테스트
[JeonWoo@/]# svcadm enable ftp
Name (127.0.0.1:root):
(2). sendmail 서비스 disalbe/enable 테스트
(3). rdate 서비스 disable/enable 테스트
[JeonWoo@/]# svcs -a | grep time
disabled 12:32:25 svc:/network/daytime:dgram
disabled 12:32:25 svc:/network/daytime:stream
disabled 12:32:25 svc:/network/time:dgram
disabled 12:32:25 svc:/network/time:stream
:solaris 10 버전부터 rdate는 disable이 되어있다.
[JeonWoo@/]# rdate 127.0.0.1
rdate: connect: Connection refused
(4). apache(Apache 2.X) 서비스 disable/enable 테스트
disabled 12:32:01 svc:/network/http:apache2
maintenance 3:01:27 svc:/network/http:apache2
STATE STIME FMRI
: 의존성에는 문제가 없는것을 확인할수있다.
영향: 이 서비스가 실행되지 않습니다.
.
.
.
[ 4월 11 03:00:11 Executing start method ("/lib/svc/method/http-apache2 start") ]
[ 4월 11 03:00:14 Method "start" exited with status 0 ]
[ 4월 11 03:00:34 Stopping because service disabled. ]
[ 4월 11 03:00:34 Executing stop method ("/lib/svc/method/http-apache2 stop") ]
[ 4월 11 03:00:34 Method "stop" exited with status 0 ]
[ 4월 11 03:01:27 Enabled. ]
[ 4월 11 03:01:27 Executing start method ("/lib/svc/method/http-apache2 start") ]
[ 4월 11 03:01:27 Method "start" exited with status 96 ]
[JeonWoo@/]# vi /lib/svc/method/http-apache2
"/lib/svc/method/http-apache2" [읽기 전용] 40 행, 698 문자
1 #!/sbin/sh
2 #
3 # Copyright 2004 Sun Microsystems, Inc. All rights reserved.
4 # Use is subject to license terms.
5 #
6 # ident "@(#)http-apache2 1.2 04/11/11 SMI"
7 #
8
9 . /lib/svc/share/smf_include.sh
10
11 APACHE_HOME=/usr/apache2
12 CONF_FILE=/etc/apache2/httpd.conf
13 PIDFILE=/var/run/apache2/httpd.pid
14
15 [ ! -f ${CONF_FILE} ] && exit $SMF_EXIT_ERR_CONFIG
16: 에러가 출력된 부분임을 알수있다. 즉, /etc/apache2/httpd.conf 파일에 문제가 있거나 없는경우이다.
17 case "$1" in
18 start)
19 /bin/rm -f ${PIDFILE}
20 /bin/mkdir -p /var/run/apache2
21 ssl=`svcprop -p httpd/ssl svc:/network/http:apache2`
22 if [ "$ssl" = false ]; then
23 cmd="start"
30 ;;
31 stop)
32 cmd="stop"
33 ;;
34 *)
35 echo "Usage: $0 {start|stop|refresh}"
36 exit 1
37 ;;
38 esac
39
40 exec ${APACHE_HOME}/bin/apachectl $cmd 2>&1
[JeonWoo@/etc/apache2]# cp httpd.conf-example httpd.conf ; ls
highperformance-std.conf magic
highperformance.conf mime.types
httpd-std.conf ssl-std.conf
httpd.conf ssl.conf
httpd.conf-example
:httpd.conf파일을 복사하여 에러의 근원지를 해결
[JeonWoo@/]# svcadm disable apache2
[JeonWoo@/]# svcadm enable apache2
:apache2 재시작
[JeonWoo@/]# svcs -a | grep apache
legacy_run 12:32:36 lrc:/etc/rc3_d/S50apache
online 3:06:49 svc:/network/http:apache2
[JeonWoo@/]# svcs -xv
:더 이상 에러가 나타나지 않는것을 확인
[JeonWoo@/]# cd /var/apache2/htdocs
[JeonWoo@/var/apache2/htdocs]# vi index.html
<html>
<head>
<body>
<font size=20 color=green> Enhance your life!!</font>
</body>
</head>
</html>
웹브라우저에서 192.168.x.x접속후 서비스 확인!
|
첫댓글 웹 페이지의 문구 ~~~ 좋~은~데~요!!!!