在启动自定义服务的时候,希望使用8370端口,却发现端口已经被nginx或node占用了,无法启动。但是lvs又已经申请了,改端口的话比较麻烦。所以可以修改下 /proc/sys/net/ipv4/ip_local_port_range 参数,使tcp协议分配的端口从一个比较大的范围开始启用,这样,node或nginx就不会占用较小的端口了。
echo '32768 61000' > /proc/sys/net/ipv4/ip_local_port_range
阅读全文

在启动自定义服务的时候,希望使用8370端口,却发现端口已经被nginx或node占用了,无法启动。但是lvs又已经申请了,改端口的话比较麻烦。所以可以修改下 /proc/sys/net/ipv4/ip_local_port_range 参数,使tcp协议分配的端口从一个比较大的范围开始启用,这样,node或nginx就不会占用较小的端口了。
echo '32768 61000' > /proc/sys/net/ipv4/ip_local_port_range
在shell下想用循环输出数字,然后用0补齐,拼出文件名来。.
可以使用printf。
for((i=45; i<=49; i++))
do
printf -v file "%05d" "${i}"
echo $file
done
使用 sudo rm -rf *.sst 删除文件时,出现如下提示:
sudo: unable to execute /bin/rm: Success
出现这种错误时,是由于*匹配的文件太多导致的。
所以需要换个方式来删除
sudo sh -c 'find -name "*.sst"|xargs rm -rf '
使用sh -c 表示对整条命令使用sudo权限.
/proc/sys/net/ipv4/icmp_timeexceed_rate
这个在traceroute时导致著名的“Solaris middle star”。这个文件控制发送ICMP Time Exceeded消息的比率。
/proc/sys/net/ipv4/igmp_max_memberships
主机上最多有多少个igmp (多播)套接字进行监听。
/proc/sys/net/ipv4/inet_peer_gc_maxtime
求 助: Add a little explanation about the inet peer storage? Minimum interval between garbage collection passes. This interval is in effect under low (or absent) memory pressure on the pool. Measured in jiffies.
/proc/sys/net/ipv4/inet_peer_gc_mintime
每一遍碎片收集之间的最小时间间隔。当内存压力比较大的时候,调整这个间隔很有效。以jiffies计。
/proc/sys/net/ipv4/inet_peer_maxttl
entries的最大生存期。在pool没有内存压力的情况下(比如,pool中entries的数量很少的时候),未使用的entries经过一段时间就会过期。以jiffies计。
/proc/sys/net/ipv4/inet_peer_minttl
entries的最小生存期。应该不小于汇聚端分片的生存期。当pool的大小不大于inet_peer_threshold时,这个最小生存期必须予以保证。以jiffies计。
/proc/sys/net/ipv4/inet_peer_threshold
The approximate size of the INET peer storage. Starting from this threshold entries will be thrown aggressively. This threshold also determines entries’ time-to-live and time intervals between garbage collection passes. More entries, less time-to-live, less GC interval.
/proc/sys/net/ipv4/ip_autoconfig
这个文件里面写着一个数字,表示主机是否通过RARP、BOOTP、DHCP或者其它机制取得其IP配置。否则就是0。
/proc/sys/net/ipv4/ip_default_ttl
数据包的生存期。设置为64是安全的。如果你的网络规模巨大就提高这个值。不要因为好玩而这么做——那样会产生有害的路由环路。实际上,在很多情况下你要考虑能否减小这个值。
首先:
bzip2 -d wkhtmltopdf-0.11.0_rc1-static-i386.tar.bz2
会解压成一个tar文件
wkhtmltopdf-0.11.0_rc1-static-i386.tar
在打开tar即可。
tar -xvf wkhtmltopdf-0.11.0_rc1-static-i386.tar
就会看到包里的内容了。
当出现此错误时,说明本地git没有安装curl-devel包,可以直接使用yum install git完整安装git来解决。
不过现在由于我的开发机已经安装了公司的另一个curl包,不能覆盖安装,会发生冲突而中断。
所以就需要用另一种方式来提交。
不通过https,而是通过git://github.com ,通过建立ssh信任来直接提交。
在生成公钥,填写在github.com的账户管理中后。
本地设置一下远程仓库url
git remote set-url --push origin git@github.com:DigDeeply/Qalert.git
再git push。
就ok啦。。
