AKZN Notes

Archives for My Lazy and Forgetful Mind

Category: Linux

Freeradius + Daloapi + mikrotik

Daloapi setting install freeradius (with mysql) and daloradius daloradius need php-pear and php-db sudo apt-get install php-common php-gd php-curl php-mail php-mail-mime php-pear php-db sudo pear install db deploy daloapi from git, setting database as same with freeradius setting, make sure daloapi database migration is set. after git deployment .env.example to .env configure db credential to […]

[ubuntu][xrandr] Autodetect Display

cant get to work, use autorandr instead https://github.com/phillipberndt/autorandr config file on ~/.config/autorandr/ just in case some error(like what happened to me), just edit some parameter on those files that make errors, taken from https://unix.stackexchange.com/a/11891 with fix and personal customization I’m using this simple (homemade) script that keeps polling RandR and switches between LVDS1 and VGA1 […]

Install FreeRADIUS & daloRADIUS on Ubuntu 20.04 + MySQL/MariaDB

taken from https://bytexd.com/freeradius-ubuntu/ with a few update to support daloRADIUS with freeradius v3.0. (as is, daloradius only support freeradius v2, and accounting will error) (TBA) add mikrotik radius client (TBA) add tutorial sqlcounter daloradius scheme to freeradius In this tutorial we’ll install FreeRADIUS on a server running Ubuntu 20.04 and configure it to work with […]

Windows Ubuntu Virtual Box Update Hash Sum Missmatch Fix

On installing Ubuntu as guest from Windows Host, if you got an error Update Hash Sum Missmatch Fix, this is a fix for that Based on https://askubuntu.com/a/1242739 Try this before running apt: $ sudo bash # mkdir /etc/gcrypt # echo all >> /etc/gcrypt/hwf.deny Because apt use sha256 method from libgcrypto20, but optimized too much. We […]

How To Secure Apache with Let’s Encrypt on Ubuntu 20.04

source : https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-20-04 Introduction Let’s Encrypt is a Certificate Authority (CA) that facilitates obtaining and installing free TLS/SSL certificates, thereby enabling encrypted HTTPS on web servers. It simplifies the process by providing a software client, Certbot, that attempts to automate most (if not all) of the required steps. Currently, the entire process of obtaining and […]

Deploy Laravel Project to Hosting or VPS

Deploy to CPanel Clone git to cpanel Taken from https://dashboard.webhostingmagic.com/knowledgebase/242/How-To-Clone-A-Private-Github-Repo-To-A-cPanel-Server.html Git private repository requires SSH access. So you must ensure that your hosting package has SSH enabled (customers on Web Hosting Magic need not worry as every hosting package comes with SSH access) and perform additional steps in order to successfully clone a privately-hosted remote […]

fix failed install python package

fix failed install python package problem pip installs packages successfully, but executables not found from command line solution echo "export PATH=\"`python3 -m site –user-base`/bin:$PATH\"" >> ~/.bashrc source ~/.bashrc

Linux Common Command

Linux Common Command show port sudo netstat -tuln Copy File/Folder cp cp -a /source/. /dest/ If you want to copy content of folder. If you want to copy folder content and parent, remove [dot] rsync rsync -r –progress /source/. /dest/ same with cp, but copy only the files that have changed Mount/Unmount USB/removable drive mount […]

Keep Processes Running After Ending SSH Session

Problem Let’s say I launch a bunch of processes from a ssh session. Is it possible to terminate the ssh session while keeping those processes running on the remote machine? Solution 1. Using built-in bash command For new task nohup nohup long-running-command & It was made specifically for this, it even logs stdout to nohup.log. […]

INSTALL aria2 to Ubuntu VPS

[VPS][UBUNTU] INSTALL aria2 Table of Contents Install Aria2 Make and configure aria2 config Make the service handler aria2 on init.d install Aria2 Webui Install Aria2 sudo apt install aria2 Make and configure aria2 config install to your path sudo nano /path/to/config/aria2/aria2.conf configure as required, uncomment the rpc part if you want to use aria2 webui […]