Install NTP time ubuntu


#timedatectl
#sudo ls -l /etc/localtime
#sudo apt-get install ntp
#sudo nano /etc/ntp.conf
–copy paste list server address berikut–
server 0.id.pool.ntp.org
server 1.id.pool.ntp.org
server 2.id.pool.ntp.org
server 3.id.pool.ntp.org
–end–
#timedatectl list-timezones
#sudo timedatectl set-timezone Asia/Jakarta
#timedatectl

Plugin myzsh on ubuntu


#sudo apt-get update && sudo apt-get upgrade
#sudo apt-get dist-upgrade
#sudo apt-get install zsh
#sudo apt-get install git-core
#sudo wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O – | zsh

Login as root:
#sudo usermod -s /bin/bash user1

Install adminer di linux


Ke direktory web:

#cd /var/www/html/
#sudo wget http://www.adminer.org/latest.php -O adminer.php
#sudo ufw allow db_ port
#sudo ufw allow https_port

Install SSL with Nginx Web Server on Linux


Anda akan mendapatkan 3 file dari Provider SSL:
-file .ca-bundle
-file .crt
-file .p7

1) Create file chained
#sudo cat _server_com.crt _server_com.ca-bundle > server_com.chained.crt

2) Create file stapling
#sudo mv _server_com.ca-bundle stapling.server_com.crt

3) Create file pkcs12 (.p12)
#sudo openssl pkcs12 -export -name servercrt -in server_com.chained.crt -inkey server_com.key -out server_com.p12
–> input source key/pass p12: yourpassword

4) Create file .jks
#sudo keytool -importkeystore -srckeystore server_com.p12 -srcstoretype pkcs12 -destkeystore server_com.jks -keyalg RSA
–> input destination key/pass jks: yourpassword

5) Create file public.pem
#sudo openssl pkcs12 -in server_com.p12 -out public.pem -nodes -clcerts
–> input pass: yourpassword

6) Create file ejabberd.pem
#sudo server_com.key server_com.ca-bundle stapling.server_com.crt > ejabberd.pem

NOTE:
Cek karakte’M dan —–BEGIN CERTIFICATE—– dan —–END CERTIFICATE—– biasanya setelah digabung, selalu ada yang nyambung/salah

Create file .key dan .csr untuk generate SSL file


#sudo openssl genrsa -out server_com.key 2048
#sudo openssl req -new -key server_com.key -out server_com.csr
#sudo openssl dhparam -out /etc/nginx/dhparam.pem 2048

      Jawab sebagai berikut untuk pertanyaan yang muncul (jawaban saya beri tanda **, jangan ketik bintang-nya):

      Country Name (2 letter code) [AU]: *ID*
      State or Province Name (full name) [Some-State]: *DKI JAKARTA*
      Locality Name (eg, city) []: *JAKARTA*
      Organization Name (eg, company) [Internet Widgits Pty Ltd]: *server_com*
      Organizational Unit Name (eg, section) []: *IT*
      Common Name (e.g. server FQDN or YOUR name) []: *server.com*
      Email address []: *kosongkan saja, tekan enter*

      Please enter the following ‘extra’ attributes
      to be sent with your certificate request
      A challenge password []: *kosongkan saja, tekan enter*
      An optional company name []: *kosongkan saja, tekan enter*

      Akan ada 2 file, yaitu file .key dan .csr
      Anda dapat mengupload file .csr ke provider SSL dan melakukan generate certificate key nya

      Running service Xinetd


      Bila hanya menggunakan firewall di sisi os saja, sudah bisa langsung running;


      Bila menggunakan firewall dari dashboard AWS/AliCloud/GCP/Linode/DO, lakukan juga allow All-ICMP IPv4 (ping) dari IP yang akan akses dan tetap harus enable ufw dan allow port 6556

      Check masa garansi server HPE dan Dell


      #Server HPE
      https://support.hpe.com/connect/s/?card=wc

      #Server Dell:
      https://www.dell.com/support/home/en-id?app=warranty

      Crontab


      #crontab -e
      script delete otomatis jam 1,6,12,18 (per 6 jam) file DONE.file* di dir /tmp/capture/..
      0 1,6,12,18 * * * rm -f /tmp/capture/DONE.file*

      Cek Hardware Detail


      Cek spesifikasi & serial number :

      #dmidecode | egrep -i “product name|serial number”

      #less /proc/cpuinfo

      #lscpu


      Cek OS detail :

      #cat /etc/issue

      #uname -m

      Disable IPV6


      A. Cara Disable ipv6 (temporary):

      #ip a | grep inet6
      inet6 ::1/128 scope host
      inet6 fe80::2267:7cff:fee9:4507/64 scope link

      #vi /etc/default/grub

      GRUB_TIMEOUT=5
      GRUB_DISTRIBUTOR=”$(sed ‘s, release .*$,,g’ /etc/system-release)”
      GRUB_DEFAULT=saved
      GRUB_DISABLE_SUBMENU=true
      GRUB_TERMINAL_OUTPUT=”console”
      GRUB_CMDLINE_LINUX=”ipv6.disable=1 crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet”

      GRUB_DISABLE_RECOVERY=”true”

      #sudo grub2-mkconfig -o /boot/grub2/grub.cfg

      #reboot

      ip a | grep inet6

      B. Cara Disable ipv6 (permanent):

      #vi /etc/sysctl.conf

      —-

      net.ipv6.conf.all.disable_ipv6 = 1

      net.ipv6.conf.default.disable_ipv6 = 1

      —-

      #reboot