1.新建一个没有家目录的用户openstack2.复制/etc/skel为/home/openstack3.改变/home/openstack及其内部的文件的属主,属组均为openstack4./home/openstack及其内部的文件,属组和其他用户没有任何访问权限[root@localhost~]#useradd-Mopenstack
[root@localhost~]#ls-l/home/op..
分类:
系统相关 时间:
2014-05-27 04:18:58
阅读次数:
523
开门见山,操作如下:首先,在前端nginx上需要做如下配置:location/{proxy_passhttp://test1;proxy_set_hearderhost$host;proxy_set_headerX-Real_IP$remoute_addr;proxy_set_header$proxy_add_x_forwarded_for;};nginx会在把请求转向后台real-server前把http报头中的ip地址进..
分类:
其他好文 时间:
2014-05-27 04:03:48
阅读次数:
321
#!/usr/bin/python
#-*-coding:utf-8-*-
importparamiko,os,datetime
server_ip=‘192.168.1.123‘
server_user=‘root‘
server_passwd=‘10241010‘
server_port=22
#local_dir=‘C:\Python27‘
#remote_dir=‘/soft2/nba/‘
defssh_connect():
ssh=paramiko.SSHClient()
ssh.set_missi..
分类:
编程语言 时间:
2014-05-27 03:51:40
阅读次数:
283
1.创建一个用户mandriva,其ID号为2002,基本组为distro(组ID为3003),附加组为linux[root@localhost~]#groupadd-g3003distro
[root@localhost~]#tail-1/etc/group
distro:x:3003:
[root@localhost~]#groupaddlinux
[root@localhost~]#tail-1/etc/group
linux:x:3004:[root@loca..
分类:
系统相关 时间:
2014-05-27 03:37:39
阅读次数:
409
题目链接:poj 2411 Mondriaan's Dream
题目大意:用1?2的木块填满n?m的矩阵有多少种方法。
解题思路:插头dp裸题。uva11270
#include
#include
typedef long long ll;
const int N = 13;
int n, m;
ll set, dp[N+5][(15];
void solve (int d,...
分类:
其他好文 时间:
2014-05-22 08:06:07
阅读次数:
177
开始一个新项目的时候,Build工程的时候一直报这个错误:控制台报错误:ConversiontoDalvikformatfailed:Unabletoexecutedex:methodIDnotin[0,0xffff]:65536看别人有说在project.properties里面加上dex.force.jumbo=true,尝试了一下,不成功,后来遍访名山高人,查各种资料,各种尝试,..
分类:
其他好文 时间:
2014-05-21 02:53:21
阅读次数:
331
linux下的vim文本编辑器的常用选项。vim(VisualinterfaceImproved)是vi编辑器的增强版,体积小但是功能强大,是linux系统使用最频繁的文本编辑器,所以学好vim也是学好linux必不可少的技能!vim的命令格式:vim[options][file..]eg:[root@localhost~]#vimhello.txt#用vim打..
分类:
系统相关 时间:
2014-05-21 01:35:18
阅读次数:
390
cdpr命令:安装:yum-yinstallcdpr(安装epel库)[21:53:07root@localhost~]#cdpr-h
cdpr-CiscoDiscoveryProtocolReporter
Version2.4
Copyright(c)2002-2010-MonkeyMental.com
d:Specifydevicetouse(eth0,hme0,etc.)
h:Printthisusage
t:timeinsecondstoabortwaitingforapack..
分类:
系统相关 时间:
2014-05-21 00:08:27
阅读次数:
447
1,安装依赖包确保服务器中已经安装了Memcached的依赖包。[root@localhost~]#yum-yinstall
--skip-brokengccgcc-c++autoconfautomakezlibzlib-devel
pcre-developenssl-devellibeventlibevent-devel.x86_642,创建Memcached的安装用户[root@localhost~]#groupadddfhapp
[root@l..
分类:
其他好文 时间:
2014-05-20 21:44:44
阅读次数:
376
1.HashSet内的对象无法remove:在Java中HashSet的底层的实现是通过Map来实现,将要保存的对象的hashcode值作为Key,使用一个dummy作为Value.在对象被放入Set之后,如果有操作改变影响该对象的hashcode的变量,会造成该对象无法被remove,因为remove时是通过hashcode来查找Set内的..
分类:
其他好文 时间:
2014-05-20 19:57:22
阅读次数:
294