当前位置: 首页 >> '榆树网-杂项'分类下的文章

为何我的yum不工作了?

现象:运行yum update后提示错误

[root@vps ~]# yum update nginx
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 229, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 104, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 339, in doCommands
self._getTs(needTsRemove)
File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 101, in _getTs
self._getTsInfo(remove_only)
File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 112, in _getTsInfo
pkgSack = self.pkgSack
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 591, in <lambda>
pkgSack = property(fget=lambda self: self._getSacks(),
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 434, in _getSacks
self.repos.populateSack(which=repos)
File "/usr/lib/python2.4/site-packages/yum/repos.py", line 223, in populateSack
self.doSetup()
File "/usr/lib/python2.4/site-packages/yum/repos.py", line 71, in doSetup
self.ayum.plugins.run('postreposetup')
File "/usr/lib/python2.4/site-packages/yum/plugins.py", line 176, in run
func(conduitcls(self, self.base, conf, **kwargs))
File "/usr/lib/yum-plugins/fastestmirror.py", line 181, in postreposetup_hook
all_urls = FastestMirror(all_urls).get_mirrorlist()
File "/usr/lib/yum-plugins/fastestmirror.py", line 333, in get_mirrorlist
self._poll_mirrors()
File "/usr/lib/yum-plugins/fastestmirror.py", line 376, in _poll_mirrors
pollThread.start()
File "/usr/lib/python2.4/threading.py", line 416, in start
_start_new_thread(self.__bootstrap, ())
thread.error: can't start new thread

原因:系统内存不足,没有足够的内存来加载yum一些相关的插件,这种情况大多出现在vps上,一般vps内存512M,还不支持swap分区,启动mysql+php-fpm+nginx之后内存就剩下不多了。
解决办法,禁用yum的插件,命令如下:

yum --disableplugin=\* update nginx

IOBlazer-跨平台的IO压力测试程序

来自VMware:http://labs.vmware.com/flings/ioblazer
Read the rest of this entry »

OpenVZ中的VPS支持IPv6?

OpenVZ官方文档建议通过桥接方式来搞定IPv6,虽然也提供给VPS分配IPv6地址的方法,也提到需要通过修改sysctl.conf文件来处理邻居发现和路由发现等协议,但是文档并未提及如何修改sysctl.conf文件,详见:IPv6
Read the rest of this entry »

如何迁移OpenVZ中的VPS主机

OpenVZ中要迁移vps主机,只需停止vps,将vps主机文件及配置文件备份至其他主机即可。

cd /vz/private
vzctl stop 102
tar cf - 102/ | ssh -l root 10.255.7.251 "(cd /vz/private; tar xf -)"
cd /etc/vz/conf
scp 102.conf root@10.255.7.251:/etc/vz/conf/

在10.255.7.251主机执行

vzctl start 102

即可重新启动vps。

让VPS支持Tun/Tap?

要让VPS支持OpenVPN,让vps支tun/tap是第一步,如果在租用别人的vps,直接找客服要求增加tun/tap即可,要是自己搞的vps呢,那么该找谁要呢,参考OpenVZ官方文档就很容易搞定了:http://wiki.openvz.org/VPN_via_the_TUN/TAP_device
Read the rest of this entry »

OpenVZ的VPS里不支持nat表?

在vps里执行:

iptables -t nat -L

提示:

iptables v1.2.11: can’t initialize iptables table `nat’: Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

Read the rest of this entry »

让CentOS6提供基于OpenVZ的虚拟化服务

刚刚写了OpenVZ常用的几个参数,该文章基于OpenWall的LiveCD安装的,所以关于如何安装OpenVZ没有介绍,并且由于内核没有编译IPv6模块,所以虚拟机不支持IPv6协议,OpenVZ官方文档是支持IPv6的,所以在CentOS6下试验安装OpenVZ。
以下为具体步骤:
Read the rest of this entry »

OpenVZ常用的几个参数

上网下载了个Openwall-owl,试试OpenVZ虚拟环境,以下安装后需要做的事情:
1、下载template,一开始不知道如何制作template,就下载现成的吧,各个版本几乎都有,下载地 址:http://download.openvz.org/template/precreated/ 下载后的template放在:/vz/template/cache/ 目录即可。
Read the rest of this entry »

Moving ZCS to Another Server

Introduction


Either you, or someone you know has been there. Almost out of Disk space, RAM is topped out, and the CPU is constantly running above 80%. It’s time to upgrade the hardware. But how easy and safe is it to move the Zimbra server instance? Well, it’s easier than you might think.

In this Zimbra Administrator’s PowerTip, we’ll discuss how to migrate your Zimbra server to another Machine or OS. The one big caveat is that both instances of Zimbra MUST be running the same version. So if your old server is running 4.5.5, then you’ll need to install 4.5.5 on your new server. This wouldn’t be the time to upgrade your ZCS version.

Read the rest of this entry »

OutLook如何使用Zimbra LDAP提供的地址簿

Outlook可以使用活动目录及其他一些目录服务提供的地址簿,Zimbra用户验证也是通过LDAP实现的,OutLook如何使用Zimbra提供的地址簿呢?继续往下看吧。
Read the rest of this entry »