crazyoptimist
Blog
About
  • Let's Encrypt - The Right Way in 2021

    Jun 11, 2020 · 1 min read  ·
    Share on:

    Install Certbot Install snapd. Remove old version of certbot: 1sudo apt-get remove certbot 2# or 3sudo dnf remove certbot Install certbot: 1sudo snap install --classic certbot 2sudo ln -s /snap/bin/certbot /usr/bin/certbot Run it! 1sudo certbot --nginx Caution! In case you have an IP access blocking config in nginx, …

    Read More
  • How to Install Golang on Manjaro

    May 22, 2020 · 1 min read  ·
    Share on:

    Manjaro is an attractive distro built on top of Arch. Let's get golang development environment ready on your Manjaro machine! You can just update the whole system packages and then simply install golang stable version provided by the Arch repository, not sure what it's called really. 1pacman -Syu 2pacman -S go 3go …

    Read More
  • How to Install Vmware-Tools on Manjaro - an Awesome Distro of Arch Linux

    Apr 23, 2020 · 1 min read  ·
    Share on:

    As you may know, the package manager of Arch Linux is "pacman". 1sudo pacman -Syu #Update and upgrade system packages 2sudo pacman -S package_name #Install a new package 3sudo pacman -R package_name #Remove a package 4sudo pacman -Rn package_name #Remove along with backup-ed config files 5sudo pacman -Rsu …

    Read More
  • How to Install The Latest Version of Nginx on Ubuntu Bionic

    Apr 7, 2020 · 1 min read  ·
    Share on:

    Nginx.org maintains a repository for Ubuntu. We can use this repository to install the latest version of Nginx. First off, let's create a repository source file for Nginx with the following command. 1vim /etc/apt/sources.list.d/nginx.list Paste in the following two lines to the file: 1deb [arch=amd64] …

    Read More
  • How to Handle "Content-Type" in a Post Request Header

    Mar 13, 2020 · 1 min read  ·
    Share on:

    Value Description application/json Indicates that the request body format is JSON. application/xml Indicates that the request body format is XML. application/x-www-form-urlencoded Indicates that the request body is URL encoded. In some scenarios, for example, when we are going to send POST requests from a …

    Read More
  • How to Build a CI/CD Pipeline on CircleCI

    Mar 11, 2020 · 1 min read  ·
    Share on:

    Once you got your account on CircleCI and setup your project linked to your git repository, you will have to have a directory named “.circleci” inside the root of your project repo. Create a file named “config.yml” in there. Grab the sample script given by CircleCI platform according to your project type. The first …

    Read More
  • How to Configure a Nginx Reverse Proxy With Let's Encrypt

    Mar 11, 2020 · 3 min read  ·
    Share on:

    Let’s say one of your micro services is running on http://localhost:3000 If you already have a nginx service running on the server, create a server block like this: 1vim /etc/nginx/sites-available/domain.com.conf Grab this content to paste in: 1server { 2 3 server_name domain.com; 4 5 root /var/www/html; 6 index …

    Read More
  • How to Use Git Rebase in a Practical Situation

    Feb 24, 2020 · 1 min read  ·
    Share on:

    Let’s say there are two pull requests open on a project repository. Each change has its own branch like this: master feature/add-base64-endpoint feature/add-user-agent-endpoint The challenge is to use git rebase to add both changes to master. When you finished, your master branch should have three commits in the …

    Read More
  • How to Enable Login With Password on Linux

    Feb 18, 2020 · 1 min read  ·
    Share on:

    Let’s update the Password Authentication parameter in the ssh service config file: 1vim /etc/ssh/sshd_config Hey, what? You can't even find the sshd service? Install it then: 1sudo apt update 2sudo apt install openssh-server In the /etc/ssh/sshd_config file, uncomment this line: 1#PasswordAuthentication yes Boom! Done. …

    Read More
  • How to Update Apt Repository on Kali Linux

    Feb 18, 2020 · 1 min read  ·
    Share on:

    Back up the current sources.list first. 1sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup Well, run this command then. 1sudo echo "deb http://http.kali.org/kali kali-rolling main non-free contrib" > /etc/apt/sources.list Now you can run apt update command! Happy networking! 😎

    Read More
  • How to Dockerize a Full Stack MEVN Application

    Feb 15, 2020 · 3 min read  ·
    Share on:

    First things first. Let’s check the directory structure of the app. A Full Stack MEVN Application Let’s take a look into the DB image first. 1FROMmongo:latest23WORKDIR/app4COPY . /app56ENV MONGO_INITDB_ROOT_USERNAME=root 7ENV MONGO_INITDB_ROOT_PASSWORD=password 8 9EXPOSE27017I thought importing dump data should be …

    Read More
  • How to Setup a Reverse Proxy With Let's Encrypt SSL Certificates Using Docker

    Jan 8, 2020 · 3 min read  ·
    Share on:

    I think this is really important in practical docker battle field. 🙂 Let’s go for the docker-compose.yml first. 1version:'3'23services:4nginx:5image:nginx:1.15-alpine6restart:unless-stopped7volumes:8- ./data/nginx:/etc/nginx/conf.d9- ./data/certbot/conf:/etc/letsencrypt10- …

    Read More
  • How to Host Wordpress Using Docker

    Jan 6, 2020 · 1 min read  ·
    Share on:

    Let’s go for our docker-compose.yml first. 1version:'3'23services:4wp:5image:wordpress:latest6ports:7- ${IP}:80:808volumes:9- ./php.conf.ini:/usr/local/etc/php/conf.d/conf.ini10- …

    Read More
  • How to Auto Start OpenVPN Client on Ubuntu Bionic

    Jan 6, 2020 · 1 min read  ·
    Share on:

    Launch OpenVPN client as a daemon. Here I assume you already have your own cert file - filename.ovpn. 🙂 Modify its file extension to conf like so: 1mv filename.ovpn filename.conf Put your cert file inside /etc/openvpn directory like so: 1mv /path/to/filename.conf /etc/openvpn/ OpenVPN client service name would be …

    Read More
  • Basic Docker Notes

    Dec 28, 2019 · 2 min read  ·
    Share on:

    To run a container from an image: 1docker container run -it --rm ubuntu /bin/bash -t: terminal inside -i: (STDIN) grabbing --rm: remove container automatically when process exits --name: name the container or daemon -d: daemonize the container running To list all containers: 1docker container ps -a To start or stop …

    Read More
  • How to Setup LAMP Stack on Centos 7 - Right Way

    Dec 25, 2019 · 1 min read  ·
    Share on:

    Today I am going to follow up the procedures to setup standard LAMP stack on CentOS 7. For the latest version of phpMyAdmin: 1rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY* 2yum -y install epel-release For MariaDB: 1yum -y install mariadb-server mariadb 2systemctl enable --now mariadb 3mysql_secure_installation For Apache: …

    Read More
  • How to Install Letsencrypt Certbot for Apache on Centos 7

    Dec 20, 2019 · 1 min read  ·
    Share on:

    Simply follow this script below: 1yum install epel-release -y 2yum install certbot python-certbot-apache mod_ssl -y 3certbot --apache Create a cron job which renews certification once a week. 1crontab -e 10 0,12 * * * python -C 'import random; import time; time.sleep(random.random() * 3600)' && certbot …

    Read More
  • How to Setup a Reverse Proxy With Nginx on Centos 7

    Dec 20, 2019 · 1 min read  ·
    Share on:

    First off, install nginx on the server machine. 1yum update 2yum install epel-release 3yum install nginx Edit the nginx config file then. 1cd /etc/nginx/nginx.conf 2vim nginx.conf Edit the file like this: 1server_name domain.com; If you are not going to use domain name, a public ip address would also work instead of …

    Read More
  • How to Deploy Your Nodejs App on Centos 7

    Dec 20, 2019 · 1 min read  ·
    Share on:

    PM2 is a process manager for nodejs apps. It daemonizes apps built with nodejs, which means run-as-service. Let’s install PM2 using npm. 1npm install -g [email protected] Now you can start your app using pm2 like so: 1pm2 start app.js Next, register the app as startup process. 1pm2 startup systemd 2pm2 save You can check the …

    Read More
  • How to Configure Virtual Hosts on Centos 7 Apache Server

    Dec 20, 2019 · 1 min read  ·
    Share on:

    Prerequisites for a vhost setup: 1chown -R apache:apache /path_to/site_root Set the permission of the root directory to 755, you may already know. 🙂 Well, let’s create a vhost config file before you edit it. 1cd /etc/httpd/conf.d 2vim domain_name.conf Now, grab this content to your config file: 1<VirtualHost …

    Read More
    • ««
    • «
    • 1
    • 2
    • 3
    • »
    • »»

crazyoptimist

Software Engineer
Read More

Featured Posts

  • Automatic Https With Caddy - Extremely Easy
  • How to Deploy Next.js App to AWS EC2 in Production and Set up CI/CD with Github Actions
  • GPG Key in Git - Get Your Every Commit Verified
  • Deploy Your Web Apps in Just a Minute - Made With 💖 for Dockerists

Recent Posts

  • Python Development Environment Setup - an Excellent Way
  • Setup Neovim with vim-plug on Windows 11

Categories

DEVOPS 23 NETWORK 11 LINUX 6 DOCKER 3 GOLANG 3 JAVASCRIPT 3 VIM 2 PYTHON 1
crazyoptimist

Copyright  CRAZYOPTIMIST. All Rights Reserved