Fedora on a white macbook

A work mate offered me his old white macbook. As long as Apple decides about the so called programmed obsolescence, he installed a Linux to stay secure and fully operative.

He use to run Linux Mint, which is a good distro for the desktop and end-user.

He asked what distro I use, and so, he will install it to me saving my time. The funny side of the story is that when he told me he was surprised about how fast and smooth Fedora performs on the same hardware. Good point for Fedora team.

Postgresql en Fedora 31: conectar a la BD

En un breve artículo hemos visto como instalar e inicializar Postgresql en Fedora 31.

Instalé e intenté conectar con PgAdmin3 sin éxito. La única manera en la que conseguía conectar era convirtiéndome en le usuario postgres en el SO.

Los logs de postgresql en Fedora están en la ruta: /var/lib/pgsql/data/log

Un vistazo y ví:
2019-12-14 19:04:59.627 CET [26263] LOG: could not connect to Ident server at address "::1", port 113: Connection refused
2019-12-14 19:04:59.627 CET [26263] FATAL: Ident authentication failed for user "postgres" 2019-12-14 19:04:59.627 CET [26263] DETAIL: Connection matched pg_hba.conf line 84: "host all all ::1/128 ident"

Hay distintas maneras de solucionarlo, una sencilla (poco elegante a mi juicio) es habilitar el acceso basado en contraseñas con encriptación md5.

La solución editar el fichero: /var/lib/pgsql/data/pg_hba.conf y dejar línea de autenticación para que se haga con md5:
host all all ::1/128 md5

Hay que hacer algo más, poner una contraseña al usuario postgres en el servidor porque la validación que hemos configurado utilizará el propio servidor para permitir o denegar el acceso por el puerto predeterminado de postgresql.

Configurar una la contraseña del usuario se hace entrando a la BD desde el SO como usuario postgres. Utilizamos la CLI de postgres:
su
- postgres
psql
postgres=
# \password postgres

Gracias a Jordanspheire por su artículo User “postgres” Has No Password Assigned

Postgresql en Fedora 31: inicializar la BD

La base de datos Postgresql merece un artículo aparte para comentar porqué elegirla, en este artículo -y probablemente en alguno más- comentaré las peculiaridades de instalarla y configurarla sobre Fedora 31.

La instalación de Postgresql está disponible en otros artículos, documentada con detalle. Hay dos cosas que sí destaco:

  1. Se dispone de varios rpm’s con el nombre de Postgresql, el que instala el RDBMS es el postgresq-server.
  2. Una vez instalado, parece que no va, la razón es que hay que inicializar la instalación. Se consigue con el comando initdb.

Aquí copio dónde se ubica el comando initdb y que pertenece al paquete postgresql:

# whereis initdb initdb: /usr/bin/initdb /usr/share/man/man1/initdb.1.gz
# rpm -qf /usr/bin/initdb postgresql-server-11.6-1.fc31.x86_64

Iniciamos el servicio como root:
systemctl status postgresql

Tecleamos para inicializar la BD:
postgresql-setup --initdb

Why to effort when there’s the “easy way”?

I’m setting up an old Rasperri Py and I was stucked at WiFi configuration. So I may let the ethernet cable plugged (it gives network up & running with a plus of physical security) or just simply let it go.

Why to effort when there’s the “easy way”? Because you learn. And btw, as I use to say, I’m not the first one on facing this problem with “Failed to connect to non-global ctrl_ifname: (null) error: No such file or directory

In parallel I’m setting up a mini-server with raid-1 and found myself in the same choice. I choose, obviously, get into problems but know, I know how to sigg into the bios to set two hard-disk for build the raid-1.

Next steps with the rasperri py? Uhmmm… I don’t really know, probably I choose something simple but useful since it’s an old one with only 512 Mb memory.