Skip to content

Instantly share code, notes, and snippets.

@kn9
Created November 26, 2016 21:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kn9/c9501bb187c90bf14935b4acb45ba2ef to your computer and use it in GitHub Desktop.
Save kn9/c9501bb187c90bf14935b4acb45ba2ef to your computer and use it in GitHub Desktop.
The Perfect Web Server - OpenSSL, Nginx, MySQL (PostgreSQL), Ajenti, Wordpress, Debian 7.x
# This file is zentralized to be a Turorial.
# I'm not sure about the full selfish-work.
# We will isntall OpenSSL,NginX,PostgreSQL.
# Than we will isntall Ajenti.
# Than you must configurate Ajenti to not use SSL (we will changethis later back)
# Followed we install Wordpress and you will have to install some plugins for PSQL and Nginx.
# Ready to press words!
# ----------
#remove instalaltion hardware ofthe sources.list
nano /etc/apt/sources.list
#put a "#" in front of the deb cd/dvd line
#update
apt-get update
#Putty Connection
apt-get install openssh-server
#connect via ssh user@ip
#on "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!"
#use ssh-keygen -R ip
#Install OpenSSL for Putty
#apt-get install openssl
#Only if you want/do not want apache2
#Install Apache2
#apt-get install apache2
#Uninstall Apache2
#apt-get autoremove && apt-get remove apache2*
#Install Nginx
apt-get install nginx
#Insall Ajenti
wget http://repo.ajenti.org/debian/key -O- | apt-key add -
echo "deb http://repo.ajenti.org/debian main main debian" >> /etc/apt/sources.list
apt-get update
apt-get install ajenti
service ajenti status
# ONLY IF DEBIAN 8.X
#Configure Ajenti for non-SSL connection
#If you want to use a SSL connection visit the following ans skip this step.
# https://easythereentropy.wordpress.com/2014/05/29/getting-setup-with-nginx-php-and-postgresql/
#nano /etc/ajenti/config.json
#NOW IT's YOUR TURN
#Change the following
#"ssl": {
# "enable": true,
# "certificate_path": "/etc/ajenti/ajenti.pem"
#},
#INTO
#"ssl": {
# "enable": false,
# "certificate_path": "/etc/ajenti/ajenti.pem"
#},
#Install PostgreSQL
#apt-get install postgresql
#Install PHP5 and MySQL (requered by WordPress)
apt-get install php5-common php5-cli php5-fpm php5-mysql
#php5-pgsql
service php5-fpm restart
#Install PHPmyAdmin
#apt-get install phpmyadmin
# Install Ajenti-v
apt-get install ajenti-v ajenti-v-php-fpm ajenti-v-nginx
#Install MySQL
apt-get install ajenti-v-mysql
# If you <3 Ruby
#apt-get install ajenti-v-ruby-unicorn ajenti-v-ruby-puma
# If you need Python
#apt-get install ajenti-v-python-gunicorn
# If you need nodeJS
#apt-get install ajenti-v-nodejs
# 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
#service postgresql restart
service mysql restart
service php5-fpm restart
service nginx restart
service ajenti restart
#service apache2 restart
###########
###FINE####
##ROUND 2##
###########
#Download WordPress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment