有空看看_百度空间
 
文章列表
 
2011-02-12 14:49

log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
        '$status $body_bytes_sent "$http_referer" '
        '"$http_user_agent" "$http_x_forwarded_for" '
        'upstream_response_time $upstream_response_time ' 'msec $msec request_time $request_time - $upstream_cache_status';

 

access_log /var/ www /logs/access.log main

 
2010-07-20 23:46
一台dns cache 机器坏了,没有备机。临时用另一台dns cache来接管。

dns cahce用的是djbdns。

设置方法比较简单,
1. 绑定IP
ifconfig em0 add 192.168.1.15 netmask 255.255.255.255

2. 添加服务
dnscache-conf gdnscache gdnslog /usr/local/etc/dnscache15 192.168.1.15

ln -s /usr/local/etc/dnscache15 /var/service/dnscache15

dnsip `dnsqr ns . | awk '/answer:/ {print $5 ;}'` |sort > /usr/local/etc/dnscache15/root/serve
 
2010-05-13 10:03

FreeBSD安装很方便

# cd /usr/ports/net/vnstat/ && make install clean

# vnstat
Error: Unable to open database directory "/var/db/vnstat".
Make sure it exists and is at least read enabled for current user.
Exiting...

# mkdir /var/db/vnstat

# vnstat -u -i igb0
Error: Unable to read database "/var/db/vnstat/igb0".
Info: -> A new database has been created.

igb是网卡设备名

# vnstat
Databas

 
2009-11-24 09:37

国内魔兽一直不能正式上线,同事都已经转向台服。但目前国内到台服线路不畅,一到晚上就卡。

手上正好有几台香港服务器,应同事要求,架个socks代理,从香港联过去。

从使用效果来看,引同事一句话:速度不是很快,但胜在稳定。

安装

cd /usr/ports/net/socks5 && make install clean

vi /usr/local/etc/socks5.conf (文件不存在需要手工创建)
auth - - u
permit u - - - - -
set SOCKS5_NOIDENT
set SOCKS5_V4SUPPORT
set SOCKS5_PWDFILE /usr/local/etc/sock

 
2009-11-20 11:12

history -c # 清空历史记录

stat -f %N:%Sm -t %Y-%m-%d /root/.history #格式化输出文件属性

 
2009-11-06 19:14

制作CA证书

OS: Freebsd 6.4-RELEASE-p6
ports install openssl: OpenSSL 0.9.7e-p1 25 Oct 2004

cd /data/ca

# 生成CA key passwd:12345
openssl genrsa -des3 -out rootcakey.pem 2048


# 生成CA证书
openssl req -new -key rootcakey.pem -out rootcareq.pem

Enter pass phrase for rootca.key: (passwd:12345)
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is w

 
2009-09-28 23:54

类似 linux下的uptime ,查看系统已经跑了多久的命令

systeminfo |find "系统启动时间"

C:\>systeminfo |find "系统启动时间"
系统启动时间:     3 天 10 小时 0 分 30 秒


 
2009-08-02 22:35
maxthon 导出收藏为html形式文件,默认导出的文件名称bookmark.htm。

如果直接导入到firefox中会出现乱码,原因是firefox默认以UTF-8编码来导入导出书签为Html文件,默认的文件名是bookmarks.html。

因此需要转换一下,用下面的代码可实现,


#!/usr/bin/perl

#
# gb2312_utf8.pl
# @wuhuren.com
#

use strict;
use Encode;

my $add    = '<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
 
2009-07-08 10:59

zmtx-zmrx 可以用二进制模式传数据,比lrsz好使。

/usr/ports/comms/zmtx-zmrx

在secureCRT中可以直接传。

shell> zmrx

Starting zmodem transfer. Press Ctrl+C to cancel.
Transferring net.pm...
100%       6 KB    6 KB/s 00:00:01       0 Errors

以后可以不用sftp了。

 
2009-05-04 17:18

090504 6:51:05 [ERROR] /usr/local/mysql/libexec/mysqld: Out of memory (Needed 1676960 bytes)
090504 6:51:05 [ERROR] /usr/local/mysql/libexec/mysqld: Out of memory (Needed 1676960 bytes)
090504 6:51:05 [ERROR] /usr/local/mysql/libexec/mysqld: Out of memory (Needed 1676960 bytes)
090504 6:51:05 [ERROR] /usr/local/mysql/libexec/mysqld: Out of memory (Needed 1676960 bytes)
090504 6:51:05 [ERROR] /usr/local/mysql/libexec/mysqld: Out

 
     
 
 
个人档案
 
chinaw3

北京 海淀区 
 
   
 
文章分类
 
 
 
 
 
 
 
 
Php(1)
 
 
 
 
 
Ids(0)
 
Bind(2)
 
     
 
最新评论
 
     
 
最近访客
 
 

coldcool2009

yl002

robbinqian

shuai0379

220605080

shelingdan

cooc2000

18888887
     
 
订阅我的空间
 
已有人次访问本空间
 
订阅RSS  什么是RSS?

您也想拥有这样的空间?请点此申请。
     

帮助中心  |  空间客服  |  投诉中心  |  空间协议
©2012 Baidu