Add local Debian installation instructions
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
### Installation
|
### Installation
|
||||||
* [Introduction](getting_started/introduction.md)
|
* [Introduction](getting_started/introduction.md)
|
||||||
* [Prerequisites](getting_started/prerequisites/README.md)
|
* [Prerequisites](getting_started/prerequisites/README.md)
|
||||||
* [Linux](getting_started/prerequisites/linux.md)
|
* [Debian GNU/Linux](getting_started/prerequisites/debian.md)
|
||||||
* [macOS](getting_started/prerequisites/macos.md)
|
* [macOS](getting_started/prerequisites/macos.md)
|
||||||
* [Windows](getting_started/prerequisites/windows.md)
|
* [Windows](getting_started/prerequisites/windows.md)
|
||||||
* [Local installation](getting_started/local_installation.md)
|
* [Local installation](getting_started/local_installation.md)
|
||||||
|
|||||||
146
docs/en/getting_started/prerequisites/debian.md
Normal file
146
docs/en/getting_started/prerequisites/debian.md
Normal file
@@ -0,0 +1,146 @@
|
|||||||
|
# Configuration for development and test environments (Debian 9.8)
|
||||||
|
|
||||||
|
## Superuser
|
||||||
|
|
||||||
|
Note that 'sudo' is not installed by default in Debian. It's possible to install and configure it, you can find information [here](https://wiki.debian.org/sudo). But we don't recommend it cause you may have other problems. We recommend running the following commands as a superuser, so make sure the very first command you run is:
|
||||||
|
|
||||||
|
```
|
||||||
|
su
|
||||||
|
```
|
||||||
|
|
||||||
|
## Git
|
||||||
|
|
||||||
|
Git is officially maintained in Debian:
|
||||||
|
|
||||||
|
```
|
||||||
|
apt-get install git
|
||||||
|
```
|
||||||
|
|
||||||
|
## Curl
|
||||||
|
|
||||||
|
Curl is officially maintained in Debian:
|
||||||
|
|
||||||
|
```
|
||||||
|
apt-get install curl
|
||||||
|
```
|
||||||
|
|
||||||
|
## Ruby
|
||||||
|
|
||||||
|
Ruby versions packaged in official repositories are not suitable to work with consul, so we'll have to install it manually.
|
||||||
|
|
||||||
|
The preferred method is via rvm:
|
||||||
|
|
||||||
|
```
|
||||||
|
command curl -sSL https://rvm.io/mpapis.asc | gpg --import -
|
||||||
|
command curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
|
||||||
|
curl -L https://get.rvm.io | bash -s stable
|
||||||
|
```
|
||||||
|
|
||||||
|
then add rvm script source to user's bash (/root/.bashrc)
|
||||||
|
|
||||||
|
```
|
||||||
|
[[ -s /usr/local/rvm/scripts/rvm ]] && source /usr/local/rvm/scripts/rvm
|
||||||
|
```
|
||||||
|
|
||||||
|
and finally, reload .bashrc to be able to run RVM
|
||||||
|
|
||||||
|
```
|
||||||
|
source /root/.bashrc
|
||||||
|
```
|
||||||
|
|
||||||
|
with all this, you are suppose to be able to install a ruby version from rvm, as for example version 2.3.2:
|
||||||
|
|
||||||
|
```
|
||||||
|
rvm install 2.3.2
|
||||||
|
```
|
||||||
|
|
||||||
|
## Bundler
|
||||||
|
|
||||||
|
Install it with
|
||||||
|
|
||||||
|
```
|
||||||
|
gem install rubygems-bundler
|
||||||
|
```
|
||||||
|
|
||||||
|
## Node.js
|
||||||
|
|
||||||
|
To compile the assets, you'll need a JavaScript runtime. Node.js is the preferred option. As with Ruby, we don't recommend installing Node from your distro's repositories.
|
||||||
|
|
||||||
|
To install it, you can use [n](https://github.com/tj/n)
|
||||||
|
|
||||||
|
Run the following command on your terminal:
|
||||||
|
|
||||||
|
```
|
||||||
|
curl -L https://git.io/n-install | bash -s -- -y lts
|
||||||
|
```
|
||||||
|
|
||||||
|
And it will install the latest LTS (Long Term Support) Node version on your `$HOME` folder automatically (This makes use of [n-install](https://github.com/mklement0/n-install))
|
||||||
|
|
||||||
|
Reload .bashrc to be able to run node
|
||||||
|
|
||||||
|
```
|
||||||
|
source /root/.bashrc
|
||||||
|
```
|
||||||
|
|
||||||
|
Check it's correctly installed by running:
|
||||||
|
|
||||||
|
```
|
||||||
|
node -v
|
||||||
|
```
|
||||||
|
|
||||||
|
## PostgreSQL (>=9.4)
|
||||||
|
|
||||||
|
PostgreSQL version 9.4 is not official in debian 9.
|
||||||
|
|
||||||
|
So you have to add a repository, the official postgresql works fine.
|
||||||
|
|
||||||
|
Add the repository to apt, for example creating file */etc/apt/sources.list.d/pgdg.list* with:
|
||||||
|
|
||||||
|
```
|
||||||
|
deb http://security.debian.org/debian-security jessie/updates main
|
||||||
|
```
|
||||||
|
|
||||||
|
afterwards you'll have to download the key, and install it, by:
|
||||||
|
|
||||||
|
```
|
||||||
|
wget https://www.postgresql.org/media/keys/ACCC4CF8.asc
|
||||||
|
apt-key add ACCC4CF8.asc
|
||||||
|
```
|
||||||
|
|
||||||
|
and install postgresql
|
||||||
|
|
||||||
|
```
|
||||||
|
apt-get update
|
||||||
|
apt-get install postgresql-9.4 postgresql-server-dev-9.4 postgresql-contrib-9.4
|
||||||
|
```
|
||||||
|
|
||||||
|
You also need to configure a user for your database. As an example, we'll choose the username "consul":
|
||||||
|
|
||||||
|
```
|
||||||
|
su - postgres
|
||||||
|
|
||||||
|
createuser consul --createdb --superuser --pwprompt
|
||||||
|
|
||||||
|
exit
|
||||||
|
```
|
||||||
|
|
||||||
|
## ChromeDriver
|
||||||
|
|
||||||
|
To run E2E integration tests, we use Selenium along with Headless Chrome.
|
||||||
|
|
||||||
|
To get it working, install the chromedriver package:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
apt-get install chromedriver
|
||||||
|
ln -s /usr/lib/chromedriver /usr/local/bin/
|
||||||
|
```
|
||||||
|
|
||||||
|
Make sure it's working as expected by running the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
chromedriver --version
|
||||||
|
```
|
||||||
|
|
||||||
|
You should receive an output with the latest version of ChromeDriver. If that's the case, you're good to go!
|
||||||
|
|
||||||
|
> Now you're ready to go get Consul [installed](../local_installation.html)!!
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
### Instalación
|
### Instalación
|
||||||
* [Introducción](getting_started/introduction.md)
|
* [Introducción](getting_started/introduction.md)
|
||||||
* [Prerrequisitos](getting_started/prerequisites/README.md)
|
* [Prerrequisitos](getting_started/prerequisites/README.md)
|
||||||
* [Linux](getting_started/prerequisites/linux.md)
|
* [Debian GNU/Linux](getting_started/prerequisites/debian.md)
|
||||||
* [macOS](getting_started/prerequisites/macos.md)
|
* [macOS](getting_started/prerequisites/macos.md)
|
||||||
* [Windows](getting_started/prerequisites/windows.md)
|
* [Windows](getting_started/prerequisites/windows.md)
|
||||||
* [Instalación local](getting_started/local_installation.md)
|
* [Instalación local](getting_started/local_installation.md)
|
||||||
|
|||||||
154
docs/es/getting_started/prerequisites/debian.md
Normal file
154
docs/es/getting_started/prerequisites/debian.md
Normal file
@@ -0,0 +1,154 @@
|
|||||||
|
# Configuración para los entornos de desarrollo y pruebas (Debian 9.8)
|
||||||
|
|
||||||
|
## Super usuario
|
||||||
|
|
||||||
|
El programa 'sudo' no viene instalado en Debian por defecto. Su instalación y configuración es posible, se puede encontrar informacion al respecto [aquí](https://wiki.debian.org/es/sudo). Pero no lo recomendamos porque puede causar otros problemas. Recomendamos que se ejecuten las siguientes instrucciones como un super usuario, así que asegúrate de que la primera instrucción que ejecutes sea:
|
||||||
|
|
||||||
|
```
|
||||||
|
su
|
||||||
|
```
|
||||||
|
|
||||||
|
## Git
|
||||||
|
|
||||||
|
Git es mantenido oficialmente en Debian:
|
||||||
|
|
||||||
|
```
|
||||||
|
apt-get install git
|
||||||
|
```
|
||||||
|
|
||||||
|
## Curl
|
||||||
|
|
||||||
|
Curl es mantenido oficialmente en Debian:
|
||||||
|
|
||||||
|
```
|
||||||
|
apt-get install curl
|
||||||
|
```
|
||||||
|
|
||||||
|
## Ruby
|
||||||
|
|
||||||
|
Las versiones de Ruby versions empaquetadas en repositorios oficiales no son aptas para trabajar con consul (al menos Debian 7 y 8), así que debemos instalar manualmente.
|
||||||
|
|
||||||
|
El método recomendado es via rvm:
|
||||||
|
|
||||||
|
### Como usuario local
|
||||||
|
|
||||||
|
```
|
||||||
|
command curl -sSL https://rvm.io/mpapis.asc | gpg --import -
|
||||||
|
command curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
|
||||||
|
curl -L https://get.rvm.io | bash -s stable
|
||||||
|
```
|
||||||
|
|
||||||
|
despues añadimos el script rvm a nuestro bash (~/.bashrc) (este paso sólo es necesario si no puedes ejecutar el comando rvm)
|
||||||
|
|
||||||
|
```
|
||||||
|
[[ -s /usr/local/rvm/scripts/rvm ]] && source /usr/local/rvm/scripts/rvm
|
||||||
|
```
|
||||||
|
|
||||||
|
por úlitmo, volvemos a cargar el .bashrc para poder ejecutar RVM
|
||||||
|
|
||||||
|
```
|
||||||
|
source /root/.bashrc
|
||||||
|
```
|
||||||
|
|
||||||
|
con todo esto, deberías poder instalar la versión de ruby con rvm, por ejemplo la 2.3.2:
|
||||||
|
|
||||||
|
```
|
||||||
|
rvm install 2.3.2
|
||||||
|
```
|
||||||
|
|
||||||
|
## Bundler
|
||||||
|
|
||||||
|
lo instalammos usando
|
||||||
|
|
||||||
|
```
|
||||||
|
gem install rubygems-bundler
|
||||||
|
```
|
||||||
|
|
||||||
|
## Node.js
|
||||||
|
|
||||||
|
Para compilar los archivos estáticos (JS, CSS, imágenes, etc.), es necesario un _runtime_ de JavaScript. Node.js es la opción recomendada. Al igual que como ocurre con Ruby, no es recomendable instalar Node directamente de los repositorios de tu distribución Linux.
|
||||||
|
|
||||||
|
Para instalar Node, puedes usar [n](https://github.com/tj/n)
|
||||||
|
|
||||||
|
Ejecuta el siguiente comando en tu terminal:
|
||||||
|
|
||||||
|
```
|
||||||
|
curl -L https://git.io/n-install | bash -s -- -y lts
|
||||||
|
```
|
||||||
|
|
||||||
|
Y este instalará automáticamente la versión LTS (_Long Term Support_, inglés para "Soporte a largo plazo") más reciente de Node en tu directorio `$HOME` (Este comando hace uso de [n-install](https://github.com/mklement0/n-install))
|
||||||
|
|
||||||
|
vuelve a cargar el .bashrc para poder ejecutar node
|
||||||
|
|
||||||
|
```
|
||||||
|
source /root/.bashrc
|
||||||
|
```
|
||||||
|
|
||||||
|
Comprueba que está correctamente instalado ejecutando:
|
||||||
|
|
||||||
|
```
|
||||||
|
node -v
|
||||||
|
```
|
||||||
|
|
||||||
|
## PostgreSQL (>=9.4)
|
||||||
|
|
||||||
|
La versión 9.4 de PostgreSQL no es oficial en Debian 9.
|
||||||
|
|
||||||
|
Así que debemos añadir el respositorio oficial de postgresql a apt, por ejemplo creando el fichero */etc/apt/sources.list.d/pgdg.list* con:
|
||||||
|
|
||||||
|
```
|
||||||
|
deb http://security.debian.org/debian-security jessie/updates main
|
||||||
|
```
|
||||||
|
|
||||||
|
después deberás descargar la key e instalarla:
|
||||||
|
|
||||||
|
```
|
||||||
|
wget https://www.postgresql.org/media/keys/ACCC4CF8.asc
|
||||||
|
apt-key add ACCC4CF8.asc
|
||||||
|
```
|
||||||
|
|
||||||
|
y finalmente instalar postgresql
|
||||||
|
|
||||||
|
```
|
||||||
|
apt-get update
|
||||||
|
apt-get install postgresql-9.4 postgresql-server-dev-9.4 postgresql-contrib-9.4
|
||||||
|
```
|
||||||
|
|
||||||
|
Para el correcto funcionamiento de CONSUL, necesitas confgurar un usuario para tu base de datos. Como ejemplo, crearemos un usuario llamado "consul":
|
||||||
|
|
||||||
|
```
|
||||||
|
su - postgres
|
||||||
|
|
||||||
|
createuser consul --createdb --superuser --pwprompt
|
||||||
|
|
||||||
|
exit
|
||||||
|
```
|
||||||
|
|
||||||
|
## ChromeDriver
|
||||||
|
|
||||||
|
Para realizar pruebas de integración, usamos Selenium junto a Headless Chrome.
|
||||||
|
|
||||||
|
Para ello, primero instala el siguiente paquete:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
apt-get install chromedriver
|
||||||
|
ln -s /usr/lib/chromedriver /usr/local/bin/
|
||||||
|
```
|
||||||
|
|
||||||
|
Asegúrate de que todo funciona como es debido ejecutando el siguiente comando:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
chromedriver --version
|
||||||
|
```
|
||||||
|
|
||||||
|
Deberías recibir un mensaje indicando la última versión de ChromeDriver. Si ese es el caso, está todo listo
|
||||||
|
|
||||||
|
Si te encuentras usando una distro basada en Arch, instalando `chromium` desde el repositorio `extra` debería ser suficiente
|
||||||
|
|
||||||
|
También tienes la opción de solo instalar ChromeDriver desde AUR. Si usas `pacaur`, ejecuta el siguiente comando:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pacaur -S chromedriver
|
||||||
|
```
|
||||||
|
|
||||||
|
> Ya estás listo para [instalar Consul](../local_installation.html)!!
|
||||||
Reference in New Issue
Block a user