Skip to content

Instantly share code, notes, and snippets.

@phillpafford
Last active December 14, 2015 18:08
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 phillpafford/5126739 to your computer and use it in GitHub Desktop.
Save phillpafford/5126739 to your computer and use it in GitHub Desktop.
Line by line input for how I got SiriProxy running on a fresh install of Ubuntu 12.10 server
# Must give props to Plamoni
https://gist.github.com/plamoni/1428474
# Additional props to Elvis as I'm pulling some steps from his installation process which you can find here:
https://gist.github.com/elvisimprsntr/3985559
# READ if you need
https://help.ubuntu.com/community/VimHowto ( This works for vi command as well )
# START HERE <------------------------------------------------------------
# Download the server install image, I chose the 32 bit version
http://releases.ubuntu.com/quantal/ubuntu-12.10-server-i386.iso
# Create the Install USB drive
# Note I'm using a Mac and a USB drive ( 4GB ) to use as the install disc for Ubuntu,
# if you are using another OS please see those installation instructions
http://www.ubuntu.com/download/help/create-a-usb-stick-on-mac-osx
# Here is a good guide to follow if you have never setup a Ubuntu Server before
http://www.howtoforge.com/perfect-server-ubuntu-12.10-apache2-bind-dovecot-ispconfig-3-p2
# The only two things I would look out for as I've had trouble in the past are
1- Select "No Automatic Updates"
( Screen shot if you need ) http://static.howtoforge.com/images/perfect_server_ubuntu_12.10_apache2_bind_dovecot_ispconfig_3/29.png
2- Only select "OpenSSH Server"
( Screen shot if you need ) http://static.howtoforge.com/images/perfect_server_ubuntu_12.10_apache2_bind_dovecot_ispconfig_3/30.png
# Once the server is up and running you need to install some additional packages
sudo apt-get install apache2 -y
# Find out what address your router assigned
ifconfig
# Example output:
eth0 Link encap:Ethernet HWaddr
inet addr:10.0.1.10 Bcast:10.0.1.255 Mask:255.255.255.0
...
# Edit the network settings to use a STATIC IP address.
sudo vi /etc/network/interfaces
# Comment out the DHCP entry but adding the pound sign # in front of each line
# Before:
auto eth0
iface eth0 inet dhcp
# After
#auto eth0
#iface eth0 inet dchp
# Configure your STATIC IP address.
# OSX Example:
auto eth0
iface eth0 inet static
address 10.0.1.111
netmask 255.255.255.0
broadcast 10.0.1.255
network 10.0.1.0
gateway 10.0.1.1
dns-nameservers 8.8.8.8 8.8.4.4
# Windows/Linux Example:
auto eth0
iface eth0 inet static
address 192.168.69.96
netmask 255.255.255.0
broadcast 192.168.69.255
network 192.168.69.0
gateway 192.168.69.1
dns-nameservers 8.8.8.8 8.8.4.4
# Reboot
sudo reboot
#Install all the prerequisites
sudo apt-get install dnsmasq build-essential libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config mysql-server libmysqlclient18 libmysqlclient-dev
# make sure you remeber the MySQL root password when prompted
# I ususally default this to password
#edit the dnsmasq conf
sudo vi /etc/dnsmasq.conf
# Keystrokes in vi:
# /address=
# A <enter> address=/guzzoni.apple.com/10.0.1.111 <-- This is the IP of your server
# <esc> :wq!
# iOS production Siri server
address=/guzzoni.apple.com/10.0.1.111
# iOS beta Siri server
address=/kryten.apple.com/10.0.1.111
#Restart dnsmasq
sudo /etc/init.d/dnsmasq restart
# Install RVM - This will take awhile.
bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
# Set RVM path
[[ -s "/etc/profile.d/rvm.sh" ]] && . "/etc/profile.d/rvm.sh"
# Set the RVM path to be set up every time I log in
echo '[[ -s "/etc/profile.d/rvm.sh" ]] && . "/etc/profile.d/rvm.sh" # Load RVM function' >> ~/.bash_profile
# Installing Ruby/RVM The correct way in Ubuntu, more here
# http://stackoverflow.com/questions/9056008/installed-ruby-1-9-3-with-rvm-but-command-line-doesnt-show-ruby-v/9056395#9056395
# removing Ruby/RVM
sudo apt-get --purge remove ruby-rvm
# and any configs
sudo rm -rf /usr/share/ruby-rvm /etc/rvmrc /etc/profile.d/rvm.sh
# Install Ruby/RVM via curl, this will take a while
curl -L https://get.rvm.io | bash -s stable --ruby --auto-dotfiles
# Ran ran the next two steps again
# Set RVM path
[[ -s "/etc/profile.d/rvm.sh" ]] && . "/etc/profile.d/rvm.sh"
# Set the RVM path to be set up every time I log in
echo '[[ -s "/etc/profile.d/rvm.sh" ]] && . "/etc/profile.d/rvm.sh" # Load RVM function' >> ~/.bash_profile
# Reboot you machine
sudo reboot
# Install RUBY 1.9.3 -- This will take several minutes
rvm install 1.9.3
# Use RUBY 1.9.3 as the default (and current) version of ruby
rvm use 1.9.3 --default
# Clone the SiriProxy repo
git clone git://github.com/plamoni/SiriProxy.git
# Change the directory to SiriProxy
cd SiriProxy
# You should see a NOTICE popup
==============================================================================
= NOTICE =
==============================================================================
= RVM has encountered a new or modified .rvmrc file in the current directory =
= This is a shell script and therefore may contain any shell commands. =
= =
= Examine the contents of this file carefully to be sure the contents are =
= safe before trusting it! ( Choose v[iew] below to view the contents ) =
==============================================================================
Do you wish to trust this .rvmrc file? (/home/autobot/SiriProxy/.rvmrc)
y[es], n[o], v[iew], c[ancel]>
# type y + <enter keypress>
# Make the .siriproxy directory in my home directory
mkdir ~/.siriproxy
# Copy the example config
cp ./config.example.yml ~/.siriproxy/config.yml
# Install SiriProxy -- Can take a minute or two
rake install
# Generate the certificates
siriproxy gencerts
# Install the certificate on the iPhone.
# On your machine use FileZilla to copy the certificate from the server.
# Install FileZilla on the machine used to email ( Like your main computer )
http://filezilla-project.org/
# How to use FileZilla
http://wiki.filezilla-project.org/FileZilla_Client_Tutorial_(en)
# You can login the same way you SSH into the server
# Navigate to the cert directory
/home/foobar/.siriproxy
# ls -ltr
ca.pem
# Download the file to your machine
# Attach this file to an email account you have access to on your iPhone.
# On the iPhone simply tap the file and follow the prompts to install.
# Yes you can trust it as you created it
# Bundle SiriProxy (this installs the plugins and whatnot)
siriproxy bundle
# install bundle
bundle install
# set permissions ( @todo: set this up in profile )
export rvmsudo_secure_path=1
# Start the server with rvm sudo user
rvmsudo siriproxy server
# On your device:
# This is that part I had the hardest with as it's not in the docs
# Thsi video at 12:59 explains how to set the DNS to point to our SiriProxy server
http://www.idownloadblog.com/2011/12/09/how-to-install-siri-proxy-tutorial-video/
#Quote from the site:
"in your iPhone 4S's WiFi Settings, select the blue arrow icon next to your active WiFi connection. Remember, you must be connected to the same local network as the Siri Proxy running on your computer. Tap on the DNS section, and edit the DNS entry to point to the IP address of your Siri Proxy server. See the video at 12:59 for more details."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment