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
39k 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 ...
5
votes
2answers
2k views

Why is there a discrepancy in disk usage reported by df and du? [duplicate]

I have a Linux(CentOS) server, the OS+packages used around 5GB. Then, I transferred 97GB data from a Windows server to two folders on this Linux server, after calculated the disk usage, I see the ...
5
votes
3answers
4k views

Moved bin and other folders! How to get them back?

I accidentally moved all folders from root to a subfolder. (/bin, /etc, /home, /lib, /usr... all moved) The only ones that were not moved, since they were in use, are /bak, /boot, /dev, /proc, /sys. ...
3
votes
1answer
1k views

Rename All Files with a Certain Name

I'm trying to find certain files with the name "stringx" and replace the name (but not the extension) with "stringy". So basically for stringx.txt and stingx.cs, I'd want stringy.txt and stringy.cs. ...
17
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?
7
votes
3answers
6k 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 ...
2
votes
2answers
250 views

Commands for determining level of usage of server

I am scripting a new program that will connect to a cluster of machines in a VM park, and hopefully check their level of usage. The VM clients are a combination of RHEL and CentOS, and runs on ...
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 ...
2
votes
1answer
5k views

Set Static IP in CentOS 6.4?

Most guides seem to revolve around modifying ifcfg-eth0, which doesn't exist on my system.. [root@Azaz07]# vi /etc/sysconfig/network-scripts/ifcfg-eth0 [root@Azaz07]# ls ...
2
votes
1answer
2k views

CentOS conservative governor, nice error

I changed my CentOS 6 CPU governor from ondemand (the default one) to conservative and got this after restarting the cpufreq service: /etc/rc5.d/S13cpuspeed: line 88: ...
7
votes
6answers
19k 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. ...
6
votes
3answers
2k views

What does it mean to be in group 0?

Several users in a system I inherited have their group set to 0 in /etc/passwd. What does that mean? Do they essentially get full root privileges? The system is running CentOS 5, and the users ...
0
votes
4answers
6k views

Fastest RDP client on linux

I currently use KRDC on CentOS, but mouse pointer is a little slow and I'm sure that this is not caused by my internet line speed, because the windows RDP client works and everything is fine. Which ...
3
votes
3answers
9k views

How to auto type password for SCP or SFTP to automate it?

I have script where I put scp command to backup file to other server. But when it runs it asking to type password. Is there way to automate this? I am using CentOS 5.6. I have seen few guides they use ...
29
votes
2answers
50k 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 ...
14
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 ...
5
votes
4answers
6k views

What are the different ways that a message can be displayed to a bash shell after a user logs in?

I have a CentOS 5.7 VPS using bash as its shell that displays a branded greeting immediately after logging in via SSH. I've been trying to modify it, but can't seem to find where it is in the usual ...
2
votes
1answer
168 views

Is there an easy way to check which program wrote to /var/log/messages?

Is there an easy way to check which program wrote to which file? I'd like to check which program wrote an error to /var/log/messages for example.
9
votes
7answers
34k 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 ...
6
votes
3answers
4k views

How to execute a script on gdm login automatically for all users?

What file should I modify to execute some instructions when any user logs in through gdm? I tried /etc/bashrc but that is executed ony when starting bash (and each time an xterm is open). I'd like to ...
5
votes
5answers
3k views

Need to upgrade svn on centos

I have an error when I run svn up svn this client is too old to work with working copy...please get a newer subversion client This is on centos. I need to update svn. How do I do this? ...
2
votes
2answers
978 views

How can I make a process I start during an SSH session run after the session has ended? [duplicate]

Possible Duplicate: Keep SSH Sessions running after disconnection. I have a process which is basically a web-server, I start it during an SSH session. However, when I leave the session (by ...
1
vote
2answers
1k views

How can I Forward a subDomain to a specific port?

My apologies if this has been asked before. I haven't found an adequate solution so... yeah. When a specific domain, "example.com" is accessed, I want it to act normally. In other words, it should go ...
0
votes
1answer
891 views

Difficulty installing PHP from source to CentOS 6.4

The problem: After installing PHP from source, functionality is not present - my phpinfo test page does not work. If I use yum to install from the repository functionality is restored. Why am I ...
2
votes
1answer
656 views

Can rpm handle an install of another OS into another Logical Volume?

I am trying to install fedora as a domU under a CentOS dom0 using the method outlined in The Book of Xen. I have asked another question regarding a consistent error message of cpio: Bad magic when I ...
2
votes
2answers
1k views

how to make system service out of .jar file? (linux)

i wrote a little java server which i'm running on my CentOS 5 VPS server. currently i just ssh onto the server and start the jar through commandline. How an i turn this jar into a system service and ...
1
vote
3answers
540 views

How to install easy_install using non-default Python Interpreter on CentOS?

I have downloaded, compiled and installed Python 2.7 on CentOS. I would like to download and install easy_install (and pip) for it but I am a little bit confused as to how to do that. How can I ...
1
vote
1answer
854 views

virt-install complains “error: no such option: --network-bridge:br0”

I was following the directions here to set up a VM in CentOS 6.4 i386/686. But I'm getting this error: $ sudo virt-install --network-bridge:br0 --name vm1 --ram=1024 --vcpus=1 --disk ...
1
vote
1answer
755 views

When using 'yum list available' why are some entries in blue?

Using iTerminal on Mac OS X 10.8 to connect via SSH to a CentOS 6.4 server, running yum list available will show a list of packages available from the various repositories on that machine. Some of the ...
1
vote
4answers
11k views

USB mount doesn't work on Centos 6.4

I have a problem. After an update, my USB drives are not mounted automatically and I'm unable to mount them manually... The output of my fdisk -l command is: Disk /dev/sdb: 15.8 GB, 15762194432 ...
1
vote
1answer
962 views

Why did yum-builddep not provide the dependencies to install my rpm?

I am trying to rum my rpm package but getting this dependencies error. [root@localhost ~]# rpm -ivh /root/x86_64/asterisk-1.8.12.2-1.fc15.x86_64.rpm error: Failed dependencies: ...
1
vote
2answers
378 views

Getting error 2006 MySQL server has gone away on CentOS

I need to import a database into a freshly created CentOS 5 virtual machine. However, whenever I run the import command on the console, it stops working in about a minute and I get the error message: ...
7
votes
3answers
17k 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 ...
3
votes
2answers
14k views

How to install g++ 4.7.2 & c++11 on CentOS 5.x?

I'm trying to install the latest stable g++ and c++11. My host did it through yum install and thought that it was the latest, but it's not, and they are now saying that this is beyond their level of ...
32
votes
6answers
48k 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 ...
9
votes
4answers
21k 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 ...
4
votes
1answer
4k views

CentOS doesn't know what the internet is

So I've done my share of investigating this problem... I just recently created a CentOS 6 VM on my LinuxMint box using VirtualBox. I left all the recommended values the same upon creation (8GB HDD, ...
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 ...
6
votes
1answer
3k views

Xvfb or Firefox throwing errors & gratuitously logging

per the answer to this question, I'm running Xvfb to make a virtual display so firefox will run on my CentOS server. (I don't need to see firefox or do any actual key or screen input/output with ...
5
votes
7answers
325 views

Are there additional ways to protect SSH connections besides firewall and RSA Keys?

Sometimes I don't have a static IP and need to administrate my web server remotely. I'm looking for any additional layers of protection I could add to make opening port 22 safer. Currently I have ...
4
votes
3answers
4k views

How do I combine two logical volumes that reside on a single physical volume in LVM?

I have two logical volumes, one is mounted as /, the other is mounted as /home. I want to combine them, because the / volume is constantly running out of space. (Yes, I know what's using all that ...
3
votes
2answers
2k views

yum - list configure flags/options used to compile package

How can I see a list of flags/options used to configure and compile a certain package in yum, without having to install it first? Say apache, for example. $ yum list available httpd Available ...
9
votes
2answers
489 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 ...
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
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 ...
3
votes
1answer
2k views

Start network service at boot time on CentOS

I've recently reinstalled CentOS onto a computer of mine. I have OpenSSH Server on it now, as did I before I reinstalled the operating system. Here's the difference: Before, SSH started without even ...
2
votes
1answer
691 views

chkconfig bootup script failing, script runs good manually

I recently purchased a vps and I attempted to create a startup/restart script to start up my java program. I am running CentOS 6. The script works if I execute it manually with this command: ...
2
votes
2answers
10k views

No network connection in CentOS 6.3 Minimal under VMWare Player

I'm trying to replicate in VMWare Player the exact same conditions I have under my Dedicated Server for testing purposes. Now, the thing is that that when I try to install something, or ping ...
2
votes
7answers
1k views

Linux server monitoring software

The dedicated server I'm looking after started to crash occasionally, I suspect because of overload, so I need some performance/resource based monitoring software, preferably with web interface, ...
6
votes
3answers
7k views

What prevents a machine from responding to pings?

I have a CentOS release 5.4 linux box on Amazon EC2 that I'm trying to set up to be monitored via Nagios. The machine is in the same security group as the nagios server, but it seems to be ...