Quantcast
Channel: 看得透又看得远者prevail. ppt.cc/flUmLx ppt.cc/fqtgqx ppt.cc/fZsXUx ppt.cc/fhWnZx ppt.cc/fnrkVx ppt.cc/f2CBVx
Viewing all 20528 articles
Browse latest View live

ip tunnel 做透明socks代理

$
0
0
做一个服务器分流,最初用iptables起一个DNAT和SNAT,直接可以做到,但是却拿不到请求方的ip地址,如果用squid可能太慢,而且是ssl连接,配置麻烦,后来准备做策略路由,用iptables做一个DNAT到openvpn,哪里知道openvpn过滤了这些包,超级郁闷弄了一天,没搞定,最后网管用ip tunnel搞定了,又学到东西了。。。
 on machine A
  498  iptunnel add tun1 mode ipip remote bbb.bbb.bbb.bbb local aaa.aaa.aaa.aaa
  499  ifconfig tun1 10.7.0.1
  501  route add 10.7.0.2 dev tun1
  504  ip route add default dev tun1 table tunnel
  505  ip rule add from 10.7.0.1 table tunnel
on machine B
  456  iptunnel add tun1 mode ipip remote aaa.aaa.aaa.aaa local bbb.bbb.bbb.bbb
  457  ifconfig tun1 10.7.0.2
  459  route add 10.7.0.1 dev tun1
  462  iptables -t nat -A PREROUTING -d bbb.bbb.bbb.bbb -p tcp -m tcp –dport 443 -j DNAT –to-destination 10.7.0.1
嘿嘿,拿到一台网通+电信双ip的机器,只做分流浪费了,看来可以拿来做点坏事了.

在vpn上面实现透明代理

$
0
0
以前,曾经在ip tunnel上面实现过:
http://briteming.blogspot.com/2017/09/ip-tunnel-socks.html

但是当时openvpn怎么设置都不行,今天有一台内网的机器需要这么搞透明代理,ip tunnel不管用了,只能用vpn来搞了。

先设置好openvpn
A(内网):
tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:10.8.0.6  P-t-P:10.8.0.5  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:183 errors:0 dropped:0 overruns:0 frame:0
          TX packets:134 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:27301 (26.6 KiB)  TX bytes:53300 (52.0 KiB)

B(外网):
tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:10.8.0.1  P-t-P:10.8.0.2  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:134 errors:0 dropped:0 overruns:0 frame:0
          TX packets:186 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:53300 (52.0 KiB)  TX bytes:27457 (26.8 KiB)

现在需要实现的是所有发到B的外网ip,80端口的包,都转发到A的80端口:
B机器上面,开打ip转发:
B> echo 1 > /proc/sys/net/ipv4/ip_forward
增加DNAT的iptable:
B> iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp –dport 80 -j DNAT –to-destination 10.8.0.6

在A机器上面,增加一个路由表vpntun,先看看/etc/iproute2/rt_tables 里面有什么路由表,然后在决定TABLE_ID,取值是 0 – 255,但是 0,253,254,255 都是系统保留的,不能用:
A> echo “200     vpntun” > /etc/iproute2/rt_tables
然后增加vpntun的默认路由,这里也可以指定via,不指定的话ip route 会自动去找。
A> ip route add default dev tun0 table vpntun
(((
或者指定via:
 ip route add default dev tun0 via 10.8.0.5 table vpntun
)))
最后把从本机outbound的包,也就是从 10.8.0.6 发出来的包,全部指定查找路由表vpntun
ip rule add from 10.8.0.6 table vpntun
这样子,从A的tun0出去的响应包,就会默认回到B的vpn上面,再回到请求的client机上面。
这样实现的代理,传过来的ip包就是原来客户端请求的ip包,服务器也能直接拿到客户端的ip,所以对服务器来说,是透明的代理,其实应该叫NAT更好了,说明白一点就是端口映射,嘿嘿。

asterisk 安装笔记

$
0
0
要搞asterisk了,用的是digium 的卡,所以要装dahdi驱动,debian下面安装过程:
1、安装内核源码
apt-get install linux-source-2.6.18
cd /usr/src
tar -xjf linux-source-2.6.18.tar.bz2
解压得到/usr/src/linux-source-2.6.18

2、源码连接到modules目录
cd /lib/modules/2.6.18-6-686
ln -s /usr/src/linux-source-2.6.18 build

3、进行配置和预编译
cd /usr/src/linux-source-2.6.18
vi Makefile
找到EXTRAVERSION 改为
EXTRAVERSION = -6-686
这个是 uname -r 显示的内核版本,里面的扩展字段,这个在后面安装的时候有点用吧,毕竟很多人的内核都是系统装好的,没有源代码的。
如果这里不修改,后面install的时候modules会安装在/lib/2.6.18/下面,虽然也能insert ,但是可能以后会有点问题啦,呵呵
make oldconfig
make prepare scripts
这步比较重要。。。因为用到genksyms等脚本,如果用
make prepare 或者 make prepare-all 都不会编译出来。。。这里搞得比较郁闷。。。

4、下载dahdi-linux-complete-2.1.0.4+2.1.0.2.tar.gz
解压,cd,
make all
make install
make config
然后配置好/etc/dahdi/*
/etc/init.d/dahdi start
启动,明天再搞配置文件.


Asterisk 安装笔记(2)- Zaptel 和 Dahdi 的配置

Zap Channel Module Configuration

The Zap channel module permits Asterisk to communicate with the Zaptel device driver, used to access Zaptel telephony interface cards. You configure Asterisk’s Zap channel module in the zapata.conf file.
Zap channel模块允许Asterisk与zaptel驱动程序之间通讯。通过配置zapata.conf文件实现
You will need the Zaptel kernel module device driver installed. See:
Although TDMoE is not directly related to Zapata hardware, it uses a pseudo-TDM engine, and gets configured here.

Using MySQL For Zap Channel Configuration

It is possible to store configuration settings for the Zap channel driver in a MySQL table, rather than editing the zapata.conf text file. You will have to compile a version of Asterisk with this support built in. See:
可以把zap channel而配置存储在mysql表中,而不是zapatap.conf中,这需要版本支持

The rest of this page assumes you are editing the zapata.conf file by hand.

Creating Channels

The format of the zapata.conf file is unfortunately not as simple as it could be. Most keywords do not do anything by themselves; they merely set up the parameters of any channel definitions that follow. The channel keyword actually creates the channel, using the settings specified before it. For example, you might create two channels like this:
zapata.conf文件,没有看上去那么复杂,大多数关键词自己不做什么,仅仅是定义通道参数,channel关键词才是真正的创建通道。
   signalling=fxo_ks
   language=en
   context=reception
   channel => 1
   signalling=fxo_ks
   language=fr
   context=sales
   channel => 2
This creates channel 1 with a default language code “en” and a context “reception”. Channel 2 has a default language code “fr” and context “sales”.
This is important, if you put something like echocancel=no before the channel definition, it will effect all channels unless you turn it on later with echocancel=yes. It progresses downward, but the definition must be above the channel=> statement.
非常重要的是,如果例如在通道前定义echocancel=no,会使影响所有通道,直到定义echocancel=yes,他会往下执行,因此,定义必须在channel=>前面进行定义

Available Settings

 

Signalling Type

The signalling type to use with your interface is the only mandatory setting. You must set a signalling type before allocating a channel. If you are connecting analog telephone equipment, note that analog phone signalling can be a source of some confusion. FXS channels are signalled with FXO signalling, and vice versa. Asterisk ‘talks’ to internal devices as the opposite side. An FXO interface card is signalled with FXS signalling by Asterisk, and should be configured as such.
信令类型是唯一强制设置,在分配一个通道之前,必须定义信令类型。如果连接的模拟电话设备,注意模拟信令是导致混乱的来源。FXS通道采用FXO信令,反之,Asterisk通知内部设备采用相反方式。FXO接口卡采用FXS信令,同样须定义。
signalling: Sets the channel signaling type. These parameters should match the Zaptel driver configuration. The setting to use depends partly on which interface card you have. Asterisk will fail to start if a channel signaling definition is incorrect or unworkable, if the statements do not match the Zaptel driver configuration, or if the device is not present or properly configured. The correct setting to use is almost certainly one of the following four: fxs_ks, fxo_ks, pri_cpe or pri_net. This setting has no default value; you must set a value before allocating a channel. Asterisk supports the following signalling types:
signalling:设置通道信令类型,这些参数须与zaptel驱动配置匹配。设置基于采用什么样的板卡,如果通道信令设置错误,如果配置描述与zaptel驱动配置不匹配,或者如果卡不存在而配置正确,Asterisk不会工作。正确的设置通常包含下面4中信令中一种,fxs_ks, fxo_ks, pri_cpe or pri_net。该设置没有缺省值,必须在分配通道前设置信令值,下面是Asterisk支持的信令类型。

  • em: E & M Immediate Start
  • em_w: E & M Wink Start
  • em_e1: E & M CAS signalling for E1 lines
  • featd: Feature Group D (The fake, Adtran style, DTMF)
  • featdmf_ta: Feature Group D (The real thing, MF (domestic, US)) through a Tandem Access point
  • fgccama Feature Group C-CAMA (DP DNIS, MF ANI)
  • fgccamamf Feature Group C-CAMA MF (MF DNIS, MF ANI)
  • featdmf: Feature Group D (The real thing, MF (domestic, US))
  • featb: Feature Group B (MF (domestic, US))
  • fxs_ls: FXS (Loop Start)
  • fxs_gs: FXS (Ground Start)
  • fxs_ks: FXS (Kewl Start)
  • fxo_ls: FXO (Loop Start)
  • fxo_gs: FXO (Ground Start)
  • fxo_ks: FXO (Kewl Start)
  • pri_cpe: PRI signalling, CPE side
  • pri_net: PRI signalling, Network side (for instance, side that provides the dialtone)
  • sf: SF (Inband Tone) Signalling
  • sf_w: SF Wink
  • sf_featd: SF Feature Group D (The fake, Adtran style, DTMF)
  • sf_featdmf: SF Feature Group D (The real thing, MF (domestic, US))
  • sf_featb: SF Feature Group B (MF (domestic, US))
  • e911: E911 (MF) style signalling. Originating switch goes off-hook, far-end winks, originating sends KP-911-ST, far-end gives answer supervision, Originating-end sends KP-0-ANI-ST
  • The following are used for Radio interfaces:
  • fxs_rx: Receive audio/COR on an FXS kewlstart interface (FXO at the channel bank)
  • fxs_tx: Transmit audio/PTT on an FXS loopstart interface (FXO at the channel bank)
  • fxo_rx: Receive audio/COR on an FXO loopstart interface (FXS at the channel bank)
  • fxo_tx: Transmit audio/PTT on an FXO groundstart interface (FXS at the channel bank)
  • em_rx: Receive audio/COR on an E&M interface (1-way)
  • em_tx: Transmit audio/PTT on an E&M interface (1-way)
  • em_txrx: Receive audio/COR AND Transmit audio/PTT on an E&M interface (2-way)
  • em_rxtx: same as em_txrx (for our dyslexic friends)
  • sf_rx: Receive audio/COR on an SF interface (1-way)
  • sf_tx: Transmit audio/PTT on an SF interface (1-way)
  • sf_txrx: Receive audio/COR AND Transmit audio/PTT on an SF interface (2-way)
  • sf_rxtx: same as sf_txrx (for our dyslexic friends)
PRI通道存在一个空闲Extension和一个微小闲置数字,只要闲置通道是空闲的,ZAP通道模块就会尝试在该通道上进行空闲拨号,然后Asterisk就会执行定义为idelext的Context和Extension中的命令。当通道需要进行语音呼叫时,’空闲’呼叫会断开并让多数通道有效。(当然尽管有微小闲置呼叫正在运行)。主要的用途是创建动态的服务,当闲置通道绑定了multilnk ppp协议后,将比传统的多重映射提供更有效率的提供综合的语音/数据服务。
minunused: The minimum number of unused channels available. If there are fewer channels available, Asterisk will not attempt to bundle any channels and give them to the data connection. Takes an integer.
minunused:最小可用闲置通道的数量。如果有很少的通道可用,Asterisk不会尝试捆绑任何通道进行数据连接。该参数需要一个整数。
minidle: The minimum number of idle channels to bundle for the data link. Asterisk will keep this number of channels open for data, rather than taking them back for voice channels when needed. Takes an integer.
minidle:最小绑定进行数据连接的通道数量,Asterisk会为数据开启这个通道数量,而不是在需要的时候返回到语音通道的使用上。该参数需要一个整数。

idledial: The number to dial as the idle number. This is typically the number to dial a Remote Access Server (RAS). Channels being idled for data will be sent to this extension. Takes an integer that does not conflict with any other extension in the Dialplan, and has been defined as an idleext.
idledial: 空闲拨号的数量,这是用于拨叫远程访问服务器最基本的一个数字,为数据预留的闲置通道被这个分机。该参数需要一个整数,与在拨号方案中定义了idleext的分机不会产生冲突。
idleext: The extension to use as the idle extension. Takes a value in the form of exten@context. Typically, the extension would be an extension to run the ZapRAS command.
idleext:用于空闲分机的extension,以exten@context的用法使用,典型的用法是被作为分机运行ZapRAS命令。
  minunused=2
  minidle=1
  idledial=6999
  idleext=6999@idle
 

Analog Trunk Features (模拟中继特征)

usedistinctiveringdetection: Whether or not to attempt to recognize distinctive ring styles on incoming calls. This does not require audio analyisis because rings are simple transitions of the analog line. It’s merely a matter of matching the transition pattern.
usedistinctiveringdetection:是否尝试识别来电特殊铃音,这不需要音频分析,因为铃音在模拟线路上是非常简单转换,只需要匹配转换样本。缺省值:no
Default: no.
   usedistinctiveringdetection=yes
dring1, dring2, dring3: If you set usedistinctiveringdetection=yes, then you may define up to three different distinctive ring styles for Asterisk to attempt to recognize. Each style is defined as a comma separated list of up to three integers. Nobody has yet documented what these numbers mean, so you’re on your own when it comes to trying to figure out what numbers to use for the distinctive ring syles used by your phone company in your country. But the tip is to use the Asterisk console in verbose mode, and apparently it reports numbers describing the ring patterns it sees. These patterns may be a starting point:
dring1, dring2, dring3:如果设置了usedistinctiveringdetection=yes,就需要定义三种不同特点的铃音风格,以便于Asterisk能够尝试识别。每种风格使用逗号分割三个整数来定义。没有文档说明三个数字的含义,因此需要自己测试鉴别在不同国家不同公司中,不同数字代表的风格。Asterisk控制台上也会显示识别的风格数字,具体风格可能会是以下一些情况。
   dring1=96,0,0
   dring2=325,95,0
   dring3=367,0,0
dring1context, dring2context, dring3context: Along with setting up to three distinctive ring patterns with dring1, dring2 and dring3, you also set corresponding contexts for incoming calls matching those distinctive ring patterns to jump into. If an incoming call does not match any of the distinctive ring patterns defined, then of course it will enter Asterisk with the default context defined for this channel.
dring1context, dring2context, dring3context:根据三种不同的铃音风格设置不同的context进行来电跳转,如果来电没有定义的风格匹配,就会进入该通道缺省的congtext。
   dring1context=line2incoming
   dring2context=business
   dring3context=chocolate
busydetect: If enabled, Asterisk will analyze the audio coming in on the line during a call or a dial attempt to attempt to recognize busy signals. This is useful on analog trunk interfaces both to detect a busy signal when dialing out, and for detecting when the person has hung up. See also Disconnect Supervision. Be sure that you don’t use this on digital interfaces like QuadBri cards and so on. Otherwise you will run in “broken calls” problems. default=no
busydetect:忙音检测,如果开启,Asterisk会拨号尝试或通话中分析在线的音频,从而尝试识别忙音信号。这非常在模拟中继接口上外呼时检测忙音信号非常有用,可以检测何时挂机。确认不能在例如QuadBri等卡上使用该参数,否则出现中断通话的问题,缺省值:no
  busydetect=yes
busycount: This option requires busydetect=yes. You can specify how many busy tones to wait before hanging up. The default is 3, but better results can be achieved if set to 6 or even 8. The higher the number, the more time is needed to detect a disconnected channel, but the lower the probability mistaking some other sound as being a busy tone.
  busycount=5
busycount:这个选项需要busydetect=yes,可以定义等待挂机的忙音信号数量,缺省值是3,但能达到的最好效果可能是设置6或者8,数字越高,检测挂机通道所需要的时间就越长,但小的数字可能会导致把其他声音错误的识别为忙音信号。

callprogress: Asterisk can attempt to monitor the state of the call to listen for a ringing tone, busy tone, congestion tone, and sounds indicating that the line has been answered. It appears that this feature is independent of the busydetect feature; it seems that both can run in parallel, and both will independently attempt to recognize a busy tone. The callprogress feature is highly experimental and can easily detect false answers, so don’t count on it being very accurate. Also, it is currently configured only for standard U.S. phone tones. Default: no.
callprogress:Asterisk可以通过尝试监控呼叫状态来侦听振铃音,忙音,拥塞音以及线路已经应答声音特征。这个特征不受busydetect特征影响,两者可以并行处理,独自尝试识别忙音信号。callprogress的特征是高实验证明更容易检测错误应答,所以不要指望它非常准确。因此,目前仅仅在标准美国电话铃音中配置,缺省值:no
  callprogress = yes
pulse: The standard installation of Asterisk does not permit you to specify that a Zaptel device use pulse dialing, even though the Zaptel driver supports pulse dialing. But you can apply a patch file to enable you to specify pulse dialing with the pulse keyword. See Pulse Dialing on Zap Channels for the patch.
pulse:Asterisk标准安装中,没有允许定义Zaptel卡使用脉冲拨号,尽管Zaptel驱动支持脉冲拨号,但可以更新补丁文件,使用pulse关键字去开启脉冲拨号。
   pulse=yes

Analog Handset Features 模拟电话特征

adsi: If your handset has ADSI (Analog Display Services Interface) capability, set set adsi=yes. The ADSI specification is system similar to Caller ID to pass encoded information to an analog handset. It allows the creation of interactive visual menus on a multiline display, offering access to services such as voicemail through a text interface.
adsi:如果手持设备支持ADSI(模拟显示服务接口),设置set adsi=yes,ADSI类似来电显示功能,传递编码信息到手持设备。它可以在多行显示的手持设备上创建交互式可视化菜单,通过文本接口提供类似语音邮件的访问服务。

immediate: Normally (i.e. with immediate set to ‘no’, the default), when you lift an FXS handset, the Zaptel driver provides you a dialtone and listens for digits that you dial, passing them on to Asterisk. Asterisk waits until the number you’ve dialed matches an extension, and then begins executing the first command on the matching extension. If you set immediate=yes, then Asterisk will instruct the Zaptel driver to not generate a dialtone when you lift a handset, instead passing control immediately to Asterisk. Asterisk will start executing the commands for this channel’s “s” extension. This is sometimes referred to as “batphone mode”. Default: no.
immediate:通常(immediate设置为no,缺省值),当FXS话机挂机时,Zaptel驱动会马上提供拨号音,等待拨号并传递给Asterisk。Asterisk等到接收到extension匹配号码时,就会开始执行相应的命令,如果设置 immediate=yes,Asterisk会命令Zaptel驱动不要在FXS挂机时产生拨号音,而是把控制权交还给Asterisk,Asterisk会开始执行这个通道的s extension。这通常应用于batphone 模式(蝙蝠电话?),缺省No
   immediate=yes
callwaiting: If enabled, Asterisk will generate “call waiting pips” when you are already in a conversation on your FXS handset when someone tries to call you. If the channel has call waiting by default, you can temporarily disable it by lifting the handset and dialing *70, whereupon you will get a dialrecall tone and may then dial the intended number. There is no corresponding way to temporarily enable call waiting for channels that have it off by default. Default: no.
callwaiting:如果开启,在通话过程中如果有来电时,Asterisk就会产生呼叫等待提示音。如果通道缺省有呼叫等待,可以临时摘机按键*70取消,这种情况下,会收到重播提示音去拨打希望拨打的号码。没有合适的方法临时开启缺省设置为关闭的通道的呼叫等待。缺省为no
   callwaiting=yes
callwaitingcallerid: Sets whether Asterisk will send Caller ID data to the handset during call waiting indication. Requires also setting callwaiting=yes. Default: no.
callwaitingcallerid:设置在呼叫等待过程中是否传送主叫号码等数据,需要设置callwaiting=yes,缺省值:no
   callwaitingcallerid=yes
threewaycalling: If enabled, you can place a call on hold by pressing a hook flash, whereupon you get a dialrecall tone and can make another call. Default: no.
threewaycalling:(三方通话)如果设置开启,可以在按保持键切换话路,让原通话处于保持状态,这时会收到重拨提示音,并开启另外一方通话。缺省值:no
   threewaycalling=yes
transfer: This option has effect only when threewaycalling=yes. If threewaycalling=yes and transfer=yes, then once you’ve placed a call on hold with a hook flash, you can transfer that call to another extension by dialing the extension and hanging up. Default: no.
transfer:(呼叫转接)这个选项仅当三方通话=yes时有效,当设置了三方通话和呼叫转接,一旦通过或呼叫保持按键把当前话路置于保持状态,就可以拨号呼叫另外分机,把2个话路桥接起来,然后挂机。缺省值:no
   transfer=yes
cancallforward: If enabled, you may activate “call forwarding immediate” by dialing *72 (whereupon you get a dialrecall tone) followed by the extension number you wish to forward your calls to. If someone dials your extension, the call will be redirected to the forwarding number. You may disable the call forwarding by dialing *73. Default: no.
cancallforward:如果呼叫前转启用,可以通过拨号*72+想要转向的Extension,立刻激活呼叫前转(同时会有重拨提示音),这时如果有来话,那么呼叫会被重定向到设置的转移号码上,可以通过拨打*73取消呼叫前转。缺省值:no
   cancallforward=yes
callreturn: If enabled, you may dial *69 to have Asterisk read to you the caller ID of the last person to call. You will hear the dialrecall tone if there is no record of a last caller. Default: no.
callreturn:如果开启此设置,可以通过拨打*69让Asterisk读出最后呼入的主叫号码,如果没有记录最后呼叫主叫号码,将听到重拨提示音,缺省值:no
   callreturn=yes
callgroup: A channel may belong to zero or more callgroups. Callgroups specify who may answer this phone when it is ringing. If this channel is ringing, then any other channel whose pickupgroups include one of this channel’s callgroups may answer the call by dialing *8#. This feature is supported by Zap, SIP, Skinny and MGCP channels. Group numbers can range from 0 to 31. The default value is an empty string, i.e. no groups.
callgroup:通道可以不属于或者属于多个呼叫群组。呼叫群组定义了当电话振铃时,谁可以接听。当一个通道振铃时,其它那些pickupgroups中包含该通道callgroups其中之一的通道可以通过按*8#来接听电话。这个特性支持在ZAP,SIP。skinny和MGCP通道类型上使用,群组数字范围为0-31,,缺省值是空字符串,即没有组。
  group=1
  callgroup=1,2,3
pickupgroup: A channel may belong to zero or more pickupgroups. Pickupgroups specify whose phones you may answer. If another channel is ringing, and this channel’s pickupgroups include one of the ringing channel’s callgroups, then this channel may answer the call by dialing *8#. Group numbers can range from 0 to 31. The default value is an empty string, i.e. no groups.
pickupgroup:通道可以不属于或者属于多个摘机群组,摘机群组定义了可以应答那些电话。如果其他通道振铃,而本通道pickupgroup是振铃通道callgroups群组其中之一,那么本通道可以通过按*8#来接听振铃通道。群组范围为0-31,缺省值为空字符串,即没有群组。
  group=1
See more about Channels and Groups
If you dial *8# when there is more than one channel whose calls you are eligible to answer, then it just answers the “first ringing channel”, i.e. you have no control which one you pick up.
如果同时不止一路通道振铃符合条件可以通过按键*8#接听,只能接听第一条振铃通道,即不能控制选择接听哪一条。
  pickupgroup=3,4
useincomingcalleridonzaptransfer: If you set this option (Use Incoming Caller ID On Zap Transfer) to ‘yes’, then when you transfer a call to another phone, the original caller’s Caller ID will get forwarded on too. Default: no.
useincomingcalleridonzaptransfer:如果设置了这个选项(在ZAP通道上启用来电转接),可以转接来电到另外一个电话,外部呼叫的主叫号码同时跟随。
   useincomingcalleridonzaptransfer=yes

Caller ID Options

callerid: Sets the Caller ID string to forward to the recipient when calls come in from this channel. You normally use this to set the Caller ID for handsets. Specify the Caller ID name in double quotation marks, followed by the Caller ID number in <> symbols. For trunk lines, set to “asreceived” to pass the received Caller ID forward.
callerid:当来电时设置主叫ID字符串,传送给接收者,通常为手持设备设置callerID。定义callerid:双引号名字后紧跟角括号数字,对中继线路,设置asreceived来传送主叫ID。
  callerid=”Mark Spencer” <256 428-6000>
  callerid=
  callerid=asreceived
Important Note: Caller ID can only be transmitted to the public phone network with supported hardware, such as a PRI. It is not possible to set external caller ID on analog lines.
重要事项:CallerID只能在硬件支持的公共电话交换网上被传输,例如PRI。在模拟线路上设置外部CallerID是不可能的。
usecallerid: For handsets, this option will cause Asterisk to send Caller ID data to the handset when ringing it. For trunk lines, this option causes Asterisk to look for Caller ID on incoming calls. Default: yes.
usecallerid:对于手持设备,这个选项可以在振铃时让Asterisk发送CallerID数据到到手持设备,对于中继线路,该选项致使Asterisk查找来电主叫ID,缺省值:yes
   usecallerid=no
hidecallerid: (Not for FXO trunk lines) For PRI channels, this will stop the sending of Caller ID on outgoing calls. For FXS handsets, this will stop Asterisk from sending this channel’s Caller ID information to the called party when you make a call using this handset. FXS handset users may enable or disable sending of their Caller ID for the current call only by lifting the handset and dialing *82 (enable) or *67 (disable); you will then get a “dialrecall” tone whereupon you can dial the number of the extension you wish to contact. Default: no.
hidecallerid:主叫ID隐藏(不能应用于FXO中继线路),对于PRI通道,在外呼时停止传送主叫ID。对于FXS端外呼时,会停止发送主叫ID信息到被叫方。FXS端可以在话机上按*82(启用)*67(关闭)可以控制是否传送主叫ID传送。
   hidecallerid=yes
restrictcid: (PRI channels only) This option has effect only when hidecallerid=no. If hidecallerid=no and restrictcid=yes, Asterisk will prevent the sending of the Caller ID data as a presentation number when making outgoing calls (ANI data is still sent). Default: no.
restrictcid:(仅用于PRI通道),该选项在hidecallerid=no时可以有效设置,如果hidecallerd=no并且restrictcid=yes,外呼时,asterisk会阻止以显示号码方式发送主叫id,但ANI消息数据仍然发送),缺省为no
   restrictcid=yes
usecallingpres: (PRI channels only) Whether or not to use the Caller ID presentation for the outgoing call that the calling switch is sending. See also the CallingPres command. Read more in this discussion from 2003.
usecallingpres:(仅PRI通道有效)不管是否把callerid作为外呼的显示号码,交换机都会传送。
   usecallingpres=no

Audio Quality Tuning Options (音频质量调整选项)

These options adjust certain parameters of Asterisk that affect the audio quality of Zapata channels. See also:
relaxdtmf: If you are having trouble with DTMF detection, you can relax the DTMF detection parameters. Relaxing them may make the DTMF detector more likely to have “talkoff” where DTMF is detected when it shouldn’t be. Default: no.
relaxdtmf:如果DTMF检测有问题,可以放宽DTMF检测的参数。
   relaxdtmf=yes
echocancel: Disable or enable echo cancellation (default is ‘yes’). It is recommended that you do not turn this off. You may specify echocancel as ‘yes’ (128 taps), ‘no’ (0 taps, disabled), or a preset number of taps which are one of 16, 32, 64, 128, or 256. Each tap is one sample from the data stream, so on a T1 this will be 1/8000 of a second. Accordingly the number of taps equate to a 2ms, 4ms, 8ms, 16ms or 32ms tail length. Beware that if you set echocancel to a different value, Asterisk will fall back to the default of 128 taps without warning.
echocancel:开启或关闭回音消除(缺省值:是),建议不要关闭该设置,可以定义回音消除yes(128滤波参数)或者no(0滤波),或者定义参数为16,32,64,128,256中一个,每种滤波参数都是一种数据流样本,在T1线路上会是每秒1/8000,因此滤波参数值等于2ms,4ms,8ms,16ms,32ms尾长,如果设置的回音消除为不同的值,Asterisk将直接使用128而不会警告。
   echocancel=no
echocancelwhenbridged: Enables or disables echo cancellation during a bridged TDM call. In principle, TDM bridged calls should not require echo cancellation, but often times audio performance is improved with this option enabled. Default: no.
echocancelwhenbridged:开启或关闭在桥接的TDM呼叫中的回音消除,原则:TDM桥接呼叫不需要回音消除,但开启这个选项通常可以提高语音效果。
   echocancelwhenbridged=yes
echotraining: In some cases, the echo canceller doesn’t train quickly enough and there is echo at the beginning of the call which then quickly fades out. Enabling echo training will cause Asterisk to briefly mute the channel, send an impulse, and use the impulse response to pre-train the echo canceller so it can start out with a much closer idea of the actual echo. However, the characteristics of some trunks may change as the endpoints become connected and, if there is a considerable delay between the circuit being ‘up’ and the endpoints being finalised, the training impulse may measure the characteristics of the open trunk rather than the completed circuit. Accordingly you may either specify a value between 10ms and 4000ms to delay before starting the impulse response process or ‘yes’, which equates to 400ms. Default: undefined.
echotraining:有时回音消除不能够很快的自学习,通话开始时会有回音,然后很快消除。开启回音训练可以让Asterisk使通道暂时无声而发送一个刺激信号,并根据响应效果预训练回音消除,从而能够更接近真实的回音。然而如果在电路up和终端响应定位之间有相当的延时,某些典型中继被会作为终端进行连接,训练刺激信号会检测open中继的特性而不是实际电路。因此,在开始响应刺激信号处理之前,可以在10ms和4000ms延时之间定义一个值,或者定义yes,缺省就是400ms。默认值没有定义。
   echotraining=no
rxgain: Adjusts receive gain. This is the audio recieved by Asterisk from the device. E.g: in a phone connected to a FXS channel, this would control the audio that is sent from the phone to Asterisk. This can be used to raise or lower the incoming volume to compensate for hardware differences. You specify gain as a decimal number from -100 to 100 representing dB. 10 is significantly high. Change these options by only a few dB at a time. Default value: 0.0
rxgain:调整接收获取强度值,这是指Asterisk从例如连接到FXS通道上的电话设备上接收到的音频,该选项能控制由电话发送给Asterisk的音频,可以用于提高或降低进入的声音音量,从而补偿硬件损耗。可以定义获得值从-100db到100db,10db就意味着很高了。修改时应进行微调。
   rxgain=4.2
txgain: Adjusts transmit gain. This is the audio transmitted by Asterisk to the device. E.g: in a phone connected to a FXS device this would control the audio that is heard in the handset. This can be used to raise or lower the outgoing volume to compensate for hardware differences. Takes the same type of argument as rxgain. Default: 0.0
txgain:调整传出强度值,这是指由Asterisk发送给连接到FXS上的电话等设备的音频,Asterisk可以控制音频音量传送给手持设备端收听。这用于提高或降低外呼音量从而降低设备损耗。使用方法参数雷同fxgain,缺省值为0.0
   txgain=-10.2
See: Asterisk zapata gain adjustment

Call Logging Options

Asterisk normally generates Call Detail Records (CDR), being a log or database of the calls made through Asterisk. This data can be used for Automated Machine Accounting (AMA). See Asterisk Billing.
Asterisk通常会产生详单记录,记录是由Asterisk呼叫产生的,以日志或数据库存储。通话详单记录可以用作自动记账AMA。
accountcode: Sets the data for the “account code” field in the CDR for calls placed from this channel. The account code may be any alphanumeric string. It may be overridden at call time with the Asterisk cmd SetAccount|SetAccount command.
accountcode:设置通话详单中account code字段的数据,用于通道呼叫处理。计费代码可以是数字和文字字符串,可能在呼叫时被Asterisk命令setaccount重置。
  accountcode=spencer145
amaflags: Sets the AMA flags, affecting the categorization of entries in the call detail records. Possible values are:
amaflags:设置AMA自动记账标记,影响通话详单中的分类条目。
  • default: Let the CDR system use its default value.  (CDR采用缺省值)
  • omit: Do not record calls.  (不记录)
  • billing: Mark the entry for billing (产生记账条目)
  • documentation: Mark the entry for documentation. (标记条目文档)
  amaflags=billing

Timing Parameters (定时参数)

These keywords are used only with (non-PRI) T1 lines. All values are in milliseconds. These do not need to be set in most configurations, as the defaults work with most hardware. It has been noted that the common Adtran Atlas uses long winks of about 300 milliseconds, and channels from them should be configured accordingly.
这个关键字仅用于T1线路,不包含pri。
prewink: Sets the pre-wink timing.
preflash: Sets the pre-flash timing.
wink: Sets the wink timing.
rxwink: Sets the receive wink timing.
rxflash: Sets the receive flash timing.
flash: Sets the flash timing.
start: Sets the start timing.
debounce: Sets the debounce timing. “The debounce settings in the Asterisk configuration affects how Asterisk
handles hookswitch transitions on its FXO/FXS interfaces.” — Derek Bruce
  rxwink=300
  prewink=20~~

Other Features

mailbox: If this option is defined for a channel, then when the handset is lifted, Asterisk will check the voicemail mailbox(es) specified here for new (unheard) messages. If there are any unheard messages in any of the mailboxes, Asterisk will use a stutter dialtone rather than the ordinary dialtone. On supported hardware, the message waiting light will also be activated — this probably requires that you also set adsi=yes. Update: This option does NOT require ADSI. It will send a standard FSK tone down the line that lights up the MWI on any capable analog phone.
mailbox:这个选项为通道定义的。当摘机时,Asterisk会检测语音邮箱中未读的邮件。如果有未读邮件,Asterisk会有摘机警告音而不是通常的拨号音。在支持的硬件上,等待消息同样激活,这需要设置adsi=yes。这个选项不需要ADSI支持,它会发送一个标准的频移键控提示音(也称为移频调制和移频信号)来挂掉支持WMI(消息等待支持)的模拟线路。

The parameters to this option are one or more comma-separated mailbox numbers, as defined in voicemail.conf.
   mailbox = 1234
   mailbox = 1,2
For each mailbox, if the mailbox is in a context other than “default”, place the context after the mailbox number
separated by an at sign (@).
如果语音邮件不是在default而是在context,按照mailbox@context的格式
   mailbox = 1234@office
   mailbox = 12@office,34@home
group: Allows you to group together a number of channels so that the Dial command will treat the group as a single channel. When Dial tries to make a call on a Zap group, the Zap channel module will use the first available (i.e. non-busy) channel in the group for the call. Multiple group memberships may be specified with commas, and to signify no group membership, the portion after the equals sign may be omitted. Group numbers can range from 0 to 31. The default value is an empty string, i.e. no groups.
group:允许把多个通道组成一组,Dial命令拨号的时候把群组视为一个单一通道。当Dial试图在ZAP组上拨号时,Zap通道模块使用组中第一个可用通道。多群组关系可以通过逗号来定义,等号后面省略表示没有群组。群组范围从0-31,缺省值时空字符串,即没有群组。
   group=1
   group=2,3
   group=
See more about Channels and Groups
language: Each channel has a default language code that affects which language version of prerecorded sounds Asterisk uses for this channel. See Setting up a Multi-Language Asterisk Installation. The default is an empty string.
language:每个通道有一个缺省的语言编码,这是由预先录制声音的语言版本来定义的
   language=en
progzone: This defines the timing and frequencies for call progress detection, which are buried in the sources in asterisk/dsp.c. This is DIFFERENT than the call progress timing defined in zaptel/zonedata.c and in /etc/asterisk/indications.conf, and so far only options you can use (defined in dsp.c) are us, ca, br, cr and uk. (This was added sometime between 1.0.9 stable and 1.2 beta). Default is: us
progzone:该选项为呼叫处理检测(在asterisk/dsp.c源代码中)定义了时间和频率,这与在zaptel/zonedata.c和/etc/asterisk/indications.conf中的定时呼叫处理不同。到目前为止该参数只能是:us,ca,br,uk,缺省是us

Important Stuff

context: This specifies which context a call will start in. The context controls how Asterisk will handle the call. Contexts are defined in the Dialplan. Default: “default”.
context:定义了呼叫开始的context,context控制Asterisk如何处理呼叫。Context在dialplan中定义,缺省为”default”
   context=internal
channel: This keyword is unlike all the other keywords in this configuration file, because where all the other keywords merely specify settings to use, this keyword causes Asterisk to actually allocate a channel with the settings that have been specified earlier in the file.
channel:这个关键字与配置文件中的其他关键字不同。原因是其他关键字仅仅定义设置来使用,这个关键字可以使Asterisk把前面定义的设置分配到通道中。
The channel keyword defines one or more channels. Each channel definition will inherit all options stated ahead of it in this file. Channels maybe specified individually, separated by commas, or as a range separated by a hyphen. Allocating a channel will not “clear” the settings, so any channels defined later on in this file will inherit the options for this channel unless you override settings.
通道关键字定义一个或多个通道,每行通道定义都会继承前面所有的选项配置状态。通道可以通过逗号分离单独定义,或者用连接符连接一组,分配通道不会清空设置,所以任何在后面定义的通道都会继承前面的选项除非覆盖设置。
   channel => 16
   channel => 2,3
   channel => 1-8 


安装好 dahdi之后,make config就会生成默认的配置文件
/etc/dahdi/init.conf
init.d自动启动脚本的配置,一般不需要改,以前是放在/etc/sysconfig下面的

/etc/dahdi/modules
需要加载的modules,看你的板卡型号,把不需要的注释掉
我的是TE410P,使用 wct4xxp
# Digium TE205P/TE207P/TE210P/TE212P: PCI dual-port T1/E1/J1
# Digium TE405P/TE407P/TE410P/TE412P: PCI quad-port T1/E1/J1
# Digium TE220: PCI-Express dual-port T1/E1/J1
# Digium TE420: PCI-Express quad-port T1/E1/J1
wct4xxp

/etc/dahdi/system.conf
最重要的配置文件,里面参数很多,基本都有注释,很清楚的了。
下面是我的情况,一条E1连接到该卡#1端口上面,配置如下
# Span 1: TE4/0/1 “T4XXP (PCI) Card 0 Span 1” (MASTER) HDB3/CCS
span=1,1,0,ccs,hdb3
# termtype: te
bchan=1-15,17-31
dchan=16
echocanceller=mg2,1-15,17-31
# Global data
loadzone        = no
defaultzone     = no

请参照你的E1,看看有没有用crc4,我配置了半天发现我的E1上面是不能加crc4的,郁闷死,嘿嘿。defaultzone  据说中国设置为no。
另外echocanceller也很重要,这个是硬件的回音消除,TE410P就支持。

/etc/modprobe.d/blacklist
这个是modules 不加载的列表,默认是要先取消所有模块,然后再加载。不用改

/etc/modprobe.d/dahdi
这个是每个模块的特别设置,比如T1到E1的软跳线,4个端口,一个个跳
The driver accepts parameter t1e1override and decimal value between 0 and 15 wich corespond to binary from 0000 to 1111 where each bit corespond to a span. 0 is T1 and 1 is E1.
Decimal  |  Binary
0 | 0000
1 | 0001
2 | 0010
3 | 0011
4 | 0100
5 | 0101
6 | 0110
7 | 0111
8 | 1000
9 | 1001
10 | 1010
11 | 1011
12 | 1100
13 | 1101
14 | 1110
15 | 1111
But how to know which port is configured for T1 or E1? Take a look at the picture below.
Binary 0 0 0 0
Spans 4 3 2 1
debug就是调试信息输出到syslog
noburst 就是是否开启突发传输,默认noburst=1就是关闭burst

options wct4xxp t1e1override=15 debug=1 noburst=0
options dahdi debug=1


启动脚本:
/etc/init.d/dahdi


Asterisk 1.6的配置文件:chan_dahdi.conf
[channels]
language=en
context=default
switchtype=euroisdn
pridialplan=national
internationalprefix = +
nationalprefix = +86
localprefix = +8620
privateprefix = +8620xxxxxxxx
unknownprefix =
signalling=pri_cpe
usecallerid=yes
hidecallerid=no
callwaiting=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
echocancel=yes
rxgain=0.0
txgain=0.0
group=1
callgroup=1
pickupgroup=1
immediate=no
callprogress=no
callerid=asreceived
group=1
context=default
signalling=pri_cpe
channel => 1-15,17-31


Asterisk 安装笔记(4)- 从程序发起呼出的几种方法


如果没有sip或者iax客户端的话,只是写简单的程序来实现呼出,就没有固定的dialplan了。。。方法有如下几种:

Automated dial out

The Asterisk dial plan extensions.conf responds to someone calling an extension on a channel. If you want to initiate a call from an external application, there are several ways to do this.
There are basically four ways to initiate outgoing calls in Asterisk
  • Use .call files. A call file is a text file that when placed in the correct directory makes Asterisk make an outgoing call.
  • Use the manager API to activate a call. See Asterisk manager dialout
  • Use the Asterisk CLI originate command
  • FollowMe command of Asterisk 1.4: Since this has the abitility to fork (create multiple calls) it could be ‘misused’ to initiate outgoing calls.
See also additional Digium documents.

apache + fastcgi + php 安装要点

$
0
0
装了apache和php,原来用的是so module的模式运行php,因为php建议使用prefork mpm,这样子每个apache 的进程都会加载php module,造成占用内存过大,如果站点静态内容多的话,个人觉得太耗资源了,apache单线程一般是4-5m,加载了php之后是20M以上,汗啊。。。这样子1G内存也开不了多少进程。。。
最后决定用fastcgi方式执行php了,按需才生成,而且是用fastcgi的动态模式,方便进程管理。
具体步骤如下:
1、编译apache,一般我用的参数是:
./configure –prefix=/home/apache2 –enable-modules=most –enable-mods-shared=most –enable-ssl –enable-so
make
make install
2、编译php,如果要用fastcgi,就不能加–with-apxs2
‘./configure’ ‘–prefix=/home/php’ ‘–enable-fastcgi’ ‘–with-mysql’ ‘–with-openssl’ ‘–with-zlib’ ‘–with-gd’ ‘–with-curl’ ‘–with-bz2’ ‘–with-jpeg-dir’ ‘–with-png-dir’ ‘–with-freetype-dir’ ‘–enable-gd-native-ttf’ ‘–enable-force-cgi-redirect’
make
make install
cp php.ini-recommended /home/php/lib/php.ini
3、编译mod_fastcgi,最新的也是2007年的版本了。。。还好apache 2.2 一样能用。
cp Makefile.AP2 Makefile
vi Makefile 把涉及到apache的目录全部改成/home/apache2,就是上面的apache安装目录
make
make install
4、配置apache的httpd.conf
在Server全局配置:
LoadModule fastcgi_module     modules/mod_fastcgi.so
FastCgiIpcDir /tmp/fastcgi
FastCgiConfig -appConnTimeout 30 -maxClassProcesses 128 -maxProcesses 128 -restart
ScriptAlias /php-go-fcgi-bin/ /home/apache2/cgi-bin/
<Directory “/home/apache2/cgi-bin”>
    SetHandler fastcgi-script
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>
Action application/x-httpd-php /php-go-fcgi-bin/php

然后在需要支持php的vhost里面加上:
AddType application/x-httpd-php .php .phtml

这样就可以支持php了。

最后还要制定cgi脚本的位置,上面的配置制定了的是cgi-bin下面,可以ln -s来支持,但是这样如果直接访问这个php文件的话,会造成下载php-cgi执行文件的问题,所以就用了一个shell脚本来执行,这样子直接访问的话fastcgi就只会显示这个shell脚本。
vi /home/apache2/cgi-bin/php
#!/bin/sh
exec /home/php/bin/php-cgi

chmod a+x /home/apache2/cgi-bin/php

5、启动apache,/home/apache/bin/apachectl start 完事。

附上mod_astcgi动态的配置说明:

FastCgiConfig

Syntax:FastCgiConfig option [option ...]
Context:server config
The FastCgiConfig directive defines the default parameters for all dynamic FastCGI applications. This directive does not affect static or external applications in any way.
Dynamic applications are not started at server initialization, but upon demand. If the demand is heavy, additional application instances are started. As the demand fades, application instances are killed off. Many of the options govern this process.
Option can be one of (case insensitive):
-appConnTimeout n (0 seconds)
Unix:  The number of seconds to wait for a connection to the FastCGI application to complete or 0 to indicate a blocking connect() should be used. Blocking connect()s have an OS dependent internal timeout. If the timeout expires, a SERVER_ERROR results. For non-zero values, this is the amount of time used in a select() to write to the file descriptor returned by a non-blocking connect(). Non-blocking connect()s are troublesome on many platforms. See also -idle-timeout, it produces similar results but in a more portable manner.
Windows NT:  TCP based applications work as above. Named pipe based applications (static applications configured without the -port option and dynamic applications) use this value successfully to limit the amount of time to wait for a connection (i.e. it’s not “troublesome”). By default, this is 90 seconds (FCGI_NAMED_PIPE_CONNECT_TIMEOUT in mod_fastcgi.h).
-autoUpdate (none)
Causes mod_fastcgi to check the modification time of the application on disk before processing each request. If the application on disk has been changed, the process manager is notified and all running instances of the application are killed off. In general, it’s preferred that this type of functionality be built-in to the application (e.g. every 100th request it checks to see if there’s a newer version on disk and exits if so). There may be an outstanding problem (bug) when this option is used with -restart.
-flush (none)
Force a write to the client as data is received from the application. By default, mod_fastcgi buffers data in order to free the application as quickly as possible.
-gainValue n (0.5)
A floating point value between 0 and 1 used as an exponent in the computation of the exponentially decayed connection times load factor of the currently running dynamic FastCGI applications. Old values are scaled by (1 - gainValue), so making it smaller weights old values more than the current value (which is scaled by gainValue).
-idle-timeout n (30 seconds)
The number of seconds of FastCGI application inactivity allowed before the request is aborted and the event is logged (at the errorLogLevel). The inactivity timer applies only as long as a connection is pending with the FastCGI application. If a request is queued to an application, but the application doesn’t respond (by writing and flushing) within this period, the request will be aborted. If communication is complete with the application but incomplete with the client (the response is buffered), the timeout does not apply.
-initial-env name[=[value]] (none)
A name-value pair to be passed in the initial environment when instances of applications are spawned. To pass a variable from the Apache environment, don’t provide the “=” (if the variable isn’t actually in the environment, it will be defined without a value). To define a variable without a value, provide the “=” without any value. The option can be used repeatedly.
-init-start-delay n (1 second)
The minimum number of seconds between the spawning of instances of applications. This delay decreases the demand placed on the system at server initialization.
-killInterval n (300 seconds)
Determines how often the dynamic application instance killing policy is implemented within the process manager. Smaller numbers result in a more aggressive policy, larger numbers a less aggressive policy.
-listen-queue-depth n (100)
The depth of listen() queue (also known as the backlog) shared by all instances of applications. A deeper listen queue allows the server to cope with transient load fluctuations without rejecting requests; it does not increase throughput. Adding additional application instances may increase throughput/performance, depending upon the application and the host.
-maxClassProcesses n (10)
The maximum number of dynamic FastCGI application instances allowed to run for any one FastCGI application. It must be <= to -maxProcesses (this is not programmatically enforced).
-maxProcesses n (50)
The maximum total number of dynamic FastCGI application instances allowed to run at any one time. It must be >= to -maxClassProcesses (this is not programmatically enforced).
-min-server-life n (30)
The minimum number of seconds a dynamic FastCGI application must run for before its restart interval is increased to 600 seconds. The server will get 3 tries to run for at least this number of seconds.
-minProcesses n (5)
The minimum total number of dynamic FastCGI application instances allowed to run at any one time without being killed off by the process manager (due to lack of demand).
-multiThreshold n (50)
An integer between 0 and 100 used to determine whether any one instance of a FastCGI application should be terminated. If the application has more than one instance currently running, this attribute will be used to decide whether one of them should be terminated. If only one instance remains, singleThreshold is used instead.
For historic reasons the mis-spelling multiThreshhold is also accepted.
-pass-header header (none)
The name of an HTTP Request Header to be passed in the request environment. This option makes available the contents of headers which are normally not available (e.g. Authorization) to a CGI environment.
-priority n (0)
The process priority to be assigned to the application instances (using setpriority()).
-processSlack n (5)
If the sum of the number of all currently running dynamic FastCGI applications and processSlack exceeds maxProcesses, the process manager invokes the killing policy. This is to improve performance at higher loads by killing some of the most inactive application instances before reaching maxProcesses.
-restart (none)
Causes the process manager to restart dynamic applications upon failure (similar to static applications).
-restart-delay n (5 seconds)
The minimum number of seconds between the respawning of failed instances of applications. This delay prevents a broken application from soaking up too much of the system.
-singleThreshold n (0)
An integer between 0 and 100 used to determine whether the last instance of a FastCGI application can be terminated. If the process manager computed load factor for the application is lower than the specified threshold, the last instance is terminated. In order to make your executables run in the “idle” mode for the long time, you would specify a value closer to 1, however if memory or CPU time is of primary concern, a value closer to 100 would be more applicable. A value of 0 will prevent the last instance of an application from being terminated; this is the default value, changing it is not recommended (especially if -appConnTimeout is set).
For historic reasons the mis-spelling singleThreshhold is also accepted.
-startDelay n (3 seconds)
The number of seconds the web server waits patiently while trying to connect to a dynamic FastCGI application. If the interval expires, the process manager is notified with hope it will start another instance of the application. The startDelay must be less than appConnTimeout to be effective.
-updateInterval n (300 seconds)
The updateInterval determines how often statistical analysis is performed to determine the fate of dynamic FastCGI applications.

svn的安装要点

$
0
0
1、需要使用 berkeley db的话,需要安装db4和db4-devel,一般yum或者apt都能找到,然后configure的时候一定要指定 –with-berkeley-db ,否则很多时候都不会编译进去。
2、和apache的结合问题,通常编译之后不成功,就是和apache的结合有问题,经常表现为apr和apr-util版本不对,所以最好保留apache编译时候的源码包(很多时候就算去下载一样版本的apr都是有问题的,因为apache自己就改过),找到srclib下面的apr和apr-util,拷贝到subversion源码根目录,然后进入apr和apr-util目录,各make clean一次(因为你的apache装的时候make过一次了),然后configure的时候只要制定–with-apxs=pathToApacheApxs,不要制定apr和apr-util,它就会自己找源代码装的了。
3、客户端用neon和ssl的问题,下载最新的neon源码包,然后放在subversion源码根目录下面,configure的时候加上–with-neon=./neon –with-ssl 就可以了.

Real Time JVM (实时JAVA虚拟机)

$
0
0
说到java实时虚拟机,貌似很强大的,今天无意中找到几款,下载来研究研究,嘿嘿
第一个就是BEA的JRockit real time,因为普通的JRockit jvm已经整合到WebLogic 里面的,如果不想下载700多M的WebLogic ,real time就是另外一个选择了,填了一大张表才能下载到
http://www.oracle.com/technology/software/products/jrockit/index.html
jrrt-3.0.0-1.6.0-linux-ia32.bin
和标准的jvm一样,chmod a+x jrrt-3.0.0-1.6.0-linux-ia32.bin; ./jrrt-3.0.0-1.6.0-linux-ia32.bin
然后就可以安装了,用来跑resin,jira也没有什么问题,有空找些大项目来试验试验,嘿嘿

第二个就是IBM的jvm real time,是隐藏在WebSphere Real Time V2.0 32-bit xSeries (Intel compatible)
里面的,文件是
ibm-wrt-i386-sdk-2.0-0.0.i386.rpm
也是一堆表格要填写才给你下载。。。
http://www.ibm.com/developerworks/java/jdk/linux/download.html

第三个就是sun自己的jrts了,90天的试用期,研究用可以无限
http://java.sun.com/javase/technologies/realtime/rts/

实时虚拟机增加了很多功能,好像内存控制方面的,垃圾回收方面的.

几款java反编译软件

$
0
0
这几年用了好几款java反编译工具,现在罗列如下:
1、最早用的是DJ JAVA DECOMPILER,现在最新版本是3.10.10.93,很强大的,破解一般就靠它了,可惜没有eclipse的插件
http://members.fortunecity.com/neshkov/dj.html

2、Jad,一款很快速的反编译工具,但是有很多类都反编译不出来,而且也没有什么维护了,2006年的,不过就有JadClipse,也是我用的第一款eclipse里面的反编译工具。
http://www.kpdus.com/jad.html
http://sourceforge.net/projects/jadclipse

3、JodeEclipse 也是一款基于eclipse的反编译工具,不用另外装什么exe,也挺好用,不过也是没有更新很久了。
http://sourceforge.net/projects/jodeeclipse

4、JD,有windows版本的,基于C++,有eclipse版本的JD-Eclipse,今天刚开始用,看起来还不错,嘿嘿。
http://java.decompiler.free.fr/

5、还有一款没有用过,但是听说过的,是DAVA,是Soot的一部分,没用过,也不清楚。
http://www.sable.mcgill.ca/dava/

因为java太容易反编译了,所以工具也特别多,下面的网站有一个很全的列表。。。不过估计大多数都是不更新的了
http://www.java-decompiler.com/

Squidguard

$
0
0
下面介绍除了squidguard之外还有哪些比较多人用的redirector。

What’s New

Introduction

This is not the official SquiGuard homepage, but only an happy user’s page :
official homepage was http://www.squidguard.org. It seems out of service. Mirko Lorenz created a mirror here. SquidGuard is a redirector which uses sleepycat‘s version of Berkeley Database
Its authors are
  • Pål Marius Baltzersen
  • Lars-Erik Håland
A new patched version of squidGuard 1.2.10, with this REAME is available. This is a compilation of patch from many contributors. I didn’t even change a dot. Thanks to Franck Bourdonnec to suggest this packaged version.
The last stable version is 1.2.0.
Here it is the ChangeLog
It needs a recent version of Berkeley Database (> 3.2 but < 4.x)
An ftp directory is available here, in France at : ftp://ftp.univ-tlse1.fr/pub/reseau/cache/squidGuard/ I began a contrib directory here : ftp://ftp.univ-tlse1.fr/pub/reseau/cache/squidguard_contrib/
It has new interesting features
  • It can filter the surfing duration on a user basis.
You can find some explanations in other languages here :

Comparison

Competitors

SquidGuard and its competitors

Advantages

  • It’s a lot faster : for a 2.000 Urls list to filter and a 11.000 Urls database, on a pentium 233 :
    • Squirm : 2 minutes 25 seconds
    • Jesred : 1 minute 45 seconds
    • SquidGuard : 9 seconds !!!
    We can say, it doesn’t care of database size :
    • a 100 Urls database tooks 6 seconds
    • a 11000 Urls database tooks 9 seconds (now the adult database contains 100 000 urls)
  • Faster, in our case, is equal to “less redirector needed” : 20 for squidguard, 25 for squirm. Following a chart of redirector usage
    • with squirm you need 3 redirectors 60% of time, with squidguard, only 5%
    • with squirm you need 7 redirectors 10% of time, with squidguard, less than 0.5 %
  • It can redirect url depending on :
    • IP adress of client
    • User identity (RFC 1413) or login/password
    • URL (of course)
    • “Class” of redirection (e.g. we can define a class banner, adult, and so on…)
  • If database size doesn’t matter, it means that we can put MANY urls. So we use less generic regular expression, which make many errors (the computer xxx in nasa.gov domains e.g.)
  • contrib

    This part show some personal contributions : scripts, databases and some advice.
    • For Squirm, some patterns
    • To show web usage : a script which describe a VERY APPROXIMATIVE proportion of URL classes (erotic, hacking, mp3, warez) in your cache taille_categorie_squid.pl
    • Come very useful scripts to detect pornographic url in squid log (and more) made by Cedric Foll : http://savannah.nongnu.org/projects/pornfind/
    • Usability of database depends of your users : MIT students are not golden boys who are not children.
    • Some virus-filtering addon exist. They are connected by redirector (squirm or squidguard), and send their files to a virus scanner. Some of them :

    Some databases

    For all information on database (contributors, size, download method look at this page : http://cri.univ-tlse1.fr/blacklists

    Related Projects

    • http://www.surbl.org is a site to prevent spam. As we know, porno-business like spam. Surbl will, likely, create a DNS zone for adult web site…

    FAQ

    The original FAQ can be found here http://www.squidguard.org/faq/. An additional FAQ is http://www.maynidea.com/squidguard/faq-plus.html
    • Squid 2.6 isn’t working : it replace
      • redirect_program by url_rewrite_program
      • redirect_children by url_rewrite_children
      • A new command appears url_rewrite_concurrency
    • Nothing is blocked Many reasons :
      • Unix access right are incorrect. The user who launch squid, is the same who launch squidguard. So, this user must be able to read text database and to write db file, and log file. So, directory looks like this :
          drwxr-xr-x  2 root     root      1024 avr  2  2001 logs
        -rw-r----- 1 squid squid 100000 oct 23 08:13 logs/squidGuard.log
        -rw-r----- 1 squid squid 1000 oct 23 08:13 logs/squidGuard.error
        drwxr-xr-x 2 root root 1024 avr 2 2001 db
        drwxr-xr-x 2 root root 1024 avr 2 2001 db/dest
        drwxr-xr-x 2 squid squid 1024 avr 2 2001 db/dest/adult
        -rw-r--r-- 1 squid squid 1024 avr 2 2001 db/dest/adult/domains
        -rw-r--r-- 1 squid squid 1024 avr 2 2001 db/dest/adult/domains.db
        -rw-r--r-- 1 squid squid 1024 avr 2 2001 db/dest/adult/urls
        -rw-r--r-- 1 squid squid 1024 avr 2 2001 db/dest/adult/urls.db
        ...
        drwxr-xr-x 2 squid squid 1024 avr 2 2001 db/dest/warez
        ...
        drwxr-xr-x 2 root root 1024 avr 2 2001 db/src
        ...
      • You forgot none at the end of rule. Default is “accept”
      • You made a syntax error. temporal definition are quite tricky.
    • I can’t download blacklist. Many reasons :
      • You, or your entreprise, are protected by a “low level” firewall which is unable to understand “active ftp”. Check your ftp client, and change mode to “passive ftp”.
      • You, or your entreprise, are protected by a “too sensitive” “high level” firewall which say that length of file path are too longue. Firewall1 (Checkpoint) is one of these. Look at ftp://ftp.univ-tlse1.fr/blacklist which is a link to ftp://ftp.univ-tlse1.fr/pub/cache/squidguard_contrib. May Help

    Definition

    • Redirector :
      Official Squid FAQ definition : http://squid.nlanr.net/Squid/FAQ/FAQ-15.html
      A redirector is a program which connects to Squid and allows to “translate” URLs before sending them to Squid Process :
      • for restricting access (erotic or financial Urls)
      • for stripping banners to accelerate web usage
      • for redirecting Urls on a local mirror (Netscape Navigator downloading e.g.)
      To put them in place, uncomment redirector line in squid.conf and enter children processes you need : redirect_program /usr/local/squidGuard/bin/squidGuard
      redirect_children 20
      Common redirectors use from 800 Ko to 1600 Ko.
      You can also, if you don’t care about very rare “workaround” (less than 0.01%) accept to bypass redirector if they are all busy, by adding this line. redirector_bypass on

      http://www.squidguard.org/
      http://squidguard.mesd.k12.or.us

    linux的网关功能

    $
    0
    0
    net.ipv4.conf.default.forwarding=1
    net.ipv4.conf.all.forwarding=1

    修改sysctrl.conf如上。

    犯罪团伙长期盘踞于世纪佳缘

    $
    0
    0
    网易科技讯9月11日消息,9月7日,WePhone的创始人兼开发者苏享茂在Google+留下一份网帖,讲述了自己遭“婚骗”的经过,并且称他即将离开 人世,对于WePhone APP也将无法正常运行他很抱歉。而昨日,苏享茂哥哥苏享龙在微博中证实,苏享茂已于9月7日凌晨5点跳楼身亡。
    今日,自媒体DevLink发布了苏享茂亲友的声明,声明中称,该女在和苏结婚之前至少结过两次婚(未必领证),每次婚姻维持时间不超过三个月。有网友反应该女通过佳缘和她约会,当天就要他买车。被他拒绝。女方所提供的工作单位证实,没有此人。
    苏享茂亲友初步判断为一长期盘踞于佳缘的团伙作案。家属请求网友提供相关线索。
    以下为声明全文:
    声明
    目前,我们又掌握了一些新情况
    1. 该女在和苏结婚之前至少结过两次婚(未必领证),每次婚姻维持时间不超过三个月。
    2. 有网友反应该女通过佳缘和她约会,当天就要他买车。被他拒绝。
    3. 婚姻存续期间,苏从未见过女方任何闺蜜,同事,朋友。
    4. 女方所提供的工作单位证实,没有此人。
    5. 交往期间,有其他男性一起电话威胁苏。
    初步判断为一长期盘踞于佳缘的团伙作案。家属请求网友提供相关线索,包括不限于
    1. 女方及伙同人员的所有相关线索,包括同学,校友,老乡,同事等所有信息。
    2. 其他和该团伙打过交道的人的信息。
    3. 欢迎佳缘红娘和我们联系,提供线索,佳缘目前还未和我们有任何沟通。
    联系方式,吕先生17192098447
    同时,我们转发苏享茂好友的悼文一篇,愿逝者安息,施害人早日得到惩处。
    少年留给这个世界的背影
    ~~悼念我们的同学
    沈浪(化名)
    相信大家这几天,被那位逝去的开发者,给刷屏了。作为事件主人公的同学,我深感痛心和遗憾。在此我不评论谁是谁非,只回忆一些我们相处的片段。
    18 年前的1999年秋天,我们一起,从全国各地来到北京,报到入学,风华正茂。第一次见面是在教室里,我坐在那里,他跑过来,向我问东西,大概问了足足有 20分钟,我耐着性子听完,就说了一句,你是福建的吧?你说的什么?我一句都没有听懂,这就是我们的初次相识。历历在目,恍如昨日,一晃便是十八年。
    四 年后的毕业,我们分开,各奔东西,我去工作,他去读研,一晃又是几年。再次印象深刻的相聚,是在美国。2009年的秋天。我知道他在纽约,恰好我也飞到纽 约,便去找他。当时纽约,红叶正盛,唯美如火。我换乘了好几种交通工具,到了纽约的长岛,找到他所居住的位置。推开门,发现他住在一栋别墅的佣人房里,连 一个窗户都没有。我问他,你怎么住在佣人房里,他笑笑,却觉得挺好,只是孤独,每天连火都不生,就买一些简单的外卖,然后每天就坐在那里,配合公司开发程 序。他一直是这样的一个人,不抽,不喝,不嫖,不赌,不购物,不旅游,只是醉心于他所热爱的程序开发。那时的他单纯的如同平静的湖水,不起微澜。
    再 次聚会,就在北京,和他一起聊起了他自己开发的wephone,他眉飞色,舞神采飞扬,告诉我他的开发的非常成功,他一个人开发,做到了有3000万的用 户,在苹果商店里排名同类第一,而且用户基本都是外国人,甚至超过了一做海外业务著名的猎豹移动的同类产品。我开始还不信,等到我打开才发现,真的非常好 用,此时我才惊讶于他在开发方面的才华。他是一个生活极其简单的人,和他所开发的app一样,简洁,明了,不假修饰。正是他的简洁,单纯,专注和才华,造 就了他在开发领域的成就。也是他此生最大的罩门。
    北京越长越大,我们越离越远。当我们盘算着下一场同学会的时候,便传来了他离去的消息。于是,我们之中,少了一个,便再也凑不齐了。
    我知道还有很多程序员漂在这个巨型的城市,透支青春,过着类似的质量很低的生活,唯愿你们在孤独的城市照顾好自己,不让故乡的亲人担心。
    来自http://tech.163.com/17/0911/17/CU2NP8FC00097U7R.html
    WePhone开发者苏享茂自杀身亡,留遗书称被前妻所逼,遭索要1000万
    wephone创始人苏享茂,在世纪佳缘上征婚,被骗婚,在给女方花了总计1300万元以后,被女方要求离婚,并被女方恐吓举报其不法经营,勒索1000万离婚费。最终苏某在不堪骚扰的情况下跳楼自杀。
    这个周末,想必很多小伙伴都看到或听到这样一则消息:某APP创始人苏享茂跳楼自杀,据称,他是被前妻逼迫,不堪重负之下作出结束生命的选择。

    婚恋网站“骗婚”事件近年时有发生
    苏享茂事件是否涉及“骗婚”成为关注焦点。
    记者梳理发现,婚恋网站骗婚事件时有发生。2012年,当时尚未合并的世纪佳缘网和百合网高层曾在微博上互相指责对方是骗子集中地。
    2011年,一名北京男子伪造港人身份在世纪佳缘等婚恋网站诈骗,一年之内连骗6名企业女高管,诈骗金额近600万元。
    2012年,深圳警方破获一起征婚诈骗案,该犯罪嫌疑人通过世纪佳缘网站两年内骗婚27名女子,涉案金额达300万元。
    2015前,广东一对父子因为在婚恋网站上骗婚诈骗,被判刑入狱。从2011年开始,这对父子利用婚恋网站累计骗取受害人17万之多。
    此外,还有传销组织利用婚恋网站实施诈骗。
    今年,重庆警方破获一起传销组织利用线下传销人员实施婚恋诈骗的案件,涉案人员70人,受害人超300人。
    据了解,婚恋网站对用户信息很难做到完全核实,教育、婚否、职业等个人信息都无法做到准确核实。即便是真实信息用户,用户本人的安全性、目的性也很难保证。
    央视2013年报导曾指出,婚恋网站会员信息造假仅需10分钟即可完成。最近,河南开封又有一名男子利用婚恋网站虚构双学历、未婚、医生等身份与多名女子交往,实施诈骗,骗取受害人共27万元。
    其家属表示,目前已经报警,并且相信政府,相信司法,相信社会公义能还苏享茂以公平,慰藉其家乡年迈父母。家属称,事发后,至今未接触过女方,对于女方的做法,他们均不做出任何评价。
    透过男方在结束生命前发在社交媒体上的信息可以看到,在双方交往过程中,男方缺少自我保护意识,当发觉自己陷入圈套,特别是被对方以“法律”相要挟时,不是拿起法律武器保护自己,反而一再妥协,最终被对方死死吃住,无法自拔。
    女方要挟的手法低劣且漏洞百出,何以让一个天才开发者深信不疑甚至无法自拔,这更值得深思。
    有人说男方死于善良,其实,如果多一些对法律的了解,或许结局就不一样。
    来自http://www.sohu.com/a/191326146_160850
    “逼死程序员”涉事人舅舅系公安大学教师:深表哀痛,但从未见过苏享茂
    据澎湃新闻9月12日报道,在近日备受关注的“程序员自杀事件”中,中国人民公安大学宣传部12日下午回应称,确认在职教师刘克俭是程序员之死涉事人“翟某欣”舅舅,并确认刘克俭未参与到此事中,并称“很快刘克俭会有个人声明表示‘不接受任何媒体采访’”。
    随后,北京青年报12日发布翟某欣舅舅刘克俭的个人声明称,对苏享茂先生的离世深表哀痛,但本人与外甥女翟某欣少有来往、也未见过苏享茂,从未以任何形式 介入两人的任何纠纷;其本人也非并非网上传言的“高官”,对恶意滋扰、诽谤等违法行为保留追究其法律责任的权利,且不接受媒体采访。
    9月8日,有网帖称手机应用软件WePhone开发者苏享茂被前妻翟某欣逼迫,遭索要1000万元和房产赔偿后自杀。随后,苏享茂的哥哥发布声明表示苏享茂系因不甘女方骚扰跳楼身亡且已经报警,事件引发热议。截至目前,苏享茂前妻翟某欣尚未对外作出回应。
    澎湃新闻称,根据苏享茂家属和同学方面发布的信息,在苏享茂跳楼自杀前几个小时,陆续收到女方多条辱骂威胁恐吓消息。其中一条截屏信息显示,翟某欣曾在朋友圈发文称其舅舅荣升高级警监职位。
    不过,据澎湃新闻目前可查到的刘克俭最近动态为:2016年4月7日中国科学院合肥物质科学研究院官网的一篇名为《中国人民公安大学遥感中心刘克俭一行到合肥研究院调研》的文章,文章中刘克俭的身份显示为中国人民公安大学遥感中心主任。
    随后,12日下午,北京青年报称,女方翟某欣舅舅刘克俭向该报发去个人声明。声明称:“本人对苏享茂先生的离世深表哀痛。翟欣欣女士确 系本人外甥女,但与本人少有来往。本人从未见过苏享茂先生,也从未以任何形式介入翟欣欣女士与苏享茂先生的任何纠纷。本人是公安院校的一名科研技术人员, 不承担公安执法工作,并非网上报道的所谓公安机关“高官”。对于涉及本人及家人的恶意滋扰、诋毁、侮辱、诽谤等违法行为,本人保留追究其法律责任的权利。 在有关部门查清事实、公布调查结果之前,本人不接受任何媒体采访。”
    苏享茂前妻翟某欣舅舅刘克俭的声明/图片来自北京青年报
    来自http://www.guancha.cn/society/2017_09_12_426842.shtml

    如何通过文化殖民掌控他国?

    $
    0
    0
    (此文恰好说明了西方政治制度的优越性,你共匪有本事的话,也去"文化殖民”欧洲/美国啊,ok?你共匪有那本事吗??)

    文化殖民,是指西方一些发达国家凭借其霸权地位,在资本逻辑的驱使下,通过文化符号系统的强势传播,向“他者”输出自己的思维方式、价值观念、意识 形态和宗教信仰,企图同化“他者”,教会“他者”如何依托西方的价值观念去思考、用西方的话语去表达、参照西方的模式去实践,使“他者”思其所思、想其所 想、言其所言、美其所美、行其所行。其最终结果在于瓦解“他者”民族文化根基、削弱“他者”文化主权意识,从而实现世界文化西方化、西方文化普世化,形成 西方式的一元文化体系,将世界永久置于西方的统治之下。


    文化霸权是文化殖民的操盘手。长期以来,世界各民族文化不是在平等的基础上进行自由的交流、交融和交锋,文化不是在各个国家、民族间的双向或多向互动,而是在文化霸权的操控下,“自西向东”单向输出。
    世界范围内权力格局的不平衡性,为文化殖民的滋生提供了土壤。文化殖民之所以呈现为西方之于“他者”的单向输出,就是由西方在世界权力格局中的霸权地位决定的。自 二战以来,尤其是苏联解体之后,西方国家因其在经济、政治、军事、科技等硬实力方面的先发优势,使其在国际关系中处于主导、支配和统治的地位。而非西方国 家,则相对处于被支配、被统治的劣势地位。毫无疑问,谁拥有更多的权力,谁就能把握先机,掌握主动权、决定权和支配权,谁就掌握了别人的命运。
    文化殖民,正是西方秉持“弱肉强食”法则的必然选择,是西方权力扩张的必然产物,也是西方主客二分思维的体现。西方凭借其在硬实力方面的先发优势,人为地将文化主权国家主客二分,视自己为权力主体,将东方客体化、他者化,并以主体的“优越性”和“支配性”为据点,强迫“他者”被动接受其价值观念。西方的目的在于将硬实力方面的优势转化为软实力的优势,从而实现赢者通吃。由于硬实力方面的差异,西方国家对文化输出的内容、方式等具有决定权;而其他国家,除了被动接受,别无选择。
    西方文化横行世界,首要的不是因为它本身的优越性,而是源于它背后的硬实力,源于权力主体的操盘。文化殖民貌似是价值观念、意识形态、政治制度等软 实力的较量,实则是经济、军事、科技等硬实力的抗衡。因为,文化作为一种软实力,不具有直接的效力,它只有建立在硬实力的基础上才能成为一种真正意义上的 权力。总之,文化殖民作为一种软实力的扩张,它是依托于硬实力的支撑而奏效的,反过来,硬实力的扩张,也离不开软实力的保驾护航。一方面,硬实力为软实力 的扩张提供物质保障、强大后盾和技术支撑;另一方面,文化殖民为西方这一权力主体获得经济利润,实现霸权统治鸣锣开道。前者是后者的坚强后盾,而后者则是 前者的天然保护色,是前者的精致的包装。


    资本是西方社会的真正主人,资本逻辑是西方文化殖民的内在动力。资本主义社会的主导逻辑是资本逻辑,不仅经济领域服从这一逻辑的统治,文化领域同样服从这一逻辑的主宰。
    文化殖民,源于资本主义的生产方式,源于资本的扩张本性。马克思、恩格斯早在1848年就曾预言,“资产阶级,由于开拓了世界市场,使一切国家的生 产和消费都成为世界性的了”,“它使未开化和半开化的国家从属于文明的国家,使农民的民族从属于资产阶级的民族,使东方从属于西方”。这种从属关系,正是 文化殖民的社会历史根源。众所周知,资本的本性是实现无限增殖。不知餍足地乃至不择手段地追逐利润、实现利润最大化,是资产阶级的最高目标。而当国内无法 实现这一目标时,向外扩张就成了资产阶级的最佳选择。资本主义发展初期,资产阶级正是通过对内剥削和对外扩张,来完成资本的原始积累的。资本主义国家通过 发动战争、实施经济掠夺来占领资源和市场,不断进行资本扩张。在资本扩张过程中,西方文化也顺势走出国门,走向世界,为西方国家的掠夺行为提供辩护与支撑,营造良好的舆论环境,以实现其思想上的征服。这正如美国前总统小布什所言:“输出美国的资本,就是输出美国的价值观。”
    资本追求无限增殖的本性,促使文化沦为资本增殖的手段。西方文化产业的巨大繁荣背后,体现的正是极力追求资本增殖的魅影。西方国家为了寻得新的利润 增长点,都倾向于把资本转移到文化领域,将文化资源不断开发成可实现价值增殖的文化资本,将文化资本与经济资本一同注入经济生产和资本循环系统中,获得经 济收益,实现资本增殖。正是由于文化产业成本低而利润大,也正是由于文化产业有暴利可图,才使资本主义国家的大亨和寡头们趋之若鹜。
    以美国为例,其文化产业在GDP中所占比重越来越大,并迅速席卷全球文化市场。美国影视传媒产业的发展,使得迪斯尼公司、福克斯电影公司、哥伦比亚 电影工业公司等一度成为影视巨头,并垄断好莱坞长达半个世纪。《环球时报》曾发表文章指出:“美国500强企业前10名都在中国投资,它们在中国的生意份 额已超过其本土,成为盈利的主要来源。”而在这前10名中,文化企业占半数以上。美国通过其大众文化产品在全球的销售,既可获得丰厚的外汇,又可宣传其价 值观。这种新殖民主义比战争侵略和遏制策略更加冠冕堂皇,也更具有隐蔽性。哪里有利润,哪里就有资本。资本从来不会眷顾没有利润的行业,正是资本不断逐利 的本性,使它从经济领域渗透至文化领域,极大地推动了西方国家文化殖民的进程。


    西方国家如何通过文化殖民掌控他国
    文化殖民,是一种文化符号的输出。将资本主义的意识形态和价值观念编码在符号系统中,利用其话语优势和先进传播手段,植入到“他者”的意识观念之中,并对其进行“洗脑”,是西方文化殖民所惯用的把戏。
    西方一些国家凭借其话语优势和先进的传播手段,借由文化工业布道,将所谓的“自由”“平等”“民主”等意识形态观念,标榜为“普世价值”;将所谓 “休闲”“娱乐”“舒适”的生活方式,勾勒成现代生活的样板,企图以此来桎梏“他者”对民主制度和美好生活的想象。这实际上是想通过文化的符号化,传播西 方的政治价值、生活方式等,使“他者”产生一种崇拜和归附心理,从而使“他者”美其所美、行其所行。
    话语掌控是西方一些国家推进文化殖民的关键环节。西方正是凭借其在经济、技术以及网络传播体系中的话语霸权,来主导文化的交流与传播,扩展其意识形 态,强化其软实力建设,奠定其在国际社会的领导地位。话语具有重塑的功能,它可以使“主体”与“客体”或“自我”与“他者”的表象失真。西方凭借其话语优 势,一方面不断地美化自身,鼓吹“种族优秀论”“普世价值论”,使自己的“完美”形象更加“逼真”;另一方面,极力丑化、甚至妖魔化“他者”,使“他者” 不断失真,这也是为什么中国图像里有许多“非中国元素”的原因所在。一种话语的独尊就意味着一种霸权。西方一些国家凭借其在话语方面的先发优势,极力鼓吹 “西方中心论”“西方优越论”“普世价值论”等,实则是为西方推进文化殖民摇旗呐喊、擂鼓助威;而“文明冲突论”“历史终结论”等论调接踵而来,则是为西 方进行文化殖民杜撰理论依据。这些论调无不站在西方的立场上,目的在于让“他者”向西方靠拢、向西方看齐。
    广告参与使文化殖民更加行之有效。人们大多认为广告不过是宣传商品的手段,但事实并非那么简单。广告一方面是商品的美化与宣传,一方面又是输出国的消费观念、生活方式、价值取向的综合表现。英 国作家道格拉斯说,“从广告上可以看出一个国家的理想”。美国历史学家布尔斯廷更是直言不讳:“在移居新大陆、扩张经济和建立美国生活水平方面,广告一直 属于美国文明的主流”。在信息化时代,广告无处不在、无时不有、无孔不入。通过广告,西方所呈现给世界人民的是旅行、休闲、咖啡厅、高尔夫、挑战极限运动 等“美好”的生活情调,正是这些桎梏了发展中国家人民对美好生活的想象,也让根本没有条件享受这些的人盲目追求“更高”的生活水平。这不仅是经济上的诱惑,更是精神上的殖民。它使“他者”对西式的生活更加向往、对西式的价值观念更加认同。西方国家通过无限重复的广告,以一种“填鸭式”的方式,让受众在不知不觉中、在无意识中受到“诱劝”。


    西方一些国家推行文化殖民,目的在于实现世界文化西方化、西方文化普世化,从而形成以西方文化为价值标尺的一元文化体系。这种价值 标尺西化的结果就是“他者”民族文化根基的瓦解、文化主权意识的失落。西方国家正是企图通过掌控“他者”文化主权,来引起“他者”政权更迭,从而将世界置 于西方的统治之下。
    西方国家以“普世价值”来标榜自身价值的所谓“合法性”,力求用所谓的“西方评判标准”来衡量世界文化,从而实现思想的征服和文化的霸权。例如,美 国学者詹姆逊认为,文化的全球化“是界定全球化的真正核心:世界文化的标准化;美国的电视,美国的音乐,好莱坞的电影,正在取代世界上其他一切东西”。这 是想要用美国的文化标尺来丈量色彩斑斓的世界文化。著名的卡通文化研究者伯克指出,美国的卡通片使受众产生了这样的观念,“美国的生活方式正是他们所想要 的,美国人的优越性是自然而然的,符合每一个人的最佳利益”。这种论调虽有些夸大其辞,但也确实是一些主张全盘西化者的心理的真实写照。西方国家积极兜售 为强权者利益所需要的文化精神,对被殖民者的民族心理、民族意识进行渗透、同化和改造,其结果就是造成被殖民国民族主体意识的失落、民族虚无主义的泛滥、 民族自豪感的丧失,这不仅会动摇其他民族国家的理想信念,而且还会动摇它们文化主权的根基。
    西方国家如何通过文化殖民掌控他国
    文化主权的沦丧是西方文化殖民的隐形结果,也是西方文化殖民的最终企图。文化主权,关乎每一个民族的前途、每一个国家的命运。一个国家没有占主导地 位的统一的文化,就没有向心力和凝聚力。西方国家耽视文化主权,隐藏其后的则是更大的利益需求和政治阴谋。他们企图凭借殖民文化所形成的“统治意志”,控 制和掌握被殖民国家的政治主权,来实现自己的霸权统治。正如美国前总统尼克松所说:“我们同东方交往越多,我们就能使它受西方典范力量更大的冲击。……这 些种子有朝一日定会结成和平演变的花蕾”。
    量变达到一定程度就会发生质变,形式嬗变常常是内容嬗变的先声。文化主权的对抗在一定条件下,会发展成为公开的政治主权的争执。这是冷战后民族主义 兴起及许多地区性冲突的诱因。美国原国土安全部部长汤姆·瑞琪曾说:“恐怖分子不仅是怀揣炸弹的人。思想与文字同样会对我们的安全造成严重影响。”因为思 想与文字具有无形的力量,而“这种无形的力量没有导弹驱逐舰护卫下的货轮那样气势汹汹,但是它却能够散布在全球性的广阔空间,影响千百万人的思想感情, 从而能最终改变导弹和货轮的归属”。不幸的是,20世纪末的苏联解体、东欧剧变以及21世纪初的“颜色革命”“阿拉伯之春”等就像受到魔咒一样被言中了.

    手把手教你把旧电脑变成一台速度超快的 Chromebook

    $
    0
    0
    很多朋友都体验过 Chromebook 或者 Chrome 浏览器的“健步如飞”,也体验过用10年前旧电脑慢得“生不如死”,殊不知天地英雄生死之间只隔着一步,这一步上可化腐朽为神奇,下可变破铜烂铁为神器。那就是今天我们这篇文章能给大家带来的,教你免费把你的笔记本电脑打造成 Chromebook。
    自从 Google 推出 Chromebook 以来,大家都领略到原来笔记本电脑可以如此玩,界面可以如此简洁,速度可以如此快捷;而后市面上陆续推出的 Google Chromebook Pixel,Acer Chromebook C720, ASUS Chromebook C300, Acer Chromebook 11 都取得了非常好的市场反响。遥看外面的年轻女孩儿如此漂亮,低头看看家里的10年旧电脑黄脸婆是不是觉得特别难受,特别悲壮(点头的同学,妹子们注意拉一下黑名单)。
    话说回来,在这个巨大的信息化社会的新铁器时代,不少朋友家里都放着不少旧电脑或者其他电子设备,当初买来兴冲冲,能学习,能游戏;如今在家吃灰尘,做摆设、压箱底;完全成了真真正正的“铁器”了,非常浪费,非常可耻,而今,我们通过小小的方法就可以把它变成“神器”。不仅废物利用,而且艳羡已久的 Chromebook 也唾手可得了,岂不两全其美哉?(当然啦,如果愿意捐助出来,请联系 ezgo 的闻其详,ezgo 是一个公益的开源项目,可以安装开源的操作系统并捐助电脑给学校,网址是 https://ezgolinux.org
    怎么做呢?刚好今天从 The Verge 中看到这个视频,就转帖到 Youku 上给大家分享一下,我们需要用到的工具叫 CloudReady,它是来自纽约的一个名叫 NeverWare 的创业公司所开发,可以方便地把 Mac 或者 Windows 电脑快速变成一台 Chromebook。而我们今天完成这个“大变活机”魔法仰赖的就是这款软件。
    旧版本的 CloudReady 只支持单系统,意味着为了用 Chromebook,必须要把整块硬盘都格式化,用来安装 Chrome OS 系统。不过据我实际使用, CloudReady 已经添加了支持多系统的特性,让 Chrome OS 和其他操作系统并存,并且可以在开机选单中可以选择想要使用的系统。当然,你仍然可以选择只安装 Chrome ,让笔记本看起来像台真的 Chromebook.

    下载 CloudReady

    第一步是下载这款 CloudReady 软件,原始下载地址在这里(因为含有二进制文件bin格式,所以可能会被 Windows 系统下的杀毒软件拦截),速度有点慢,我已经下载好,把它上传到了百度网盘(链接:http://pan.baidu.com/s/1WbUBs 密码:r1wh)

    烧录到U盘中

    第二步是准备一个U盘,8GB已经足够,将CloudReady 刻到U盘中,Windows 下可以用 UltraISO,Linux 下可以用 Brasero 或 K3b

    修改PC启动选项

    第三步时修改电脑的启动选项,大多数正常运行的电脑默认首选启动位置是本地硬盘,为了从U盘安装系统,我们需要修改为从U盘启动,要么进 BIOS 修改 Boot Option,调整 USB Disk 到启动第一优先顺序,要么在开机时候进入启动选单。示例的电脑是 ThinkPad,按 F12键即可进入选择画面,如果你用的是 Acer 电脑的话,也是按 F12 键。

    从U盘启动,进入安装过程

    前面三步做完之后,看到的启动画面应该是这样:
    到这里该做出一个选择了,一定要注意,选择 Install CloudReady Standalone 就是只安装这一个系统,会把其他系统格掉,而选择 Install CloudReady Dualboot,则可以和 Windows 并存:
    后面要做的可能就非常简单了,就像安装其他操作系统或者像安装一款普通的软件一样,做选择,点击下一步就可以。
    这是 Adobe Flash 的 EULA,建议选择安装上 Flash.

    大功告成,享受 Chrome

    很快就装好了系统,马上就可以开始畅游 Chrome 的世界了,不过首先需要登录 Google 账号,他就是你电脑的系统账号。
    看到熟悉的 Chrome Web Store了吗,其实它和你平常 Chrome浏览器中看到的那个在线应用商店完全一样,你可以安装任何你想使用的扩展、主题和插件,现在需要大家转换思维了,使用 Chromebook,你需要这么想,这个 Chrome 浏览器就是你的操作系统,而浏览器的插件就是你为操作系统安装的软件,这也是 Web OS 的思维。
    好了,走到这里,你已经完成了这个魔法,把自己的老旧电脑变成了一台焕然一新的 Chromebook,按捺不住地话,你已经可以马上开始动手尝试了。
    from https://linuxstory.org/how-to-turn-your-old-pc-into-a-speedy-chromebook-for-free/
    ------------

    如何制作自己的Chromebook

    概要

    您现在已经了解了Chromium操作系统提供的功能。 这是一个有趣的小项目,Hexxeh做了很好的工作,使人们可以方便地尝试。
    您现在可以使用一个USB记忆棒,您可以随身携带,并在最新的PC上启动桌面环境,默认情况下不会将文件存储在本地计算机上。 所以它使一个非常好的便携式环境。 Chromium OS的硬件支持有限,但在目前为止我已经尝试过的大部分硬件上都有。

    下一步

    • 尝试由Hexxeh构建的Vanilla版本 – 这更接近常规的Chromebook,但并不像Hexxeh的定制版本那么好。
    • 将其安装在硬盘驱动器上,Hexxeh的网站上有几个选项(替换基本操作系统,安装在其他操作系统等上)。
    • 从源代码构建您自己的自定义Chromium OS。 http://www.chromium.org/chromium-os/developer-guide详细介绍如何运行Ubuntu时如何做到这一点。

    参考文献

    from  https://www.howtoing.com/how-to-make-your-own-almost-chromebook/

    谷歌正在努力让所有Android应用程序都能够在Chrome OS系统上运行

    $
    0
    0
    最近就已经有四款知名Android应用加入到了Chrome OS的平台上。另外,许多黑客都开始对各种Android应用进行修改,并且已经找到了可以让任何Android应用在Chrome OS上运行的通用办法。没错,这就意味着现在我们已经可以在Chromebook上使用Skype了。
    一切都变得更加容易了,现在可以通过ARChon Package来将Android应用快速转换成Chrome OS安装包,或者直接Chrome插件支持解压APK安装文件。而这项功能很有可能继续完善,最终所有的Android应用都可以完美的在Chrome OS上运行。将来Chromebook将会成为另外一个发挥Android应用魅力的舞台
      离线使用
      没错,现在Chromebook也可以离线使用了,在离线的情况下,我们也可以阅读Gmail邮件、查看谷歌日历或者在Google Drive中编辑文档。
      除了这些基础操作之外,我们甚至还可以下载Kindle电子书、视频、音乐和离线查看PDF文档。另外使用Chrome应用还可以像Wunderlist或Any.DO.那样本地编辑待办清单。你甚至可以从Google Play商店中购买电影和电视剧离线下载观看。如果你只是为了消磨时间,也可以离线玩一会小游戏。
      当然,很多事情还需要在线使用,但是现在Chromebook已经摆脱了无法离线使用的限制。在这一点上,Chrome OS已经和Windows或Linux处于同样的状态。
      不过,这个功能目前仅支持最新的测试版Chrome 39中,如果在其它版本的Chrome浏览器中使用,依然还是会获得“无法连接到网页”的提示。
      完整的桌面操作系统
      最后的这个功能并不适合新手,也不适合对Chromebook不熟悉的用户。但是这个功能几乎可以让Chrome OS与Windows、Linux一样获得一个完整的桌面体验,真的很有吸引力。
      将系统切换到开发者模式(现在在系统中就可以实现,之前这个功能还需要物理开关),我们就可以完全访问Chrome OS系统的内部。接下来就可以安装一个完整的Linux桌面系统(比如Ubuntu)到Chrome OS里面。切换到Linux之后,就可以像操作一台普通的桌面系统那样进行使用,安装应用程序等。
      更好的情况时,在安装Steam for Linux之后,只要是一款基于英特尔处理器的设备,就可以参与到Steam在线流媒体游戏服务,在Chromebook上运行那些通常只能在PC上运行的游戏。我们还可以安装像Minecraft和Skype for Linux等微软的桌面应用。没错,Skype现在支持Linux,不支持Chrome OS。
      怎么样,随着时间的推移,Chromebook用户所受到的限制会越来越少。像Photoshop、Office和各种Android应用都可以在Chrome OS上实现。如果谷歌和开发者将来更多的支持Chrome OS,那么未来Chromebook的功能还会越来越强大,在我们的生活中扮演更重要的作用.

    WePhone创始人之死疑点解析:前妻、世纪佳缘、苏享茂本人

    $
    0
    0

    http://www.kjson.com/h/c/news/593301.html

    期待警方尽快把涉嫌敲诈勒索犯翟欣欣绳之以法。

    SwitchyOmega_Chromium.crx的直链地址

    $
    0
    0
    https://github.com/FelisCatus/SwitchyOmega/releases/download/v2.5.2/SwitchyOmega_Chromium.crx

    from  https://github.com/FelisCatus/SwitchyOmega/releases

    程序员苏享茂的最后94天:沉默码农和“白富美”的致命交集

    $
    0
    0
    澎湃新闻
    ​​9月7号凌晨3点46分,在自己研发的产品WePhone推送了一条“公司法人被毒妻翟某害死,WePhone即将停止运营”的消息后,凌晨4点多,37岁的苏享茂从西二旗的家中跳楼自杀。
    前一天,他在自己的社交账号上写道:“我是WePhone的开发者,今天我就要走了,App以后无法运营了,抱歉。我从来没想过我是这样的结局,我竟然被我极其歹毒的前妻翟某欣给逼死了。”
    今年6月6日,他和前妻翟某欣领完结婚证;7月18日,两人签订离婚协议。
    闪婚
    苏享茂的婚宴原本定在8月24号。日期已经看好了,福建老家的请帖也已经发了出去。
    但婚礼变成了葬礼。
    苏享茂去世一天后,亲人和朋友在他办公室整理遗物时,发现一份叙述和前妻从相识到离婚全过程的说明文件。
    在这份自述的事件经过里,苏享茂详细回忆了他和翟某欣3月30日相识第一天至8月底几乎每一天的经历,被他分为“认识过程,送特斯拉车,北京消费,旅游计划,回福建老家,三亚之行,香港之行,在香港的一次吵架,澳门之行,在澳门的一次吵架,结婚,提出离婚,通过离婚协议敲诈”13个部分。
    4月30日,苏享茂曾带着翟某欣回到福建老家。年纪逐渐增大,苏享茂面临父母催婚。“她表现得很乖巧懂事,还会扶着我妈妈走路,我家人对她比较认可,给的红包总共有7000元。”
    苏享茂的大哥大姐见到翟某欣之后的感觉是:“事情来得太美好,不真实。但是年龄大了也该结婚了。”
    在福建待了一个星期之后,两人前往三亚游玩。这期间,苏享茂在朋友圈发过一次旅游的照片,其中有张翟某欣的背影。
    苏享茂在事件经过里写到,在三亚,翟某欣提出在那边买房。买房时,完全由翟某欣和房屋销售张岩岩通过微信进行沟通。苏曾要求加入群聊,但翟以张岩岩的普通话听不清楚为由拒绝了。
    9月12日,雅居乐销售张岩岩用吐字清晰的普通话向澎湃新闻回忆说,5月9号,他在售楼中心接待了这对夫妻。事后,一直是翟某欣和他沟通购房事宜,他的确从未和苏享茂交流过。
    三亚之行后,两人又相继去了香港,澳门旅游,购物。按照苏享茂生前列出的消费目录,好友王冉算了一下,两人相处的40多天里,一共消费1300多万,“平均一天30多万。”
    苏享茂在自述中写道,从澳门回到北京后,翟某欣主动提议领结婚证,两人商量后决定6月2号领证。领证前一天上午,翟某欣告诉苏享茂,自己有过一段婚事,并需要到法院拿离婚调解书。
    两人因此发生口角,领证日期改到了6月6号。领结婚证之前,苏享茂陪同翟某欣到海淀法院领女方之前的离婚调解书,并提出看调解书的要求,翟某欣以隐私为由不让他看,要看就给她88万。“我当时特别愚蠢的(地)给了。”他在自述内容中写到。
    但看到调解书上男方姓名并不是之前翟某欣说的那个人后,苏享茂“心情郁闷”,他提出当天不适合领证。翟某欣“非常生气”,并说由于要与苏享茂结婚,自己户口本状态不得不显示离异,暴露了她以前的婚史,而她以原本能请当警察的舅舅抹掉这段纪录为由,向苏享茂索要45.8万(其中银行汇款40万,支付宝转账5.8万)。“我当时很糊涂,很愚蠢的(地)都给了。”
    苏享茂在自述中写到:“虽然领了证,但是以前发生的一系列事件,让我觉得这个女人不简单。跟她相处总有一种不自在和压抑的感觉。”
    他写道,那段时间,“一方面觉得自己的选择错了,另一方面觉得离婚的代价太大了,骑虎难下。”
    苏享茂的好友王冉回忆,这段期间,他多次和苏享茂相聚。他得知苏享茂和妻子之间出现了问题,但直到闹离婚的时候,他才知道苏享茂“压抑了很久”。
    7月6号,翟某欣以居住在15楼恐高为由,提出让苏享茂把自己位于海淀区西二旗的房子卖掉,买一处更大的房子,否则就离婚。
    苏享茂最终同意离婚。之后,翟某欣提出,要求苏享茂赔偿其精神损失费1000万元,否则将举报他偷税。
    一直到7月18日上午,苏享茂转给翟660万之后,两人下午一起到朝阳区民政局离婚。
    苏享茂在自述中提到,当时“身心俱疲”,再加上以为自己的税务问题及App灰色运营问题很严重,担心被对方举报,因此签下这份“显失公平”的离婚协议。
    “他做App是美国苹果公司的App,主要把App做了给中东的老外用,用完之后苹果会在美国扣税,扣完税支付到他的境外账户。相当于他一个中国人在国外帮苹果开发软件,苹果给他支付酬劳。”王冉曾告诉过他,只要补税就能解决。“但女方每天威胁他,他最后自己出不来了。”
    离婚协议显示,男方同意将海南的一处房产过户给女方,一次性补偿女方现金1000万元。其中,首期支付660万元整,已支付完毕。剩余340万在离婚后120天内一次性付清,每延期一天,赔偿10万元违约金。
    从8月底开始,翟某欣一直发短信给苏享茂发微信,催促他还钱。
    “我资金链已经断裂,实在很绝望。”9月7日,跳楼自杀前,苏享茂在社交账号上写道。
    妻子
    今年4月,苏享茂主动告诉王冉,自己认识了一个女孩儿。三人约着周末一块爬山。
    王冉向澎湃新闻回忆,第一次见到翟某欣是在爬山的时候。眼前这个女孩儿,身高一米七左右,漂亮,家里有别墅,开着自己的车;苏享茂身高一米六,长相普通,他觉得“不对劲”。但苏享茂刚认识翟某欣的时候,心情很好。
    从后来的聊天中,王冉还得知,翟某欣硕士毕业,父亲是大学教授。他主动问翟某欣“喜欢小苏(苏享茂)什么”,女方回答:“幽默。”这个回答让王冉更加坚定了自己的想法,“他其实是一个沉默寡言的人。”
    自从见过翟某欣后,王冉一直旁敲侧击地提醒苏享茂,他经常半开玩笑半认真地说:“人家对你一见钟情,你也不撒泡尿照照自己。”苏享茂沉默不语。
    苏享茂在自述中写到翟某欣“一个微信号经常有一些演艺方面的职位需求”。
    北京一家文化传播公司的活动负责人李昕曾经和翟某欣有工作上的交集。他向澎湃新闻回忆,2015年,翟某欣在报名参加一次手机品牌的礼仪兼职的活动的时候联系上他,在李昕的印象中,翟某欣“踏实靠谱”,多苦多累都不抱怨。
    李昕不明白,翟某欣如果那么有钱,为什么要做一天300元的礼仪工作。网上流传着翟某欣曾经面试的一段视频,李昕说,那段视频是面试一款手机活动时的视频。
    2017年6月6日最后一次联系,也是沟通礼仪兼职方面的事情。此前,5月份的时候,翟某欣曾和李昕聊起婚姻中的不愉快,并说自己已看破红尘,不想结婚了。
    当时,李昕以为翟某欣是和他们都认识的另外一个人结婚,从来没有听她提起过苏享茂,也并未在朋友圈发过两人的合影。
    苏享茂的姐姐回忆说,弟弟曾经告诉她,翟某欣带她回家住过两晚,除了见过一个还在上学的表弟,从没有见过她的朋友。
    9月5日,翟某欣曾和礼仪同行聊过礼仪方面的工作,并提到“不结婚挺好,如果让我重新选择我也不会结婚的。”
    据红星新闻报道,翟某欣的研究生同学称,她漂亮、家境好,成绩优异,但性格高冷,比较神秘。
    此前网上流传一篇作者署名为“翟某欣”的北京交通大学硕士毕业论文《大气边界层的风洞试验模拟》。9月12日,在看过网传的翟某欣照片后,该论文的指导老师之一马文勇告诉澎湃新闻称,“我不能百分百确定,但是我想应该是她”。
    马文勇指导过翟某欣做实验,但对她印象不是很深。在他记忆里,这名学生长相清秀,内向文静,除了问论文相关的问题不怎么说话。
    让马文勇印象最深的是,这名学生做事积极主动,喜欢提问,“她来了(实验室)之后就在那帮忙,我很少安排女生干什么活,她就主动跑过去在后面递扳手之类的。完事了就坐在那,一逮住机会就问你问题。”
    苏享茂自杀后,翟某欣始终未现身。9月9号,王冉发信息给翟某欣:“事已至此,赶紧收手。”但她在回复给王冉的手机短信中,不相信前夫自杀。
    翟某欣居住的三层独栋别墅区位于北京的东五环,该小区的独栋别墅市值在千万元以上。
    9月10日,澎湃新闻在这里看到,行人来来往往,但翟某欣家中大门紧闭。小区物业工作人员确认,该别墅登记的业主名为翟某欣。
    居住在翟家对面的邻居向澎湃新闻回忆,去年年初她刚搬过去的时候,邻居曾和翟某欣的母亲短暂聊过一次,得知他们是山东人。在邻居眼里,这家人平时不怎么说话,很少与人交流和外出走动,母亲偶尔会去市区帮女儿打理另一套房子。
    在邻居的观察中,翟某欣的工作比较随意,平时上班的时间很不确定。一年多的时间里,邻居只正面碰见过四五次翟某欣,但经常看到她开着显眼的白色或红色的特斯拉汽车驶出小区。
    据几名邻居回忆,去年年初,翟某欣结过一次婚,三四个月之后这段婚姻结束了。但他们并不知道翟某欣今年6月结婚的事情,也从不知道苏享茂。
    婚恋网站疑云
    苏享茂和翟某欣都是婚恋网站世纪佳缘上的VIP会员。此前,世纪佳缘曾发布声明称,两人在该网站上已完成实名认证。
    世纪佳缘的相关公关负责人告诉澎湃新闻,两人于3月30日在世纪佳缘办公室初次见面,见面后双方都表示相互有好感。
    相识68天后,两人领了结婚证。领完证之后,翟某欣在朋友圈发了钻戒和结婚证的照片,并把结婚证发给了世纪佳缘帮他们牵线的红娘。前述公关负责人向澎湃新闻回忆,红娘当天的确收到了翟某欣发来的结婚证。
    苏享茂在自述中提出了自己关于翟某欣信息的三点质疑:“1.婚姻状况:离异写成未婚;2.年龄:86年11月写成87年1月;3.恋爱经历:不是她所描述那么简单;4.用世纪佳缘服务时间:后来得知至少有3年的时间。”
    在会员资料上,翟某欣填写的是未婚。前述公关负责人回忆,她的户口本上的确填的是未婚。她解释称,世纪佳缘的注册会员都会进行人工审核,并鼓励注册会员上传身份证、护照、港澳通行证、驾照、单身证明、收入证明、学位证、学历证、职称证、房产证等。并称针对翟某欣也进行了这样的审核。
    此前,世纪佳缘发布的声明中称,“世纪佳缘会密切关注事态进展,并配合相关部门进行调查取证工作。”不过,前述公关负责人向澎湃新闻表示,目前警方尚未找到他们调查相关事宜。
    7月11日,在一张微信朋友圈截图中,翟某欣曾提到自己的舅舅刘克俭刚升到三级警监,并配有一张身穿警服人员照片。
    9月12日,刘克俭发表个人声明称,“本人对苏享茂先生的离世深表哀痛。翟某欣女士确系本人外甥女,但与本人少有来往。本人从未见过苏享茂先生,也从未以任何形式介入翟某欣女士与苏享茂先生的任何纠纷。”
    自杀之前,苏享茂曾把前妻翟某欣的身份证号码、住址、电话公布在网络上。9月7日,有疑似翟某欣的微博发消息称,“我已经在朝阳区黑庄户派出所立案,属于刑事案件,对我进行造谣,诽谤,人生攻击,曝光了我的身份证号,电话号和住宅。侵犯我人格名誉权,隐私权。”
    9月12日,北京市朝阳区黑庄户派出所的一位民警告诉澎湃新闻,当天翟某欣确实报过警,但在警方系统里并未检索到立案的信息。
    王冉回忆,翟某欣曾向苏享茂透露自己的工作单位是北京的一家研究所。并从他那里得知,两人相处的两个多月里,翟某欣从来没有上过班。
    9月10日,该研究所一名人事科工作人员告诉澎湃新闻,该单位从未有过叫翟某欣的人,也没有其相关的人事资料信息。
    9月11日,有媒体援引该研究所一名工作人员的话称,2011年5月至2012年4月,翟某欣确实曾在此处工作,几年前离职了。
    9月12日,澎湃新闻再次前往该单位,三名人事科的工作人员同时否认了这一说法,强调翟某欣和研究所没有任何关系。
    “天才”与“码农”
    在王冉眼里,苏享茂是IT技术上的“天才”。两人本科时在北京信息科技大学相识,后来成为好朋友。多年来一直在北京打拼,从无到有。
    苏享茂1980年出生于福建的农村,成绩优异,一直读到北京邮电大学的研究生。毕业之后,苏享茂曾经在百度做过两三年工程师。
    从百度出来以后,苏享茂独自开发了以提供通讯服务为主的App WePhone。“Wephone是他一辈子的心血。”
    苏享茂创业后的生活和大学差异不大,每天围着计算机写代码,很少参加其他活动。
    王冉回忆,苏享茂性格内向,不善言辞。之前谈过两次恋爱,第一次恋爱持续了一年多,第二次是短暂的异地恋。和翟某欣结婚之前,在所有大学班里的同学中,唯独只有苏享茂还单身。苏享茂没有女朋友的时候,王冉怕他孤独,有几次带着他和朋友聚会。但欢声笑语间,苏享茂总插不上话。王冉担心他尴尬,就没带过他了。
    大学同学和朋友陆续结婚后,相互之间来往减少了。苏享茂的大学同学沈浪回忆,2009年的秋天。他和苏享茂同时到纽约出差,两人相约见面。
    换乘几种交通工具后,沈浪在长岛一栋别墅的佣人房里见到了苏享茂,房间没有窗户。沈浪问:“你怎么住在佣人房里。”苏享茂笑了笑,回:“我觉得挺好,只是孤独。”他每天除了吃外卖,其余时间则是坐在房间里,配合公司开发程序。“他一直是这样的一个人,不抽,不喝,不嫖,不赌,不购物,不旅游,只是醉心于他所热爱的程序开发。”
    后来两人在北京聚会,苏享茂眉飞色舞地和他聊起自己开发的WePhone。“他一个人开发,做到了有3000万的用户。”刚开始沈浪不信,直到他打开应用后,“我才惊讶于他在开发方面的才华。”
    WePhone是一款在用户间免费发短信和打电话的手机应用,是北京曳尾科技有限公司开发的产品。北京曳尾科技有限公司的工商资料显示,该公司于2012年注册,注册资本为10万元,法定代表人系苏享茂。
    在同学眼里,苏享茂的生活简单,唯一的爱好是“偶尔下个馆子”,其余时间都在写代码。“他是一个无趣的人,典型的码农。”直到认识翟某欣后,王冉发现“极为节省”的苏享茂整天旅游,购物。
    出事前几天,王冉见了一次苏享茂,他还穿着研究生时期买的学校文化衫,两人商量着一块儿创业。“他技术上有才华,我懂融资,结合起来就好了。”
    苏享茂的公司在北京上地的一栋写字楼里,员工三人公司的产品主要是苏享茂一个人完成,另外两名员工平时负责维护一下系统。
    9月12日中午,澎湃新闻在这里看到,公司大门紧闭,敲了几次门均无人应答。这款软件至今仍可下载,打开程序后依旧会弹出“公司法人被毒妻翟某害死,WePhone即将停止运营”的提醒。
    结束生命之前,苏享茂决定停掉自己的公司。王冉和苏享茂的家人商量,打算继续把公司做下去,他们计划把公司收入的一部分拿给苏享茂的父母,另一部分成立一个“关爱程序员”的基金。
    苏享茂的父母年过八旬,兄弟姐妹5人,他是最小的一个。出事之后,兄弟姐妹没敢把真相告诉两位老人,他们打算等警方立案后,带着苏享茂的骨灰回福建。
    王冉说,苏享茂就像《小李飞刀》里的阿飞,阿飞单纯简单,剑术天下第一,最后拜倒在林仙儿的石榴裙下;苏享茂独自研究软件,做到几千万的量级。但他除了技术厉害,感情是片空白。“阿飞有李寻欢帮他,可惜我不是李寻欢。”
    王冉和好友苏享茂的最后一次交集是在微信朋友圈。9月5日,苏享茂给他点了一次赞。
    那次之后,王冉以为苏享茂熬过去了。前几天,王冉和一个大学同学开玩笑,调侃他的高血压,说“肯定你先走,话音刚落,没想到他(苏享茂)跳下去了。” 他想不明白,为没能拦住他走这条路而遗憾。

    debian桌面系统下面的/etc/network/interfaces配置文件

    $
    0
    0
    做wake up on lan,要用到ethtool设置网卡状态,但是系统关机的过程中会重设这个状态,所以放在网卡关闭脚本的最后,就是 interfaces里面的post-down,这里可以执行任何脚本。。
    man 5 interfaces
    INTERFACES(5) File formats INTERFACES(5)
    NAME
    /etc/network/interfaces – network interface configuration for ifup and
    ifdown
    DESCRIPTION
    /etc/network/interfaces contains network interface configuration infor‐
    mation for the ifup(8) and ifdown(8) commands. This is where you con‐
    figure how your system is connected to the network.
    Lines starting with ‘#’ are ignored. Note that end-of-line comments are
    NOT supported, comments must be on a line of their own.
    A line may be extended across multiple lines by making the last charac‐
    ter a backslash.
    The file consists of zero or more “iface”, “mapping”, “auto” and
    “allow-” stanzas. Here is an example.
    auto lo eth0
    allow-hotplug eth1
    iface lo inet loopback
    mapping eth0
    script /usr/local/sbin/map-scheme
    map HOME eth0-home
    map WORK eth0-work
    iface eth0-home inet static
    address 192.168.1.1
    netmask 255.255.255.0
    up flush-mail
    iface eth0-work inet dhcp
    iface eth1 inet dhcp
    Lines beginning with the word “auto” are used to identify the physical
    interfaces to be brought up when ifup is run with the -a option. (This
    option is used by the system boot scripts.) Physical interface names
    should follow the word “auto” on the same line. There can be multiple
    “auto” stanzas. ifup brings the named interfaces up in the order
    listed.
    Lines beginning with “allow-” are used to identify interfaces that
    should be brought up automatically by various subsytems. This may be
    done using a command such as “ifup –allow=hotplug eth0 eth1”, which
    will only bring up eth0 or eth1 if it is listed in an “allow-hotplug”
    line. Note that “allow-auto” and “auto” are synonyms.
    Stanzas beginning with the word “mapping” are used to determine how a
    logical interface name is chosen for a physical interface that is to be
    brought up. The first line of a mapping stanza consists of the word
    “mapping” followed by a pattern in shell glob syntax. Each mapping
    stanza must contain a script definition. The named script is run with
    the physical interface name as its argument and with the contents of
    all following “map” lines (without the leading “map”) in the stanza
    provided to it on its standard input. The script must print a string on
    its standard output before exiting. See /usr/share/doc/ifupdown/exam‐
    ples for examples of what the script must print.
    Mapping a name consists of searching the remaining mapping patterns and
    running the script corresponding to the first match; the script outputs
    the name to which the original is mapped.
    ifup is normally given a physical interface name as its first
    non-option argument. ifup also uses this name as the initial logical
    name for the interface unless it is accompanied by a suffix of the
    form =LOGICAL, in which case ifup chooses LOGICAL as the initial logi‐
    cal name for the interface. It then maps this name, possibly more than
    once according to successive mapping specifications, until no further
    mappings are possible. If the resulting name is the name of some
    defined logical interface then ifup attempts to bring up the physical
    interface as that logical interface. Otherwise ifup exits with an
    error.
    Stanzas defining logical interfaces start with a line consisting of the
    word “iface” followed by the name of the logical interface. In simple
    configurations without mapping stanzas this name should simply be the
    name of the physical interface to which it is to be applied. (The
    default mapping script is, in effect, the echo command.) The interface
    name is followed by the name of the address family that the interface
    uses. This will be “inet” for TCP/IP networking, but there is also
    some support for IPX networking (“ipx”), and IPv6 networking (“inet6”).
    Following that is the name of the method used to configure the inter‐
    face.
    Additional options can be given on subsequent lines in the stanza.
    Which options are available depends on the family and method, as
    described below. Additional options can be made available by other
    Debian packages. For example, the wireless-tools package makes avail‐
    able a number of options prefixed with “wireless-” which can be used to
    configure the interface using iwconfig(8). (See wireless(7) for
    details.)
    Options are usually indented for clarity (as in the example above) but
    are not required to be.
    IFACE OPTIONS
    The following “command” options are available for every family and
    method. Each of these options can be given multiple times in a single
    stanza, in which case the commands are executed in the order in which
    they appear in the stanza. (You can ensure a command never fails by
    suffixing “|| true”.)
    pre-up command
    Run command before bringing the interface up. If this command
    fails then ifup aborts, refraining from marking the interface as
    configured, prints an error message, and exits with status 0.
    This behavior may change in the future.
    up command
    post-up command
    Run command after bringing the interface up. If this command
    fails then ifup aborts, refraining from marking the interface as
    configured (even though it has really been configured), prints
    an error message, and exits with status 0. This behavior may
    change in the future.
    down command
    pre-down command
    Run command before taking the interface down. If this command
    fails then ifdown aborts, marks the interface as deconfigured
    (even though it has not really been deconfigured), and exits
    with status 0. This behavior may change in the future.
    post-down command
    Run command after taking the interface down. If this command
    fails then ifdown aborts, marks the interface as deconfigured,
    and exits with status 0. This behavior may change in the
    future.
    There exists for each of the above mentioned options a directory
    /etc/network/if-
    All of these commands have access to the following environment vari‐
    ables.
    IFACE physical name of the interface being processed
    LOGICAL
    logical name of the interface being processed
    ADDRFAM
    address family of the interface
    METHOD method of the interface (e.g., static)
    MODE start if run from ifup, stop if run from ifdown
    PHASE as per MODE, but with finer granularity, distinguishing the pre-
    up, post-up, pre-down and post-down phases.
    VERBOSITY
    indicates whether –verbose was used; set to 1 if so, 0 if not.
    PATH the command search path: /usr/local/sbin:/usr/local/bin:‐
    /usr/sbin:/usr/bin:/sbin:/bin
    Additionally, all options given in an interface definition stanza are
    exported to the environment in upper case with “IF_” prepended and with
    hyphens converted to underscores and non-alphanumeric characters dis‐
    carded.
    INET ADDRESS FAMILY
    This section documents the methods available in the inet address fam‐
    ily.
    The loopback Method
    This method may be used to define the IPv4 loopback interface.
    Options
    (No options)
    The static Method
    This method may be used to define ethernet interfaces with statically
    allocated IPv4 addresses.
    Options
    address address
    Address (dotted quad) required
    netmask netmask
    Netmask (dotted quad) required
    broadcast broadcast_address
    Broadcast address (dotted quad)
    network network_address
    Network address (dotted quad) required for 2.0.x kernels
    metric metric
    Routing metric for default gateway (integer)
    gateway address
    Default gateway (dotted quad)
    pointopoint address
    Address of other end point (dotted quad). Note the
    spelling of “point-to”.
    media type
    Medium type, driver dependent
    hwaddress class address
    Hardware Address. class is one of ether, ax25, ARCnet or
    netrom. address is dependent on the above choice.
    mtu size
    MTU size
    The manual Method
    This method may be used to define interfaces for which no configuration
    is done by default. Such interfaces can be configured manually by means
    of up and down commands or /etc/network/if-*.d scripts.
    Options
    (No options)
    The dhcp Method
    This method may be used to obtain an address via DHCP with any of the
    tools: dhclient, pump, udhcpc, dhcpcd. (They have been listed in their
    order of precedence.) If you have a complicated DHCP setup you should
    note that some of these clients use their own configuration files and
    do not obtain their configuration information via ifup.
    Options
    hostname hostname
    Hostname to be requested (pump, dhcpcd, udhcpc)
    leasehours leasehours
    Preferred lease time in hours (pump)
    leasetime leasetime
    Preferred lease time in seconds (dhcpcd)
    vendor vendor
    Vendor class identifier (dhcpcd)
    client client
    Client identifier (dhcpcd, udhcpc)
    hwaddress class address
    Hardware Address. class is one of ether, ax25, ARCnet or
    netrom. address is dependent on this choice.
    The bootp Method
    This method may be used to obtain an address via bootp.
    Options
    bootfile file
    Tell the server to use file as the bootfile.
    server address
    Use the IP address address to communicate with the
    server.
    hwaddr addr
    Use addr as the hardware address instead of whatever it
    really is.
    The ppp Method
    This method uses pon/poff to configure a PPP interface. See those com‐
    mands for details.
    Options
    provider name
    Use name as the provider (from /etc/ppp/peers).
    The wvdial Method
    This method uses wvdial to configure a PPP interface. See that command
    for more details.
    Options
    provider name
    Use name as the provider (from /etc/ppp/peers).
    IPX ADDRESS FAMILY
    This section documents the methods available in the ipx address family.
    The static Method
    This method may be used to setup an IPX interface. It requires the
    ipx_interface command.
    Options
    frame type
    type of ethernet frames to use (e.g. 802.2)
    netnum id
    Network number
    The dynamic Method
    This method may be used to setup an IPX interface dynamically.
    Options
    frame type
    type of ethernet frames to use (e.g. 802.2)
    INET6 ADDRESS FAMILY
    This section documents the methods available in the inet6 address fam‐
    ily.
    The loopback Method
    This method may be used to define the IPv6 loopback interface.
    Options
    (No options)
    The static Method
    This method may be used to define interfaces with statically assigned
    IPv6 addresses.
    Options
    address address
    Address (colon delimited) required
    netmask mask
    Netmask (number of bits, eg 64) required
    gateway address
    Default gateway (colon delimited)
    media type
    Medium type, driver dependent
    hwaddress class address
    Hardware Address. class is one of ether, ax25, ARCnet or
    netrom. address is dependent on this choice.
    mtu size
    MTU size
    The manual Method
    This method may be used to define interfaces for which no configuration
    is done by default. Such interfaces can be configured manually by means
    of up and down commands or /etc/network/if-*.d scripts.
    Options
    (No options)
    The v4tunnel Method
    This method may be used to setup an IPv6-over-IPv4 tunnel. It requires
    the ip command from the iproute package.
    Options
    address address
    Address (colon delimited)
    netmask mask
    Netmask (number of bits, eg 64)
    endpoint address
    Address of other tunnel endpoint (IPv4 dotted quad)
    required
    local address
    Address of the local endpoint (IPv4 dotted quad)
    gateway address
    Default gateway (colon delimited)
    ttl time
    TTL setting
    KNOWN BUGS/LIMITATIONS
    The ifup and ifdown programs work with so-called “physical” interface
    names. These names are assigned to hardware by the kernel. Unfortu‐
    nately it can happen that the kernel assigns different physical inter‐
    face names to the same hardware at different times; for example, what
    was called “eth0” last time you booted is now called “eth1” and vice
    versa. This creates a problem if you want to configure the interfaces
    appropriately. A way to deal with this problem is to use mapping
    scripts that choose logical interface names according to the properties
    of the interface hardware. See the get-mac-address.sh script in the
    examples directory for an example of such a mapping script. See also
    Debian bug #101728.
    It is not currently possible to divide up /etc/network/interfaces into
    multiple files. A feature that would make this possible is some sort
    of inclusion directive. No such feature exists in the current ifupdown
    program. For more information see Debian bug #159884.
    AUTHOR
    The ifupdown suite was written by Anthony Towns . This manpage was contributed by Joey Hess
    .
    SEE ALSO
    ifup(8), iwconfig(8), run-parts(8).
    For advice on configuring this package read the Network Configuration
    chapter of the Debian Reference manual, available at
    http://www.debian.org/doc/manuals/reference/ch-gateway.en.html or in
    the debian-reference-en package.
    Examples of how to set up interfaces can be found in
    /usr/share/doc/ifupdown/examples/network-interfaces.
    ifupdown 5 April 2004 INTERFACES(5)

    http代理的两种模式

    $
    0
    0
    做代理,用squid来做,以前一直都是用来做反向代理,其实正向代理设置也基本一样。。。
    代理有两种模式,一种直接就是http代理,另外一种就是CONNECT代理.
    第一种方式:
    发包的方式是改变http的GET头:
    浏览器的请求包模式应该是
    GET http://www.163.com/ HTTP/1.1
    Accept: */*
    Proxy-Connection: Keep-Alive
    UA-CPU: x86
    Accept-Encoding: gzip, deflate
    User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Maxthon; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; MAXTHON 2.0)
    Host: www.163.com
    Pragma: no-cache
    而第二种模式,是可以建立TCP连接的,当初是为了ssl而建立的。
    发包的过程是:
    先发送:
    CONNECT www.163.com:80 HTTP/1.1
    然后代理服务器收到这个包之后,就会去和www.163.com 80建立连接
    成功的话会返回:
    HTTP/1.0 200 Connection established
    然后客户端再发送正常的http请求:
    GET / HTTP/1.1
    Accept: */*
    Proxy-Connection: Keep-Alive
    UA-CPU: x86
    Accept-Encoding: gzip, deflate
    User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Maxthon; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; MAXTHON 2.0)
    Host: www.163.com
    Pragma: no-cache
    就会拿到正常的结果了.

    rhel5 转到 centos5

    $
    0
    0
    rhel5的yum source 不好找,还是直接用centos的方便,转换一下就好了

    It is not hard to switch to CenOS5, just install a couple of rpm packages and your done, but you really do not have to switch. It is possible to add the CentOS repos to your yum configuration. Sample /etc/yum.repos.d/ CentOS5.repo (sample name) file below; [CentOS5 base]
    name=CentOS-5-Base
    mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=os
    #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
    gpgcheck=0
    enabled=0
    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
    [CentOS5 updates]
    name=CentOS-5-Updates
    mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=updates
    gpgcheck=0
    enabled=0
    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
    [CentOS5plus]
    name=CentOS-5-Plus
    mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=centosplus
    gpgcheck=0
    enabled=0
    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
    Notice the CentOS5 repos are by default disabled. This is a good idea, one can enable the repos at anytime using the yum –enablerepo switch. It might be a good idea to import the CentOS5 key (see the example repo file above) and enable the gpgcheck;
    rpm –import http://isoredirect.centos.org/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
    If you really want to switch to CentOS then download and install the;
    For 64-bit based system:
    http://isoredirect.centos.org/centos/5/os/x86_64/CentOS/centos-release-5-0.0.el5.centos.2.x86_64.rpm
    http://isoredirect.centos.org/centos/5/os/x86_64/CentOS/centos-release-notes-5.0.0-2.x86_64.rpm
    For 32-bit based system:
    http://isoredirect.centos.org/centos/5/os/i386/CentOS/centos-release-5-2.el5.centos.i386.rpm
    http://isoredirect.centos.org/centos/5/os/i386/CentOS/centos-release-notes-5.2-2.i386.rpm
    上面的地址会经常变的,升级版本就会变,所以直接到 http://isoredirect.centos.org/centos/5/os/
    里面找 A couple of additional packages might be needed but these should get you started nicely. Test install them to find out if you need to add any packages first, example;
    rpm -Uvh centos-release*.rpm –test
    You might want to remove the Red Hat release packages first, or you may have to use the force or replace packages switch to really install, for example;
    rpm -Uvh centos-release*.rpm –force [–replacepkgs]
    Of course the example repo file above would not be needed if you really switch. It would be an excellent idea to first unregister any systems from RHN before switching, this way you can re-register other systems on RHN if desired.

    调整debian的ipvs内核

    $
    0
    0
    最好把
    CONFIG_IP_VS_TAB_BITS=12
    调整成
    CONFIG_IP_VS_TAB_BITS=20
    这样hash表有100多w,可以顶得住大流量的情况了,哎。
    如果是同版本的source,直接把/boot/config-xxx 拷贝到源代码目录下面的.config,然后修改就可以了 ,省下了下面make menuconfig的一步。

    首先要介绍一下,通常其它操作系统的内核编译是比较繁琐的。然而,由于Debian强大的dpkg软件包管理系统,使得内核的升级、编译也变得容易很多。这篇文章将会一步一步教你如何编译自己的,带有grsecurity的Linux 2.6内核。Grsecurity是一个Linux的内核补丁,针对Linux内核的某些安全漏洞进行修补以及安全性的增强。
    首先用 apg-get 自动下载并安装一些必要的软件包,包括编译内核需要的kernel-package和ncurses-dev等。如果在内核编译、制作过程中,遇到错误提示说某个软件包不存在的话,请同样使用 apt-get install 命令进行下载安装。
    apt-get install build-essential kernel-package ncurses-dev fakeroot wget bzip2 make patch
    cd /usr/src
    wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.11.7.tar.bz2
    tar -xjf linux-2.611.7.tar.bz2
    请到 http://www.kernel.org查看最新的内核版本。
    之后,下载grsecurity。请注意,务必选择与内核版本相应的grsecurity版本。(grsecurity网站)
    wget http://www.grsecurity.org/grsecurity-2.1.5-2.6.11.7-200504111924.patch.gz
    gunzip grsecurity-2.1.5-2.6.11.7-200504111924.patch.gz
    执行以下命令将新内核打上grsecurity补丁
    patch -p0 < ./grsecurity-2.1.5-2.6.11.7-200504111924.patch
    OK,切换到新内核的目录
    cd linux-2.6.11.7
    为了节省时间,请执行以下命令从现有内核中获得配置
    make oldconfig
    执行完此条命令后,会根据新老内核的差异情况,询问你一些问题,如果不确定的话请都是用默认(直接按回车)。
    以上步骤完成后,执行内核配置程序
    make menuconfig
    如果你的Debian有X的话,也可以使用 make xconfig 来进行内核的配置。请自行根据实际情况进行配置,不确定的话请保持默认。
    在 Security Options 中,选择 Grsecurity 并将其设置到 medium。然后根据grsecurity的官方推荐,请在 Security Options -> PaX -> PaX Control 中,将 MAC system integration 设置为 [None] 。
    至此,内核的配置就算完成了。请按 ESC 多次后退出内核配置页面(在系统询问是否要保存新内核的配置时,当然要选择yes)。
    执行以下命令进行新内核的生成!
    make-kpkg clean
    fakeroot make-kpkg –initrd –append-to-version=noobu –revision=1.0 kernel_image
    fakeroot 的作用是在内核的生成过程中暂时性获取root权限。如果你直接是用root帐号操作的话,可以省略fakeroot。–append-to-version定义的是内核的软件包名字,类似 kernel-image-2.6.11.7-noobu 这样。而 –revision定义的是软件包的版本。
    现在系统会开始进行新内核的生成,屏幕上会有许多文字闪过。请注意,如果生成过程中出现错误,请执行 make clean 后,用 make menuconfig 重新配置内核。一般都是仔细看错误信息,找到出错的模块,然后将其去除。
    内核顺利生成完毕后,会在/usr/src目录下产生一个 deb 包。例如 kernel-image-2.6.11.7-noobu_1.0_i386.deb

    如果用
    fakeroot make-kpkg –initrd –append-to-version=noobu –revision=1.0 binary
    就会生成 headers、image、manual、doc、src 所有的包。

    执行以下命令安装新内核!^_^
    dpkg -i kernel-image-2.6.11.7-noobu_1.0_i386.deb
    接着Debian会安装新内核并更新Grub的配置文件。重新启动(shutdown -r now)后将会boot到新内核。
    用 uname -a 看一下,是不是看到新内核的名字啦?
    怎么样,在Debian上重新编译内核是不是很简单很高效呢?
    Viewing all 20528 articles
    Browse latest View live


    <script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>