Langsung ke konten utama

Postingan

Speed Up Boot Time Ubuntu

Analyze $ systemd-analyze blame $ systemd-analyze critical-chain // Comment public class Testing { public Testing() { } public void Method() { /* Another Comment on multiple lines */ int x = 9; } }
Postingan terbaru

SSL Certificate at Apache2

We need installed apache2, teks editor (e.g. nano) and domain (e.g. jusmelon.com) Install apache2 $ sudo apt install apache2 -y Get certificate and put to path e.g. /home/ubuntu/ssl-certificates/here $ ls /home/ubuntu/ssl-certificates/   cert.crt cert.key README Configuration $ sudo nano /etc/apache2/sites-available/000-default.conf Add this to end of file <VirtualHost *:443> SSLEngine on SSLCertificateFile /home/ubuntu/ssl-certificates/cert.crt SSLCertificateKeyFile /home/ubuntu/ssl-certificates/cert.key </VirtualHost> Enable module and restart service $ sudo a2enmod ssl $ sudo service apache2 restart Check Open browser and type https://jusmelon.com Enter

Jenkins

Pull from Docker-Hub To use the latest LTS:  docker pull jenkins/jenkins:lts To use the latest weekly:  docker pull jenkins/jenkins Build from Docker images docker run -p 8080:8080 -p 50000:50000 -v jenkins_home:/var/jenkins_home --name jenkins --restart always jenkins/jenkins:lts Check at http://localhost:8080/ (Dashboard) http://localhost:50000/ (Status)

PostgreSQL

Install postgresql $ sudo apt install postgresql Purge (clean uninstall) postgresql $ sudo service postgresql stop $ sudo apt --purge remove postgresql\* $ sudo rm -rf /var/lib/postgresql/ $ sudo userdel -r postgres Install pgadmin $ docker run -p 80:80 -e "PGADMIN_DEFAULT_EMAIL=user@domain.com" -e "PGADMIN_DEFAULT_PASSWORD=SuperSecret" -d dpage/pgadmin4 Access postgresql $ sudo -u postgres psql postgres See list of user postgres=# \du See list of database postgres=# \l Connect database postgres=# \c postgres Create user $ sudo -u postgres createuser lite Quit postgresql postgres=# \q

Proxy VPS - Proxy Docker - Proxy Container

Setting proxy di VPS yang tidak punya IP Public: $ sudo nano /etc/environment  Tambahkan http_proxy=http://10.210.9.74:8888 https_proxy=https://10.210.9.74:8888 Acquire::http::proxy "http://10.210.9.74:8888"; Acquire::https::proxy "https://10.210.9.74:8888"; Setting proxy di Docker: $ nano /etc/default/docker Tambahkan export http_proxy="http://10.210.9.74:8888" export https_proxy="https://10.210.9.74:8888" $ sudo service docker stop $ sudo service docker start Setting proxy di container (menggunakan docker-compose.yml): services:   api:     environment:       http_proxy: http://10.210.9.74:8888       https_proxy: https://10.210.9.74:8888     image: qisme:v249     ports:     - 80:1000/tcp     restart: always     volumes:     - /home/qisme:/api:rw