Commit 8437c9a7 authored by Administrator's avatar Administrator

[FEAT] Install scripts for Debian Jessie.

parent a6abc431
#!/bin/bash
sudo aptitude install postfix
# copy from tina
cp configurations/postfix/main.cf
sudo postfix reload
sed -i 's/wheezy/jessie/g' /etc/apt/sources.list
sudo aptitude update
sudo aptitude dist-upgrade
ssh-keygen
cat ~/.ssh/id_rsa.pub | mail alexandre@delanoe.org -s "Key Server $(hostname)"
echo "Put ~/.ssh/id_rsa.pub on remote to enable git pull please and press enter"
read answer
sudo mkdir /srv/gargantext
cd /srv
chown gargantua:www-data gargantext
git clone ssh orign ssh://gitolite@delanoe.org:1979/gargantext
#!/bin/dash
# TODO do sudo apt-get install --force-yes
sudo apt-get install postgresql sudo apt-get install postgresql
sudo apt-get install postgresql-contrib sudo apt-get install postgresql-contrib
sudo apt-get install python-virtualenv sudo apt-get install rabbitmq-server
sudo apt-get install tmux
sudo apt-get install python3.4-venv
#sudo apt-get install python-virtualenv
sudo apt-get install libpng12-dev sudo apt-get install libpng12-dev
sudo apt-get install libpng-dev sudo apt-get install libpng-dev
sudo apt-cache search freetype
sudo apt-get install libfreetype6-dev sudo apt-get install libfreetype6-dev
sudo apt-cache search python-dev
sudo apt-get install python-dev sudo apt-get install python-dev
sudo apt-get install libpq-dev sudo apt-get install libpq-dev
sudo apt-get postgresql-contrib sudo apt-get install libpq-dev
sudo aptèget install libpq-dev
# Pour avoir toutes les dependences de matpolotlib (c'est sale, trouver
sudo apt-get build-dep python-matplotlib sudo apt-get build-dep python-matplotlib
sudo apt-get install python-matplotlib
#Paquets Debian a installer #Paquets Debian a installer
# easy_install -U distribute (matplotlib) # easy_install -U distribute (matplotlib)
#lxml #lxml
...@@ -33,5 +41,16 @@ sudo apt-get install liblapack-dev ...@@ -33,5 +41,16 @@ sudo apt-get install liblapack-dev
sudo apt-get install libgflags-dev sudo apt-get install libgflags-dev
sudo aptitude install libgoogle-glog-dev sudo aptitude install libgoogle-glog-dev
source /srv/gargantext_env/bin/activate # MElt
pip3 install git+https://github.com/mathieurodic/aldjemy.git # soon
## SERVER Configuration
# server configuration
sudo apt-get install nginx
# UWSGI with pcre support
sudo apt-get install libpcre3 libpcre3-dev
sudo apt-get install python3-pip
pip3 install uwsgi
#!/bin/dash
sudo mkdir /srv/gargantext_env
sudo chown gargantua:www-data /srv/gargantext_env
pyvenv3 /srv/gargantext_env
source /srv/gargantext_env/bin/activate
pip install --upgrade pip
pip install -r 3-requirements.txt
pip3 install git+https://github.com/mathieurodic/aldjemy.git
patch /srv/gargantext_env/lib/python3.4/site-packages/cte_tree/models.py /srv/gargantext/init/cte_tree.models.diff
#!/bin/bash
cd /srv/
wget http://docs.delanoe.org/gargantext_lib.tar.bz2
sudo tar xvjf gargantext_lib.tar.bz2
sudo chown gargantua:gargantua /srv/gargantext_lib
cd /srv/gargantext_lib/js
git clone git@github.com:PkSM3/garg.git
# Installing TreeTagger
cp treetagger /srv/gargantext/parsing/Tagger/treetagger
cp nlpserver /srv/gargantext/parsing/Tagger/
# Installing nlpserver
# the upstream component nginx needs to connect to
upstream gargantext {
server unix:///tmp/gargantext.sock; # for a file socket
#server 127.0.0.1:8001; # for a web port socket (we'll use this first)
}
# configuration of the server
server {
# the port your site will be served on
listen 8002;
# the domain name it will serve for
server_name localhost; # substitute your machine's IP address or FQDN
charset utf-8;
# max upload size
client_max_body_size 75M; # adjust to taste
# Django media
location /media {
alias /var/www/gargantext/media; # your Django project's media files - amend as required
}
location /static {
alias /var/www/gargantext/static; # your Django project's static files - amend as required
}
# Finally, send all non-media requests to the Django server.
location / {
uwsgi_pass gargantext;
include uwsgi_params;
}
}
# django.ini file
[uwsgi]
env = DJANGO_SETTINGS_MODULE=gargantext_web.settings
#module = django.core.handlers.wsgi:WSGIHandler()
# the base directory
chdir = /srv/gargantext
# Django's wsgi file
#module = wsgi
wsgi-file = /srv/gargantext/wsgi.py
# the virtualenv
home = /srv/gargantext_env/
# master
master = true
# maximum number of processes
processes = 10
# the socket (use the full path to be safe)
socket = /tmp/gargantext.sock
# with appropriate permissions - *may* be needed
chmod-socket = 666
# clear environment on exit
vacuum = true
pidfile = /tmp/gargantext.pid
# respawn processes taking more than 20 seconds
harakiri = 120
# limit the project to 128 MB
#limit-as = 128
# respawn processes after serving 5000 requests
max-requests = 5000
# background the process & log
#daemonize = /var/log/uwsgi/gargantext.log
uid = 1000
gid = 1000
#!/bin/dash
#
echo "Copy nginx configuration in sites available"
sudo cp 4-NGINX_gargantext.conf /etc/nginx/sites-available
echo "Enable site"
cd /etc/nginx/sites-enable
sudo ln -s ../sites-available/gargantext.conf
sudo service nginx restart
echo "Copy UWSGI configuration"
sudo cp 4-UWSGI_gargantext.ini /etc/uwsgi/
sudo service uwsgi restart
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment