postgresql9.5 安装使用
postgresql9.5 安装使用1 下载&安装postgresql9.51.1 官网下载https://www.postgresql.org/download/linux/redhat/ 1.2 下载postgresql9.5的repo# yum install https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-7-x86_64/pgdg-redhat95-9.5-3.noarch.rpm # ll /etc/yum.repos.d/ -rw-r--r-- 1 root root 482 Jan 5 2016 pgdg-95-redhat.repo1.3 安装postgresql9.5的客户端# yum install postgresql95 1.4安装postgresql9.5的服务端# yum install postgresql95-server 1.5 设置数据库开机自起# systemctl enable postgresql-9.5 # systemctl start postgresql-9.5 1.6 查看数据运行的状态# systemctl status postgresql-9.5.service Active: active (running) since Wed 2018-04-18 07:40:03 EDT; 52s ago ***************** 1.7 初始化postgresql9.5数据库# /usr/pgsql-9.5/bin/postgresql95-setup initdb 2 配置 & 使用postgresql9.5数据库参考:https://help.ubuntu.com/stable/serverguide/postgresql.html 2.1 修改postgres用户的密码# su - postgres -bash-4.2$ psql -U postgres postgres=# ? -- 查看帮助 postgres=# ALTER USER postgres WITH PASSWORD '1234' --修改postgres用户的密码 postgres-# q --退出修改 2.2开启远程访问数据库# vi /var/lib/pgsql/9.5/data/postgresql.conf ****** listen_addresses = '*' # what IP address(es) to listen on; 2.3信任远程连接修改成以下配置 # vi /var/lib/pgsql/9.5/data/pg_hba.conf *********** # IPv4 local connections: host all all ::/32 md5 local replication postgres md5 2.4 关闭linux服务器的防火墙#systemctlstopfirewalld #systemctldisablefirewalld 2.5 重启postgresql服务# systemctl restart postgresql-9.5.service (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- 【React系列】受控组件(Controlled Components)和不受控组件
- Swift - 使用导航条和导航条控制器来进行页面切换并传递数据
- 开源论坛系统
- oracle 创建数据库 在新创建的数据库中创建用户 删除创建数
- .net – SQLite等效于ISNULL(),NVL(),IFNULL()或COALESCE()
- react-native – React-Navigation使用不同的参数进入相同的
- PostgreSQL查询,LIKE运算符
- Swift轻松调用Objective-C第三方库
- 基于iframe实现ajax跨域请求 获取网页中ajax数据
- C#/.NET – 查看系统事件列表,即.已显示的Windows,已单击的