AKZN Notes

Archives for My Lazy and Forgetful Mind

Category: Linux

Nmap Install & Usage

if you want to scan your network, you can use Nmap Nmap is a powerful network exploration and security auditing tool that can be used to discover hosts and services on a computer network. Here’s a tutorial on how to install and use Nmap on Linux: Installation: Open the terminal on your Linux system. # […]

How to backup and restore all mysql database from vps

how to backup all database To backup all MySQL data, you can follow these steps: Connect to your VPS: Log in to your VPS using SSH. Navigate to the MySQL data directory: MySQL data files are typically located in the /var/lib/mysql directory. Navigate to this directory by running the following command: cd /var/lib/mysql Create a […]

Using Github Workflow to Auto Deploy to VPS

original tutorial https://viandwi24.medium.com/github-actions-sederhana-untuk-testing-dan-deploy-ke-server-vps-a43976cd6f46#5752 make new linux user with limited access/no sudo edit the yml workflow name: CI-Deploy-serv3 on: push: branches: [ master ] workflow_dispatch: jobs: build: runs-on: ubuntu-latest steps: – uses: actions/checkout@v2 with: fetch-depth: '0' ref: 'master' – name: Deploy to Serv 3 Dwbz uses: appleboy/ssh-action@master with: host: ${{ secrets.HOST_GITHUBCI_SERV3DWBZ }} username: ${{ secrets.USERNAME_GITHUBCI_SERV3DWBZ }} […]

Docker Wireguard + Mikrotik

todo : make ip address obtained from docker-compose > hostnet static/persistent add clearer documentation about docker-compose > hostnet Installation Prequisities MIkrotik RouterOS v.7.1 and above Docker Wireguard Setup Make sure Docker is installed Using docker-compose # docker-compose.yml version: ‘3’ services: wireguard: image: lscr.io/linuxserver/wireguard container_name: wireguard cap_add: – NET_ADMIN – SYS_MODULE environment: – PUID=1000 – PGID=1000 […]

OpenVPN for Docker

This notes are taken from https://raw.githubusercontent.com/kylemanna/docker-openvpn/master/README.md. Edited to added some notes to make it easier for me to read and install on the near future OpenVPN server in a Docker container complete with an EasyRSA PKI CA. Extensively tested on Digital Ocean $5/mo node and has a corresponding Digital Ocean Community Tutorial. Installation Upstream Links […]

Codeigniter 3 with php 8.1

How to update your ci 3 version to 3.1.13 change config $config['sess_save_path'] = sys_get_temp_dir() add #[\ReturnTypeWillChange] before the open, read, write, close, destroy and gc functions in /system/libraries/Session/drivers/Session_files_driver.php example : #[\ReturnTypeWillChange] public function open($save_path, $name) { … update system/libraries/pagination.php line 526 from if ( ! ctype_digit($this->cur_page) OR ($this->use_page_numbers && (int) $this->cur_page === 0)) to if […]

WordPress Installation and Migration

Force HTTPS Using htaccess on WordPress Step 1: Update your general settings. Log into your WordPress dashboard ang go to Settings > General. Scroll down to the WordPress and Site URL Address field and replace the HTTP with HTTPS. Click the Save Changes button at the bottom of the page. You’ll be automatically logged out […]

Using Rclone to sync file to Google Drive on Ubuntu

As of now, Google has yet to release an official backup/sync client for Linux. The following write-up describes an approach for using an open source package, rclone, to automate backups from Linux to Google drive. Download/install rclone: To download/install rclone: $ cd $HOME $ curl https://rclone.org/install.sh | sudo bash … rclone v1.53.1 has successfully installed. […]

OpenVPN Client to Client Connection Configuration

follow this tutorial https://openvpn.net/community-resources/how-to/#scope dont forget to do step below how to add route (not persistent) on ubuntu example sudo ip route add 10.10.10.0/24 via 192.168.1.254 # Specific route sudo ip route add default via 192.168.1.254 # Default route (gw) how to add persistent route on ubuntu modify the /etc/network/interfaces file. $ sudo nano /etc/network/interfaces […]

Alpine Linux LAMP Installation Notes

Apache2 .htacess : makesure AllowOverride All on directory htdocs on httpd.conf PHP make sure all module installed Session : make sure session.save_path on php.ini is enabled SSL Letsencrypt make sure apache-ssl module installed sudo apk update & sudo apk upgrade & sudo apk add apache2-ssl sudo apk add certbot-apache sudo certbot certonly make site-avalaible conf […]