Articles of centos

从埃佩尔Monit不能通过新贵的方法启动

我有centos 6.3机器,做了一个yum安装monit(epel的版本monit 5.1.1-4.el6),然后我安装了http://mmonit.com/wiki/Monit/Upstart并试图启动monit initctl启动monit initctl:作业启动失败。 我在另一台机器上下载了monit-5.3.2-2.el6.rf.x86_64.rpm的.rpm文件,并做了相同的工作,并能够通过initctl方法启动。 epel版本中可能会丢失什么?

如何在CentOS上安装imagemagick for php

我发现这篇文章在CentOS上安装imagemagick与PHP imagick扩展,但是当我试图运行pecl install imagick我编译时出现错误,这是命令的输出: # pecl install imagick downloading imagick-3.0.1.tgz … Starting to download imagick-3.0.1.tgz (93,920 bytes) …………………done: 93,920 bytes 13 source files, building running: phpize Configuring for: PHP Api Version: 20100412 Zend Module Api No: 20100525 Zend Extension Api No: 220100525 Please provide the prefix of Imagemagick installation [autodetect] : Notice: Use of undefined […]

调查例行服务器冻结

我有一个运行CentOS 6.3的专用服务器。 每隔一段时间,早上从我的时区2:00到6:00左右,服务器冻结 – 我不确定发生了什么,但似乎所有正在运行的进程都停止了。 我做的一个Java应用程序每分钟都会保存日志,然后停止。 我能够连接到KVM,发现黑屏,从KVM界面我能够重新启动它。 我想知道如果有人有任何想法如何调查这个问题的原因。 我不确定要查看什么日志以及我可能会find什么。 这是一个带宽使用的图片: 正如你所看到的,当我能够把它重新打开的时候,它似乎完全被切断并且回来了。

是否有可能将除www外的所有子域redirect到特定的目录?

我想要任何目录* .example.com(bar.example.com,foo.example.com等)直接到文件夹/ home / user / htdocs / subdir / www.example.com和example.com应该不受影响。 这可能与htacecss,或其他路线?

Puppet – 从清单中调用自定义函数(包含case / when)

我正在对我的httpd和nginx虚拟主机confs进行puppetizing。 现在我有5个服务器,每个都有自己的端口,并运行在server1上,而nginx运行在server2上。 很明显,我需要保持对httpd和nginx的清单调用,因为它们可以在不同的服务器上运行。 我试图做的是共享两个清单之间的端口,所以我需要做的就是将我想要的虚拟主机的名称传递给httpd和nginx,它将在中心位置查找端口。 我正在尝试实现一个自定义函数,目前有这样的设置: # /path/to/puppet/modules/global/lib/puppet/parser/functions/app_to_port.rb module Puppet::Parser::Functions newfunction(:app_to_port, :type => :rvalue) do |args| case args[0] when app_1 return 27960 when app_2 return 27961 end end end # /path/to/puppet/modules/httpd/manifests/vhost/conf.pp … $vhost_port = app_to_port($name) … 我一直遇到各种问题,$ name我一直得到undefined local variable or method 'app_1'错误,如果我传入一个int, $vhost_portvariables永远不会得到一个值。 我是新来的ruby和傀儡,这导致我相信我缺less一些语言或应用程序构造。 我运行ruby -rpuppet /path/to/app_to_port.rb时没有任何回应,这让我相信代码在语法上是正确的。 为了logging,我正在阅读http://docs.puppetlabs.com/guides/custom_functions.html和https://stackoverflow.com/questions/948135/how-to-write-a-switch-statement-in – 让我知道这一点。 目前env:ruby1.8.7和木偶2.7.19

保存加载的内核模块

我在命令行中执行了以下操作: modprobe ipt_LOG modprobe ipt_multiport modprobe ipt_state modprobe ipt_limit modprobe ipt_recent modprobe ipt_owner modprobe iptable_nat modprobe tun/tap modprobe iptable_nat modprobe ipt_MASQUERADE modprobe ipt_POSTROUTING 我如何让内核使用,并重新启动这些模块备份?

百胜集团挂上“build立知识库”

运行以下命令时,yum挂起Setting up repositories 。 [vagrant@centos48 yum.repos.d]$ sudo yum install emacs Setting up Install Process Setting up repositories 的yum.conf [vagrant@centos48 ~]$ cat /etc/yum.conf [main] cachedir=/var/cache/yum debuglevel=2 logfile=/var/log/yum.log pkgpolicy=newest installonlypkgs=kernel kernel-smp kernel-devel kernel-smp-devel kernel-largesmp kernel-largesmp-devel kernel-hugemem kernel-hugemem-devel distroverpkg=centos-release tolerant=1 exactarch=1 retries=20 obsoletes=1 gpgcheck=1 plugins=1 proxy= [intentionally not listed] # PUT YOUR REPOS HERE OR IN separate files […]

如何解决yum错误:没有名为CElementTree的模块?

我有以下问题与百胜: $ yum There was a problem importing one of the Python modules required to run yum. The error leading to this problem was: No module named cElementTree Please install a package which provides this module, or verify that the module is installed correctly. It's possible that the above module doesn't match the current version […]

如何在CentOS 6上安装pecl spidermonkey

运行以下命令: > sudo pecl install spidermonkey 我收到以下错误: … … a bunch of successful checks … … checking whether to enable spidermonkey support… yes, shared configure: error: jsapi.h not found. Please reinstall libjs. ERROR: `/var/tmp/spidermonkey/configure' failed 我试图通过安装js-devel来解决这个问题,js-devel在与各种yum软件库摔跤后,最后我手动完成了这个工作: > wget http://pkgs.repoforge.org/js/js-1.60-1.el6.rf.x86_64.rpm > wget http://pkgs.repoforge.org/js/js-devel-1.60-1.el6.rf.x86_64.rpm > yum install js-1.60-1.el6.rf.x86_64.rpm > yum install js-devel-1.60-1.el6.rf.x86_64.rpm (不知道为什么js-devel需要先安装js …但是,当我尝试安装js-devel独奏时,它会抱怨。 重新运行pecl install ,我收到相同的错误。 […]

stream量转发到特定网关(Elastix – CentOS)

我需要有关多个接口卡的信息。 我的情景是: Eth0: 172.XXX / XXX252 GW 172.XX105 Eth1: 192.168.XX / XXX0 GW 192.168.1.1 我的要求是: eth0stream量输出/在网关172.XX105 Eth1stream量input/输出网关192.168.1.1 这意味着从eth0产生的stream量转发到它自己的gate方式,和eth1一样。 我正在使用elastix服务器(centos)和两个SIP帐户,一个在eth0和其他eth1上。 端口号5060。 我很困惑如何做到这一点。