次のコマンドを実行.
sudo apt -y update sudo apt-get upgrade
次のコマンドを実行.
sudo apt -y update sudo apt -y install postgresql-8.4 sudo apt -y install postgresql-8.4-postgis sudo apt -y install postgresql-9.1 sudo apt -y install postgresql-9.1-postgis sudo apt -y install postgresql-client-8.4 sudo apt -y install postgresql-client-9.1 sudo apt -y install postgis sudo apt -y install postgresql-contrib libpq-dev sudo apt -y install osm2pgsql
■ Ubuntuで rvm を用いる場合の操作手順(例)
sudo bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer ) source /usr/local/rvm/scripts/rvm rvm get head rvm reload rvm install ruby-1.9.2-head rvm use ruby-1.9.2-head
mkdir osm cd osm git clone https://git.openstreetmap.org/rails.git
cd rails cat Gemfile | sed "s/gem 'memcache/# gem 'memcache/g" > /tmp/Gemfile.$$ cp /tmp/Gemfile.$$ Gemfile bundle install
sudo -u postgres -i createuser openstreetmap -s -P createdb -E UTF8 -O openstreetmap openstreetmap createdb -E UTF8 -O openstreetmap osm_test createdb -E UTF8 -O openstreetmap osm psql -d openstreetmap < /usr/share/postgresql/8.4/contrib/btree_gist.sql
cp rails/config/postgres.example.database.yml rails/config/database.yml sudo vi rails/config/database.yml
編集
cd config cp example.application.yml application.yml cd .. rake db:migrate
migrate の結果の確認