远志

个人站

欢迎来到我的个人站~


Galaxy Learning 5-- PostgreSQL database connect Galaxy

1. Install PostgreSQL

sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
sudo yum install -y postgresql12-server
sudo /usr/pgsql-12/bin/postgresql-12-setup initdb
sudo systemctl enable postgresql-12
sudo systemctl start postgresql-12

2. Set up the PostgreSQL postgres user password:

sudo -u postgres psql postgres
\password postgres

and give the password postgres when prompted.

3. Create database named “galaxy” and make ‘postgres’ the owner.

sudo -u postgres psql postgres
\l
CREATE DATABASE galaxy owner postgres;
\l
\q

4. Edit the postgresql.conf file to allow connection from all computers:

sudo vim /var/lib/pgsql/12/data/postgresql.conf

5. Edit the pg_hba.conf file to allow everyone access postgreSQL:

sudo vim /var/lib/pgsql/12/data/pg_hba.conf

6. Restart postgreSQL 12

sudo systemctl restart postgresql-12

7. Edit config/galaxy.yml file for setting database connection:

cd galaxy
vim config/galaxy.yml

Add following command or edit as following command in config/galaxy.yml file:

database_connection: postgres://postgres:postgres@localhost:5432/galaxy  
database_engine_option_server_side_cursors: true  
database_engine_option_pool_size: 10 
database_engine_option_max_overflow: 20  
slow_query_log_threshold: 2 

Save your modification.

8. Restart galaxy

sh run.sh

打赏一个呗

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦