[34647] | 1 | #----
|
---|
| 2 | # Get verious development/compiler tools installed:
|
---|
| 3 | #----
|
---|
| 4 |
|
---|
| 5 | sudo apt-get update
|
---|
| 6 | sudo apt-get install subversion
|
---|
| 7 | sudo apt-get install gcc g++
|
---|
| 8 | sudo apt-get install build-essential
|
---|
| 9 | sudo apt-get install ant
|
---|
| 10 | sudo apt-get install openjdk-11-jdk
|
---|
| 11 |
|
---|
| 12 | # The Greenstone3 build process uses wget to download
|
---|
| 13 | # additional components:
|
---|
| 14 |
|
---|
| 15 | sudo apt-get install wget
|
---|
| 16 |
|
---|
| 17 | # The following environment variables are key for compilation
|
---|
| 18 | # They are often setup up in local/gs3-setup.sh
|
---|
| 19 |
|
---|
| 20 | export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
|
---|
| 21 |
|
---|
| 22 | export CFLAGS=-fPIC
|
---|
| 23 | #export CXXFLAGS=-fPIC
|
---|
| 24 | export JAVACFLAGS="-source 1.6 -target 1.6"
|
---|
| 25 |
|
---|
| 26 | # Prepare to compile:
|
---|
| 27 |
|
---|
| 28 | ant
|
---|
| 29 | ant prepare
|
---|
| 30 |
|
---|
| 31 | # Edit build.properties:
|
---|
| 32 |
|
---|
| 33 | checkout.imagemagick.ext=true
|
---|
| 34 |
|
---|
| 35 | # Edit build.xml to disable compiling wv-ware
|
---|
| 36 | # (around line 719):
|
---|
| 37 |
|
---|
| 38 | value="${opt.gnomelibext.arg} "
|
---|
| 39 | # =>
|
---|
| 40 | value="${opt.gnomelibext.arg} --disable-wvware"
|
---|
| 41 |
|
---|
| 42 |
|
---|
| 43 |
|
---|
| 44 |
|
---|
| 45 | # Found that gs2build wget compile needed static version of -lz
|
---|
| 46 | # Did this by copying out the imagemagic zlib tarball, compiling i tup
|
---|
| 47 | # and updating the gs2buid/build-src/packages/configure to include
|
---|
| 48 | # -L/.../ in front of -lz
|
---|
| 49 |
|
---|
| 50 | #----
|
---|
| 51 | # To get going with https with Apache web server
|
---|
| 52 | #----
|
---|
| 53 |
|
---|
| 54 | sudo apt-get install apache2
|
---|
| 55 |
|
---|
| 56 | sudo apt install snapd
|
---|
| 57 | sudo snap install core; sudo snap refresh core
|
---|
| 58 | sudo snap install --classic certbot
|
---|
| 59 | sudo ln -s /snap/bin/certbot /usr/bin/certbot
|
---|
| 60 |
|
---|
| 61 | sudo certbot --apache
|
---|
| 62 |
|
---|
| 63 |
|
---|
| 64 | sudo a2enmod proxy_http
|
---|
| 65 | sudo systemctl restart apache2
|
---|
| 66 |
|
---|
| 67 | #----
|
---|
| 68 |
|
---|
| 69 | #Interesting part of:
|
---|
| 70 | # /etc/apache2/sites-enabled/000-default-le-ssl.conf
|
---|
| 71 |
|
---|
| 72 | ProxyPass /greenstone3 http://localhost:8383/greenstone3
|
---|
| 73 | ProxyPassReverse /greenstone3 http://localhost:8383/greenstone3
|
---|
| 74 |
|
---|
| 75 | # ProxyPass /cambridge-museum http://localhost:9393/greenstone3
|
---|
| 76 | # ProxyPassReverse /cambridge-museum http://localhost:9393/greenstone3
|
---|
| 77 | # <Location /cambridge-museum>
|
---|
| 78 | # ProxyPassReverseCookiePath /greenstone3 /cambridge-museum
|
---|
| 79 | # </Location>
|
---|
| 80 |
|
---|
| 81 |
|
---|
| 82 | ServerName so-we-must-think.space
|
---|
| 83 | Include /etc/letsencrypt/options-ssl-apache.conf
|
---|
| 84 | ServerAlias sowemustthink.space
|
---|
| 85 | SSLCertificateFile /etc/letsencrypt/live/so-we-must-think.space/fullchain.pem
|
---|
| 86 | SSLCertificateKeyFile /etc/letsencrypt/live/so-we-must-think.space/privkey.pem
|
---|
| 87 |
|
---|
| 88 | RewriteEngine on
|
---|
| 89 | RewriteRule "^/$" "/greenstone3/library" [PT]
|
---|
| 90 |
|
---|
| 91 | #----
|
---|
| 92 |
|
---|
| 93 | # Edit:
|
---|
| 94 | # build.properties
|
---|
| 95 |
|
---|
| 96 | tomcat.server=<you.domain.name>
|
---|
| 97 |
|
---|
| 98 | # Edit:
|
---|
| 99 | # web/sites/localsite/siteConfig.xml
|
---|
| 100 |
|
---|
| 101 | <metadata name="siteURL">//<your.domain.name>/greenstone3/</metadata>
|
---|
| 102 |
|
---|
| 103 | ant restart
|
---|
| 104 |
|
---|
| 105 |
|
---|