Skip to content

Instantly share code, notes, and snippets.

View Udara-Dananjaya's full-sized avatar
🏠
Working from home

Udara Dananjaya Udara-Dananjaya

🏠
Working from home
View GitHub Profile
@Udara-Dananjaya
Udara-Dananjaya / Build a Workspace.sh
Created August 15, 2023 06:45
Build a Developer Workspace: Set up tools, services & security. LAMP stack, remote access, web hosting & more. Enhance productivity!
# Gain superuser privileges
sudo -i
# Create swap area for managing memory
# Create a swap file for efficient memory management.
# Adjust size (5024 MB) as needed.
sudo dd if=/dev/zero bs=1M count=5024 of=/mnt/swapfile.swap
sudo chmod 600 /mnt/swapfile.swap
sudo mkswap /mnt/swapfile.swap
sudo swapon /mnt/swapfile.swap
@Udara-Dananjaya
Udara-Dananjaya / Install AApanel.sh
Created August 15, 2023 06:51
Install AApanel on Ubuntu: Set up swap, update, define firewall rules, hostname, and AApanel installation with SSL.
# Gain superuser privileges
sudo -i
# Create swap area for managing memory
sudo dd if=/dev/zero bs=1M count=5024 of=/mnt/swapfile.swap
sudo chmod 600 /mnt/swapfile.swap
sudo mkswap /mnt/swapfile.swap
sudo swapon /mnt/swapfile.swap
echo '/mnt/swapfile.swap swap swap defaults 0 0' | sudo tee -a /etc/fstab
@Udara-Dananjaya
Udara-Dananjaya / Install Hestia.sh
Created August 15, 2023 06:56
Install HestiaCP on Ubuntu: Setup swap, firewall rules, hostname, and HestiaCP installation with SSL. Simplify web hosting!
# Gain superuser privileges
sudo -i
# Create swap area for managing memory
sudo dd if=/dev/zero bs=1M count=5024 of=/mnt/swapfile.swap
sudo chmod 600 /mnt/swapfile.swap
sudo mkswap /mnt/swapfile.swap
sudo swapon /mnt/swapfile.swap
echo '/mnt/swapfile.swap swap swap defaults 0 0' | sudo tee -a /etc/fstab
@Udara-Dananjaya
Udara-Dananjaya / Install CyberPanel.sh
Created August 15, 2023 06:59
Install CyberPanel on Ubuntu: Setup swap, firewall, hostname & CyberPanel with OpenLiteSpeed, Memcached, and Redis. Streamline web management!
# Gain superuser privileges
sudo -i
# Create swap area for managing memory
sudo dd if=/dev/zero bs=1M count=5024 of=/mnt/swapfile.swap
sudo chmod 600 /mnt/swapfile.swap
sudo mkswap /mnt/swapfile.swap
sudo swapon /mnt/swapfile.swap
echo '/mnt/swapfile.swap swap swap defaults 0 0' | sudo tee -a /etc/fstab
@Udara-Dananjaya
Udara-Dananjaya / Install Virtualmin.sh
Created August 15, 2023 07:01
Install Virtualmin on Ubuntu: Setup swap, firewall, hostname & Virtualmin with comprehensive port configurations. Simplify web hosting!
# Gain superuser privileges
sudo -i
# Create swap area for managing memory
sudo dd if=/dev/zero bs=1M count=5024 of=/mnt/swapfile.swap
sudo chmod 600 /mnt/swapfile.swap
sudo mkswap /mnt/swapfile.swap
sudo swapon /mnt/swapfile.swap
echo '/mnt/swapfile.swap swap swap defaults 0 0' | sudo tee -a /etc/fstab
@Udara-Dananjaya
Udara-Dananjaya / Install KASM Workspace.sh
Last active September 15, 2023 05:09
Build Kasm Workspace on Ubuntu: Setup swap, firewall, hostname & Kasm installation with SSL. Simplify secure virtual workspaces!
# Gain superuser privileges
sudo -i
# Create swap area for managing memory
sudo dd if=/dev/zero bs=1M count=5024 of=/mnt/swapfile.swap
sudo chmod 600 /mnt/swapfile.swap
sudo mkswap /mnt/swapfile.swap
sudo swapon /mnt/swapfile.swap
echo '/mnt/swapfile.swap swap swap defaults 0 0' | sudo tee -a /etc/fstab
@Udara-Dananjaya
Udara-Dananjaya / VScode-remote setup.sh
Created August 15, 2023 07:17
Configure VSCode-remote SSH: Set up user access, VS Code, GIT, and OpenSSH for Ubuntu and Windows. Seamlessly edit remote files!
# Configure VSCode-remote SSH for Ubuntu and Windows
# Setup user account with SSH access on Ubuntu
sudo -s
adduser username
sudo usermod -aG sudo username
sudo ufw app list
sudo ufw allow OpenSSH
sudo ufw enable # Confirm with 'y'
sudo ufw status
@Udara-Dananjaya
Udara-Dananjaya / Setup Database.sh
Last active August 15, 2023 13:06
Automate MySQL installation on Ubuntu: Update, clear rules, install MySQL Server, configure, and create a user with privileges.
# Install MySQL Server on Ubuntu
# Gain superuser privileges
sudo -i
# Define firewall rule for specified port
# Subnet > Ingress Rule > Source CIDR > 0.0.0.0/0
# TCP PORTS :3306
# Update the list of available software packages
@Udara-Dananjaya
Udara-Dananjaya / Gnome RDP Connection.sh
Created August 15, 2023 07:27
Install Ubuntu Gnome RDP: Configure swap, SSH, user access, and Chrome Remote Desktop for remote connections with Gnome environment.
# Install Ubuntu Gnome RDP Connection
# Gain superuser privileges
sudo -i
# Create swap area for managing memory
sudo dd if=/dev/zero bs=1M count=5024 of=/mnt/swapfile.swap
sudo chmod 600 /mnt/swapfile.swap
sudo mkswap /mnt/swapfile.swap
sudo swapon /mnt/swapfile.swap
@Udara-Dananjaya
Udara-Dananjaya / RDP Connection.sh
Last active September 20, 2023 09:45
Ubuntu RDP Setup: Configure swap, SSH, remote desktop, tools installation for a comprehensive remote computing environment.
# This script automates the setup and configuration of various applications on Ubuntu.
# Ensure superuser privileges
sudo -i
# Create a swap area to improve system performance
sudo dd if=/dev/zero bs=1M count=5024 of=/mnt/swapfile.swap
sudo chmod 600 /mnt/swapfile.swap
sudo mkswap /mnt/swapfile.swap
sudo swapon /mnt/swapfile.swap