]> Git — Sourcephile - gargantext.git/blob - devops/debian/install
install
[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 git iptables curl
22
23 ########################################################################
24 sudo sed -i "s/bullseye/bookworm/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 postgresql postgresql-server-dev-15
32
33 #git config --global user.email "contact@gargantext.org"
34 #git config --global user.name "Gargantua"
35
36
37 ########################################################################
38
39 echo "Installing Nix"
40 sh <(curl -L https://nixos.org/nix/install) --daemon
41
42 echo "Installing GHCUP"
43 curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
44
45 #######################################################################
46 # Get the Sources
47 git clone https://gitlab.iscpif.fr/gargantext/haskell-gargantext.git
48 cd haskell-gargantext
49 git clone https://gitlab.iscpif.fr/gargantext/haskell-gargantext.git
50
51
52
53 #### Configure timezone and locale ###################################
54 # todo sync dates
55 #echo "########### LOCALES & TZ #################"
56 #echo "Europe/Paris" > /etc/timezone
57 #sudo dpkg-reconfigure --frontend=noninteractive tzdata
58 ##ENV TZ "Europe/Paris"
59 #
60 #sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen && \
61 #sed -i -e 's/# fr_FR.UTF-8 UTF-8/fr_FR.UTF-8 UTF-8/' /etc/locale.gen && \
62 #locale-gen && \
63 #update-locale LANG=fr_FR.UTF-8 && \
64 #update-locale LANGUAGE=fr_FR.UTF-8 && \
65 #update-locale LC_ALL=fr_FR.UTF-8
66 #################################################################
67
68 # Database configuration
69 # CREATE USER gargantua WITH PASSWORD $(grep DB_PASS gargantext.ini)
70 # GRANT ALL PRIVILEGES ON DATABASE gargandbV4 to gargantua
71 # sudo su postgres
72 # createdb gargandb
73
74 #######################################################################
75 ## POSTGRESQL DATA (as ROOT)
76 #######################################################################
77 # configure the database with script in devops/postgres
78 # edit gargantext.ini
79