Membuat USB Installer Centos 7 di Mac / OsX


Create a bootable USB drive with the CentOS 7 installer ISO file on Mac OSX (Apple MacBook).
Steps:
  1. Format a USB drive as eFAT with Disk Utility
  2. Download CentOS 7 Full or Minimal iso file
  3. Open terminal and find USB drive partition name with command “diskutil list
  4. In terminal, use dd command to copy CentOS iso to usb
  5. Test usb drive in Parallels virtual machine

FIND USB DRIVE PARTITION

In terminal, run command “diskutil list” to view partitions, the usb drive will be the last one listed.
Screenshot of the USB partition /dev/disk2 formatted as eFAT (but shows Windows NTFS)

COPY CENTOS 7 ISO TO USB DRIVE WITH DD

Sebelum menjalankan perintan DD, unmount dulu flashdisk dengan perintah :

diskutil umount /dev/disk2s1

Run the following command to copy iso drive to the usb drive, this command makes the usb drive bootable.

sudo dd if=./Downloads/CentOS-7-x86_64-DVD-1611.iso of=/dev/rdisk2 bs=1m

Note the additional “r” prepended to the usb partition name rdisk2 instead of disk2. The does a raw copy which is much faster than a block-by-block file copy.
Press CTRL + T to view progress, which will show blocks processed.

4177+0 records in
4177+0 records out
4379901952 bytes transferred in 323.733465 secs (13529346 bytes/sec)

Screenshot of the usb drive after iso has been copied. Note that the partition type has been changed to “0xEF” a GUID partition.
OSX will not recognise this partition, click ignore at the “Disk not readable” prompt. This usb drive will not be readable on OSX but can be used to boot and install CentOS 7.

TEST USB DRIVE

To test the bootable usb drive spin-up a Parallels virtual machine with a 10 GB partition and change the boot order in configuration to external drive > usb drive

References:
  1. CentOS download link
  2. Microsoft doc on GUID partition
  3. Server Fault dd page



sumber : https://cloudwrk.com/create-centos-7-bootable-usb-on-osx/

Menjalankan TMUX Langsung Dengan Perintah Tertentu dan menjalankanya di crontab



tmux new-session -d -s nama_sesi 'perintah'
contoh :
tmux new-session -d -s ngeping_aja 'ping google.com'
Kadang kita perlu menjalankan peritah tertentu pada TMUX, normalnya kita akan membuka TMUX terlebih dahulu dengan perintah "tmux", setelah tmux terbuka baru kita laksanakan operasi yang ingin dilakukan. Namun akan sedikit merepotkan bila dibutuhkan menjalakan beberapa operasi dengan banyak tmux, apalagi bila operasi tersebut ingin dijadikan salah satu cronjob, dengan script diatas memungkinkan menjalankan operasi dalam tmux dengan satu baris perintah, pun memudahkan bila dijadikan script yang akan dijalankan pada cronjob. Jangan lupa bila menjalankan script, script tersebut harus diberikan permisi eksekusi terlebih dahulu.

Seting di crontab
untuk mengedit perintah cronjob ketikan perintah

crontab -e

ketik "i" untuk edit cronjob, tambahkan perintah yang akan dijalankan.

contoh :

@reboot sleep 300 && tmux new-session -d -s tmux_adms 'ping google.com'

perintah diatas maksudnya,menjalankan perintah "sleep 300" memberikan jeda waktu 5 menit (300 detik=5menit), kemudia menjalankan perintah ping google.com di dalam tmux setelahnya.


untuk variasi perintah crobjob lainya dapat di pelajari pada https://crontab.guru/

20 Command Line Tools to Monitor Linux Performance - Part 2

11. Monit – Linux Process and Services Monitoring

Monit is a free open source and web based process supervision utility that automatically monitors and managers system processes, programs, files, directories, permissions, checksums and filesystems.
It monitors services like Apache, MySQL, Mail, FTP, ProFTP, Nginx, SSH and so on. The system status can be viewed from the command line or using it own web interface.

12. NetHogs – Monitor Per Process Network Bandwidth

NetHogs is an open source nice small program (similar to Linux top command) that keeps a tab on each process network activity on your system. It also keeps a track of real time network traffic bandwidth used by each program or application.

13. iftop – Network Bandwidth Monitoring

iftop is another terminal-based free open source system monitoring utility that displays a frequently updated list of network bandwidth utilization (source and destination hosts) that passing through the network interface on your system. iftop is considered for network usage, what ‘top‘ does for CPU usage. iftop is a ‘top‘ family tool that monitor a selected interface and displays a current bandwidth usage between two hosts.

14. Monitorix – System and Network Monitoring

Monitorix is a free lightweight utility that is designed to run and monitor system and network resources as many as possible in Linux/Unix servers. It has a built in HTTP web server that regularly collects system and network information and display them in graphs. It Monitors system load average and usagememory allocationdisk driver healthsystem servicesnetwork portsmail statistics (SendmailPostfixDovecot, etc), MySQL statistics and many more. It designed to monitor overall system performance and helps in detecting failures, bottlenecks, abnormal activities etc.

15. Arpwatch – Ethernet Activity Monitor

Arpwatch is a kind of program that is designed to monitor Address Resolution (MAC and IP address changes) of Ethernet network traffic on a Linux network. It continuously keeps watch on Ethernet traffic and produces a log of IP and MAC address pair changes along with a timestamps on a network. It also has a feature to send an email alerts to administrator, when a pairing added or changes. It is very useful in detecting ARP spoofing on a network.

16. Suricata – Network Security Monitoring

Suricata is an high performance open source Network Security and Intrusion Detection and Prevention Monitoring System for LinuxFreeBSD and Windows.It was designed and owned by a non-profit foundation OISF (Open Information Security Foundation).

17. VnStat PHP – Monitoring Network Bandwidth

VnStat PHP a web based frontend application for most popular networking tool called “vnstat“. VnStat PHPmonitors a network traffic usage in nicely graphical mode. It displays a total IN and OUT network traffic usage in hourlydailymonthly and full summary report.

18. Nagios – Network/Server Monitoring

Nagios is an leading open source powerful monitoring system that enables network/system administrators to identify and resolve server related problems before they affect major business processes. With the Nagios system, administrators can able to monitor remote Linux, Windows, Switches, Routers and Printers on a single window. It shows critical warnings and indicates if something went wrong in your network/server which indirectly helps you to begin remediation processes before they occur.

19. Nmon: Monitor Linux Performance

Nmon (stands for Nigel’s performance Monitor) tool, which is used to monitor all Linux resources such as CPU, Memory, Disk Usage, Network, Top processes, NFS, Kernel and much more. This tool comes in two modes: Online Mode and Capture Mode.
The Online Mode, is used for real-time monitoring and Capture Mode, is used to store the output in CSV format for later processing.

20. Collectl: All-in-One Performance Monitoring Tool

Collectl is a yet another powerful and feature rich command line based utility, that can be used to gather information about Linux system resources such as CPU usage, memory, network, inodes, processes, nfs, tcp, sockets and much more.
We would like to know what kind of monitoring programs you use to monitor performance of your Linux servers? If we’ve missed any important tool that you would like us to include in this list, please inform us via comments and please don’t forget to share it.

Summer : https://www.tecmint.com/command-line-tools-to-monitor-linux-performance/

Setting NTP di Centos 7

NTP adalah protocol yang berfungsi untuk mengsinkronisasikan waktu pada suatu komputer yang akurat melalui internet




Setelah itu kita install terelbih dahulu NTP di centos servernya... cara install nya dengan menggunakan perintah "yum install ntp -y"... dan tunggu sebentar...


Setelah terinstall ntpnya akan terlihat packet yang terinstall, dan kalian bisa lihat gambar diatas...


Setelah itu kalian buka web "www.pool.ntp.org/zone/id" untuk melihat server pool nya kalian bisa pilih indonesia. disini kalian harus cepat konfigurasinya karena setiap 10 menit maka server pool nya akan terganti automatic dengan server pool lain.

setelah itu kalain masuk ke direktori "etc/ntp.conf" dengan menggunakan command "nano /etc/ntp.conf"....


Kalian tambahkan tanda pager script yang sudah saya tandai pada gambar diatas...


Maka nanti hasilnya akan seperti gambar diatas....


Kalian copy pool zone ke dalam direktori "/etc/ntp.conf", kalian bisa lihat contoh nya seperti gambar diatas




Setelah tadi mengatur file "ntp.conf" , sekarang kalian setting timezone nya menggunakan perintah "timedatectl set-timezone Asia/Jakarta" lalu kalian "enter"


Setelah itu kita tambahkan service ntp pada firewall nya dengan perintah "firewall-cmd --add-service=ntp --permanent"...

Setelah itu kita restart firewallnya menggunakan perintah "firewall-cmd --reload" dan pastikan setiap command nya ada tulisan "scripts"....


Setelah itu kita start, aktifkan dan check status ntpnya dengan perintah :
"sytemctl start ntpd"
"systemctl enable ntpd"
"systemctl status ntpd"
masukan satu persatu, dan kalian harus pastikan status nya harus running dan aktif....


Setelah itu kita coba verifikasi dengan menggunakan perintah "ntpq -p" dan menggunakan perintah "date -R" untuk melihat tanggal dan jamnya.

Sumber : https://fahmilatiefmunir.blogspot.com/2016/10/konfigurasi-network-time-protocol-ntp.html