Setting up Subversion on Amazon EC2

Creating an EC2 instance and connecting via SSH

Create a new EC2 instance (free, unless you go beyond the free tier)
Choose an AMI: check "Free tier only" and pick the Amazon Linux AMI
Next (Choose an Instance Type): choose General purpose t2.microFree tier eligible (EBS only)
Next (Configure Instance Details): leave everything as is unless you need some changes e.g. subnet
Next (Add Storage): change Size (GiB) to up to 30GB
Next (Tag Instance): e.g. Key = Name, Value = MySVN or Key = Owner, Value = Yatko - learn more about tagging
Next (Configure Security Group): SSH should be already open, below click Add Rule and select HTTP on port 80, Anywhere (
Review and Launch

Create a new key pair when prompted and download the .PPK file from amazon, save it in a safe place!
Visit the EC2 dashboard, instance should be Running and status checks 2/2 checks
Record your instance Public IP (and/or Public DNS)
if Mac/Linux, open a Terminal window
SSH into your instance:

locate the path where your .PPK file from amazon was saved e.g. /Documents/YOUR_PPK-FILE_PATH/mysvn.pem.txt
# cd /Documents/YOUR_PPK-FILE_PATH/
# ssh -i mysvn.pem.txt ec2-user@YOUR_EC2_PUBLIC-IP

If you encounter "WARNING: UNPROTECTED PRIVATE KEY FILE", try to chmod your keypair to 600:
# chmod 600 mysvn.pem.txt

In case you run into more issues, read/ask here.

if Windows (skip next 4 lines for Mac/Linux), download Putty
SSH into your instance using the PPK from amazon (guide)
Default amazon AMI SSH username is ec2-user, no password
Putty hint: right-click to paste clipboard contents.

Installing software

Update pre-installed software:
# sudo yum update -y

Visit the public ip in your browser: http://YOUR_EC2_PUBLIC-IP, should see Amazon Linux AMI Test Page if Apache is installed and running

If Apache is not installed (guide):
# sudo yum groupinstall -y "Web Server" "MySQL Database" "PHP Support"
# sudo yum install -y php-mysql
# sudo service httpd start

Install subversion and mod_dav_svn (should see a long list of all changes):
# sudo yum install -y mod_dav_svn
# sudo sudo yum install -y subversion

# sudo yum install mod_dav_svn subversion

Edit the Apache configuration file for subversion:
# sudo vi /etc/httpd/conf.d/subversion.conf
Replace any subversion.conf content with:

LoadModule dav_svn_module     modules/
LoadModule authz_svn_module   modules/
<Location /repos>
   DAV svn
   SVNParentPath /var/www/svn
   # Limit write permission to list of valid users.
   AuthType Basic
   AuthName "Authorization Realm"
   AuthUserFile /var/www/svn-auth/passwd
   AuthzSVNAccessFile  /var/www/svn-auth/access
   Require valid-user

Create the directory which will contain the subversion repository:
# sudo mkdir /var/www/svn

Create the directory which will contain the permissions files.
# sudo mkdir /var/www/svn-auth

Create the permission file:
# sudo vi /var/www/svn-auth/access
And fill it with (replace sarah, colin, guest with your usernames):

admin = rw
user1 = rw
guest = r

Create and add to the password file (use -c the first time to create)
# sudo htpasswd -cb /var/www/svn-auth/passwd admin ADMIN_PASSWORD
# sudo htpasswd -b /var/www/svn-auth/passwd user1 USER1_PASSWORD
# sudo htpasswd -b /var/www/svn-auth/passwd guest GUEST_PASSWORD

Create a repository (REPONAME is the name of your repository eg rebuild):
# cd /var/www/svn
# sudo svnadmin create REPONAME

Change files authorization (again after creating new repos too):
# sudo chown -R apache.apache /var/www/svn /var/www/svn-auth
# sudo chmod 600 /var/www/svn-auth/access /var/www/svn-auth/passwd

Restart apache web server:
# sudo service httpd restart
May complain about determining domain and using, that’s ok

To make sure apache always starts on boot:
# sudo chkconfig httpd on
# sudo chkconfig --list
Should show 2:on 3:on 4:on 5:on for httpd

Verify the subversion repo by opening in a browser:

You’re done! Connect via your fav svn client using the url above.

Other operations

To copy from an older repo including revisions:
# sudo svnadmin dump /var/www/svn/REPONAME > /tmp/REPONAME.svn
(copy the file to the new server then)
# sudo svnadmin load /var/www/svn/REPONAME < /tmp/REPONAME.svn

To connect a backup mirror on another (non-free) EC2 server with the same setup (guide)
First make revisions editable in the mirror repo:
# sudo echo '#!/bin/sh' > /var/www/svn/REPONAME/hooks/pre-revprop-change
# sudo chmod 755 /var/www/svn/REPONAME/hooks/pre-revprop-change
Then initialize the mirror from the old one:
# sudo svnsync init file:///var/www/svn/REPONAME http://YOUR_INSTANCE_IP/repos/REPONAME
Should see "Copied properties for revision 0."
Then copy the data including all revisions:
# sudo svnsync sync file:///var/www/svn/REPONAME
Can use this to make nightly backups to another server

Based on Setting up Subversion on Amazon EC2 for free by northwaygames.comSetting up SVN on AWS EC2 instance by Stuff I Do and
Add a comment

Getting Started with Gulp

You will need:

  • Node.js and npm (Node Package Manager)
  • Gulp 
  • IP Camera Tool

Step 1 - Install Node.js

to install Node, visit and click the "Install" button to download the installer for your OS. Follow the instructions and after finished, you should have Node and npm (Node Package Manager) installed.

- to ensure that Node is properly installed type into the terminal: 

node -v

you should get a response with the version number of Node

npm -v

will get you the version number of npm

Step 2 - Prepare

- navigate to your project directory e.g.  

cd /Documents/Project/my-project

the ls command will list the contents of a directory and helps finding your way around, cd will change the directory, use the [Tab] key to auto-complete long directory-names

- once you made it to your project directory, use npm to initialize your package.json file: 

npm init

this will create the package.json file in your root directory which will provide information about your project and help manage dependencies

Step 3 - Install Gulp

- grant you administrator access (sudo), install package globally (-g),  

sudo npm install -g gulp

- to ensure that Gulp is properly installed type into the terminal:

gulp -v

and this should return the Gulp version number

- also install gulp locally, using the --save-dev flag to add the dependency to your devDependencies list in package.json

npm install --save-dev gulp

Step 4 - Install required Plugins


npm install gulp-jshint gulp-sass gulp-concat gulp-uglify gulp-rename --save-dev

*for 0.2.2 use:

npm install gulp-browserify gulp-connect gulp-plumber gulp-sass gulp-util plumber reactify require-dir vinyl-buffer vinyl-source-stream watchify --save-dev

- prepend with sudo e.g. sudo npm install gulp-sass --save-dev if you are getting permissions errors, also read this great article to find out more about these plugins also to learn more about how to use your command-line interface

Step 5 - Start tool

- download the IP Camera Tool source code and extract it to your project folder

- run Gulp


this will call gulp and run everything needed to start

Step 6 - Access tool

- in your browser navigate to http://localhost:8080 and you should see the IP Camera Tool up and running!


How to resolve "Cannot find module" error?

- while still in your project folder, run npm install {module-name} more info here e.g. require-dir



Add a comment