CentOS is an Enterprise-class Linux Distribution derived from Redhat Enterprise Linux sources freely provided to the public.

learn more… | top users | synonyms

49
votes
13answers
41k views

How can I get distribution name and version number in a simple shell script?

I'm working on a simple bash script that should be able to run on Ubuntu and CentOS distributions (support for Debian and Fedora/RHEL would be a plus) and I need to know the name and version of the ...
33
votes
8answers
50k views

Is CentOS exactly the same as RHEL?

I'm sure this question has been asked again and again elsewhere (I did not find anything specific to CentOS vs RHEL in SE), but I would still like to ask and confirm a few specific points. I am well ...
30
votes
2answers
51k views

CentOS 6 “Default” Installation Options

Can someone tell me the difference between a Desktop Install, a Basic Server install, and a Minimal Install? During installation, it doesn't give a description and I can't find documentation on it ...
27
votes
7answers
1k views

What's the equivalent to && when writing a bash script?

I apologize in advance if this is a duplicate question. I did make an effort to search/check before asking here. I'm comfortable with writing one-liners like this: foocommand && ...
18
votes
2answers
11k views

How to colorize output of ls ?

I'm running CentOS in Linux text mode. When I run the command ls /usr/, the output is too hard to read (dark blue on black). How can I change the text coloring?
17
votes
4answers
2k views

What makes CentOS “enterprisey” compared to “generic” distributions like Ubuntu?

What makes CentOS "enterprisey" compared to "generic" distributions like Ubuntu? When I say "enterprisey" I actually mean "better for server deployments". Just a general question, because I was ...
15
votes
7answers
4k views

Is there a difference of stability between Linux distros?

I've using Debian since 2010 for some home purposes and it has been stable. Is Debian still a good option if I need a server for heavy network, cpu, disk and memory usage? Last month I listened to ...
14
votes
9answers
49k views

Cannot enable network after CentOS 6.3 fresh install

I am trying to perform a fresh CentOS 6.3 installation then run various yum commands such as yum install httpd. The installation runs fine, however I cannot run any network based commands like yum I ...
13
votes
5answers
11k views

How can I limit the bandwidth used by a process?

I have a CentOS 5.7 server that will be backing up its files nightly. I am concerned that visitors to the various sites that the server hosts will experience degraded performance while the backup is ...
13
votes
3answers
25k views

Why the default eth0 interface is down by default on CentOS?

I am already a little bit familiar with Linux distros like Debian or Ubuntu (yeah, very similar) but I wanted to try Red Hat based - CentOS 6.2 . I have installed it on my Windows 7 host in virtualBox ...
12
votes
10answers
60k views

How to install CentOS 6 via USB mass storage device?

I want to install CentOS 6.2 on a laptop (Thinkpad R40) which comes without CD/DVD-drive but with USB 2.0 ports. It seems that CentOS does not provide ready-to-use dd-able USB images for ...
11
votes
2answers
25k views

How to change the hostname of a linux machine using terminal?

I logged in for the first time, opened terminal, and typed in ‘hostname’. It returned ‘localhost.localdomain.com’. Then I logged as the root user in terminal using the command, ‘su –‘, provided the ...
11
votes
2answers
7k views

In CentOS, what is the difference between yum update and yum upgrade?

What is the difference between yum update and yum upgrade, and when should I use one over the other?
11
votes
2answers
337 views

Find out exact installation time of CentOS

I installed CentOS on my laptop about 8 month ago, and I want to know when exactly I installed it , how can I do that in CentOS 6.4 ?
10
votes
1answer
841 views

How can I monitor CPU usage by user?

I need to monitor CPU usage by users of two servers' (Ubuntu and CentOS). For example: user1 5% user2 10% ... Is there a tool similar to top or htop that can do that?
10
votes
1answer
9k views

BUG: soft lockup - CPU# stuck for x seconds

I've seen a few bug reports and questions (on stackexchange and elsewhere) regarding a nagging "BUG: soft lockup - CPU#<n> stuck for <dt>s!". So far, I haven't found any clue as to what ...
10
votes
3answers
808 views

Why are files in my home dir being created as world-writable despite a more-restrictive umask?

I've realized that the permissions for new files and directories behave a bit strangely. First of all, umask seems to return the right answer: $ umask 0002 This means full access for my user and ...
9
votes
1answer
623 views

How do you omit “./” when running scripts on current directory

On some tutorials over the internet they can run a script on the current directory without doing: ./script How do you omit this? I am using CentOS 5.6 x64. I want to run it this way script
9
votes
2answers
584 views

( /etc/sysconfig/iptables ) “Manual customization of this file is not recommended.” Why?

Editing this file directly /etc/sysconfig/iptables can save me so much headaches so much time and so on... and yet on the very top of the file it says.. Manual customization of this file is not ...
9
votes
9answers
11k views

Package: git-1.7.6.1-1.el5.rf.i386 (rpmforge) Requires: libcurl.so.3

After I run yum install git it shows the error Error: Package: git-1.7.6.1-1.el5.rf.i386 (rpmforge) Requires: libcurl.so.3 You could try using --skip-broken to work around the problem You ...
9
votes
4answers
23k views

“Symbolic link not allowed or link target not accessible” / Apache on CentOS 6

I've got a brand new CentOS 6 installation, which has a symlink in the document root to my development files: [root@localhost html]# ls -l total 4 -rwxrwxrwx. 1 root root 0 Sep 18 20:16 index.html ...
9
votes
2answers
2k views

Should you run automatic updates

I'm running production Centos web servers. I want to know what is best practice for running updates. Should I automate this with yum-cron or yum-updatesd? Or is there a danger of updates breaking ...
9
votes
7answers
37k views

How can I fix “cannot find a valid baseurl for repo” errors on CentOS?

I finished installing CentOS 6, but when I tried running yum update I got: [root@centos6test ~]# yum update Loaded plugins: fastestmirror, refresh-packagekit Determining fastest mirrors Could not ...
9
votes
2answers
8k views

Package bash-completion missing from Yum in CentOS 6

I am trying to get tab-completion working in Yum in CentOS 6 (so I can do something like yum install firefo<TAB> and get back firefox), and I have found many tutorials which say to simply do yum ...
9
votes
1answer
501 views

MySQL gets killed by OS every 25 days or so

About 4 months ago we migrated from MS SQL Server to MySQL 5.5. Since then we have been experiencing an issue once approximately ever 25 days since where CentOS runs out of memory and as a result it ...
8
votes
3answers
932 views

/bin /etc /lib64 /root /sbin deleted or moved by mv folder/* /* while su

OS is Centos 6.5 64-bit I downloaded a tar file and wanted to untar and mv it. I untared, then accidentally (as root) ran mv folder/* /* instead of mv folder/* . bash said it couldn't overwrite some ...
8
votes
2answers
6k views

CentOS: List the installed RPMs by date of installation/update?

I'm on a CentOS 4 machine. I updated and installed some packages a few weeks back, but I don't remember the name of every package or the names of every dependency. I used yum. Can I list the packages ...
8
votes
2answers
4k views

I Can't login as root with su command, but I can with SSH

How is it possible that I cannot log in as root by su root or su (I get incorrect password error), but I can log in by ssh root@localhost or ssh root@my_local_IP with the same password? I'm using ...
8
votes
1answer
412 views

How are ACL permissions processed and in what order do they apply to a given user action?

CentOS 6.4 I'm trying to better understand how filesystem ACL rules are processed and in what order ACL rules apply. For example, let's say users bob and joe belong to a group called sales. Let's ...
8
votes
3answers
7k views

CentOS no network interface after installation in VirtualBox

I have Ubuntu 12.10 on which i installed virtual box on which I setup centos 6.4 i386. On Ubuntu I have: 3.5.0-17-generic kernal running. On virtual box I install centos 6.4 and everything works ...
8
votes
2answers
2k views

How can I disable TCP/IP for an Ethernet adapter?

I have CentOS 6.3 running in a (virtual) machine with two Ethernet adapters. I have eth0 connected to a TCP/IP LAN and eth1 connected to a DSL modem. The system is intended as a dedicated ...
8
votes
2answers
713 views

lsof - age of file

The *nix command lsof gives you a list of open files. Is anyone aware of a way that would also list how long a particular file has been open? Either by using lsof or any other command. I'm using ...
8
votes
3answers
497 views

Using real time kernel headers to compile userspace code vs default headers

Per customer requirements, I installed CentOS 5.6 with the default kernel. With this kernel installed, the time.h file includes the #define CLOCK_MONOTONIC. Now, a real-time kernel was installed ...
7
votes
3answers
858 views

How to remove a specific character in a string but only if there are no numbers in that line in Linux

I've been stumped with this seemingly simple-to-fix problem.. well, for a while. Here's example output from the file I need to edit: $cat file George Washington Geneva Convention 123,281,029 USD ...
7
votes
6answers
24k views

How to extend CentOS 5 partition on VMware?

I have a CentOS 5 virtual machine and I added 20GB more to disk size. How do I initialize and extend the available space? I'm new to Linux, so what should I do? I tried loading GParted as well, ...
7
votes
3answers
18k views

How To Install Virtualbox Guest Additions On CentOS via Command Line only

Reading the Virtualbox user manual, I finally got [here], which explains how to install Virtualbox Guest Additions on a Linux guest via Command Line. But it's not clear enough for me (I just started ...
7
votes
1answer
817 views

Why isn't the ls command listing huge filesizes?

In my Redhat Linux, I am getting the following error when executing the ls command. # ls ls: sugar.sql: Value too large for defined data type
7
votes
6answers
20k views

How do I upgrade OpenSSL?

According to these instructions: http://wiki.apache.org/httpd/NameBasedSSLVHostsWithSNI I need to use OpenSSL 0.9.8k or later (right now it's on 1.0.0c) to use name based virtual hosts in apache. ...
7
votes
1answer
6k views

what is the CentOS equivalent of /var/log/syslog (on Ubuntu)?

On ubuntu this file exists: /var/log/syslog. However the same file does not appear on CentOS Distributions. What is the equivalent file on CentOS?
7
votes
2answers
20k views

CentOS on HyperV - eth0 not in ifconfig?

I've launched a CentOS install in HyperV and assigned a NIC the same way I've done on an Ubuntu VM, however, the device simply isn't picked up. Only my loopback is found by ifconfig. How should I go ...
7
votes
2answers
34k views

How to create a FTP user with specific /dir/ access only on a Centos / linux installation

So I'm on a VPS - CentOS Linux installation. I have vsFTPd on the server. I currently have SFTP access to the server via my root user, but am now trying to create a new user with FTP access to a ...
7
votes
2answers
4k views

How to configure network profiles in Centos?

I'm trying to setup two network profiles in Centos. One for at home, one for at work. The home profile has a fixed IP address, fixed gateway and DNS server addresses. The work profile depends on DHCP. ...
7
votes
3answers
960 views

Download ALL rpms for a product

I have two CentOS machines, one 6.3 box (A), and another CentOS 6.1. (B) 6.3 box is with internet connection, 6.1 box is without internet connection. I want to download ALL dependencies of a product ...
7
votes
0answers
3k views

OpenSSL Package Rebuild CentOS 6.4 [closed]

Rebuilding openssl with Elliptic Curves on CentOS 6.4 The strategy is: 1) Download the "official" CentOS source package (.src.rpm) 2) Modify the .spec file to enable elliptic curves. (change no-EC ...
6
votes
4answers
1k views

What's the difference between a hard links and copied files?

RHEL 6 My understanding is that hard links include a copy of the original file and that I could delete a hard-linked file in one directory, and it would still exist in the other directory. If ...
6
votes
2answers
45k views

Installing git “sudo: apt-get: command not found”

I am trying to install git. I run the following command: sudo apt-get install git-core git-gui git-doc But receive the following error: sudo: apt-get: command not found What should I do?
6
votes
1answer
2k views

Limit Outgoing Bandwidth on an interface

I would like to know the easiest way to limit outgoing bandwidth for an interface. I want to cap the outgoing port speed so that file transfers between my servers don't fail during busy hours. What's ...
6
votes
4answers
17k views

Kipmi0 eating up to 99.8% cpu on centos 6.4

We have CentOS 6.4 and the kipmi0 is showing as 99.8%cpu and 0.0% memory and load average is 1.00. What should we do to rectify on this?
6
votes
1answer
2k views

Can Yum express a preference for x86_64 over i386 packages?

I run a 64-bit version of CentOS5. At the moment, when I run Yum updates or installs, unless Yum is purged of i386 packages prior, it will install i386 packages when x86_64 are available. Is it ...
6
votes
2answers
6k views

How can I know which IRQ is responsible of high CPU usage

I've moved a server from one mainboard to another due a disk controller failure. Since then I've noticed that constantly a 25% of one of the cores goes always to IRQ however I haven't managed myself ...