PostgreSQL(Linux)安装、启动、停止、重启
If we don't already have PostgreSQL installed, we must install it.
$ sudo apt-get install postgresql
This command installs the PostgreSQL server and various other packages.
$ sudo update-rc.d -f postgresql remove
Removing any system startup links for /etc/init.d/postgresql ...
/etc/rc0.d/K21postgresql
/etc/rc1.d/K21postgresql
/etc/rc2.d/S19postgresql
/etc/rc3.d/S19postgresql
/etc/rc4.d/S19postgresql
/etc/rc5.d/S19postgresql
/etc/rc6.d/K21postgresql
If we install the PostgreSQL database from packages, it is automatically added to the start up scripts of the operating system. If we are only learning to work with the database, it is unnecessary to start the database each time we boot the system. The above command removes any system startup links for the PostgreSQL database.
$ /etc/init.d/postgresql status
Running clusters: 9.1/main
$ service postgresql status
Running clusters: 9.1/main
We check if the PostgreSQL server is running. If not, we need to start the server.
$ sudo service postgresql start
* Starting PostgreSQL 9.1 database server [ OK ]
On Ubuntu Linux we can start the server with the service postgresql start command.
$ sudo service postgresql stop
* Stopping PostgreSQL 9.1 database server [ OK ]
We use the service postgresql stop command to stop the PostgreSQL server.
$ sudo service postgresql restart
Stopping postgresql-9.5 service: [ OK ]
Starting postgresql-9.5 service: [ OK ]
We use the service postgresql restart command to restart the PostgreSQL server.
PostgreSQL(Linux)安装、启动、停止、重启的更多相关文章
- linux如何启动/停止/重启MySQL
如何启动/停止/重启MySQL 一.启动方式 1.使用 service 启动:service mysqld start2.使用 mysqld 脚本启动:/etc/inint.d/mysqld star ...
- Linux下启动,停止,重启Nginx、Mysql、PHP
LINUX启动Nginx的命令: 一.查询是否启动 [root@jiang php-fpm.d]# ps -ef | grep nginx root 25225 1 0 19:26 ? 00:00:0 ...
- Linux编辑启动停止重启springboot jar包脚本
springboot的配置文件中,配置文件的名字都有各自的意义跟用途 dev 开发环境 prod 生产环境(默认) test 测试环境 加载指定配置文件 --spring.profiles.activ ...
- Linux Systemd——在RHEL/CentOS 7中启动/停止/重启服务
RHEL/CentOS 7.0中一个最主要的改变,就是切换到了systemd.它用于替代红帽企业版Linux前任版本中的SysV和Upstart,对系统和服务进行管理.systemd兼容SysV和Li ...
- 在CentOS 7中启动/停止/重启服务
RHEL/CentOS 7.0中一个最主要的改变,就是切换到了systemd.它用于替代红帽企业版Linux前任版本中的SysV和Upstart,对系统和服务进行管理.systemd兼容SysV和Li ...
- (转) Linux安装启动FTP服务
Linux安装启动FTP服务 Linux服务器默认是没有开启FTP服务的.也没有FTP服务器,为了文件的传输需要用到FTP服务器,以典型的vsftpd为例.vsftpd作为FTP服务器,在Linux系 ...
- 批处理命令行CMD启动停止重启IIS的命令
原文:批处理命令行CMD启动停止重启IIS的命令 启动IIS: net start iisadmin (IIS的整个服务) net start w3svc (WWW网页WEB服务) ...
- MongoDB之二基础入门(window/linux安装启动)
mongodb中有三元素:数据库,集合,文档,其中“集合”就是对应关系数据库中的“表”,“文档”对应“行”. 一window安装与启动 一. 下载 上MongoDB官网 ,下载页面:https://w ...
- 【Docker】在Linux系统中安装Docker虚拟机、启动停止重启查看Docker命令
安装Docker 文章目录 安装Docker Docker虚拟机架构 在Linux系统中安装Docker虚拟机 管理Docker虚拟机 参考资料 Docker虚拟机架构 Docker创建的所有虚拟实例 ...
- linux下如何启动/停止/重启mysql:
一.启动方式1.使用linux命令service 启动:service mysqld start2.使用 mysqld 脚本启动:/etc/inint.d/mysqld start3.使用 safe_ ...
随机推荐
- linux c 出错集
2018.7.8 1.声明结构体时,结构体内部不能赋值.比如 struct student{ char id=0; char score=0; }; 这样大错特错! 2.字符数组 char a[10] ...
- java加密用到了BASE64Decoder时报错信息:Access restriction: The type BASE64Encoder is not accessible due to restrict
在Eclipse中编写Java代码时,用到了BASE64Decoder,import sun.misc.BASE64Decoder;可是Eclipse提示: Access restriction : ...
- [【转】ubuntu 16.10 Server 安装及基本部署
一.Ubuntu Server 16.10 LTS 系统安装 Ubuntu 16.10 分为 桌面版 (desktop)和服务器版(Server).两者对于用户而言,最大的区别在于桌面版有图形操作界面 ...
- IDA动态调试SO文件
1. 所需工具 IDA Pro 6.6. 安卓SDK工具 2. 模拟器设置 将ida所在目录的dbgsrv文件夹内的android_server文件push到模拟器中. 设置777属性 启动调试服务器 ...
- 「赛后补题」HBCPC2018题目代码与思路简析
这次比赛(2018年第二届河北省大学生程序设计竞赛)虽然没有打,但是题目还是要写的.未完成的题目(还差比较硬核的四题)和思路分析会陆续更新完. Problem A 2011 Mex Query /* ...
- P2384洛谷 最短路
题目描述 给定n个点的带权有向图,求从1到n的路径中边权之积最小的简单路径. 输入输出格式 输入格式: 第一行读入两个整数n,m,表示共n个点m条边. 接下来m行,每行三个正整数x,y,z,表示点x到 ...
- 目标检测之Faster-RCNN的pytorch代码详解(模型准备篇)
十月一的假期转眼就结束了,这个假期带女朋友到处玩了玩,虽然经济仿佛要陷入危机,不过没关系,要是吃不上饭就看书,吃精神粮食也不错,哈哈!开个玩笑,是要收收心好好干活了,继续写Faster-RCNN的代码 ...
- [Java-Idea]解决idea启动项目报错:Unable to open debugger port(127.0.0.1:53046):java.net.SocketException"socket closed
命令行窗口,执行命令:netstat -aon|findstr 9030 查找占用端口的进程 taskkill -f -pid 11331
- lintcode-60-搜索插入位置
60-搜索插入位置 给定一个排序数组和一个目标值,如果在数组中找到目标值则返回索引.如果没有,返回到它将会被按顺序插入的位置. 你可以假设在数组中无重复元素. 样例 [1,3,5,6],5 → 2 [ ...
- vs2017切换设计、拆分假死的解决
今天安装了vs2017版把vs2015卸载了,原因就是vs2015运行webform后ajaxpro总是会出现time out现象.太难受了,所以决定体验一下新版本. 安装了vs2017后ajaxpr ...