Tag Info

Hot answers tagged

60

To be honest, I think this comes down to simple viewpoint: Chef seems more of an imperative, programmatic solution, the usage of ruby as the language instantly makes me hope somebody ported it to python, as is the way of the world with all of ruby's ideas. That's not what you want for this sort of thing though. You want to speak to the void where the ...


18

I've written a detailed comparison of Chef vs Puppet here: Puppet vs Chef: 10 reasons why Puppet wins. Although it doesn't include use cases, I hope it provides some useful starting points for people wondering which tool to choose for their infrastructure automation.


14

Sorry about the verbosity. Use the tool that makes it's easy to get your job done. That's the point of automation, right? History: I have used puppet in past gigs and last month I spent about a week trying to get used to chef to see if I would make the switch at my new gig. I didn't leap. Jargon: One unfortunate problem with both of these systems is the ...


12

We recommend everyone run through a reinstall rather than attempt an inplace upgrade from CentOS-4 or CentOS-5! Source: http://lists.centos.org/pipermail/centos-announce/2011-July/017645.html You can run this upgrade centos6 just by using yum upgrade --enablerepo=centosplus. Do not forget: each system running centos is individual (!). I recommend ...


11

Install the nsclient++ agent on windows, then configure your RHEL5 nagios config file accordingly. There may be other windows nagios agents, or you can configure nagios to use remote probes with SNMP, but I've used nsclient++ and it works well.


10

Can I suggest an alternative solution? You might find that a configuration management tool like Puppet or Cfengine2 does what you want. You write manifest files that describe how you want a system to look and it goes away and changes the system so it looks like that. Notice the important distinction that you are describing how the system should look, not how ...


10

CPU utilization is measured relative to a single CPU. The maximum is 100% for each CPU, so a four-CPU system would have a maximum CPU utilization of 400%.


9

Modify the OPTIONS line in /etc/sysconfig/memcached adding ">> /var/log/memcached 2>&1" on the end. IE OPTIONS="-vv >> /var/log/memcached 2>&1"


8

Add multilib_policy=best to your /etc/yum.conf Yum will now try to install the "best" package.arch for your system and it will only install that one (as long as it is available). Assuming you're on a 64-Bit system, yum will first try to install package.x86_64, if that doesn't exist it will fall back to i386 and noarch. The default setting is ...


8

About comparing installed kernels with running one: #!/bin/bash LAST_KERNEL=$(rpm -q --last kernel | perl -pe 's/^kernel-(\S+).*/$1/' | head -1) CURRENT_KERNEL=$(uname -r) test $LAST_KERNEL = $CURRENT_KERNEL || echo REBOOT Hope that helps!


8

maybe something like this will help. it will block any hosts, that open more than 150 connections within 2 minutes (180 seconds): iptables -A INPUT -p tcp --dport 80 -i eth0 -m state --state NEW -m recent --set iptables -A INPUT -p tcp --dport 80 -i eth0 -m state --state NEW -m recent --update --seconds 180 --hitcount 150 -j REJECT you have to tune the ...


8

The user ID of scan is set to 0 (root). Check if /etc/passwd contains two entries for scan. One mapped to root. Otherwise, if you are using any other name services check that these dont export scan as UID 0. And make sure you tell these people mapping multiple accounts to the same UID is not a good idea as you break the separation of privileges you would ...


7

Assuming all the users are local users (that is, there's no network directory service like LDAP, Active Directory, NIS, etc), then local users are probably all enumerated in /etc/passwd, which is a colon delimited file with the following fields: username:password:uid:gid:name:home directory:shell You can get just the usernames and home directories, if ...


7

No worries, it just executed 'rpm -e' which would not remove any package. [root@web420 ~]# rpm -e rpm: no packages given for erase BTW, for verifying you have not removed all packages you could just run rpm -qa and see the list of installed packages.


7

You can try package from ActiveState http://www.activestate.com/activepython/downloads. It doesn't depend on package manager (just unpack and run "install.sh"). Or you can compile Python and create package by yourself Here is how to create RPM by yourself: http://www.ibm.com/developerworks/library/l-rpm1 http://www.tldp.org/HOWTO/RPM-HOWTO/ Here is how ...


7

You can just su. You won't need the password because the script will initally be running as root. There's also the runuser command. If you use /etc/init.d/functions you can use the daemon function which has an option for specifying the user to run as. I'd personally sway towards the latter all other things being equal.


7

Per my comment, I don't believe there is an equivalent to the "packages.debian.org" central package archive (with web interface) in CentOS. It's something I think is really missing!


7

No, the algorithm is not that simplistic. You can find more information in: http://linux-mm.org/OOM_Killer If you want to track memory usage, I'd recommend running a command like: ps -e -o pid,user,cpu,size,rss,cmd --sort -size,-rss | head It will give you a list of the processes that are using the most memory (and probably causing the OOM situation). ...


7

First and foremost, boot off a live CD or recovery disk and back up your data. You may want to include system configurations from /etc, too. You can try doing a reinstall over what you have, leaving your partitions you want to keep untouched. As long as you weren't keeping your good data in any system partitions (and let's hope not under /usr), you should ...


6

You deleted all of your users' passwords, because they aren't stored in /etc/passwd anymore like they were in the olden days. pwconv is only for converting entries from passwd to shadow and vice versa -- you should never have to use it in day-to-day tasks. Boot into single-user mode as DaveN suggested, restore the file from backup, chalk this one up to ...


6

The /etc/pam.d/system-auth file is used by Red-Hat and like systems to group together common security policies. It is often included in other /etc/pam.d policy files where those common policies are required. When accessing a system via ssh through sshd the /etc.pam.d/sshd policy file is consulted. This file includes /etc/pam.d/system-auth so your changes to ...


6

Don't try to compile yourself, you'll just get yourself into trouble that way. (and even if you were compiling yourself, you should compile into RPMs and install those, instead of installing directly to the systems). First, try to find all the files you've installed yourself and remove them (check that they don't belong to a system package with rpm -qf ...


6

The answer is found in the Linux source, specifically, /usr/src/linux/mm/shmem.c, starting around line 70 on my system (Gentoo 2.6.31-ish): /* * The maximum size of a shmem/tmpfs file is limited by the maximum size of * its triple-indirect swap vector - see illustration at shmem_swp_entry(). * * With 4kB page size, maximum file size is just over 2TB on ...


6

Disclaimer, I'm the Zenoss Community Manager. Zenoss Core will monitoring your Windows boxes, as well as their applications and databases and most everything else on your network. For Windows there is SNMP and WMI monitoring available without requiring an agent installed on the box.


6

Based on your comment on MikeyB's answer you're trying to solve this the wrong way IMHO -- Both numactl and taskset will lock your process to a CPU, but they won't keep other processes off that CPU. If someone else is on that CPU when your process needs it you will have to wait. A better solution is to set your process' nice value to something that will ...


6

Try the disable repo switch: --disablerepo=REPONAME UPDATE To find all repositories currently "known" (enabled and disabled): yum repolist all Then to find which repository is giving you grief for the above package, try: yum list php53-mcrypt-5.3.3-4.ius.el5.x86_64 --showduplicates This will then show which of your repositories provide the above ...


5

The perl-MIME-tools package includes a variety of command-line tools for processing MIME-encoded messages, including mimeexplode: Takes one or more files from the command line that contain MIME messages, and explodes their contents out into subdirectories of the current working directory. The subdirectories are just called "msg0", "msg1", "msg2", etc. ...


5

If at all possible, make your build server EL6. This will save you a lot of hassle later... For a simple build box where only the occasional RPM package will be built, have your users use mock. You'll find it in the EPEL repository. Using mock to build an RPM ensures that all of the correct build dependencies have been specified by building it in a chroot ...


5

I wouldn't run the upgrade process this way if you're planning to perform in-place transitions from EL5 to EL6. It's not an easy or clean process. See: Why is it so difficult to upgrade between major versions of Red Hat and CentOS? and Upgrade CentOS 5.x to CentOS 6.x - tips and techniques However, you have the right idea of testing this in a ...



Only top voted, non community-wiki answers of a minimum length are eligible