Created
August 15, 2023 06:59
-
-
Save Udara-Dananjaya/e740b62027c42b9dd1f7a83e7b5a6016 to your computer and use it in GitHub Desktop.
Install CyberPanel on Ubuntu: Setup swap, firewall, hostname & CyberPanel with OpenLiteSpeed, Memcached, and Redis. Streamline web management!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
# Check available RAM and disk space | |
free -m | |
df -h | |
# Update the list of available software packages | |
sudo apt update -y | |
# Upgrade installed packages to their latest versions | |
sudo apt-get upgrade -y | |
sudo apt-get full-upgrade -y | |
# Define firewall rules for specified ports and sources | |
# Subnet > Ingress Rule > Source CIDR > 0.0.0.0/0 | |
# TCP PORTS :80,443,8090,40110-40210,21,25,587,465,110,143,993,53 | |
# UDP PORTS :53,443 | |
# Clear existing iptables rules | |
sudo iptables -P INPUT ACCEPT | |
sudo iptables -P OUTPUT ACCEPT | |
sudo iptables -P FORWARD ACCEPT | |
sudo iptables -F | |
# Set hostname | |
hostnamectl set-hostname hostname.domain | |
hostname | |
# Install CyberPanel | |
sudo su - | |
sh <(curl https://cyberpanel.net/install.sh || wget -O - https://cyberpanel.net/install.sh) | |
# Follow prompts for installation, including Admin password setup, Memcached, and Redis installation. | |
#1. Install CyberPanel. | |
#1. Install CyberPanel with OpenLiteSpeed. | |
#Full installation [Y/n]: y | |
#(Default = No) Remote MySQL [y/N]: n | |
#Press Enter key to continue | |
#Choose [d]fault, [r]andom or [s]et password: [d/r/s] d | |
#Admin password will be set to 1234567 | |
#install Memcached [Y/n]: y | |
#install Redis [Y/n]: y | |
#Kill the watchdog (with capital Y, default Yes) : Y |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment