Skip to content

Instantly share code, notes, and snippets.

@yetanotherchris
Created April 22, 2013 09:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save yetanotherchris/5433565 to your computer and use it in GitHub Desktop.
Save yetanotherchris/5433565 to your computer and use it in GitHub Desktop.
Bash script for installing Mono ASP.NET MVC 3
sudo apt-get -y update
# Install Apache, Mono and mod_mono.
# mod_mono may freeze here. If it does, open a new shell and restart apache 2:
# sudo /etc/init.d/apache2 restart
sudo apt-get -y install apache2
sudo /etc/init.d/apache2 stop
sudo apt-get -y install mono-devel mono-runtime
sudo apt-get -y install mono-apache-server4
sudo apt-get -y install libapache2-mod-mono
# update permissions for r,w,exec for user + group
sudo chgrp -R www-data /var/www
sudo chown -R www-data /var/www
sudo chmod -R 755 /var/www
# Replace the default apache site settings
sudo mv /var/www/default.txt /etc/apache2/sites-available/default
sudo /etc/init.d/apache2 restart
# Install UFW (uncomplicated firewall)
sudo apt-get -y install ufw
# Allow SSH and HTTP traffic
sudo ufw enable
sudo ufw allow 22
sudo ufw allow 80
sudo ufw allow proto tcp to any port 135
sudo ufw allow proto udp to any port 137
sudo ufw allow proto udp to any port 138
sudo ufw allow proto tcp to any port 139
sudo ufw allow proto tcp to any port 445
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment