Hot answers tagged rhel5
You can look at the contents of /etc/redhat-release, which will look something like this: $ cat /etc/redhat-release CentOS release 5.4 (Final) The contents are different for an actual RHEL system. This technique works on all RedHat derivatives, including CentOS, Fedora, and others.
You can use the lsb_release command on recent linux distributions. If you issue: lsb_release -i -r it will tell you the Distribution and Version. This is a little bit more accurate than accessing files that may or may not have been modified by the admin or a software package. As well as working across multiple distros.
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 ...
I prefer to use the /etc/issue file. $ cat /etc/issue I've seen many situations where /etc/redhat-release has been modified to meet software compatibility requirements (Dell or HP's management agents, for instance).
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.
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 ...
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"
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 ...
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.
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 ...
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!
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%.
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 ...
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 ...
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 ...
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 ...
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.
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.
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). ...
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 ...
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 ...
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!
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 ...
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 ...
Restrict shell access to most of the folders but user's own home folder. This user (USER1) should not be able to run any shell commands that will affect any file/folder but their own. The standard Linux permissions scheme should account for this. Unprivileged users can't modify anything that doesn't belong to them, nor access to folders ...
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 ...
Try using: tail --follow=name <logfile> And see if that works better. You don't have to worry about it being rotated out from under you. Any pattern to it stopping? Certain length of time? Certain time of day?
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 ...
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 ...
Only top voted, non community-wiki answers of a minimum length are eligible