In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The postgresql package in the CentOS 7 repository is too old, and we would like to get support from the postgresql official, especially for postgresql clustering, such as pgpool.
Install postgresql 9.4
yum install https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-2.noarch.rpm yum install postgresql-9.4-server
initialize the database
mkdir -p /data/pgsqlchmod 755 /datachmod 755 /data/pgsqlchown -R postgres:postgres /data/pgsqlsudo -u postgres /usr/pgsql-9.4/bin/initdb -D /data/pgsql --encoding='UTF8' --locale='zh_CN.UTF-8' --lc-collate='zh_CN.UTF-8' --lc-ctype='zh_CN.UTF-8'
Create the file/etc/systemd/system/postgresql-9.4.service,
touch /etc/systemd/system/postgresql-9.4.service
contents are as follows
.include /usr/lib/systemd/system/postgresql-9.4.service[Service]Environment=PGPORT=5432Environment=PGDATA=/data/pgsql
Start postgresql
systemctl daemon-reloadsystemctl enable postgresql-9.4systemctl start postgresql-9.4
Set postgres user password
psql -U postgresalter user postgres with password '123456';
main performance parameters
shared_buffers = 4GB #About 1/4 of physical memory, no more than 8Gwork_mem = 32MB #work_mem * max_connections does not exceed physical memory max_connections = 500 #Maximum connections maintenance_work_mem = 256MBeffective_cache_size = 8GB #Maximum cache that can be used, it is recommended that physical memory 1/2fsync = on #Whether to force hard disk flushing, on to prevent data loss, off to close, performance will be better.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.