By default, this would be in the /run/postgresql directory. PostgreSQL requires a directory path for create and store its. Step 3: Create Required Folders for PostgreSQLĪt this point, we need to set up two folders for PostgreSQL: Step 3.1: Folder for PostgreSQL Socket Note: It is possible to combine these two steps into one, using the second command with the -no-cache flag. Step 2: Update Package Repository Index and Install the PostgreSQL Package ~ # apk update You can check the available versions of PostgreSQL at the Alpine Linux package repository.įor simplicity, I will use PostgreSQL 11.6 that is within the Alpine Linux v3.10 package repository. However, depending on your version of Alpine Linux and PostgreSQL required, you can explicitly specify the repository + PostgreSQL version to pull from. For example, Alpine Linux v3.10’s package repository only has PostgreSQL 11.6 available. Step 1: Determine PostgreSQL / Alpine Linux VersionĮach version of Alpine Linux uses a different official package repository, with each having a specific of PostgreSQL. I am using a custom data directory located at /var/lib/postgresql/data.These steps were performed within a vanilla Alpine Linux LXC container (but I try to avoid going too much into LXC here).I am using the official Alpine Linux package repository.Source error: psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.I found that installing and starting PostgreSQL on Alpine Linux to be a not so straight forward task. Then I had also to run sudo chmod 644 /etc/postgresql/12/main/pg_hba.conf 14:35:39.338 UTC LOG: database system is shut down 14:35:39.337 UTC LOG: aborting startup due to startup process failure 14:35:39.337 UTC LOG: startup process (PID 3496) was terminated by signal 6: Aborted 14:35:39.199 UTC LOG: database system was not properly shut down automatic recovery in progress 14:35:39.155 UTC LOG: database system shutdown was interrupted last known up at 14:32:27 UTC 14:35:39.122 UTC HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. 14:35:39.122 UTC LOG: could not bind IPv6 address "::1": Cannot assign requested address * Restarting PostgreSQL 12 database server * Error: /usr/lib/postgresql/12/bin/pg_ctl /usr/lib/postgresql/12/bin/pg_ctl start -D /var/lib/postgresql/12/main -l /var/log/postgresql/postgresql-12-main.log -s -o -c config_file="/etc/postgresql/12/main/nf" exited with status 1: I got pg_ctl: could not start server sudo service postgresql restart In my case sudo service postgresql restart did not work.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |