摘要: 触发器(tigger)是一种由事物自动触发执行的特殊存储过程,这些事件可以是对一个表进行INSERT、UPDATE、DELETE等操作。 一、创建触发器 create [ constraint ] trigger name { before | after | instead of} { event 阅读全文
posted @ 2018-05-17 16:40 Mr-Lee-long 阅读(1517) 评论(0) 推荐(0) 编辑
摘要: 一、创建表 语法: create table table_name( col01_name data_type, col02_name data_type, col03_name data_type,); 1.1 创建表的时候可以指定主键: 1.2 如果使用复合主键,则需要使用约束字句的语法: co 阅读全文
posted @ 2018-05-17 15:56 Mr-Lee-long 阅读(660) 评论(0) 推荐(0) 编辑
摘要: 一、数据库逻辑结构介绍 数据库:应用连接到一个数据库时,一般不能访问其它数据库,除非使用dblink等其他手段。 表、索引:postgresql中标的术语为relation,其它数据库中成为table。 数据行:每张表有多行数据,postgresql中称为tuple,其它数据库称row。 注意:在p 阅读全文
posted @ 2018-05-17 15:09 Mr-Lee-long 阅读(814) 评论(0) 推荐(0) 编辑
摘要: 所有psql命令都以 \ 开头 一、使用psql -l查看有哪些数据库: 创建数据库的时候默认是hi从template克隆出来的。 \l 同psql -l \d 查看表 \c 连接数据库 psql -h <hostname or ip> -p <port> [数据库名称] [用户名称] 二、\d 2 阅读全文
posted @ 2018-05-17 13:45 Mr-Lee-long 阅读(801) 评论(0) 推荐(0) 编辑
摘要: 语句分类 SQL 命令一般分为三类:DQL、DML、DDL。 一、DDL语句。 1.1建表语句 CREATE TABLE table_name( col01_name data_type, col02_name data_type, ); 实例: \d 显示表 主键 创建表的时候可以指定主键prim 阅读全文
posted @ 2018-05-17 11:24 Mr-Lee-long 阅读(490) 评论(0) 推荐(0) 编辑
摘要: 前传: 1、CentOS 7.3.1611系统安装配置图解教程 http://www.jb51.net/os/RedHat/597874.html 2、CentOS服务器初始化设置 http://www.jb51.net/article/133839.htm 准备篇 一、防火墙配置 CentOS 7 阅读全文
posted @ 2018-04-19 17:07 Mr-Lee-long 阅读(308) 评论(0) 推荐(0) 编辑
摘要: 方法一、简单安装(通过yum) 1.安装epel-release rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm 2.安装PHP7的rpm源 rpm -Uvh https://m 阅读全文
posted @ 2018-04-19 16:25 Mr-Lee-long 阅读(229) 评论(0) 推荐(0) 编辑
摘要: SELinux:Secure Enhanced Linux,是美国国家安全局(NSA=The National Security Agency)和SCC(Secure Computing Courporation)开发的LInux的一个强制控制的安全模块。2000年以GNU GPL发布,Linux内 阅读全文
posted @ 2018-04-18 09:17 Mr-Lee-long 阅读(8423) 评论(0) 推荐(0) 编辑
摘要: dig命令是常用的域名查询工具,可以用来测试域名系统工作是否正常 语法 选项 参数 实例 阅读全文
posted @ 2018-04-17 10:47 Mr-Lee-long 阅读(31397) 评论(0) 推荐(1) 编辑
摘要: 一.kvm虚拟化环境搭建准备 1.硬件环境 kvm只能部署在物理机上面。 2.BIOS开启VT Virtualization Tech [Enabled] 3.查看cpu 是否支持kvm 全虚拟化 # grep "flags" /proc/cpuinfo|uniq flags : fpu vme d 阅读全文
posted @ 2018-04-16 10:37 Mr-Lee-long 阅读(7106) 评论(0) 推荐(0) 编辑