PostgreSQL Installation
This section explains how to install PostgreSQL on different operating systems and using Docker Compose.
Linux Installation
Ubuntu/Debian
CentOS/RHEL/Fedora
Arch Linux
macOS Installation
Using Homebrew
Using PostgreSQL.app
- Download PostgreSQL.app from postgresapp.com
- Drag the application to your Applications folder
- Open the app and click "Initialize" to create a new server
- Add
/Applications/Postgres.app/Contents/Versions/latest/binto your PATH
Windows Installation
Using Official Installer
- Download PostgreSQL installer from postgresql.org
- Run the installer as administrator
- Follow the installation wizard:
- Select installation directory
- Choose components (PostgreSQL server, pgAdmin, command line tools)
- Set data directory
- Set superuser password
- Set port (default: 5432)
- Set locale
- Complete installation
Docker Compose Installation
For quick and portable PostgreSQL setup, you can use Docker Compose:
Basic Docker Compose Setup
Create docker-compose.yml file:
Advanced Docker Compose with pgAdmin
For database management, you can also include pgAdmin:
Running Docker Compose
Post-Installation Setup
After installing PostgreSQL, you need to:
- Create database for palpo:
- Configure connection settings in palpo application configuration file using appropriate database URL:
- Test connection to ensure everything works properly.
After installing and configuring PostgreSQL, you're ready to set up palpo. Make sure to update your application's database configuration with the correct connection details before proceeding with application setup. {/* 本行由工具自动生成,原文哈希值:a517ef902d1e82c158060f7e5f040af7 */}