HOME > 이용안내
이용안내
 
작성일 : 19-01-16 14:31
[리눅스서버] CentOs7 부팅시 rc.local 파일 실행되도록 설정
 글쓴이 : 제이네트워크
조회 : 31,892  

CENTOS 7 부팅시 rc.local 파일 실행되도록 설정


※ CentOS 7에서는 부팅시 /etc/rc.local 이 실행되지 않는다.


# chmod u+x /etc/rc.d/rc.local

# systemctl start rc-local


실행 권한 추가 후 시작 (재 부팅 후에도 적용됩니다.)

 rc.local 이지만 rc-local로 해야 한다.








Cloud server Streaming service Domain Cloud Firewall

제이네트워크 20-04-02 13:31
 
1. 먼저 실행권한을 줍니다. 

# chmod +x  /etc/rc.d/rc.local


2. 실행 상태를 확인합니다.   

# ll /etc/rc.d/rc.local

-rwx-xr-xr 1 root.root 504 jan 2 11:11 /etc/rc.d/rc.local

3.  status 를 체크해 봅니다.

# systemctl status rc-local.service
.......
.......
Active : inactive(dead)


4. 실행시키고 확인합니다.

#systemctl start rc-local.service
.....
.....
Active : active(exited)....


5. 리부팅후에도 실행 되겠끔 enable 처리 합니다.

# vi /usr/lib/systemd/system/rc-local.service    (맨아래 줄에 다음 항 추가)

[Install]
WantedBy=multi-user.target


# systemctl enable rc-local.service
Created symlink from /etc/systemd/system/multi-user.target.wants/rc-local.service to /usr/lib/systemd/system/rc-local.service.

 
6. 확인 해 봅니다.

# systemctl list-unit-files | grep rc.local
rc-local.service                              enabled


7. 리부팅후 확인해 봅니다.
 
 

Total 0

번호 제   목   글쓴이 날짜 조회
게시물이 없습니다.