文章列表
 
2009-11-19 10:29

为了查着方便,随手贴一下:

HTTP/1.1状态代码及含义 


100 Continue 初始的请求已经接受,客户应当继续发送请求的其余部分。(HTTP 1.1新)
101 Switching Protocols 服务器将遵从客户的请求转换到另外一种协议(HTTP 1.1新)

 
2009-11-17 11:04

思路很清晰的东西,转自cu:

wildcard & regular expression
话说写在shell script里的东东,一旦是头头上添上了sha bang(#! /bin/bash),通通要经过shell层层剥开皮检查一番,这样以来,参数不再是原来的参数,而是被shell解析程序施加了7层过滤的参数(7 types of expansion),这让我们在传参数时,心里很不踏实。

这里一种办法,用于区分shell展开时对文件名的处理即pathname expansion与命令中参数中常用的正则表达式的处理RE matching。
Part-I: Wildcard
首先, wildcard 也是属于 command l

 
2009-11-11 11:00

对这玩意本来不是很熟,只能从操作系统的层面去解决这个问题:

必须说明的,cvs中默认一个用户checkout代码时候,会在当前模块下生成一个锁文件,如果这个用户对当前模块没有写权限,读是不可能的。配合上面的权限设置,必须改一下cvs服务器配置。改成不在当前模块目录下生成锁文件,把锁文件集中到一个所有用户都有读写权限的目录。修改配置文件CVSROOT/config:
# Put

 
2009-11-02 16:35
安装流程

lamp 环境简单,标准安装

值得注意的是要注意在安装mantis之前
先要改变mysql的编码方式为utf8
首先找到mysql的配置文件
即etc/mysql/my.cnf
然后vi etc/mysql/my.cnf

在my.cnf文件中的[client]段和 [mysqld]段加上以下两行内容:
[client]
default-character-set=utf8
[mysqld]
default-character-set=utf8

需要重启mysql服务
停用:
mysqladmin shutdown -u root -p
然后输入mysql的root用户的密码
启用:
mysqld_safe -user=mysql
 
2009-11-02 16:30
server端:
[root@localhost test]# cat /etc/rsyncd.conf
uid = nobody
gid = nobody
use chroot = no
list = false
ignore errors = yes
ignore nonreadable = yes
max connections = 50
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log
[test]
path = /home/oracle/test   需要增量备份的目录
uid = nobody
read only = true
auth users = oracle
secrets file = /etc/rsync_server.passwd
 
2009-09-21 19:08
一、bug症状和描述

症状:
当主机运行时间达198天或248天,cpu占用率就突然达到100%。此时操作系统命令可以执行,但Oracle的命令象lsnrctl、sqlplus、dbca等都会被hang住,不能执行。

Oracle官方对该bug的描述:
#-------------------------------------------------------------------------
# Interim Patch for Base Bugs: 4612267
#-------------------------------------------------------------------------
#
# DATE: Wed Oct 5 10:17:13 2005
# -------
 
2009-08-25 16:29
[xxx@localhost wunderbar_emporium]$ cat exploit.c
/* dedicated to my best friend in the whole world, Robin Price
the joke is in your hands

just too easy -- some nice library functions for reuse here though

credits to julien tinnes/tavis ormandy for the bug

may want to remove the __attribute__((regparm(3))) for 2.4 kernels,
I have no time to test

spender@www:~$ cat redhat_hehe
I bet Red Hat will wish they closed the SELinux vulnerability when
 
2009-08-25 14:04
一般root用户才能执行lsof命令,普通用户可以看见/usr/sbin/lsof命令,但是普通用户执行会显示“permission denied”

我总结一下lsof指令的用法:

lsof abc.txt 显示开启文件abc.txt的进程

lsof -i :22 知道22端口现在运行什么程序

lsof -c abc 显示abc进程现在打开的文件

lsof -g gid 显示归属gid的进程情况

lsof +d /usr/local/ 显示目录下被进程开启的文件

lsof +D /usr/local/ 同上,但是会搜索目录下的目录,时间较长

lsof -d 4 显示使用fd为4的进程
 
2009-08-17 9:41
貌似知道nginx有双机热备功能的人不是很多:
proxy_connect_timeout 3;
upstream  172.16.0.48  {
server   172.16.0.34:80 max_fails=2 fail_timeout=10s;
server   172.16.0.81:80 backup;
如上面配置,当34的服务10秒内出现2次错误,会自动切到81上面,延迟3秒。
 
2009-08-05 21:00

1.下载apache http://httpd.apache.org/
./configure \
--prefix=/usr/local/apache2 \
--enable-mods-shared=all \
--enable-rewrite \
--enable-ssl \
--enable-so

make
make install

2.下载jk
http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/linux/
改名为mod_jk放到$apache_home/modules目录

在$apach

 
   
 
 
文章分类
 
   
 
文章存档
 
     
 
最新文章评论
  

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