2019/04/05: 2개의 글

[리눅스공통] tar 사용법 (gz, bz2, xz)

Posted by nkjok
2019. 4. 5. 11:50 OS&기타/Linux
반응형

샘플 : [root@localhost /]# tar cvfz 123.tar.gz /bin /var
tar cvfz 파일이름.tar.gz /압축경로 /압축경로
= /bin + /var 압축한 123.tar.gz 생성

 

샘플 : [root@localhost /]# tar xvfz 123.tar.gz -C /test
tar xvfz /경로/압축파일.tar.gz -C /원하는위치
= 특정경로에 풀기

 

형식 : gzip

gzip은 파일 압축에 쓰이는 응용 소프트웨어이다. gzip은 GNU zip의 준말이며, 초기 유닉스 시스템에 쓰이던 압축 프로그램을 대체하기 위한 자유 소프트웨어이다. gzip은 Jean-loup Gailly와 마크 애들러가 만들었다. 버전 0.1은 1992년 10월 31일에 처음 공개되었으며, 버전 1.0이 1993년 2월에 뒤따라 나왔다. 오픈BSD의 gzip 버전은 더 오래된 압축 프로그램을 기반으로 하고 있으며, 오픈BSD 3.4에 추가되었다.

묶기 : [root@localhost /]# tar cvfz 123.tar.gz /bin

풀기 : [root@localhost /]# tar xvfz 123.tar.gz

 

 

형식 : bzip2

bzip2는 버로우즈-휠러 변환 기반의 압축 알고리즘 및 압축 소프트웨어이다. 줄리안 시워드(Julian Seward)가 개발하였으며, 1996년 7월에 0.15 버전을 처음 공개했다. 소프트웨어는 오픈 소스이며, BSD 허가서와 비슷한 라이선스를 갖는다.

묶기 : [root@localhost /]# tar cvfj 123.tar.bz2 /bin

풀기 : [root@localhost /]# tar xvf 123.tar.bz2

 

 

형식 : xz

xz는 무손실 데이터 압축 프로그램 및 LZMA2 압축 알고리즘 파일 형식이다.

묶기 : [root@localhost /]# tar cvfJ 123.tar.xz /bin

풀기 : [root@localhost /]# tar xvfJ 123.tar.xz

반응형

[CentOS-6.X] 리눅스를 NTP 서버로 만들기 (시간동기화 서버)

Posted by nkjok
2019. 4. 5. 10:32 OS&기타/Linux
반응형

1. 설치한다.

[root@localhost ~]# yum -y install ntp

 

2. 설정을 수정한다

[root@localhost ~]# vi /etc/ntp.conf

# Hosts on local network are less restricted.
#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap (NTP 행위를 허용할 IP 범위 설정)
restrict 192.168.3.0 mask 255.255.255.0 nomodify notrap

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
server 127.127.1.0 #local clock

vi에디터로 ntp.conf를 열어서 IP 범위를 지정하고 Server 리스트를 주석(#) 처리한다.

 

3. 서비스를 시작한다.

[root@localhost ~]# service start ntpd

 

4. 서비스를 부팅 시 자동으로 시작하게 설정한다.

[root@localhost ~]# chkconfig ntpd on 

 

이제 시간을 동기화할 컴퓨터에 이 리눅스의 IP를 NTP서버로 지정해주면 된다.

 

끝 !

 

 

 

참고용. 

[root@localhost ~]# chkconfig --list ntpd
ntpd 0:해제 1:해제 2:활성 3:활성 4:활성 5:활성 6:해제 (init로 부팅됬을때 자동 활성화 여부)

반응형