]> Git — Sourcephile - gargantext.git/blob - debian-install
[PARSERS] RIS/PRESSE fix title and abstract field.
[gargantext.git] / debian-install
1 #!/bin/bash
2
3
4
5
6
7 if git --version;
8 then
9 echo "git installed, ok"
10 else
11 sudo apt update && sudo apt install git
12 fi
13
14 sudo apt update
15 sudo apt install liblzma-dev libpcre3-dev libblas-dev liblapack-dev pkg-config libgsl-dev libbz2-dev postgresql postgresql-server-dev-9.6
16
17 #echo "Which user?"
18 #read USER
19 #sudo adduser --disabled-password --gecos "" $USER
20 #sudo su $USER
21
22 curl -sSL https://get.haskellstack.org/ | sh
23 stack update
24 stack upgrade
25
26
27 git clone https://gitlab.iscpif.fr/gargantext/haskell-gargantext.git
28
29 cd haskell-gargantext
30 git clone https://gitlab.iscpif.fr/gargantext/purescript-gargantext
31
32 mkdir deps
33 cd deps
34 git clone https://gitlab.iscpif.fr/gargantext/clustering-louvain.git
35 git clone https://github.com/np/servant-job.git
36 git clone https://github.com/np/patches-map
37 git clone https://gitlab.com/npouillard/patches-class.git
38 git clone https://github.com/delanoe/haskell-opaleye
39 git clone -b next --single-branch https://github.com/delanoe/hsparql
40 cd ..
41
42 stack setup
43 stack build
44 stack install
45
46
47 # Specific to our servers
48
49 ### Configure timezone and locale ###################################
50 echo "########### LOCALES & TZ #################"
51 echo "Europe/Paris" > /etc/timezone
52 dpkg-reconfigure --frontend=noninteractive tzdata
53 #ENV TZ "Europe/Paris"
54
55 sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen && \
56 sed -i -e 's/# fr_FR.UTF-8 UTF-8/fr_FR.UTF-8 UTF-8/' /etc/locale.gen && \
57 locale-gen && \
58 update-locale LANG=fr_FR.UTF-8 && \
59 update-locale LANGUAGE=fr_FR.UTF-8 && \
60 update-locale LC_ALL=fr_FR.UTF-8
61 ################################################################
62
63 # Database configuration
64 # CREATE USER gargantua WITH PASSWORD $(grep DB_PASS gargantext.ini)
65 # GRANT ALL PRIVILEGES ON DATABASE gargandbV4 to gargantua
66
67 #######################################################################
68 ## POSTGRESQL DATA (as ROOT)
69 #######################################################################
70 sed -iP "s%^data_directory.*%data_directory = \'\/srv\/gargandata\'%" /etc/postgresql/9.6/main/postgresql.conf
71 echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.6/main/pg_hba.conf
72 echo "listen_addresses='*'" >> /etc/postgresql/9.6/main/postgresql.conf
73