This commit is contained in:
Benoît S. 2018-01-30 22:40:37 +01:00
parent 0ec6ebd35b
commit fbbfb8d5a7

View file

@ -11,7 +11,7 @@ title: Howto Mastodon
## Installation ## Installation
Nous installons la version **2.1.3** sous **Debian 9 (Stretch)**. Nous installons la version **2.2.0** sous **Debian 9 (Stretch)**.
Mastodon s'appuie sur Ruby, [NodeJS](HowtoNodeJS), [Yarn](HowtoYarn), [Nginx](HowtoNginx), [Redis](HowtoRedis) et [PostgreSQL](HowtoPostgreSQL). Mastodon s'appuie sur Ruby, [NodeJS](HowtoNodeJS), [Yarn](HowtoYarn), [Nginx](HowtoNginx), [Redis](HowtoRedis) et [PostgreSQL](HowtoPostgreSQL).
@ -20,7 +20,7 @@ On peut installer les dépendances pour Mastodon :
~~~ ~~~
# apt install nodejs yarn imagemagick ffmpeg libpq-dev libxml2-dev libxslt1-dev file git curl \ # apt install nodejs yarn imagemagick ffmpeg libpq-dev libxml2-dev libxslt1-dev file git curl \
g++ libprotobuf-dev protobuf-compiler pkg-config build-essential libreadline-dev libicu-dev \ g++ libprotobuf-dev protobuf-compiler pkg-config build-essential libreadline-dev libicu-dev \
libidn11-dev libssl-dev libidn11-dev libssl-dev libjemalloc-dev
~~~ ~~~
### Compte UNIX ### Compte UNIX
@ -35,7 +35,7 @@ Créer un compte UNIX *mastodon* :
### Ruby ### Ruby
Mastodon nécessite une version très récente de Ruby (2.4.2), on le met en place via [rbenv](HowtoRails#cas-2-utilisation-avec-rbenv-unicorn) : Mastodon nécessite une version très récente de Ruby (2.5.0), on le met en place via [rbenv](HowtoRails#cas-2-utilisation-avec-rbenv-unicorn) :
~~~ ~~~
# sudo -iu mastodon # sudo -iu mastodon
@ -47,7 +47,7 @@ $ echo 'export RAILS_ENV="production"' >> ~/.bash_profile
$ source ~/.bash_profile $ source ~/.bash_profile
$ git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build $ git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
$ cd $ cd
$ TMPDIR=~/tmp MAKE_OPTS=-j$(nproc) rbenv install 2.4.2 $ TMPDIR=~/tmp MAKE_OPTS=-j$(nproc) RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install 2.5.0
~~~ ~~~
> **Note** : On met la variable d'environnement `RAILS_ENV` dans notre profile bash pour éviter de l'indiquer à chaque commande Ruby/Rails. > **Note** : On met la variable d'environnement `RAILS_ENV` dans notre profile bash pour éviter de l'indiquer à chaque commande Ruby/Rails.
@ -87,7 +87,7 @@ On clone le repository et installe avec _bundle_ et _yarn_ :
# sudo -iu mastodon # sudo -iu mastodon
$ git clone https://github.com/tootsuite/mastodon.git $ git clone https://github.com/tootsuite/mastodon.git
$ cd mastodon $ cd mastodon
$ git checkout v2.1.3 $ git checkout v2.2.0
$ gem install bundler $ gem install bundler
$ bundle install --deployment --without development test $ bundle install --deployment --without development test
$ yarn install --pure-lockfile $ yarn install --pure-lockfile
@ -349,8 +349,8 @@ $ cd mastodon
$ git fetch $ git fetch
$ git checkout <VERSION> $ git checkout <VERSION>
$ bundle install --deployment --without development test $ bundle install --deployment --without development test
$ bundle exec rails db:migrate
$ yarn install --pure-lockfile $ yarn install --pure-lockfile
$ bundle exec rails db:migrate
$ bundle exec rails assets:precompile $ bundle exec rails assets:precompile
$ chmod -R u=rwX,g=rwX,o=rX /home/mastodon/mastodon/public $ chmod -R u=rwX,g=rwX,o=rX /home/mastodon/mastodon/public
$ exit $ exit