20170505

RAID级别

raid0 为带区阵列;
raid1 为镜像阵列
raid0+1 为四块磁盘实现的荣誉磁盘阵列;
raid5 至少三块,容量为(n-1)/n 广泛用于各种服务器:文件,数据库,web,邮件服务器

1.git回退到某个历史版本
1. 使用Git log命令查看所有的历史版本,获取某个历史版本的id,假设查到历史版本的id是139dcfaa558e3276b30b6b2e5cbbb9c00bbdca96。

2. 

[html] view plain copy
git reset --hard 139dcfaa558e3276b30b6b2e5cbbb9c00bbdca96 

3. 把修改推到远程服务器
[javascript] view plain copy
git push -f -u origin maste
因为pythonanywhere上没有 PostgreSQL,所以今天完成的无法在上面实现,但是我上传了,结果报错,所以回退回去了
当然发布更新:
command-line
$ git status
$ git add --all .
$ git status
$ git commit -m "Added views to create/edit blog post inside the site."
$ git push
Then, in a PythonAnywhere Bash console:
command-line
$ cd my-first-blog
$ git pull
[...]
2.Detailed installation guides
Want to edit, but don't see an edit button when logged in? Click here.
YUM Installation
PostgreSQL can be installed using RPMs (binary) or SRPMs (source) managed by YUM. This is available for the following Linux distributions (both 32- and 64-bit platforms; for the current release and prior release or two):
Fedora
Red Hat Enterprise Linux
CentOS
Scientific Linux
Oracle Enterprise Linux
See links from the main repository, http://yum.postgresql.org:
A list of available packages
Repository packages for different version combinations
Status of RPM builds
Contents [hide] 
1 Instructions
1.1 Configure your YUM repository
1.2 Install PGDG RPM file
1.3 Install PostgreSQL
1.4 Post-installation commands
1.4.1 Data Directory
1.4.2 Initialize
1.4.3 Startup
1.5 Control service
2 Removing
3 Support
4 After installation
Instructions

Configure your YUM repository
Locate and edit your distributions .repo file, located:
On Fedora: /etc/yum.repos.d/fedora.repo and /etc/yum.repos.d/fedora-updates.repo, [fedora] sections
On CentOS: /etc/yum.repos.d/CentOS-Base.repo, [base] and [updates] sections
On Red Hat: /etc/yum/pluginconf.d/rhnplugin.conf [main] section
To the section(s) identified above, you need to append a line (otherwise dependencies might resolve to the postgresql supplied by the base repository):
exclude=postgresql*
Install PGDG RPM file
A PGDG file is available for each distribution/architecture/database version combination. Browse https://yum.postgresql.org/repopackages.php and find your correct RPM. For example, to install PostgreSQL 9.6 on CentOS 7 64-bit: yum install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat96-9.6-3.noarch.rpm
Install PostgreSQL
To list available packages:
yum list postgresql*
For example, to install a basic PostgreSQL 9.6 server:
yum install postgresql96-server
Other packages can be installed according to your needs.
Post-installation commands
After installing the packages, a database needs to be initialized and configured.
In the commands below, the value of <name> will vary depending on the version of PostgreSQL used.
For PostgreSQL version 9.0 and above, the <name> includes the major.minor version of PostgreSQL, e.g., postgresql-9.4

Data Directory
The PostgreSQL data directory contains all of the data files for the database. The variable PGDATA is used to reference this directory.
The default data directory is:
/var/lib/pgsql/<name>/data
For example:
/var/lib/pgsql/9.6/data
Initialize
The first command (only needed once) is to initialize the database in PGDATA.
For Red Hat 6:
service <name> initdb
E.g. for version 9.6:
service postgresql-9.6 initdb
For Red Hat 7, and Fedora 23 and above:
If the previous command did not work, try directly calling the setup binary, located in a similar naming scheme:
/usr/pgsql-y.x/bin/postgresqlyx-setup initdb
E.g. for version 9.6:
/usr/pgsql-9.6/bin/postgresql96-setup initdb

Startup
If you want PostgreSQL to start automatically when the OS starts, do the following:
In RHEL 6 and PostgreSQL 9.6:
chkconfig postgresql-9.6 on
In RHEL 7+, and Fedora 23+ try:
systemctl enable postgresql-9.6.service
Control service
To control the database service, use:
for RHEL 5 and 6:
service <name> <command>
where <command> can be:
start : start the database
stop : stop the database
restart : stop/start the database; used to read changes to core configuration files
reload : reload pg_hba.conf file while keeping database running
E.g. to start version 9.6:
service postgresql-9.6 start

With RHEL 7.1+ and CentOS 7.1+, and Fedora 23+, systemd is introduced. Use this instead:
systemctl enable postgresql-9.6.service
systemctl start postgresql-9.6.service
Removing

To remove everything:
yum erase postgresql96*
or 
dnf remove postgresql96* for Fedora 23+.
Or remove individual packages as desired.
Support

Email: pgsql-pkg-yum@postgresql.org (requires subscription)
After installation
sudo su - postgres
Or the more modern form:

sudo -u postgres -i
Out of all the answers above nothing worked for me. I had to manually change the users password in the database and it suddenly worked.

psql -U postgres -d postgres -c "alter user produser with password 'produser';"
I used the following settings:

pg_hba.conf

local all all peer
# IPv4 local connections:
host all all 127.0.0.1/32 password 
# IPv6 local connections:
host all all ::1/128 password
Connection is successful finally for the following command:

psql -U produser -d dbname -h localhost -W 

这其中会出现用户找不到的问题,所以下面是解决方法
3.今天实现评论的功能,但是在本地!!!!

转载于:https://www.cnblogs.com/Jt00/p/7154947.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/400514.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

MVC4下配置log4net 五部曲

第一步&#xff1a;把log4net.dll 编译成Framework 4.0 第二步&#xff1a;找到项目的Properties下的AssemblyInfo。在最下面添加&#xff1a;[assembly: log4net.Config.XmlConfigurator(Watch true)]。 第三步&#xff1a;Web.config <configuration><configSectio…

算法,俄罗斯方块

炮姐的88行代码,亮瞎了..有待研究 #include <windows.h> #include <stdio.h> #include <time.h> #include <conio.h> #include <stdlib.h> char gcText[] " 1LJTSZ#"; struct tetris {int _pool[16][32], (*pool)[32], tmap[8][4][16…

利用D触发器和异或门实现两个IO解读电机编码器的计数值和方向

目录反转变正转正转变反转iPad Pro 2020 14.8.1 仿真软件&#xff1a;iCircuit 突发奇想&#xff0c;做个记录。应该可以用于诸如51单片机、Arduino或是电赛中可能用到的MSP430G2553这类外设十分稀缺的单片机上。一个想法&#xff0c;啊&#xff0c;不一定对。 黄色波形是编码…

TCP协议的三次握手和四次分手

HTTP连接 HTTP协议即超文本传送协议(Hypertext Transfer Protocol )&#xff0c;是Web联网的基础&#xff0c;也是手机联网常用的协议之一&#xff0c;HTTP协议是建立在TCP协议之上的一种应用。HTTP连接最显著的特点是客户端发送的每次请求都需要服务器回送响应&#xff0c;在请…

CountDownLatch线程同步辅助

2019独角兽企业重金招聘Python工程师标准>>> http://bughope.iteye.com/blog/2081935 在上一篇文章中写道用一个静态的变量保存线程的执行状态,并用时间等待的方法后来仔细考虑,其实是 线程不安全的.多个线程同时执行这个类时,这个静态变量的值就不能保证了. 用一个…

SQLServer链接服务器至Oracle

1. 我方服务器必须安装msdtc服务&#xff0c;并进行相应配置。 2. 我方服务器必须安装oracle client&#xff0c;这个要对应中心站oracle版本的客户端。 3. 我方服务器必须安装Oracle Services For Microsoft Transaction Server [版本] Oracle Provid…

【51单片机快速入门指南】3.1:配置外部中断触发方式和中断优先级

目录源码EXTI.cEXTI.hmain.c实验现象普中51-单核-A2 STC89C52 Keil uVision V5.29.0.0 PK51 Prof.Developers Kit Version:9.60.0.0 源码 stdint.h见【51单片机快速入门指南】1&#xff1a;基础知识和工程创建 中断知识见【51单片机快速入门指南】3&#xff1a;中断系统 将…

(转)工厂方法模式

转自&#xff1a;http://www.jellythink.com/archives/62 问题描述 之前讲到了C设计模式——简单工厂模式&#xff0c;由于简单工厂模式的局限性&#xff0c;比如&#xff1a;工厂现在能生产ProductA、ProductB和ProductC三种产品了&#xff0c;此时&#xff0c;需要增加生产Pr…

一种父线程阻塞等待子线程的有效方法

最近在做一个查询优化时&#xff0c;考虑到一次查询耗时较多&#xff0c;所以打算用多线程来做&#xff0c;之前是串行查询。比如一个用户查询触发50个线程&#xff0c;在只有一个用户的情况下&#xff0c;性能比串行查询确实提高了许多&#xff0c;但当多个用户同时触发查询的…

C语言利用循环队列实现滑动平均值滤波器,提高计算速度

目录源码Filter.cFilter.h使用效果普中51-单核-A2 STC89C52 Keil uVision V5.29.0.0 PK51 Prof.Developers Kit Version:9.60.0.0 串口示波器&#xff1a;Vofa 1.3.10 网上查到的滑动平均值滤波器在计算平均值的时候还要再for累加一遍&#xff0c;这太浪费时间了&#xff0c…

iOS 计算文字宽度的一个细节

设计师给到的图&#xff0c;经常是 “按钮的左边距离文字右边5px” 这样子的标注。于是我们需要计算文字的宽度。 有两种方法&#xff1a; 用 label 或 button 的 sizetofit 方法 [label sizeToFit]; NSLog("label size is %",[NSValue valueWithCGSize:label.boun…

Exchange Server 2013日记功能

9.6 日记9.6.1 日记功能为什么很重要首先&#xff0c;了解日记功能与存档功能之间的区别十分重要&#xff1a;首先&#xff0c;了解日记功能与存档功能之间的区别十分重要&#xff1a; “日记”可以记录组织中的所有通信&#xff08;包括电子邮件通信&#xff09;&#xff0c;以…

VB数据库经典实例总结(二)

大家先看一张似图非图的图、 我们先称它为“过程”也许有不对的地方&#xff0c;在我学数据库到这个阶段、到这个刚刚接触、初生牛犊不怕虎的阶段对它的理解是这样的、所有的都是这个过程、只是在这中间掺杂了一些知识点&#xff08;我们要掌握的&#xff09;针对有些个别的&am…

适用于单片机的FFT快速傅里叶变换算法,51单片机都能用

目录源码FFT.cFFT.h使用方法效果其他部分的代码main.c普中51-单核-A2 STC89C52 Keil uVision V5.29.0.0 PK51 Prof.Developers Kit Version:9.60.0.0 算法来自FFT算法的使用说明与C语言版实现源码 —— 原作者&#xff1a;吉帅虎 速度更快的版本见C语言实现的FFT与IFFT源代码…

第9课 - 函数重载分析(下)

第9课 - 函数重载分析&#xff08;下&#xff09; 1. 重载与指针 1.1 下面的函数指针将保存哪个函数的地址&#xff1f; 1.2 函数重载遇上函数指针 将重载函数名赋值给函数指针时&#xff1a; &#xff08;1&#xff09;根据重载规则挑选与函数指针参数列表一致的候选者 &#…

常见窗函数的C语言实现及其形状,适用于单片机、DSP作FFT运算

目录源码WindowFunction.cWindowFunction.h使用形状三角窗巴特利特窗巴特利特-汉宁窗布莱克曼窗布莱克曼-哈里斯窗博曼窗切比雪夫窗平顶窗高斯窗海明窗汉宁窗纳托尔窗Parzen窗矩形窗&#xff08;模拟&#xff09;效果无窗汉宁窗平顶窗平台&#xff1a;Windows 10 20H2 Visual …

cs

cs.yuneasy.cn 7989root yuneas123killall -9 caps cd capserver ./caps -cx转载于:https://www.cnblogs.com/bevis/p/3152633.html

.net Json JavaScriptSerializer JsonHelper类

结合.net 的JavaScriptSerializer 类实现Json数据处理 调用1&#xff1a; Model.Users m BLL.UsersBLL.GetUserById(Convert.ToInt32(id));string result "";if (m ! null)result JsonHelper.ObjectToJSON(m);context.Response.Write(result); 调用2&#xff…

C语言实现的FFT与IFFT源代码,不依赖特定平台

目录源码FFT.cFFT.h使用方法初始化输入数据FFT 快速傅里叶变换解算FFT结果使用python绘制FFT波形IFFT 快速傅里叶逆变换解算IFFT结果Windows 10 20H2 Visual Studio 2015 Python 3.8.12 (default, Oct 12 2021, 03:01:40) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on …

产品经理能力产品经理工作积累(3)

每日一贴,今天的内容关键字为产品经理能力 按职业司理的层次模型产品司理又可分工匠型,元帅型和老师型. (1). 工匠型 工匠型产品司理主要的代价在于:在某个专业领域里其技能的娴熟水平. (2). 元帅型 元帅型产品司理,可以在一个领域中带领一帮人来完成一个特定的项目.他的能力体…