Linux教程

linux安装

本文主要是介绍linux安装,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

yum源安装

安装PostgreSQL的repository RPM

yum install http://download.postgresql.org/pub/repos/yum/10/redhat/rhel-6-x86_64/pgdg-centos10-10-1.noarch.rpm

安装PostgreSQL

yum search postgresql10
yum install -y postgresql10-server postgresql10-contrib

卸载通过yum源安装的PostgreSQL软件包

#查看软件包
rpm -qa | grep postgresql
#卸载
yum remove postgresql10-libs-10.0-1PGDG.rhel.x86_64
#删除服务管理脚本
rm -f /etc/init.d/postgresql-10

通过源码安装

下载源码

#下载
wget http://ftp.postgresql.org/pub/source/v10.0/postgresql-10.0.tar.gz
#解压
tar -xvf postgresql-10.0.tar.gz

运行configure程序配置编译选项

#准备编译环境和必要的包
yum groupinstall "Development tools"
yum install -y bison flex readline-devel zlib-devel
#编译
./configure
#常用编译选项
#--prefix=PREFIX: 指定安装目录,默认/usr/local/pgsql
#--includedir=DIR:指定C和C++的头文件目录,默认PREFIX/include
#--with-pgport=PORTNUM:指定初始化数据目录时的默认端口
#--with-blocksize=BLOCKSIZE:指定数据文件块的大小,默认为8K,可调增加到32K
#--with-segsize=SEGSIZE{指定单个数据文件的大小,默认是1G
#--with-wal-blocksize=BLOCKSIZE:指wal块的大小,默认8K
这篇关于linux安装的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!