debian 에서 시각을 동기화 해보자.
먼저 ntp와 ntpdate 를 설치 해야 한다.
apt-get install ntp
apt-get install ntpdate
ntpdate 를 설치 한 후 ntpdate [ntp 서버 ip주소] 를 하면 동기화를 한다.
그리고, /etc/ntp.conf 를 편집해서
server 에 ntp 서버 ip주소를 추가 해주거나 기존의 ntp 주소를 수정 해준다.
끝.
추가..(2017.02.15.)
/etc/ntp.conf에서 server목록을 편집 하고 ntp 서버와 동기화가 잘 되는지
ntpdate [server ip]를 해서 싱크가 성공하였는지 확인한다. (링크#1)
만약
31 Aug 12:31:59 ntpdate[3108]: the NTP socket is in use, exiting
와 같은 메시지가 발생시 (링크#2)
ntp 데몬을 stop한 후 재실시한다.
데몬 stop 명령어는 service ntp stop 이다.
다른 방법은 다음과 같다 (링크#3)
수동 설정
1. localtime 을 삭제 : rm /etc/localtime
2. Zone 복사 : cp /usr/share/zoneinfo/Asia/Seoul localtime
3. ntp 데몬설치 : apt-get install ntp
GUI 툴을 이용한 설정
1. 타임존 설정 : dpkg-reconfigure tzdata -> Asia -> Seoul
2. ntp 데몬설치 : apt-get install ntp
2016년 11월 30일 수요일
2015년 9월 8일 화요일
데비안 리눅스 sudo 설치
데비안에 sudo를 설치 해본다.
설치를 하고 유저를 추가 해줘야한다..
1. sudo 설치
root@*******:/home/********# apt-get install sudo
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
sudo
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 850 kB of archives.
After this operation, 2,694 kB of additional disk space will be used.
Get:1 http://ftp.kr.debian.org/debian/ jessie/main sudo amd64 1.8.10p3-1+deb8u2 [850 kB]
Fetched 850 kB in 3s (217 kB/s)
Selecting previously unselected package sudo.
(Reading database ... 33426 files and directories currently installed.)
Preparing to unpack .../sudo_1.8.10p3-1+deb8u2_amd64.deb ...
Unpacking sudo (1.8.10p3-1+deb8u2) ...
Processing triggers for systemd (215-17+deb8u2) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up sudo (1.8.10p3-1+deb8u2) ...
Processing triggers for systemd (215-17+deb8u2) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
sudo
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 850 kB of archives.
After this operation, 2,694 kB of additional disk space will be used.
Get:1 http://ftp.kr.debian.org/debian/ jessie/main sudo amd64 1.8.10p3-1+deb8u2 [850 kB]
Fetched 850 kB in 3s (217 kB/s)
Selecting previously unselected package sudo.
(Reading database ... 33426 files and directories currently installed.)
Preparing to unpack .../sudo_1.8.10p3-1+deb8u2_amd64.deb ...
Unpacking sudo (1.8.10p3-1+deb8u2) ...
Processing triggers for systemd (215-17+deb8u2) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up sudo (1.8.10p3-1+deb8u2) ...
Processing triggers for systemd (215-17+deb8u2) ...
2. sudo 에 user 추가
root@*******:/home/********# sudo adduser ********* sudo
Adding user `*********' to group `sudo' ...
Adding user ********* to group sudo
Done.
Adding user `*********' to group `sudo' ...
Adding user ********* to group sudo
Done.
3. visudo에 설정
GNU nano 2.2.6 File: /etc/sudoers.tmp
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
***** ALL=(ALL:ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
***** ALL=(ALL:ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
피드 구독하기:
글 (Atom)