crontab restart tomcat8 every 2 hours
* */2 * * * /usr/sbin/service tomcat8 restart > /dev/null
* */2 * * * /usr/sbin/service tomcat8 restart > /dev/null
sha256sum telo.txtoutput : string checksum256nya telo.txt
ssh-keygen scp /home/system/.ssh/id_rsa_box_contoh user@servertujuan:/home/system di server tujuan :cat /home/system/.ssh/id_rsa_box_contoh > /home/system/.ssh/authorized_keys
sudo adduser telosudo usermod -aG sudo telo #check sudo exists on user telogroups telo sudo visudotelo ALL=(ALL) NOPASSWD: ALL
ip -s -h link 1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 RX: bytes packets errors dropped overrun mcast 251k 1.82k 0 0 0 0 TX: bytes packets errors dropped carrier collsns 251k 1.82k 0 0 0 0 2: ens32: mtu 1500 qdisc noop state… Read More »
Compress :gzip nama-fileakan terbuat nama-file.gz, file yg asli terdelete, gunakan -k jika ingin file yg lama tetap ada Compress setiap file didalam folder : gzip -r foldername Decompress :gunzip nama-file.gzorgzip -dk nama-file.gz
sudo vi /etc/systemd/system/coba.service [Unit] Description=aplikasi coba [Service] User=system WorkingDirectory=/home/system/coba ExecStart=/home/system/coba/coba.sh Restart=always [Install] WantedBy=multi-user.target Reload the service files to include the new service.sudo systemctl daemon-reload Start your servicesudo service coba start To check the status of your servicesudo service coba status To enable your service on every rebootsudo systemctl enable coba To disable your service on… Read More »
sudo swapoff -asudo swapon -a Check swappiness : cat /proc/sys/vm/swappiness(default ubuntu 60) Change swappiness : temporary : sudo sysctl vm.swappiness=10 permanent : sudo vi /etc/sysctl.confadd/change linevm.swappiness=10
Download package pada pc yg online dengan apt-get install nama-packagenya(dengan apt-get install, bukan apt install, klo apt install .deb-nya nggak diarchive)akan terdownload ke :/var/cache/apt/archives/silahkan dicopy *.deb ke usb dll. Kemudian pada pc offlinecopy balik *.deb ke :/var/cache/apt/archives/ lalu install dengan cara :apt-get install –no-download nama-packagenya untuk membersihkan folder achive gunakan perintahsudo apt-get clean