Category Archives: 日记

date

delday=$(date -d “7 days ago” +%Y%m%d)

Posted in 日记 | Leave a comment

centos pxe tftp kickstart httpd

首先安装httpd dhcp tftp ddns-update-style interim; ignore client-updates; subnet 10.10.10.0 netmask 255.255.255.0 { # — default gateway option routers                  10.10.10.1; option subnet-mask              255.255.255.0; option nis-domain               “domain.org”; option domain-name              ”domain.org”; option domain-name-servers      10.10.10.1; filename “pxelinux.0″; next-server 10.10.10.200; option time-offset              -18000; # Eastern Standard Time #       option ntp-servers              192.168.1.1; … Continue reading

Posted in 日记 | Leave a comment

linux 和freebsd的时间

linux下 前一天的日期 date -d”1 day ago” +”%y%m%d” date -d”1 month ago” +”%y%m%d” linux和bsd通用格式 day=`date +%Y%m%d%H` 类似的还有 `date -d ’2 month ago’ +’%Y%m%d%H’` bsd下 date -v-1d -v-1m +”%y%m%d” today=$(date +%Y-%m-%d) delday=$(date -v -2d +%Y-%m-%d)

Posted in 日记 | Leave a comment

查看连接数

netstat -n|awk ‘/^tcp/ {++S[$NF]} END {for( a in S) print a, S[a]}’

Posted in 日记 | Leave a comment

centos nginx squid apache架构

架构是nginx->squid->apache nginx配置 upstream squid { server    10.10.10.59:3128 ; } server { listen       80; server_name www.37du.org; index index.html index.htm index.php; #               root  /home/wwwroot; location / { proxy_pass         http://squid; proxy_redirect          off; proxy_set_header        Host $host; proxy_set_header        X-Real-IP $remote_addr; proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size    10m; client_body_buffer_size 128k; proxy_connect_timeout   90; proxy_send_timeout      90; proxy_read_timeout      90; proxy_buffer_size       … Continue reading

Posted in 日记 | Leave a comment

discuz SELECT value FROM uc_vars WHERE name=’noteexists’

首先这个原因就是无法修改头像。造成这个原因一个是ucenter下的config.inc.php 数据库配置文件没有修改。 还有一个原因可能就是define(‘UC_DBTABLEPRE’ 后面加上数据库前缀

Posted in 日记 | Leave a comment

黑莓 内存卡的问题

今天买了个内存卡加在8330中。大容量模式复制mp3 总是报错。用软件也报错。最后经过店主指点,是开启了压缩的问题 ,系统->内存 压缩功能禁用就可以了。

Posted in 日记 | Leave a comment

rhel centos 5.1 ftp命令存在bug

rhel centos 5.1 ftp命令存在bug,手动ftp正常。但是通过脚本就会爆出 glibc detected *** ftp: malloc(): memory corruption: 0x0833ca38 lib/libc.so.6[0xc52fbb] /lib/libc.so.6(__libc_malloc+0x7e)[0xc5412e] /lib/libc.so.6[0xc41faf] /lib/libc.so.6(fopen64+0x2c)[0xc4455c] /lib/libselinux.so.1(matchpathcon_init_prefix+0x6b)[0x1f0beb] /lib/libselinux.so.1[0x1f1328] /lib/libselinux.so.1(matchpathcon+0×25)[0x1f1555] /usr/lib/libkrb5support.so.0[0x7e7aad] /usr/lib/libkrb5support.so.0(krb5int_labeled_fopen+0×37)[0x7e7db7] 遇到这样的无法进行处理,因为系统也无法升级。只好改用lftp

Posted in 日记 | Leave a comment

黑莓8330混刷教程

如果没有出现安装程序,主要是dm 和8330操作系统的问题,把两个都重装。先删除vender.xml先 一、相关程序: 下载BlackBerry Curve (TM) 8330最新版操作系统OS v5.0.0.438 黑莓手机瑞士军刀BBSAK1.7(用于格式化手机,实现507) 9500中文语言包+CDMA中文支持 二,首先先安装黑莓dm桌面管理器5.0 、刷机步骤: 1、安装:BlackBerry Curve (TM) 8330最新版操作系统OS v5.0.0.438 删除:C:\Program Files\Common Files\Research In Motion\AppLoader\ Vendor.xml 2、用瑞士军刀BBSAK1.2格式化手机,使手机显示507。 3、运行C:\Program Files\Common Files\Research In Motion\AppLoader\ Loader.exe 刷入BlackBerry Curve (TM) 8330最新版操作系统OS v5.0.0.438。 4、 先备份C:\Program Files\Common Files\Research In … Continue reading

Posted in 日记 | Leave a comment

bind 莫名其妙无法解析

messages 下有failed while receiving responses: permission denied 这个是selinux的问题 因为named运行在chroot环境下。所以关闭selinux 就可以正常解析 logging channel ‘query_log’ file ‘/var/named/chroot/var/log/named/query.log’: file not found 主要是在配置文件中的配置。首先查看named在哪个目录运行 一般都是/var/named/chroot 修改named.conf 在 /var/named/chroot/var/etc/下

Posted in 日记 | Leave a comment