In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to install PostgreSQL, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Recently, I heard a theory, that is, the survivor theory. the story is that US military aircraft suffered heavy losses in the war against Japan, so the military wanted to count how to improve the survival rate of aircraft in battle. they conducted a detailed study of the aircraft returning to the aircraft carrier and found that all the aircraft had many bullet holes in the fuselage and few bullet holes in the wings and propellers. The final conclusion is that the fuselage should be fitted with thicker armor.
Is that the truth? Have those planes that have been destroyed been investigated? is it possible to think that the survival rate of aircraft that have been hit by wings and propellers is lower, but that those places should be reinforced? Why tell this story, because you always hear people say, "have you heard who uses POSTGRESQL?" No. I don't want to explain any more, because anyone who knows Chinese characters in the above story should be able to understand what I'm talking about.
In fact, there is a similar problem in POSTGRESQL installation, that is, they all think that it is very easy to install POSTGRESQL, as long as it is compiled and initialized. Is that actually the case? So it's better to delve into how to install a POSTGRESQL and make a good foundation.
1 the version of make you are using should be higher than 3.8
2 the GCC you use should be at least c89-compliant
3 the version of perl language should be at least above Perl5.8.3
4 if the version of openssl is 0.98 or above, you need to install the zlib library
5 large pages of memory must be opened
6 check the proportion of dirty pages refreshed in the background after using large memory in systcl. If the proportion is too large, it may cause memory jitter in database use.
Vm.dirty_background_bytes = 0
7 configure appropriate system variables
Export PGPORT = 5432
Export PGDATA= / pgdata/data
Export LANG = en_US.utf8
Export PGHOME = / usr/local/postgre
Export LD_LIBRARY_PATH = $PGHOME/lib:/usr/lib:/usr/lib64:$LD_LIBRARY_PATH
Export DATE= `date +'"Y%m%d%H%M"'
Export PATH=$PGHOME/bin:$PATH
Export PGUSER=postgre
Export PGDATABASE=postgre
8 large restrictions on database in the part of access to LINUX
* soft nofile 1024000
* hard nofile 1024000
* soft nproc unlimited
* hard nproc unlimited
* soft core unlimited
* hard core unlimited
* soft memlock unlimited
* hard memlock unlimited
9 the process of compilation dominates the confirmation of the main directories and some parameters that cannot be changed in the later key period
/ configure-- prefix=/usr/local/postgre-- bindir=/usr/local/postgre/bin-- sysconfdir=/etc/-- datarootdir=/pgdata/data-- with-pgport=5432-- with-segsize=4-- enable-dtrace
Make world
Make install
10 adjust to postgre to initialize the database
Initdb-D / pgdata/udata-U postgre-X / pgdata/log
Start the database
Pg_ctl-D / pgdata/udata-l logfile start
11 create initialization database
Createdb postgre
12 execute psql and you can directly enter the database world of postgresql
Now you can into your database monster, PG
(the above assumes that you use postgre as the startup account, and of course, your PGDATA also needs chown, so it is not in bulabula)
The above is all the contents of the article "how to install PostgreSQL". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.