Skip to content

Instantly share code, notes, and snippets.

@ibuilder
Forked from seanmcn/gist:62a021a765ad4f8e593b
Last active March 11, 2017 16:58
Show Gist options
  • Save ibuilder/fb69c639357501123148 to your computer and use it in GitHub Desktop.
Save ibuilder/fb69c639357501123148 to your computer and use it in GitHub Desktop.
The Perfect Web Server - Nginx, Ajenti, Ubuntu
#!/bin/bash
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
echo ':: Installing repo key'
wget http://repo.ajenti.org/debian/key -O- | apt-key add -
echo ':: Adding repo entry'
echo "deb http://repo.ajenti.org/debian main main ubuntu" > /etc/apt/sources.list.d/ajenti.list
echo ':: Updating lists'
apt-get update
echo ':: Installing package'
apt-get install -y ajenti
echo ':: Done! Open https://<address>:8000 in browser'
service ajenti restart
# Uninstall Apache2
sudo apt-get autoremove && sudo apt-get remove apache2*
# Install Ajenti-v
apt-get install ajenti-v ajenti-v-nginx ajenti-v-mysql ajenti-v-php-fpm php5-mysql ajenti-v-mail
service ajenti restart
# If you want FTP
apt-get install ajenti-v-ftp-pureftpd
# If you want mail
apt-get install ajenti-v-mail
# If you want POP support (for gmail etc.)
apt-get install courier-pop
# Restart All Services
sudo service php5-fpm restart
sudo service nginx restart
sudo service ajenti restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment