Pre-Requisites:
-> Log in as root if the password of the root is not known then use this cmd else simply sudo su root.
cmd:su bash
-> Give the password for the current user then it will automatically redirects to the root.
-> Copy the package or binary file of postgresql to the /opt/ folder.
-> If the file is tar then untar using this cmd to extract the file by going to the location.
cmd:cd /opt/
cmd:/opt# tar -xvf postgresql-9.5.8.tar.gz
-> to check for the extracted file use the cmd then the file will be listed.
cmd:ls -ltr
-> Then go to the location where the package is available by the cmd
cmd:cd /opt/postgresql-9.5.8/
Step1: If we need xml support then configure with libxml else we can configure directly without libxml.
cmd:./configure –with-libxml
-> If no error came then proceed to step2.
Error: If readline dependent came ..
so installed libreadline-java ,libreadline-java-javadoc and readline-devel library needs to be installed with libreadline
-> Then run the cmd.
cmd:apt-get install readline
cmd:apt-get install libreadline6 libreadline6-dev
-> Now readline dependencies are available. Again configure
cmd:./configure –with-libxml
->If the error comes for zliblg then use the cmd.
Note:When ever any dependency missing error came then use the cmd with that dependency.
cmd:apt-get install zlib1g-dev
cmd:./configure –with-libxml
Note:If the postgresql is already installed then before make run this cmd.
cmd:make clean
Step2:
cmd:make
Step3:
cmd:make world
Step4:
cmd:make install
step5:
cmd:make install-world
-> Now postgresql is installed successfully.
Hint:The default installation directory of postgres available here.After the spep 5 we can be able to see in the last lines.
Postgresql Server Set Up in Linux
Related Posts
Vi editor in Linux
Its a visual editor by default installed in every linux system. The next version of vi is vim. The vi editor tool is an interactive tool as it displays changes…
Monitoring in Postgresql
In normal PostgreSQL operation, tuples that are deleted or obsoleted by an update are not physically removed from their table. They remain present until a VACUUM is done. Therefore it’s necessary to do VACUUM periodically, especially…