XCP-NG few basic command lines- CLI Rumi, July 3, 2024July 3, 2024 Run the following command to list VMs and their UUIDs: xe vm-list resident-on=<uuid_of_host> Try the shutdown command with force: xe vm-shutdown uuid=<uuid_of_vm> force=true Restart the toolstack on the host by using the following command: xe-toolstack-restart Restart the host. shutdown -r now If the VM is still not shutdown, you might… Continue Reading
MOTD with NeoFetch Rumi, July 1, 2024July 3, 2024 Install NetoFetch First: sudo apt install neofetch sudo cp motd.sh /etc/profile.d/motd.sh sudo chmod +x /etc/profile.d/motd.sh Open the motd.sh filw using text editor and paste below: #!/bin/bash printf “\n” neofetch Exit from shell and re-login- Voila! Continue Reading
Install LetsEncrypt on Debian with Nginx Server Rumi, June 30, 2024 Install Certbot and its Nginx plugin with apt: sudo apt install certbot python3-certbot-nginx Certbot provides a variety of ways to obtain SSL certificates through plugins. The Nginx plugin will take care of reconfiguring Nginx and reloading the config whenever necessary. To use this plugin, type the following: sudo certbot –nginx -d… Continue Reading
Reset XCP-ng root password Rumi, June 28, 2024 The full prodecure can also be found on xcp-ng site. Reboot your XCP-ng into Grub boot menu. Select XCP-ng boot menu entry and press e key to edit boot options. Locate the read-only parameter ro and replace it with rw init=/sysroot/bin/sh. Press Ctrl + X to boot into single-mode. From… Continue Reading
Creating 1:1 NAT using iptables Rumi, June 8, 2024 Its a POC where I needed a 1:1 NAT using Linux iptables. I used 2 Debian 11 OS for this and here’s the machine IP plans- VM-1: IPTables/NAT Router- 123.45.67.5/24, 123.45.67.6/24 and 192.168.10.5/24 VM-2: Backend Server- 192.168.10.6/24 (this VM’s gateway will be 192.168.10.5 On VM-1 Uninstall nftables and its Dependencies… Continue Reading
MinIO object storage upload using curl Rumi, June 7, 2024 #!/bin/bash # Usage: ./minio-upload my-bucket my-file.zip bucket=$1 file=$2 host=minio.example.com s3_key=svc_example_user s3_secret=svc_example_user_password resource=”/${bucket}/${file}” content_type=”application/octet-stream” date=`date -R` _signature=”PUT\n\n${content_type}\n${date}\n${resource}” signature=`echo -en ${_signature} | openssl sha1 -hmac ${s3_secret} -binary | base64` curl -X PUT -T “${file}” \ -H “Host: ${host}” \ -H “Date: ${date}” \ -H “Content-Type: ${content_type}” \ -H “Authorization: AWS ${s3_key}:${signature}” \… Continue Reading
Debian/Ubuntu font installation using command Rumi, June 7, 2024 Install a font manually by downloading the appropriate .ttf or otf files and placing them into /usr/local/share/fonts (system-wide), ~/.local/share/fonts (user-specific) or ~/.fonts (user-specific). These files should have the permission 644 (-rw-r–r–), otherwise they may not be usable. Run fc-cache to update the font cache (add -v for verbose output). The… Continue Reading
Install LAMP- Apache, PHP 7.4 with Apache Handler on Debian 12 Rumi, June 7, 2024June 7, 2024 Well, it’s not perfectly a LAMP stack as MySQL and PHPMYadmin are not covered here. But for someone who needs a backward compatible php edition to work on a modern/latest os built. Step1: Add PHP repository We’ll use a bash script to add the repository- #!/bin/sh # To add this… Continue Reading
Setup Apache, FastCGI and PHP 7.4 on Ubuntu 20 Rumi, May 25, 2024 Prerequisites Update the installed packages. apt update Install the Ondřej PHP repository. apt install software-properties-commonsudo add-apt-repository ppa:ondrej/php apt update Check that the repositories are correctly installed. grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/* Step 1 – Install Apache apt install apache2 Continue Reading