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

    Jan 8, 2020

    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

    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

    Assuming you already have your cert-file-name.ovpn file. 🙂 Note that client service name would be [email protected] And then enable the service like so: 1sudo killall openvpn 2sudo systemctl enable --now [email protected] Reload the daemons. 1sudo systemctl daemon-reload It seems all done. 🙂 Here is another …

    Read More
  • Basic Docker Notes

    Dec 28, 2019

    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

    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 Nginx on Ubuntu Bionic Beaver

    Dec 20, 2019

    Simply follow this script: 1apt update -y 2apt install software-properties-common -y 3add-apt-repository universe -y 4add-apt-repository ppa:certbot/certbot -y 5apt update -y 6install certbot python-certbot-nginx -y 7certbot --nginx Your server should now be all set to relay on https. 🙂 As for Apache, you could refer …

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

    Dec 20, 2019

    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

    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

    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

    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
  • How to Fix OpenVPN Socket Bind Failure

    Dec 6, 2019

    I recently came up with this error on one of my OpenVPN servers. "OpenVPN - Socket bind failed on local address [AF_INET] IP:#portnum: Cannot assign requested address" Let me share how I did fix it. First off, check this openvpn’s default init script : [email protected] 1sudo grep After …

    Read More
  • How to Auto-Login to a Linux Server Using Public Key

    Nov 19, 2019

    This is a manual version of ssh-copy-id command. Let’s say that we are logging in to server named B from a local machine named A. First off, generate authentication key pair without passphrase on the local machine A: 1ssh-keygen -t rsa Now you got a public key of your local machine, of which path is: 1cd ~/.ssh 2cat …

    Read More
  • How to Login Using PPK File With SSH

    Nov 19, 2019

    In some situations, you are given only a ppk file for access to a cloud server. You know, however, it's for Putty on windows, not for OpenSSH client which might be the most familiar to you.🤔 I am gonna introduce a method to convert a ppk file into a pem file so that you can login to the linux server with ssh command …

    Read More
  • How to Install OpenVPN Server on Any Distro of Linux

    Nov 17, 2019

    Thanks to Stan's great work, it became so delightful to run your own secure and stable private VPN server. It's never been so easy. 👍 Download the installation script like this: 1wget https://raw.githubusercontent.com/Angristan/openvpn-install/master/openvpn-install.sh Change file permission to executable like this: …

    Read More
  • CI/CD Basic Tutorial With Codeship for DevOps Beginners

    Nov 8, 2019

    CI/CD Build History You might have ever been stuck in continuous deployment with codeship. Hacking principle of CI/CD is all the same in other platforms like CircleCI, Codefresh, TeamCity, etc. Okay, let’s get started. First off, connect your version control app such as github, gitlab or bitbucket to the Codeship.\ …

    Read More
  • How to Login Automatically With SSH

    Nov 8, 2019

    Auto Login With SSH Today I am going to share you how to login to a cloud server without using password. Let’s say there is a server and your local machine, assuming you can login to the server using some kind of credentials. First off, you should generate a new local public key on your local machine. Chdir to the …

    Read More
  • How to Install Webmin on Centos7

    Nov 3, 2019

    Webmin Login Screen First off, access to the server via ssh with root. Install dependencies with this command: 1yum -y install wget perl perl-Net-SSLeay openssl perl-IO-Tty perl-Encode-Detect perl-Data-Dumper unzip Create a repo file like this: 1nano /etc/yum.repos.d/webmin.repo 1[Webmin] 2name=Webmin Distribution …

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

Crazy Optimist

Crazy Optimist, Software Engineer
Read More

Featured Posts

  • How to Make a Swap Space Using a Swap File in Linux
  • How to Setup a Nginx Reverse Proxy With Let's Encrypt for Microservices

Recent Posts

  • Git Cheatsheet - 2021
  • Podman Basic Notes

Categories

DEVOPS 22 SERVER 7 LINUX 4 DOCKER 3 GOLANG 2 API 1 CICD 1 KUBERNETES 1 NODEJS 1 PODMAN 1

Copyright © 2021 CRAZY OPTIMIST. All Rights Reserved