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_ ...
随机推荐
- java第二章 变量和运算符
Java 基础应用编程—— 变量和运算符 1.Java程序结构 数据类型:确定要存储在内存中的数据的类型. 变量:是存储数据的基本单元 2.变量的概念 变 ...
- PHP.42-TP框架商城应用实例-后台17-商品属性3-商品分类的修改与删除
商品分类的修改 1.改表单Goods/edit.html,加下拉框 2.因为商品属性修改涉及商品属性表goods_attr{id,attr_value,attr_id,goods_id}与属性表att ...
- 『AngularJS』理解$Scope
理解$Scope 执行概要 在AngularJS,一个子scope通常原型继承于它的父scope.应用于这个规则的表达式是一个使用scope:{...}的指令,这将创建一个『孤岛』scope(非原型继 ...
- python正则-字符串处理,主要用于处理请求参数格式为application/x-www-form-urlencoded的表单数据
#当提交的表单数据格式为application/x-www-form-urlencoded,直接从浏览器复制出来的格式是str_lin(chrome,也是最常见的)或者str_in2(火狐)这两种格式 ...
- Kotlin的Reified类型:怎样在函数内使用这一类型(KAD 14)
作者:Antonio Leiva 时间:Mar 2, 2017 原文链接:https://antonioleiva.com/reified-types-kotlin/ 对于Java开发者来说,最懊恼的 ...
- git安装后Gitbase闪退,gui无法使用问题解决
一般是因为null.sys导致,根本原因应该还是你装的盗版系统有问题,解决办法如下 cmd 打开命题提示符后 输入 sc start null 看 null.sys是否有问题,如果有问题,重新 ...
- python 基础篇03
本节主要内容:1. python基本数据类型回顾2. int----数字类型3. bool---布尔类型4. str--- 字符串类型一.python基本数据类型1. int ==> 整数. 主 ...
- CSP201509-1:数组分段
引言:CSP(http://www.cspro.org/lead/application/ccf/login.jsp)是由中国计算机学会(CCF)发起的“计算机职业资格认证”考试,针对计算机软件开发. ...
- python之*args和**kwargs参数,以及迭代器
*args让函数可以接受不限制多个位置参数,**kwargs让函数可以接受不限制多个关键字参数,用法如图 2.迭代器总结
- C/C++-左值、右值及引用
目录 1.左值and右值 2.引用 3.左值引用的用途 4.std::move和std::swap C和C++中定义了引用类型(reference type),存在左值引用(lvalue refere ...