原始碼安裝postgresql
作業系統版本
[root@mysqlcomm ~]# cat /etc/issue
\S
Kernel \r on an \m
[root@mysqlcomm ~]#
[root@mysqlcomm ~]# uname -a
Linux mysqlcomm 4.14.35-1902.3.2.el7uek.x86_64 #2 SMP Tue Jul 30 03:59:02 GMT 2019 x86_64 x86_64 x86_64 GNU/Linux
[root@mysqlcomm ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.7 (Maipo)
資料庫版本:12.4
從網站下載原始碼, 解壓
首先需要安裝library
yum -y install -y readline-devel
yum -y install -y zlib-devel
yum -y install -y gcc
./configure
make && make install
adduser postgres
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test
[root@mysqlcomm postgresql-12.4]# adduser postgres
[root@mysqlcomm postgresql-12.4]# mkdir /usr/local/pgsql/data
[root@mysqlcomm postgresql-12.4]# chown postgres /usr/local/pgsql/data
[root@mysqlcomm postgresql-12.4]# su - postgres
[postgres@mysqlcomm ~]$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /usr/local/pgsql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Asia/Shanghai
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
initdb: warning: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start
[postgres@mysqlcomm ~]$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile
pg_ctl: no operation specified
Try "pg_ctl --help" for more information.
[postgres@mysqlcomm ~]$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start
waiting for server to start.... done
server started
[postgres@mysqlcomm ~]$ /usr/local/pgsql/bin/createdb test
[postgres@mysqlcomm ~]$ /usr/local/pgsql/bin/psql test
psql (12.4)
Type "help" for help.
test=#
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8520577/viewspace-2714729/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- PostgreSQL 10.12 安裝系列 - 原始碼安裝SQL原始碼
- openeuler原始碼安裝Postgresql 16原始碼SQL
- PostgreSQL-原始碼安裝(一)SQL原始碼
- 【PG安裝】postgresql10 for linux 原始碼安裝SQLLinux原始碼
- PostgreSQL 13 原始碼安裝(#1.1)-202103SQL原始碼
- postgresql 12.5軟體原始碼安裝SQL原始碼
- PostgreSQL技術大講堂 - Part 2:PostgreSQL原始碼安裝SQL原始碼
- POSTGRESQL10.8原始碼安裝主從搭建SQL原始碼
- POSTGRESQL10.3原始碼安裝主從搭建SQL原始碼
- PostgreSQL原始碼學習 win10原始碼編譯安裝SQL原始碼Win10編譯
- CentOS 7.4 環境下原始碼編譯安裝 postgreSQL 11.4CentOS原始碼編譯SQL
- 在Oracle Linux 7.1中使用原始碼來安裝PostgreSQL 9.6OracleLinux原始碼SQL
- nginx原始碼安裝Nginx原始碼
- 原始碼安裝GO原始碼Go
- 原始碼安裝openresty原始碼REST
- Nginx 原始碼安裝Nginx原始碼
- 【推薦 - 原始碼安裝】nginx - 安裝原始碼Nginx
- linux安裝python3(原始碼安裝)LinuxPython原始碼
- Mysql for Linux安裝配置之—— 原始碼安裝MySqlLinux原始碼
- yum安裝與原始碼安裝比較原始碼
- Postgresql——postgis安裝SQL
- postgresql安裝(source)SQL
- macbook 原始碼安裝 redisMac原始碼Redis
- macbook 原始碼安裝 nginxMac原始碼Nginx
- MySQL 5.7.28 原始碼安裝MySql原始碼
- docker原始碼安裝NginxDocker原始碼Nginx
- paramiko 2.4.1原始碼安裝原始碼
- PostgreSQL:Redhat 8.5 + PostgreSQL 14.5 安裝SQLRedhat
- 連網安裝mysql與原始碼安裝mysqlMySql原始碼
- PostgreSQL 10.12 安裝系列 - 本地RPM安裝SQL
- 原始碼安裝Nginx和PHP原始碼NginxPHP
- 原始碼包安裝過程原始碼
- mysql5.5.20原始碼安裝MySql原始碼
- EOS原始碼分析(1)安裝原始碼
- 原始碼編譯安裝Redis原始碼編譯Redis
- postgresql 下載安裝SQL
- OpenEuler安裝配置PostgreSQLSQL
- 安裝Postgresql12.1SQL