]> Git — Sourcephile - gargantext.git/blob - devops/debian/install
[FIX] Adding a List size for others lists
[gargantext.git] / devops / debian / install
1 #!/bin/bash
2
3 # ____ _ _
4 # / ___| __ _ _ __ __ _ __ _ _ __ | |_ _____ _| |_
5 # | | _ / _` | '__/ _` |/ _` | '_ \| __/ _ \ \/ / __|
6 # | |_| | (_| | | | (_| | (_| | | | | || __/> <| |_
7 # \____|\__,_|_| \__, |\__,_|_| |_|\__\___/_/\_\\__|
8 # |___/
9
10 # This receipe is for specific use (Open Stack && Debien)
11 # Step by step installation process (advanced user mainly)
12 # For others: a docker image is coming
13
14 ########################################################################
15 # To be sure to have updated packages
16 sudo apt update
17 sudo apt upgrade
18
19 # Tmux to avoid disconnections during the installation process
20 # Htop for visual monitoring
21 sudo apt install tmux htop
22
23 ########################################################################
24 sudo sed -i "s/stretch/buster/g" /etc/apt/sources.list
25 sudo apt update
26 sudo apt dist-upgrade
27 # sudo reboot #recommended
28 ########################################################################
29
30 #sudo apt update
31 sudo apt install liblzma-dev libpcre3-dev libblas-dev liblapack-dev pkg-config libgsl-dev libbz2-dev postgresql postgresql-server-dev-11 nginx libigraph0-dev libgfortran-9-dev
32
33 sudo apt install git
34 #git config --global user.email "contact@gargantext.org"
35 #git config --global user.name "Gargantua"
36
37
38 ########################################################################
39 echo "Which user?"
40 #read USER
41 USER="gargantua"
42 sudo adduser --disabled-password --gecos "" $USER
43
44 ########################################################################
45 #cd /home
46 #sudo mv -if /home/$USER /srv/
47 #sudo ln -s /srv/$USER
48
49 curl -sSL https://get.haskellstack.org/ | sh
50
51 sudo apt install curl
52 sudo su $USER
53 stack update
54 stack upgrade
55
56 #git clone https://gitlab.iscpif.fr/gargantext/haskell-gargantext.git
57
58 #cd haskell-gargantext
59 ##########
60
61 if [[ ! -d "purescript-gargantext" ]]; then
62 ./devops/debian/install-purescript
63 fi
64
65 #########################################################################
66
67 # stack install should be enough but all process is the following steps
68 stack setup && stack build && stack install
69
70 #########################################################################
71 # build deps
72
73
74 if [[ ! -d "deps" ]]; then
75 mkdir -v deps
76 cd deps
77
78 sudo apt install default-jdk
79 if [[ ! -f "coreNLP.tar.bz2" ]]; then
80 wget https://dl.gargantext.org/coreNLP.tar.bz2
81 fi
82 if [[ ! -d "home" ]]; then
83 tar xvjf coreNLP.tar.bz2
84 fi
85 # CoreNLP needs to be started
86 # ./startServer.sh
87
88 cd ..
89 fi
90
91
92 # Specific to our servers
93
94 #### Configure timezone and locale ###################################
95 # todo sync dates
96 #echo "########### LOCALES & TZ #################"
97 #echo "Europe/Paris" > /etc/timezone
98 #dpkg-reconfigure --frontend=noninteractive tzdata
99 ##ENV TZ "Europe/Paris"
100 #
101 #sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen && \
102 #sed -i -e 's/# fr_FR.UTF-8 UTF-8/fr_FR.UTF-8 UTF-8/' /etc/locale.gen && \
103 #locale-gen && \
104 #update-locale LANG=fr_FR.UTF-8 && \
105 #update-locale LANGUAGE=fr_FR.UTF-8 && \
106 #update-locale LC_ALL=fr_FR.UTF-8
107 #################################################################
108
109 # Database configuration
110 # CREATE USER gargantua WITH PASSWORD $(grep DB_PASS gargantext.ini)
111 # GRANT ALL PRIVILEGES ON DATABASE gargandbV4 to gargantua
112
113 #######################################################################
114 ## POSTGRESQL DATA (as ROOT)
115 #######################################################################
116
117 ./devops/debian/install-postgres
118
119 # configure the database with script in devops/postgres
120 # edit gargantext.ini
121