Update macOS local installation instructions
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
* [Prerequisites](installation/prerequisites.md)
|
||||
* [Ubuntu Linux](installation/ubuntu.md)
|
||||
* [Debian Linux](installation/debian.md)
|
||||
* [MacOS](installation/macos.md)
|
||||
* [macOS](installation/macos.md)
|
||||
* [Windows](installation/windows.md)
|
||||
* [Vagrant](installation/vagrant.md)
|
||||
* [Production and Staging servers](installation/servers.md)
|
||||
|
||||
@@ -39,6 +39,8 @@ cp config/database.yml.example config/database.yml
|
||||
|
||||
6. Setup database credentials with your `consul` user in your new `database.yml` file
|
||||
|
||||
Note: this step is not necessary if you're using a database user without a password and the same username as your system username, which is the default in macOS.
|
||||
|
||||
```bash
|
||||
nano config/database.yml
|
||||
```
|
||||
|
||||
@@ -1,55 +1,56 @@
|
||||
# Configuration for development and test environments (macOS)
|
||||
# Configuration for development and test environments (macOS Sonoma 14.6)
|
||||
|
||||
## Homebrew
|
||||
|
||||
Homebrew is a very popular package manager for OS X. It's advised to use it since it makes the installation of some of the dependencies much easier.
|
||||
Homebrew is a very popular package manager for macOS. It's advised to use it since it makes the installation of some of the dependencies much easier.
|
||||
|
||||
You can find the installation instructions at: [brew.sh](http://brew.sh)
|
||||
|
||||
## XCode and XCode Command Line Tools
|
||||
## Git
|
||||
|
||||
To install *git* you'll first need to install *Xcode* (download it from the Mac App Store) and its *Xcode Command Line Tools* (you can install them from the Xcode's app menu)
|
||||
You can install git:
|
||||
|
||||
## Git and Github
|
||||
|
||||
You can download git from: [git-scm.com/download/mac](https://git-scm.com/download/mac)
|
||||
```bash
|
||||
brew install git
|
||||
```
|
||||
|
||||
## Ruby version manager
|
||||
|
||||
OS X already comes with a preinstalled Ruby version, but it's quite old and we need a newer one. One of the multiple ways of installing Ruby in OS X is through *rbenv*. The installation instructions are in its GitHub repository and are pretty straight-forward:
|
||||
|
||||
[github.com/rbenv/rbenv](https://github.com/rbenv/rbenv)
|
||||
|
||||
## Node.js
|
||||
|
||||
To compile the assets, you'll need a JavaScript runtime. OS X comes with an integrated runtime called `Apple JavaScriptCore` but Node.js is the preferred option.
|
||||
|
||||
To install it, you can use [n](https://github.com/tj/n)
|
||||
|
||||
Run the following command on your terminal:
|
||||
macOS already comes with a preinstalled Ruby version, but it's quite old and we need a newer one. One of the multiple ways of installing Ruby in macOS is through [rbenv](https://github.com/rbenv/rbenv):
|
||||
|
||||
```bash
|
||||
curl -L https://git.io/n-install | bash -s -- -y lts
|
||||
brew install rbenv
|
||||
rbenv init
|
||||
source ~/.zprofile
|
||||
```
|
||||
|
||||
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))
|
||||
## CMake and pkg-config
|
||||
|
||||
## PostgreSQL (>=9.4)
|
||||
In order to compile some of the project dependencies, we need CMake and pkg-config:
|
||||
|
||||
```bash
|
||||
brew install postgres
|
||||
brew install cmake pkg-config
|
||||
```
|
||||
|
||||
Once installed, we need to *initialize* it:
|
||||
## Node.js version manager
|
||||
|
||||
To compile the assets, you'll need a JavaScript runtime. macOS comes with an integrated runtime called `Apple JavaScriptCore` but Node.js is the preferred option. To install Node.js, we will install a Node.js version manager, like NVM:
|
||||
|
||||
```bash
|
||||
initdb /usr/local/var/postgres
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
|
||||
source ~/.zprofile
|
||||
```
|
||||
|
||||
## PostgreSQL
|
||||
|
||||
```bash
|
||||
brew install postgresql
|
||||
```
|
||||
|
||||
Now we're going to configure some things related to the *default user*. First we start postgres server with:
|
||||
|
||||
```bash
|
||||
postgres -D /usr/local/var/postgres
|
||||
brew services start postgresql
|
||||
```
|
||||
|
||||
At this point we're supposed to have postgres correctly installed and a default user will automatically be created (whose name will match our username). This user hasn't got a password yet.
|
||||
@@ -68,36 +69,20 @@ In case you want to set a password for your user you can make it through the pos
|
||||
ALTER USER your_username WITH PASSWORD 'your_password';
|
||||
```
|
||||
|
||||
Now we'll create the *consul* user, the one the application is using. Run in postgres console:
|
||||
|
||||
```sql
|
||||
CREATE ROLE consul WITH PASSWORD '000';
|
||||
ALTER ROLE consul WITH SUPERUSER;
|
||||
ALTER ROLE consul WITH login;
|
||||
```
|
||||
|
||||
If at any point during PostgreSQL installation you feel you have messed things up, you can uninstall it and start again by running:
|
||||
|
||||
```bash
|
||||
brew uninstall postgres
|
||||
```
|
||||
|
||||
You'll have to delete also this directory (otherwise the new installation will generate conflicts, source: [gist.github.com/lxneng/741932](https://gist.github.com/lxneng/741932)):
|
||||
|
||||
```bash
|
||||
rm -rf /usr/local/var/postgres
|
||||
```
|
||||
|
||||
## ChromeDriver
|
||||
|
||||
```bash
|
||||
brew install chromedriver
|
||||
```
|
||||
|
||||
## Imagemagick
|
||||
|
||||
Install Imagemagick:
|
||||
|
||||
```bash
|
||||
brew install imagemagick
|
||||
```
|
||||
|
||||
Now that we have all the dependencies installed we can go ahead and [install Consul Democracy](local_installation.md).
|
||||
## Chrome or Chromium
|
||||
|
||||
In order to run the system tests, we need to install Chrome or Chromium.
|
||||
|
||||
```bash
|
||||
brew install google-chrome
|
||||
```
|
||||
|
||||
Now you're ready to go [get Consul Democracy installed](local_installation.md)!
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
|
||||
* [Ubuntu Linux](ubuntu.md)
|
||||
* [Debian Linux](debian.md)
|
||||
* [MacOS](macos.md)
|
||||
* [macOS](macos.md)
|
||||
* [Windows](windows.md)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* [Prerrequisitos](installation/prerequisites.md)
|
||||
* [Ubuntu Linux](installation/ubuntu.md)
|
||||
* [Debian Linux](installation/debian.md)
|
||||
* [MacOS](installation/macos.md)
|
||||
* [macOS](installation/macos.md)
|
||||
* [Windows](installation/windows.md)
|
||||
* [Vagrant](installation/vagrant.md)
|
||||
* [Servidores de producción y pruebas](installation/servers.md)
|
||||
|
||||
@@ -39,6 +39,8 @@ cp config/database.yml.example config/database.yml
|
||||
|
||||
6. Configura las credenciales de base de datos con tu usuario `consul` en tu nuevo fichero `database.yml`
|
||||
|
||||
Nota: este paso no es necesario si estás utilizando un usuario de base de datos sin contraseña y el mismo nombre de usuario que tu usuario de sistema, que es el comportamiento por defecto en macOS.
|
||||
|
||||
```bash
|
||||
nano config/database.yml
|
||||
```
|
||||
|
||||
@@ -1,55 +1,56 @@
|
||||
# Configuración para los entornos de desarrollo y pruebas (Mac OS X)
|
||||
# Configuración para los entornos de desarrollo y pruebas (macOS Sonoma 14.6)
|
||||
|
||||
## Homebrew
|
||||
|
||||
Homebrew es un gestor de paquetes para OS X muy popular. Es recomendable usarlo pues facilita enormemente la instalación de algunos de los paquetes necesarios.
|
||||
Homebrew es un gestor de paquetes para macOS muy popular. Es recomendable usarlo pues facilita enormemente la instalación de algunos de los paquetes necesarios.
|
||||
|
||||
Puedes encontrar las instrucciones de instalación en: [brew.sh](http://brew.sh)
|
||||
|
||||
## XCode y XCode Command Line Tools
|
||||
## Git
|
||||
|
||||
Para utilizar git necesitarás instalar *Xcode* (está en la Mac App Store) y las *Xcode Command Line Tools* (se instalan desde el menú de Xcode).
|
||||
Puedes instalar git:
|
||||
|
||||
## Git y Github
|
||||
|
||||
Puedes descargar git desde: [git-scm.com/download/mac](https://git-scm.com/download/mac)
|
||||
```bash
|
||||
brew install git
|
||||
```
|
||||
|
||||
## Gestor de versiones de Ruby
|
||||
|
||||
OS X ya viene con una versión preinstalada de ruby, pero es bastante vieja y en nuestro caso no nos sirve. Una de las formas de instalar Ruby es a través de rbenv. Las instrucciones de instalación están en su GitHub y son bastante claras:
|
||||
|
||||
[github.com/rbenv/rbenv](https://github.com/rbenv/rbenv)
|
||||
|
||||
## Node.js
|
||||
|
||||
Para compilar los archivos estáticos (JS, CSS, imágenes, etc.), es necesario un _runtime_ de JavaScript. OS X viene con un _runtime_ integrado llamado `Apple JavaScriptCore` pero Node.js es la opción recomendada.
|
||||
|
||||
Para instalar Node, puedes usar [n](https://github.com/tj/n)
|
||||
|
||||
Ejecuta el siguiente comando en tu terminal:
|
||||
macOS ya viene con una versión preinstalada de ruby, pero necesitamos una versión más reciente. Una de las formas de instalar Ruby es a través de un gestor de versiones de Ruby como [rbenv](https://github.com/rbenv/rbenv):
|
||||
|
||||
```bash
|
||||
curl -L https://git.io/n-install | bash -s -- -y lts
|
||||
brew install rbenv
|
||||
rbenv init
|
||||
source ~/.zprofile
|
||||
```
|
||||
|
||||
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))
|
||||
## CMake y pkg-config
|
||||
|
||||
## PostgreSQL (>=9.4)
|
||||
Para compilar algunas de las dependencias del proyecto, necesitamos CMake y pkg-config:
|
||||
|
||||
```bash
|
||||
brew install postgres
|
||||
brew install cmake pkg-config
|
||||
```
|
||||
|
||||
Una vez instalado es necesario *inicializar* la instalación:
|
||||
## Gestor de versiones de Node.js
|
||||
|
||||
Para compilar los archivos estáticos (JS, CSS, imágenes, etc.), es necesario un _runtime_ de JavaScript. macOS viene con un _runtime_ integrado llamado `Apple JavaScriptCore` pero Node.js es la opción recomendada. Para instalar Node.js, instalaremos un gestor de versiones de Node.js, como NVM:
|
||||
|
||||
```bash
|
||||
initdb /usr/local/var/postgres
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
|
||||
source ~/.zprofile
|
||||
```
|
||||
|
||||
## PostgreSQL
|
||||
|
||||
```bash
|
||||
brew install postgresql
|
||||
```
|
||||
|
||||
Ahora vamos a configurar algunos aspectos del usuario por defecto. Primero iniciamos el servidor de postgres con:
|
||||
|
||||
```bash
|
||||
postgres -D /usr/local/var/postgres
|
||||
brew services start postgresql
|
||||
```
|
||||
|
||||
Llegados a este punto se supone que tenemos postgres correctamente instalado y se nos habrá creado un usuario por defecto (cuyo nombre es nuestro nombre de usuario), y que (todavía) no tiene contraseña.
|
||||
@@ -68,36 +69,20 @@ En el caso de que quieras asignarte una contraseña puedes hacerlo desde la cons
|
||||
ALTER USER tu_nombre_usuario WITH PASSWORD 'tu_contraseña';
|
||||
```
|
||||
|
||||
Ahora vamos a crear el usuario *consul*, que es el que utiliza la aplicación. Ejecuta sobre la consola de postgres:
|
||||
|
||||
```sql
|
||||
CREATE ROLE consul WITH PASSWORD '000';
|
||||
ALTER ROLE consul WITH SUPERUSER;
|
||||
ALTER ROLE consul WITH login;
|
||||
```
|
||||
|
||||
Si en algún momento durante la instalación de PostgreSQL y sospechas que te has equivocado y deseas desinstalarlo y volver a empezar desde cero:
|
||||
|
||||
```bash
|
||||
brew uninstall postgres
|
||||
```
|
||||
|
||||
También tendrás que borrar el siguiente directorio para que no de conflictos cuando intentes volver a instalarlo (fuente: [gist.github.com/lxneng/741932](https://gist.github.com/lxneng/741932)):
|
||||
|
||||
```bash
|
||||
rm -rf /usr/local/var/postgres
|
||||
```
|
||||
|
||||
## ChromeDriver
|
||||
|
||||
```bash
|
||||
brew install chromedriver
|
||||
```
|
||||
|
||||
## Imagemagick
|
||||
|
||||
Instala Imagemagick:
|
||||
|
||||
```bash
|
||||
brew install imagemagick
|
||||
```
|
||||
|
||||
Ahora que ya tenemos todas las dependencias instalado podemos proceder con la [instalación de Consul Democracy](local_installation.md)
|
||||
## Chrome o Chromium
|
||||
|
||||
Para poder ejecutar los tests de sistema, necesitaremos tener instalado Chrome o Chromium.
|
||||
|
||||
```bash
|
||||
brew install google-chrome
|
||||
```
|
||||
|
||||
¡Ya estás listo para [instalar Consul Democracy](local_installation.md)!
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
|
||||
* [Ubuntu Linux](ubuntu.md)
|
||||
* [Debian Linux](debian.md)
|
||||
* [MacOS](macos.md)
|
||||
* [macOS](macos.md)
|
||||
* [Windows](windows.md)
|
||||
|
||||
Reference in New Issue
Block a user