Skip to content

Instantly share code, notes, and snippets.

@codescribblr
Last active January 27, 2019 15:02
Show Gist options
  • Save codescribblr/b04ea9ec04eb20e967c8cfe978efd2c7 to your computer and use it in GitHub Desktop.
Save codescribblr/b04ea9ec04eb20e967c8cfe978efd2c7 to your computer and use it in GitHub Desktop.
Setup Webmin & Virtualmin on Ubuntu 16.04 LTS

ssh root@your_server_ip

adduser ubuntu Enter New Password Enter 6x

usermod -aG sudo ubuntu

ON LOCAL MACHINE

ssh-copy-id ubuntu@your_server_ip

EXIT LOCAL MACHINE

sudo su - ubuntu Enter root password

exit ssh ubuntu@your_server_ip

wget http://software.virtualmin.com/gpl/scripts/install.sh -O /root/virtualmin-install.sh sh /root/virtualmin-install.sh

sudo ufw allow OpenSSH

sudo ufw enable

sudo apt-get update sudo apt-get install apache2 Enter 1x

sudo nano /etc/apache2/apache2.conf

Inside, at the bottom of the file, add a ServerName directive, pointing to your primary domain name. If you do not have a domain name associated with your server, you can use your server's public IP address:

Add DNS entry for public IP now.

ServerName server_domain_or_IP Hit ctrl+x and y and Enter

sudo apache2ctl configtest If you did it correctly, you'll see "Syntax OK"

sudo systemctl restart apache2

sudo ufw app list Make sure Apache Full is in the list

sudo ufw allow in "Apache Full"

visit http://your_ip_or_domain to make sure that traffic is going to your server and through the firewall

exit to root user

apt-get update && apt-get dist-upgrade -y apt-get autoremove -y

apt-get install -y
build-essential
python-software-properties
python
g++
make
fail2ban
apache2-utils
curl
bc
git
htop
ntp
ntpdate

dpkg-reconfigure tzdata Select US Select Eastern

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - apt-get install -y nodejs

npm update -g

sudo apt-get install mysql-server set root password for mysql

mysql_secure_installation Enter mysql root password Enter 2x y + Enter 1x Enter 1x y + Enter 1x y + Enter 1x

sudo apt-get install software-properties-common sudo add-apt-repository ppa:ondrej/php sudo apt-get update

sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql php-cli php-curl sudo apt-get install php libapache2-mod-php5.6 php5.6-common php5.6-cli php5.6-curl php5.6-mcrypt php5.6-mysql php5.6-opcache

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment