Skip to content

Instantly share code, notes, and snippets.

@kferran
Last active December 11, 2015 02:08
Show Gist options
  • Save kferran/4527894 to your computer and use it in GitHub Desktop.
Save kferran/4527894 to your computer and use it in GitHub Desktop.
sudo apt-get update
sudo apt-get install tasksel
sudo tasksel
sudo apt-get install php5-curl
sudo apt-get install curl
sudo apt-get install git-core
sudo apt-get install vim
sudo apt-get install phpmyadmin
Ruby Stuff
Step One— Install Ruby with RVM
\curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm requirements
Install any requirements. Typically the ones below:
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config
Step Two—Install Ruby
rvm install ruby-1.9.3-p362
rvm use 1.9.3 --default
Step Three—Install RubyGems
rvm rubygems current
Step Four—Install Rails
gem install rails
Apache stuff for vhost
Redirect requests using .htaccess and mod_rewrite
sudo a2enmod rewrite
Change default vhost to all override
sudo vim /etc/apache2/sites-available/default
Look for a section that looks like this:
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# Uncomment this directive is you want to see apache2's
# default start page (in /apache2-default) when you go to /
#RedirectMatch ^/$ /apache2-default/
</Directory>
You need to modify the line containing AllowOverride None to read AllowOverride All. This tells Apache that it's okay to allow .htaccess files to over-ride previous directives. You must reload Apache before this change will have an effect:
sudo /etc/init.d/apache2 reload
Remove - Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
sudo vim /etc/apache2/conf.d/name
ServerName localhost
sudo service apache2 restart
sudo vim /etc/hosts
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
#Virtual Hosts
12.34.56.789 example.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment