Server-Side/Linux2010. 8. 26. 14:17
# chkconfig --add apacheclt  
service apachectl does not support chkconfig

위의 예처럼 데몬을 자동으로 수행하려는데 에러가 발생한다면
다음과 같은 해결책을 사용해보세요.

# vi /etc/init.d/apachectl

# chkconfig: 2345 90 90
# description: init file for apachectl server daemon
# processname: /usr/local/apache2/bin/apachectl
# config: /usr/local/apache2/conf/httpd.conf
# pidfile: /usr/local/apache2/logs/httpd.pid

편집기를 열고 다음의 주석달린 5문장을 입력하면 놀랍게도 해결이 될것이다.

화이팅!!
Posted by 준피
Server-Side/Linux2010. 8. 25. 16:34
1. 환경설정파일변경
> vi /etc/ssh/sshd_config

------------------------------------------
PermitRootLogin no
------------------------------------------

yes를 no로 변경하고 주석을 풀어줍니다.

2. 재시작
> service sshd restart


Posted by 준피
Server-Side/Linux2010. 8. 25. 14:08
1. 그룹 추가

>groupadd -g 505 web
>vi /etc/group

파일 내용중 다음과 같은 라인을 확인할 수 있다.

web:x:505:     => web이라는 그룹에 GID 505를 부여함

2. 사용자에게 GID(그룹아이디)주기

>vi /etc/passwd
원하는 사용자의 GID를 505로 변경함.

- /etc/passwd 파일의 구조
  account:password:UID:GID:GECOS:directory:shell
     account  :  사용자이름
     password : 암호(shadows파일로 대치될 경우 * 표시)
     UID, GID : 사용자번호, 그룹번호
    GECOS : 사용자정보(사용자 Full Name)
    directory : 사용자의 홈디렉토리
    shell     : 사용자의 기본 shell

3. 원하는 폴더에 그룹으로 권한주기

> chgrp web 대상폴더
> ls -al

drwxr-xr-x 2 root web 4096 1월 4 13:15 폴더이름

해당 폴더에 그룹이 web으로 변경되었음

단, 해당 디렉토리에 그룹에 대한 rwx의 권한이 있어야 함.
chmod 가 필요함.

'Server-Side > Linux' 카테고리의 다른 글

[CentOS] No curses/termcap library found MySql  (0) 2010.08.26
[CentOS] service apachectl does not support chkconfig  (0) 2010.08.26
[리눅스] root 로 접속 막기  (0) 2010.08.25
etc/passwd  (0) 2010.07.19
Unix find commands  (1) 2010.03.17
Posted by 준피
Server-Side/Linux2010. 7. 19. 18:48
abc:x:600:600::/home/abc:/bin/bash

abc : 사용자 계정
x: 비번
/home/abc : 로그인시 홈 디렉토리

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

chown abc /usr/local/apache/htdocs (-R)

abc 사용자에게 해당 디렉토리의 권한을 준다.

-R 옵션을 쓰면 하위 디렉토리까지 일괄적으로 권한을 준다.

Posted by 준피
Server-Side/Linux2010. 3. 17. 15:08
파일 찾는 명령어

find . -name "httpd.conf" -print
Posted by 준피