-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathubuntu16_18_installnotes
111 lines (65 loc) · 2.72 KB
/
ubuntu16_18_installnotes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
Notes to install on 18.04
Without rvm
Installing rubygems via bundler to ~./gem
sudo apt install postgresql-10-postgis-2.4 postgresql-server-dev-all libxml2-dev ruby-dev imagemagick gdal-bin ruby-mapscript
sudo gem install bundler
sudo gem update --system --no-user-install
bundle install --path ~/.gem
install nodejs too for production
gdal is gdalinfo --version
GDAL 2.2.3
so no need to compile!
For RVM on 18.04 you would need to compile mapscript (see below for 16.04) and link in
For large images, you need to loosen up imagemagick's policy.xml
sudo cp config/imagemagick-policy.xml /etc/ImageMagick-6/policy.xml
---------------------
ubuntu 16 Install Notes
#Compile and install gdal
#Install rvm
#Compile and install mapserver and ruby mapscript
GDAL utilities
git clone https://github.com/OSGeo/gdal.git
cd gdal
git checkout tags/2.2.2
cd gdal
./configure --prefix=/home/vagrant/gdal/install --disable-shared --enable-static --with-libtiff --with-geotiff --with-jpeg --with-geos
make
./configure --prefix=/home/tim/work/warper/ubuntu16/gdal/install22 --disable-shared --enable-static --with-libtiff --with-geotiff --with-jpeg --with-geos --without-pg --without-mysql --without-netcdf --without-pcidsk --without-python --without-php --without-java --without-sde --without-spatialite
make install
cd /home/vagrant/gdal/install
./bin/gdalinfo --version
----
##rvm for ruby
#install ruby via RVM
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
#
curl -sSL https://get.rvm.io | sudo bash -s stable
add vagrant to rvm group
sudo usermod -a -G rvm vagrant
install ruby
vagrant@vagrant:~$ cd /srv/mapwarper/
vagrant@vagrant:/srv/mapwarper$ rvm install 2.2.1
#lets use 2.4.1 and 2.4.0
rvm install 2.4.1 -enable-shared
rvm install 2.4.1 -enable-shared
#so, next we compiule mapserver using the ruby
#install dependencies
probably easiest to use build-dep
firstly enable sources
deb http://archive.ubuntu.com/ubuntu/ xenial universe
deb-src http://archive.ubuntu.com/ubuntu/ xenial universe
sudo apt-get update
sudo apt-get build-dep libmapserver2
# rvm enable-shared
rvm reinstall 2.4.0 --enable-shared (or rvm install if not done already)
source /etc/profile.d/rvm.sh
git clone https://github.com/timwaters/mapserver.git
cd mapserver
git checkout tags/rel-7-0-0
mkdir build
cd build
cmake .. -DWITH_THREAD_SAFETY=1 -DWITH_FCGI=0 -DWITH_RUBY=1 -DCMAKE_INSTALL_PREFIX=/home/vagrant/mapserver_install -DWITH_GIF=0
make
ldd mapscript/ruby/mapscript.so
then make install which should put the mapscript file in the correct place or..
/mapserver/build$ cp mapscript/ruby/mapscript.so /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/vendor_ruby/2.4.0/x86_64-linux/