]> Git — Sourcephile - gargantext.git/blob - devops/debian/install
[phylo] quality function reparameterized to have high levels for lambda-->1 and low...
[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-8-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 #sudo apt install curl
50 #curl -sSL https://get.haskellstack.org/ | sh
51
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 if [[ ! -d "clustering-louvain-cplusplus" ]]; then
79 ../devops/debian/install-clustering-louvain
80 fi
81
82 sudo apt install default-jdk
83 if [[ ! -f "coreNLP.tar.bz2" ]]; then
84 wget https://dl.gargantext.org/coreNLP.tar.bz2
85 fi
86 if [[ ! -d "home" ]]; then
87 tar xvjf coreNLP.tar.bz2
88 fi
89 # CoreNLP needs to be started
90 # ./startServer.sh
91
92 cd ..
93 fi
94
95
96 # Specific to our servers
97
98 #### Configure timezone and locale ###################################
99 # todo sync dates
100 #echo "########### LOCALES & TZ #################"
101 #echo "Europe/Paris" > /etc/timezone
102 #dpkg-reconfigure --frontend=noninteractive tzdata
103 ##ENV TZ "Europe/Paris"
104 #
105 #sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen && \
106 #sed -i -e 's/# fr_FR.UTF-8 UTF-8/fr_FR.UTF-8 UTF-8/' /etc/locale.gen && \
107 #locale-gen && \
108 #update-locale LANG=fr_FR.UTF-8 && \
109 #update-locale LANGUAGE=fr_FR.UTF-8 && \
110 #update-locale LC_ALL=fr_FR.UTF-8
111 #################################################################
112
113 # Database configuration
114 # CREATE USER gargantua WITH PASSWORD $(grep DB_PASS gargantext.ini)
115 # GRANT ALL PRIVILEGES ON DATABASE gargandbV4 to gargantua
116
117 #######################################################################
118 ## POSTGRESQL DATA (as ROOT)
119 #######################################################################
120
121 #./devops/debian/install-postgres
122
123 # configure the database with script in devops/postgres
124 # edit gargantext.ini