Langsung ke konten utama

set timezone ubuntu, centos, debian

Set the timezone

To set the timezone of your system clock do the following:
cp /usr/share/zoneinfo/America/La_Paz /etc/localtime
Choose the right timezone for you.
Automatically adjust your computer clock
To have your system to automatically adjust time we need to install ntp. Get it from your repository. Once installed you can configure it this way:
Edit the file /etc/ntpd.conf. It will look like this:
# With the default settings below, ntpd will only synchronize your clock.
#
# For details, see:
# - the ntp.conf man page
# - http://support.ntp.org/bin/view/Support/GettingStarted
# - https://wiki.archlinux.org/index.php/Network_Time_Protocol_daemon

# Associate to public NTP pool servers; see http://www.pool.ntp.org/
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org

# Only allow read-only access from localhost
restrict default noquery nopeer
restrict 127.0.0.1
restrict ::1

# Location of drift and log files
driftfile /var/lib/ntp/ntp.drift
logfile /var/log/ntp.log

# NOTE: If you run dhcpcd and have lines like 'restrict' and 'fudge' appearing
# here, be sure to add '-Y -N' to the dhcpcd_ethX variables in /etc/conf.d/net
Be sure to start the daemon, and to make it start automatically when the system boots.
On Arch Linux is: /etc/rc.d/ntpd start on Debian and derivatives /etc/init.d/ntpd start
Update from the command line against a time server
You can update the clock manually, without the need of the daemon with ntpdate
ntpdate 129.6.15.28
You will get something like this:
19 Apr 15:45:23 ntpdate[10948]: step time server 129.6.15.28 offset -45.697084 sec

Komentar

Postingan populer dari blog ini

Konfigurasi Proxy Server Squid Lusca + Mikrotik menggunakan Ubuntu 14.04

Kali ini aku akan membagikan dokumentasi yang akan aku terapkan pada pekerjaan kecilku di sebuah Internet Cafe di daerah jogja. karena permintaan dari client untuk menggunakan proxy sebagai web cache, aku akan mencoba memasang menggunakan komputer Jogloabang (http://jogloabang.com). sebelumnya kita akan mengenal yang namanya Proxy Server . Proxy Server adalah server yang bertindak sebagai perantara permintaan dari klien mencari sumber daya dari server lain. Seorang klien terhubung ke server proxy , meminta beberapa layanan, seperti file, koneksi, halaman web, atau sumber daya lain yang tersedia dari server yang berbeda dan server proxy mengevaluasi permintaan sebagai cara untuk menyederhanakan dan mengontrol kompleksitasnya. Proxy diciptakan untuk menambah struktur dan enkapsulasi untuk sistem terdistribusi. Saat ini, kebanyakan proxy adalah proxy web, memfasilitasi akses ke konten di World Wide Web dan menyediakan anonimitas. ( Sumber ). lalu apa itu Squid? Squid adalah sebuah daemo...

install php5.3 ubuntu 14.04, 16.04, 18.04 with cgi not fcgi

Halo, kali ini saya akan membagikan tutorial mudah untuk compile dan install php5.3 di ubuntu 14.04, btw.. di 18.04 juga bisa sebenernya, asalakan perinsipnya tahu.  kenapa saya pake cgi tidak fcgi? ya karena lebih enteng dari fcgi, dan fpm. nah biasanya, kita sering dihadapkan dengan kondisi dimana diharuskan memasang aplikasi lama, di server yang OS nya ke-kinian. oke.. bisa dipahami? untuk install php5.3 diubuntu, diperlukan keahlian dalam mengatasi error dan mencarinya di google. yuk mulai 1. Unduh file compile PHP wget -O php-5.3.29.tar.gz http://de1.php.net/get/php-5.3.29.tar.gz/from/this/mirror 2. install depedensi yang dibutuhkan: apt-get install apache2 apt-get install build-essential apt-get install libxml2-dev apt-get install libcurl4-openssl-dev pkg-config apt-get install libbz2-dev apt-get install libjpeg-turbo8-dev apt-get install libpng-dev apt-get install libfreetype6-dev apt-get install libmcrypt-dev libreadline-dev apt-get install libmysqlclient1...

Mengatasi Error DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled

Jika di mysql mendapatkan error seperti dibawah ini: 1418 (HY000) at line 10185: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) dapat diselesaikan dengan cara: 1. jalan kan di cmd/terminal: SET GLOBAL log_bin_trust_function_creators = 1; 2. Masukan di konfgurasi my.cnf : log_bin_trust_function_creators = 1;