rsync -ab --backup-dir=/data/backup/随机目录 --suffix=后缀 ./ /tmp/django/
-b代表先备份,再同步
--backup-dir=/data/web/minggame/backup/随机目录 指定备份的目录,如果随机目录不存在,rsync会自动创建
--suffix=后缀指定备份文件名的后缀,因为前面有指定备份的目录,这个就没有必要了
Nginx根目录是/opt/www
假如
/opt/www/a/x
/opt/www/a/d/x
/opt/www/b/x
如果配置可以禁止访问所有的x目录?
找到了
location ~ ^(.*)\/\x\/{ deny all;}
默认情况下,sudo执行的命令都会记录到/var/log/secure,为方便分析,想让它记录到其他地方
visudo
在最后加入以下两行,保存退出
Defaults logfile=/var/log/sudo.log
Defaults !syslog
这样设置后,sudo的日志就会保存到/var/log/sudo.log
./configure时没有报错
/usr/bin/ld: cannot find -lz
vi config.log
搜索lz
可以看到如下错误
configure:19207: $? = 0
configure:19210: test -s conftest
configure:19213: $? = 0
configure:19226: result: yes
configure:19240: checking for deflate in -lz
configure:19270: gcc -o conftest -g -O2 conftest.c -lz -lpthread -lm >&5
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
configure:19276: $? = 1
configure: failed program was:
| /* confdefs.h. */
Google下checking for deflate in -lz,发现跟zlib有关
yum -y install zlib-devel
就可以正常make了
又一款Xen和KVM虚拟机管理工具:Convirture
产品主页:http://www.convirture.com/index.php
分企业版和开源版
主要特性
1.开源免费
2.多平台支持,能同时支持xen和vmware等虚拟机平台的管理
3.可以实现虚拟机服务器的控制,如打开、关闭、暂停、恢复等
4.可以灵活地对虚拟机服务资源进行配置
5.实时的数据监控、如CPU、内存、硬盘等;可以查看所有的服务器配置信息,快照功能
6.虚拟服务器可实现迁移
7.可以通过管理平台快速创建虚拟机系统、创建系统采用模板化配置管理
8.可以在管理平台上实现对虚拟机的桌面化管理
ConVirt 2.0 Open Source is the leading open source product for managing Xen and KVM, enabling you to standardize and proactively manage your virtualized environment in a centralized fashion. With ConVirt, you can create and provision "gold" images, diagnose performance problems, and balance load across the data center, all from a highly interactive Web based interface and with consistent feature set across open source virtualization platforms. As an open source product, ConVirt 2.0 Open Source is free to download and use. With a large user community and the commercial backing of Convirture, companies large and small use ConVirt as the strategic solution to their virtualization management needs.