当firefox升级到3.6时,论坛登录框的不能显示,发贴时不能勾选源码按钮.
编辑include/js/common.js
去掉 document.getBoxObjectFor &&
保存,然后到后台更新缓存.
参考: http://www.discuz.net/thread-1553662-1-1.html http://www.discuz.net/thread-1553664-1-1.html
关注互联网、网页设计、Web开发、服务器运维优化、项目管理、网站运营、网站安全…
当firefox升级到3.6时,论坛登录框的不能显示,发贴时不能勾选源码按钮.
编辑include/js/common.js
去掉 document.getBoxObjectFor &&
保存,然后到后台更新缓存.
参考: http://www.discuz.net/thread-1553662-1-1.html http://www.discuz.net/thread-1553664-1-1.html
Posted in Discuz/Uchome/Ucenter, 其它.
rev="post-1123" No comments
– 2010/09/10
备份十几万图片文件时碰到内核出错,reboot等命令也无法重启。
重启后再试还是出错。
SELinux: initialized (dev rpc_pipefs, type rpc_pipefs), uses genfs_contexts
Losing some ticks… checking if CPU frequency changed.
Unable to handle kernel NULL pointer dereference at virtual address 000000f8
printing eip:
c02c4ecb
*pde = 00004001
Oops: 0000 [#1]
SMP
Modules linked in: autofs4 sunrpc ipt_state iptable_filter iptable_nat ip_conntrack iptable_mangle ip_tables dm_mod button battery ac uhci_hcd ehci_hcd tg3 floppy ext3 jbd ata_piix libata aic79xx sd_mod scsi_mod
CPU: 1
EIP: 0060:[
rev="post-1120" No comments
– 2010/09/07
网站服务器所使用的各 Linux 发行版统计数据对比分析: CentOS 增长最快,Debain 平稳发展,Ubuntu 稍有提升 Red Hat和Fedora略有下降
This report shows the historical trends in the usage of Linux versions since October 2009.
2009 1 Oct | 2009 1 Nov | 2009 1 Dec | 2010 1 Jan | 2010 1 Feb | 2010 1 Mar | 2010 1 Apr | 2010 1 May | 2010 1 Jun | 2010 1 Jul | 2010 1 Aug | 2010 1 Sep | 2010 3 Sep | |
CentOS | 23.4% | 22.0% | 21.6% | 22.1% | 22.8% | 23.5% | 24.9% | 25.8% | 27.5% | 29.9% | 31.8% | 33.3% | 33.4% |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Debian | 26.5% | 28.0% | 28.5% | 28.6% | 28.4% | 28.3% | 28.1% | 28.1% | 27.7% | 27.0% | 26.5% | 26.0% | 26.0% |
Red Hat | 21.0% | 21.4% | 21.7% | 21.5% | 21.1% | 20.6% | 19.7% | 19.2% | 18.4% | 17.5% | 16.7% | 16.1% | 16.1% |
Ubuntu | 8.8% | 8.7% | 8.8% | 9.0% | 9.2% | 9.5% | 9.8% | 9.9% | 10.0% | 10.1% | 10.1% | 10.2% | 10.2% |
Fedora | 11.3% | 11.0% | 10.7% | 10.3% | 10.0% | 9.7% | 9.2% | 8.9% | 8.6% | 8.1% | 7.8% | 7.5% | 7.4% |
SuSE | 6.2% | 6.1% | 6.0% | 5.9% | 5.6% | 5.6% | 5.3% | 5.3% | 5.1% | 4.8% | 4.6% | 4.5% | 4.5% |
Gentoo | 2.6% | 2.5% | 2.5% | 2.5% | 2.5% | 2.5% | 2.5% | 2.4% | 2.4% | 2.3% | 2.2% | 2.2% | 2.1% |
Mandriva | 0.2% | 0.2% | 0.2% | 0.2% | 0.2% | 0.2% | 0.2% | 0.2% | 0.2% | 0.2% | 0.2% | 0.2% | 0.2% |
Turbolinux | 0.1% | 0.1% | 0.2% | 0.2% | 0.2% | 0.1% | 0.1% | 0.1% | 0.1% |
The diagram shows only Linux versions with more than 1% usage.
来源:
rev="post-1118" No comments
– 2010/09/03
1.下载 postfix_mailserver.tar.gz http://forums.cacti.net/download.php?id=4091 #wget http://forums.cacti.net/download.php?id=4091
2.解压得到两个文件 #tar zxvf postfix_mailserver.tar.gz cacti_host_template_postfix_mailserver.xml fetch_mail_statistics.pl
3.测试程序文件 #chmod 0775 fetch_mail_statistics.pl #cp fetch_mail_statistics.pl /usr/local/postfix/libexec/ #cd !$
/var/log/maillog 为mail日志文件 /var/log/mailstats.db 为程序存放的数据文件 1.3.6.1.4.1.2021.255 为snmp用的oid
#./fetch_mail_statistics.pl /var/log/maillog /var/log/mailstats.db .1.3.6.1.4.1.2021.255 -n .1.3.6.1.4.1.2021.255 .1.3.6.1.4.1.2021.255.0 integer 3
有数字输出就是正确了
4.安装配置snmp snmp的安装和基本配置参考
#vi /usr/local/etc/snmp/snmpd.conf #或者这个位置vi /etc/snmp/snmp.conf
重启snmp
5.snmpwalk测试 #snmpwalk -v 1 -c c1gprivate localhost .1.3.6.1.4.1.2021.255
#snmpwalk -v 2c -c c1gprivate localhost .1.3.6.1.4.1.2021.255.0
出现下面错误请再检查snmpd.conf
6.cacti导入postfix模板 在cacti控制后台 Console -> Import Templates 导入cacti_host_template_postfix_mailserver.xml 在Console -> Host Templates 可以看到名为”Postfix Mailserver”的模板
7.创建postfix的监控图像
Console -> Devices
选择被控监的服务器,在”Associated Graph Templates”中添加”ucd/net – Postfix – Mail Transporting ”
Console -> Create New Graphs
选择被控监的服务器,勾选”Create: ucd/net – Postfix – Mail Transporting”并保存
Console -> Graph Management 稍后就可以看到图像
其它注意项 1.检查 iptables 是否允许snmp 数据包通过 2.请关闭 selinux (RHEL和centos 会出现这个问题)
参考: http://forums.cacti.net/about6657-0-asc-0.html http://dev.firnow.com/course/6_system/linux/Linuxjs/2008618/126258.html
rev="post-1115" No comments
– 2010/08/31
RedHat AS4 安装yum
下载rpm http://mirrors.163.com/centos/4/os/i386/CentOS/RPMS/yum-2.4.3-4.el4.centos.noarch.rpm http://mirrors.163.com/centos/4/os/i386/CentOS/RPMS/python-elementtree-1.2.6-5.el4.centos.i386.rpm http://mirrors.163.com/centos/4/os/i386/CentOS/RPMS/sqlite-3.3.6-2.i386.rpm http://mirrors.163.com/centos/4/os/i386/CentOS/RPMS/python-sqlite-1.1.7-1.2.1.i386.rpm http://mirrors.163.com/centos/4/os/i386/CentOS/RPMS/python-urlgrabber-2.9.8-2.noarch.rpm http://mirrors.163.com/centos/4/os/i386/CentOS/RPMS/yum-metadata-parser-1.0-8.el4.centos.i386.rpm ftp://ftp.isu.edu.tw/pub/Linux/CentOS/4.8/os/s390/CentOS/RPMS/centos-yumconf-4-4.5.noarch.rpm
安装yum rpm -ivh centos-yumconf-4-4.5.noarch.rpm rpm -ivh sqlite-3.3.6-2.i386.rpm rpm -ivh python-sqlite-1.1.7-1.2.1.i386.rpm rpm -ivh python-urlgrabber-2.9.8-2.noarch.rpm rpm -ivh python-elementtree-1.2.6-5.el4.centos.i386.rpm rpm -ivh yum-metadata-parser-1.0-8.el4.centos.i386.rpm rpm -ivh yum-2.4.3-4.el4.centos.noarch.rpm
yum clean all yum list
Posted in linux 维护优化, 技术.
rev="post-1113" No comments
– 2010/08/27
linux文字终端下的俄罗斯方块游戏 支持单人,双人及网络对战。
下载安装 wget http://victornils.net/tetris/vitetris-0.57.tar.gz tar zxvf vitetris-0.57.tar.gz cd vitetris-0.57 ./configure –prefix=/opt/gamevitetris make make install /opt/gamevitetris/bin/tetris
游戏开始的界面
Posted in Linux游戏.
rev="post-1108" No comments
– 2010/08/26
当用cat或tail命令显示一个二进制文件后终端可能会变成乱码
解决方法:
1.输入clean命令或按ctrl+L
2.输入reset命令
3.按ctrl+v再按ctrl+o 会出现个^O再按回车 ctrl+v 表示下一输入为特殊字符 ctrl+o 表示^O 切换为原来字符集
Posted in linux 维护优化, 技术.
rev="post-1105" No comments
– 2010/08/26
服务运行时通常会产生个pid文件,我们可以检查这个文件是否存在来简单判定服务是否在运行。
http://exchange.nagios.org/directory/Plugins/Uncategorized/Operating-Systems/Linux/checkfile/details
check_file.pl
在被监控机上 wget http://exchange.nagios.org/components/com_mtree/attachment.php?link_id=1094&cf_id=24
mv check_file.pl /usr/local/nagios/libexec/ cd !$ chown nagios:nagios check_file.pl chmod 0775 check_file.pl
#在nrpe.cfg中增加
#重启nrpe ps aux|grep nrpe kill $pid sudo -u nagios /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
在监控机上 在需要监控的服务器配置文件中增加
重启nagios服务后就可以看到了
rev="post-1102" No comments
– 2010/08/25
底光缆是国际互联网的骨架。光缆的多少,代表一国与互联网的联系是否紧密。
有人利用微软的Bing地图,以及wikipedia的数据,做出了一幅互动式的世界海底光缆分布图。真是厉害啊。
从地图上可以看到,中国大陆的海底光缆连接点只有三个,因此非常容易对出入境的信息进行控制。
第一个是青岛(2条光缆)。
第二个是上海(6条光缆)。
第三个是汕头(3条光缆)。
由于光缆之间存在重合,所以实际上,中国大陆与Internet的所有通道,就是3个入口6条光缆。
带宽:2.56Tbps
长度:19000km
经过地区:中国大陆、香港、台湾、日本、韩国、马来西亚、菲律宾。
入境地点:汕头,上海。
网址:http://en.wikipedia.org/wiki/APCN_2_(cable_system)
带宽:2.2Tbps
长度:30000km
经过地区:中国大陆,台湾,日本,韩国,美国。
入境地点:汕头,上海。
网址:http://en.wikipedia.org/wiki/CUCN_(cable_system)
带宽:960Gbps
长度:39000km
经过地区:东亚,东南亚,中东,西欧。
入境地点:汕头,上海。
网址:http://en.wikipedia.org/wiki/SEA-ME-WE_3
带宽:10.24Tbps
长度:36800km
经过地区:亚太地区
入境地点:上海,青岛
网址:http://en.wikipedia.org/wiki/C2C_(cable_system)
带宽:10Gbps
长度:27000km
经过地区:西欧,中东,南亚,东亚
入境地点:上海
网址: http://en.wikipedia.org/wiki/Fiber-Optic_Link_Around_the_Globe
带宽:5.12Tbps
长度:17700km
经过地区:中国大陆,台湾,韩国,美国
入境地点:上海,青岛
网址:http://en.wikipedia.org/wiki/TPE_(cable_system)
作为比较,台湾有9条光缆,香港和韩国各有11条光缆,而日本至少有11个入口15条光缆。
来源:阮一峰
rev="post-1087" No comments
– 2010/08/18
项目网址 http://code.google.com/p/mysql-cacti-templates/
下载包并取出ss_get_mysql_stats.php 文件
修改 ss_get_mysql_stats.php 中mysql配置
创建缓存目录
mysql 创建用户cacti 给予process 权限,如果要监控InnoDB状态,还必须有”SUPER”权限
在cacti管理界面Import Templates导入 cacti_host_template_x_mysql_server_ht_0.8.6i-sver1.1.7.xml
添加图表 New Graphs 选择已有Devices在Associated Graph Templates中添加 X MySQL Connections GT 然后点击Create按钮 过几分钟就可以看到图表
====================2014-10-27更新 支持多端口
在Console -> Data Templates 找到mysql-cacti-templates的mysql模板, 在这里面把Port的Use Per-Data Source Value (Ignore this Value)选中,意思是由用户输入这个参数的值,然后保存。
在Console->Data Input Methods内,把所有有关mysql数据项的Port都改成不请允许为空 取消选中Allow Empty Input,保存。
上面全部改完后,在创建图型的时候会提示输入端口: 输入你自己的mysql server端口。然后点create就好了。
参考 http://xok.la/2009/05/cacti_mysql_monitor.html http://www.linuxidc.com/Linux/2011-08/41438.htm
rev="post-1075" No comments
– 2010/08/04
近期评论