Hyper-V安装CentOS 6.3后无法安装LIC3.3,也就是Linux Integration Services V3.3 集成服务,安装时报错,显示kernel(clocksource_register)神马神马的,总之是不让装。

参考了洋同志们给的帮助 http://social.technet.microsoft.com/Forums/zh-CN/linuxintegrationservices/thread/0b94561d-9d15-4d9d-97ec-a67580c4db8a

顺利解决,貌似是将linux内核降到 2.6.32-71

我用的是64位的,所以找到以下内核的下载地址,进行安装。

Download

mirror.switch.ch kernel-devel-2.6.32-71.el6.x86_64.rpm
ftp.ntua.gr kernel-devel-2.6.32-71.el6.x86_64.rpm
ftp.icm.edu.pl kernel-devel-2.6.32-71.el6.x86_64.rpm
ftp.icm.edu.pl kernel-devel-2.6.32-71.el6.x86_64.rpm
ftp.pbone.net kernel-devel-2.6.32-71.el6.x86_64.rpm
ftp.pbone.net kernel-devel-2.6.32-71.el6.x86_64.rpm  

rpm -i --force kernel-2.6.32-71.el6.x86_64.rpm

reboot

然后再加载LIC3.3,安装即可。

找不到网卡的时候,修改了一下snmpd.conf就好了

http://blog.sina.com.cn/s/blog_6a03f09f0100xcf8.html

Cacti snmp找不到网卡的问题,请帮忙解决net-snmp版本5.0.9
编译配置:
./configure --with-default-snmp-version="3" --with-sys-contact="root@localhost" --with-sys-location="beijing" --with-logfile
="/var/log/snmpd.log" --with-persistent-directory="/var/net-snmp" --with-libwrap

snmp安装完成后,配置了一下snmpd.conf
内容为:

rocommunity abc_snmp
com2sec notConfigUserdefault abc_snmp
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.2
view systemview included .1.3.6.1.2.1.25.1.1
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.2
view systemview included .1.3.6.1.2.1.2.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1
view systemview included .1.3.6.1.4.1.2021.10.1.3.1
view systemview included .1.3.6.1.4.1.2021.10.1.3.2
view systemview included .1.3.6.1.4.1.2021.10.1.3.3
view systemview included .1.3.6.1.4.1.2021.4.3.0
view systemview included .1.3.6.1.4.1.2021.4.4.0
view systemview included .1.3.6.1.4.1.2021.4.5.0
view systemview included .1.3.6.1.4.1.2021.4.6.0
view systemview included .1.3.6.1.4.1.2021.4.11.0
view all included .1 80
accessnotConfigGroup "" any noauth exactall none none
syslocation abc
syscontact abc@abcd
pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat

然后把编译目录下/dist/snmpd-init.d cp到/etc/rc.d/init.d/snmpd
然后修改/etc/rc.d/init.d/snmpd
#!/bin/sh
#
# snmpd This shell script takes care of starting and stopping
# the net-snmp SNMP daemon
#
# chkconfig: - 26 74
# description: snmpd is net-snmp SNMP daemon.

# Source function library.
. /etc/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

RETVAL=0
name="snmpd"
prog="/usr/local/sbin/snmpd"

[ -x $prog -a -f /usr/local/share/snmp/snmpd.conf ] || exit 0

start() {
# Start daemons.
echo -n $"Starting $name: "
daemon $prog -Cc /etc/snmp/snmpd.conf
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$name
return $RETVAL
}

stop() {
# Stop daemons.
echo -n $"Shutting down $name: "
killproc $prog
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$name
return $RETVAL
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status $name
RETVAL=$?
;;
restart|reload)
stop
start
RETVAL=$?
;;
condrestart)
if [ -f /var/lock/subsys/$name ]; then
stop
start
RETVAL=$?
fi
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
exit 1
esac

exit $RETVAL

修改的内容主要是把启动时的命令添加了参数 -Cc /etc/snmp/

请建议vpn方案...

snmpd.conf 修改snmpd读取的配置文件

在cacti添加了这个服务器以后http://www.2uphone.com,取不到数据,不知道为什么,请高人指导http://www.vaexcellent.com!佳能600DCacti版本是0.8.6h for linux,数据获取方式是Cactid,Cactid默认编译.
我觉得问题应该不是Cactid,因为我以前用cmd.php取数据也是没有取到请看cacti下 的log/cacti.log查找问题你要抓的网卡是千M还是百M,是32位还是64位?
下一个新的net-snmp从新编译安装试试。
configure 时加个--enable-mfd-rewrites我现在严重怀疑是我的cacti端的net-snmp版本太低.正在重新编译5.4版的.希望有些奇迹. 我的网卡32位1000M的

shell> rpm --import http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
shell> vi /etc/yum.repos.d/utterramblings.repo

[utterramblings]
name=Jason's Utter Ramblings Repo
baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka

(3) 关闭yum fastestmirror 功能
shell> vi /etc/yum/pluginconf.d/fastestmirror.conf

enabled=0

介于机房不提供用户流量查询服务,故自行安装。

yum install mysql mysql-server php php-mysql zlib libpng freetype libjpeg fontconfig gd libxml2 rrdtool net-snmp net-snmp-utils net-snmp-devel cacti

 

以上便于记录

CentOS5(X86)  http://mirrors.sohu.com/fedora-epel/5/i386/epel-release-5-4.noarch.rpm

CentOS6(X64) http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm

http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-7.noarch.rpm

其他版本以此地址自行搜索即可

-----------------------------

CentOS 5.5 yum更新源推荐--163、搜狐、中科大

更新方法如下:

先进入yum源配置目录cd /etc/yum.repos.d备份系统自带的yum源
mv CentOS-Base.repo CentOS-Base.repo.save

下载其他更快的yum源
中科大的yum源:
wget http://centos.ustc.edu.cn/CentOS-Base.repo

163的yum源:
wget http://mirrors.163.com/.help/CentOS-Base-163.repo

sohu的yum源
wget http://mirrors.sohu.com/help/CentOS-Base-sohu.repo

更新玩yum源后,建议更新一下,使操作立即生效
yum makecache

近日服务器出现Disabling IRQ #xxx 的错误,根据网络搜索得知,是IRQ冲突所致。

通过修改 acpi=off noapic 仍然不时出现网络ping值增高到100ms左右的现象。

换块网卡,治标治本。

或者,尝试通过重启网卡可临时解决,但仍会出现异常。

所以写了如下脚本,当ping一个ip延迟超过10ms的时候,则判断irq冲突,网卡异常,则重启网卡。

放到crontab里,每隔5分钟检查一次。

*/5 * * * * /check_irq.sh

#!/bin/sh
d=`ping -c 1 192.168.1.100 |awk -F '[= ]+' '/^64/{print $((NF-1))}'`
#echo $d
if [[ $d > 10 ]]; then
#重启网卡
/sbin/ifconfig eth1 down
/sbin/ifconfig eth1 up
fi

原先在hyper-v下安装linux,只能搭配旧的网络适配器,不支持hyper-v内建的。所以我们需要安装Linux Integration Services。

Linux Integration Services 3.2下载地址

http://www.microsoft.com/downloads/zh-cn/details.aspx?FamilyID=216de3c4-f598-4dff-8a4e-257d4b7a1c12

用hyper-v管理工具加载Linux IC v3.2.iso,将里面的文件复制到一个目录下,如:/usr/local/data-original/cdrom

执行./install.sh

安装完毕后会提示reboot,我们这时执行halt,关闭服务器。

然后我们需要对虚拟机进行设置,移除旧的网络适配器,加入新的,这里必须选择手动指定MAC地址,记住这个MAC地址,一会儿要用到。

开启虚拟机

vi /etc/sysconfig/network-scripts/ifcfg-eth0

我们要注意一点,DEVICE这里要填seth0,HWADDR填写刚刚在hyper-v管理器中手动指定的MAC地址。如下:

DEVICE="seth0"
HWADDR="<Default MAC address>"
NM_CONTROLLED="no"
ONBOOT="yes"
TYPE=Ethernet
NAME="Seth0"
IPADDR="<IP Address>"
NETMASK="<Subnet Mask>"
GATEWAY="<Gatewat IP>"

好了,保存后,就可以重启了。

然后就没有然后了。

When installed on a virtual machine that is running a supported Linux operating system, Linux Integration Services for Hyper-V provides the following functionality:

  • Driver support for synthetic devices: Linux Integration Services supports the synthetic network controller and the synthetic storage controller that were developed specifically for Hyper-V.
  • Fastpath Boot Support for Hyper-V: Boot devices now take advantage of the block Virtualization Service Client (VSC) to provide enhanced performance.
  • Timesync: The clock inside the virtual machine will remain synchronized with the clock on the host.
  • Integrated Shutdown: Virtual machines running Linux can be shut down from either Hyper-V Manager or System Center Virtual Machine Manager, using the "Shut Down" command.
  • Symmetric Multi-Processing (SMP) Support: Supported Linux distributions can use up to 4 virtual processors (VP) per virtual machine.

 

1. Download Linux Integration Components v2.1

a. Download Linux Integration Components v2.1 from Microsoft Download site.

b. Extract the .exe file into a temp folder. You will need only LinuxIC v21.iso file.

c. Place the LinuxIC v21.iso file into your VM host server where you can mount the ISO as a CDROM for your Centon Virtual Machine.

 

2. Installation

You will need Development Tools installed to be able to compile the Integration Components. You could do that by running yum:

yum groupinstall "Development Tools"

NOTE: This command will try to use your network connection to download and if you used Synthetic Network Adapter for your Hyper-V machine you will not have internet connection. So make sure to install Development Tools during your Centos initial installation.

Now make sure you added LinuxIC v21.iso file to your Hyper-V CDROM as Image.

As the root user, mount the CD in the virtual machine by issuing the following commands at a shell prompt:

mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom

Copy Linux Integration Services to the virtual machine and unmount CDROM that no longer needed:

mkdir /opt/linux_ic_v21_rtm
cp –R /mnt/cdrom/* /opt/linux_ic_v21_rtm
umount /mnt/cdrom

As the root user, run the following command to compile and install the synthetic drivers:

cd /opt/linux_ic_v21_rtm/
make
make install

NOTE: If you're using the x64 version of Centos, you have perform an extra step.

转:http://hi.baidu.com/%C0%B4%C1%BD%B8%F9%CF%E3%B3%A6/blog/item/a59a610fa26207ed37d12224.html

各文档所在位置
日志文件 /var/log/varnish/varnish.log
可执行程序 /usr/local/varnish/bin
缓冲文件 /var/vcache
配置文件 /usr/local/varnish/vcl.conf
启动参数 /etc/sysconfig/varnish
启动脚本 /etc/rc.d/init.d/varnish
/etc/rc.d/init.d/varnishlog

创建www用户和组,以及Varnish缓存文件存放目录(/var/vcache):
/usr/sbin/groupadd www -g 48
/usr/sbin/useradd -u 48 -g www www
mkdir -p /var/vcache
chmod +w /var/vcache
chown -R www:www /var/vcache

创建日志文件,并授予www用户权限访问
mkdir -p /var/log/varnish
chmod +w /var/log/varnish
chown -R www:www /var/log/varnish

可能需要安装如下包
[CENTOS]yum install ncurses-devel
[UBUNTU]apt-get install libncurses5-dev

编译安装
./configure –prefix=/usr/local/varnish
make
make install

转:http://www.uplook.cn/kbase-Index-show-view10393.html

#!/bin/bash
# BY kerryhu
# MAIL:king_819@163.com
# BLOG:http://kerry.blog.51cto.com
# Please manual operation yum of before Operation.....
#============================ 更新系统时间 ============================
yum install -y ntp
ntpdate time.nist.gov
echo "00 01 * * * ntpdate time.nist.gov" >> /etc/crontab

#============================ Varnish安装 =============================

如果是RedHat/CentOS系统,在安装varnish的时候首先要安装以下软件包
automake
autoconf
libtool
ncurses-devel
libxslt
groff
pcre-devel
pkgconfig

groupadd www
useradd www -g www -s /sbin/nologin
mkdir -p /data/varnish/{cache,logs}
chmod +w /data/varnish/{cache,logs}
chown -R www:www /data/varnish/{cache,logs}
cd /opt
yum install -y automake autoconf libtool ncurses-devel libxslt groff pcre-devel pkgconfig
wget http://sourceforge.net/projects/varnish/files/varnish/2.1.3/varnish-2.1.3.tar.gz/download
tar -zxvf varnish-2.1.3.tar.gz
cd varnish-2.1.3
./configure --prefix=/usr/local/varnish
make;make install