CentOS stands for Community ENTerprise Operating System, the most popular Linux distribution for web servers with almost 30% of all servers using it. Third-party software is not included in the base.

learn more… | top users | synonyms

153
votes
9answers
18k views

I accidentally typed password into bash command line

I accidentally typed my password into bash command line, mistaking the Last login: ... line for Wrong password (I was in a hurry). What do I do to cover my trace? What I did was editing .bash_history ...
67
votes
8answers
124k views

How to Install gcc 4.7.x/4.8.x on CentOS

What would be the easiest way to install gcc 4.7.x/4.8.x on a system with CentOS 6.2+? The default RPM package contains an older version of gcc.
64
votes
4answers
237k views

Checking what PHP version I'm running on Linux?

I'm running Centos 5 and I need to know what version of PHP I'm running, is there a command for this which I can run?
39
votes
8answers
199k views

How do you automatically detect a new network card in CentOS 6 / RedHat?

I'm using CentOS 6 in a virtual environment. When cloning a virtual version of CentOS, the old eth adapters are "removed" and replaced with new ones and net MAC addresses. However, the ifcfg-ethn ...
31
votes
4answers
57k views

yum install gcc-g++ doesn't work anymore in CentOs 6.4

Today installed CentOs 6.4 fresh new on my workstation. I wanted to install g++. With my surprise I didn't succeed by using yum install gcc-g++ The thing is that even by doing a search I don't ...
25
votes
1answer
46k views

create tar with multiple directories and file locations

I have some scripts and files located in various locations like: /etc/dir1 /var/www/html /home/somedir I want to make a tar file so that it copies files and folders with the location structure. ...
23
votes
5answers
48k views

How to stop kernel messages from flooding my console?

I'm using Centos 6, rsyslog logging. Console is flooded with kernel messages. Klogd is not running (I'm using rsyslog) Rsyslog config does not direct anything to the console Even tried stopping ...
23
votes
3answers
39k views

What is the difference between CentOS “DVD” vs “Everything” ISOs

What is the difference between the DVD ISO and the Everything ISO? These options are presented on the CentOS download page but there is no explanation as to what the difference is.
23
votes
4answers
82k views

Where Linux places the messages of boot?

I want to find place to where Linux writes all boot messages. You know: facility one [STARTED] facility two [STARTED] facility three [FAILED] I searched with find . -print0 | xargs -0 grep ...
22
votes
3answers
34k views

yum hangs and won't respond

I am running yum check-update and it freezes after a 2 lines of output: Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile I'm not sure what is happening. The last things I ...
20
votes
7answers
30k views

Are we supposed to manually delete the contents of /tmp?

I was under the impression that “old” files in /tmp will be regularly deleted. However, it seems to me that /tmp will just grow as long as it wants to, and nothing will be deleted. Some people say it’...
19
votes
4answers
26k views

How to view history of Yum commands (update, install, remove)?

I'm seeing some errors in my apache logs and they may (or may not) be related to some packages that I recently installed/removed using Yum. Is there a way to view the history of Yum packages that ...
18
votes
3answers
2k views

Moving 2TB (10 mil files + dirs), what's my bottleneck?

Background I ran out of space on /home/data and need to transfer /home/data/repo to /home/data2. /home/data/repo contains 1M dirs, each of which contain 11 dirs and 10 files. It totals 2TB. /home/...
16
votes
10answers
70k views

How can I add additional search domains to the resolv.conf created by dhclient in CentOS

When my CentOS virtual machine boots it uses DHCP to get an IP address. It also overwrites resolv.conf with the DNS settings provided by the DHCP server. The DHCP server doesn't supply any search ...
16
votes
8answers
81k views

How to install pip and easy_install on CentOS

I tried to install pip and easy_install on my CentOS but could not find them. How can I install them? Also, I have two versions of Python, 2.4 and 2.7. How will pip make sure to link newly installed ...
16
votes
3answers
116k views

SSH Permission denied on Correct Password Authentication

I could successfully SSH into my machine yesterday with the exact same credentials I am using today. The machine is running Centos 6.3. But now for some reason it is giving me permission denied. Here ...
14
votes
2answers
4k views

Install emacs without sudo?

I have been using vim for years, and I don't really like it. I'd like to try emacs for a while, but it's not installed on any of the linux servers I use regularly. I don't have root so apt-get ...
14
votes
4answers
4k views

Linux software for periodical work break [closed]

I am using Cent OS 5. I am looking for an app which will alert me after some time to take break. So I can use computer as healthy computer usages ?
14
votes
3answers
39k views

How to upgrade CentOS 5.6 to 6.0?

I am using CentOS 5.6 on my desktop and would like to upgrade to CentOS 6.0. I tried changing the yum repos to point to CentOS 6 but no luck. How can I do the upgrade?
13
votes
3answers
41k views

How to find which files and folders were deleted recently in Linux?

I am having one particular folder (/home/sam/officedocuments) which is having hundreds of folders and files. I think I deleted some files and folders by mistake but I'm not sure. How to find which ...
12
votes
2answers
6k views

sshfs is failing with “remote host has disconnected”

I'm running sshfs with the following: sshfs basicuser@192.168.1.111:/var/www/myapp /home/basicuser/code -o sftp_server="/usr/bin/sudo /usr/libexec/openssh/sftp-server" I have also created RSA keys ...
11
votes
1answer
18k views

what is run-parts in /etc/crontab, and how do I use it

I have been digging through my Linux system. To try and understand how it all works In the /etc/crontab file. I see the following # run-parts 01 * * * * root run-parts /etc/cron.hourly 02 4 * * * ...
11
votes
3answers
301 views

A way to trigger an SELinux policy violation?

I'm studying the basic workings of SELinux and would find it useful to trigger a denial. My test machine is running CentOS 7, it's a basic server install without any extra services, and getenforce ...
11
votes
0answers
11k views

CentOS 7 DVD ISO vs Everything ISO different [duplicate]

What is different between CentOS 7 DVD ISO and Everything ISO in http://centos.org/download/ ? CentOS 7 DVD ISO 3.86 GB Everything ISO 6.58 GB
10
votes
3answers
58k views

how can i install CentOS 6 without the gui?

i just downloaded the centos 6 live cd and i tried installing it on virtually and i am never prompted to install centos with/without gui and its all automated. what happends is after i am booted into ...
10
votes
5answers
13k views

Proper way to start xvfb on startup on centos?

I'm following this tutorial, and I want to know the equivalent centos-version of this ubuntu-specific step: You may receive a few warnings regarding fonts and such, but it’ll still work despite these....
10
votes
1answer
18k views

Using colour schemes with vim and putty

I am trying to use the desert color scheme with VIM 7.0 on CentOS 5.6 x64 located here: http://hans.fugal.net/vim/colors/desert.vim I've downloaded the file and saved it in my ~/.vim/colors ...
10
votes
5answers
18k views

sudo access for desktop actions in Gnome/KDE?

I feel kinda silly asking this question. I'm using CentOS 5.4 and KDE. I downloaded an archive and I want to drag/drop the contents into a folder that I need root access to write to. I can obviously ...
10
votes
2answers
17k views

Virtualbox: How to access web server on guest OS from the host OS?

After a lot of RTFM'ing and reading forums, I am still having problems and need some advice. I use Virtualbox on Ubuntu and installed a Centos server as a guest. My problem is that I cannot access the ...
9
votes
2answers
35k views

Searching for grub configuration file in CentOS 7

Im searching for grub.conf file in CentOS 7. I cant find it with locate(I called updatedb before). Where does it stores? In older versions of CentOS I could find it.
9
votes
2answers
12k views

CentOS Live CD vs Live DVD download

In this download page, I am presented with some options: http://mirrors.arpnetworks.com/CentOS/6/isos/i386/ What's the difference between Live CD vs Live DVD? CentOS-6.3-i386-LiveCD.iso 690M CentOS-...
9
votes
2answers
5k views

Execute a command if Linux is idle for 5 minutes

I would like to execute a command such as notify-send 'a' if my Linux machine has been idle for 5 minutes. By idle, I mean the same thing a screen saver that gets activated would use to define "...
9
votes
3answers
416 views

Linux user account 'nagent' deleted and re-added in secure log

The following lines appear in my CentOS secure log file: Oct 27 21:10:59 servr userdel[7270]: delete user 'nagent' Oct 27 21:10:59 servr userdel[7270]: removed group 'nagent' owned by 'nagent' Oct 27 ...
8
votes
4answers
33k views

How to combine tar command with find

Find command giving this output [root@localhost /]# find var/log/ -iname anaconda.* var/log/anaconda.log var/log/anaconda.xlog var/log/anaconda.yum.log var/log/anaconda.syslog var/log/anaconda....
8
votes
3answers
10k views

Why can't I sudo some commands? (e.g., vim)

I have sudo access on my friends server, running centos-6.3, but when I try to run some commands like sudo vim /var/www/html/index.html I get an error sudo: vim: command not found I can, however, run ...
8
votes
5answers
18k views

Installing Git on CentOS [closed]

How install git on CentOS? I find this manual. Is it good?
8
votes
4answers
4k views

How can I have two files with the same name in a directory when mounted with NFS?

I have a C++ application test that creates 10,000 files in an NFS mounted directory, but my test recently failed once due to one file appearing twice with the same name in that directory with all the ...
8
votes
2answers
7k views

What does an empty iptables mean?

I’m using CentOS and when type in the following iptables command: iptables -L -v The output is as follows: Chain INPUT (policy ACCEPT 19614 packets, 2312K bytes) pkts bytes target prot opt in ...
8
votes
3answers
5k views

“muxserver_listen bind(): No such file or directory” using todo.txt over ssh on Haiku OS

I'm getting this error after entering a password when connecting via ssh from a Terminal window, ever since I followed these directions to reuse ssh connections: "...consider appending the following ...
8
votes
2answers
7k views

Which binary clang version I should use for CentOS

Based on http://llvm.org/releases/download.html Clang Binaries for FreeBSD9/x86_64 (69M)(.sig) Clang Binaries for Ubuntu-12.04/x86 (67M)(.sig) Clang Binaries for Ubuntu-12.04/x86_64 (71M)(.sig) ...
8
votes
1answer
29k views

How to completely uninstall a package (including all extra files that came with it) using yum (or rpm)?

When I do yum remove, it sometimes keeps a package's configuration files. Is there anyway to remove a package completely, without keeping any file that belonged to the package? I am running CentOS.
8
votes
3answers
5k views

I can't open phpMyAdmin, get error 301 or 500

I've installed phpMyAdmin, but I can't open it on any browser: I get a 301 redirect(*) if I browse to http://localhost:8080/phpmyadmin. If I add a / to the end of the addres, I get a 500 error status ...
7
votes
5answers
22k views

Can't kill a sleeping process

I don't seem to be able to kill -9 a process which is in an interruptible sleep (S) state: [root@jupiter ~]# ps -elf | grep yum 4 S root 16790 1 0 75 0 - 73779 - Jan15 ? 00:00:...
7
votes
3answers
15k views

Why can't I find termcap library when I build gdb?

make and then failed with: configure: error: no termcap library found, but that termcap lib is just there, why can't make find it? checking for library containing zlibVersion... -lz checking zlib.h ...
7
votes
3answers
18k views

how to stop cp: overwrite './xxx' ? prompt

How can I stop the cp command from prompting to overwrite. I want to overwrite all the files with out having to keep going back to the terminal. As these are large files and take some time to complete....
7
votes
4answers
16k views

Why Centos still not using Latest kernel

As i have seen many changes and improvement in kernel 3.xx The improvement i like is dmcache which introduced in kernel 3.9 I have 3 server with centos installed on all machine Centos is still ...
7
votes
3answers
3k views

Is sendmail a smtp server? Is there any difference between MTA and mail server?

I am new to mail and do not exactly know how it works. I have seen administrators use sendmail to send out email. Is sendmail a smtp server or is it a client that need to relies on smtp server to ...
7
votes
3answers
2k views

To use ssh-id-copy do you need both id_rsa.pub and id_rsa?

I am trying to setup a second access ssh key for a friend. He sent me his id_rsa.pub. ssh-copy-id -i id_rsa.pub root@123.123.123.123 /usr/local/bin/ssh-copy-id: ERROR: failed to open ID file './...
7
votes
4answers
520 views

How to empty the contents of continuosly streaming file in linux

i have the program running using this command command 2> sample.txt now that file is growing continuously and command will exit in 5-6 days and i beleive that file size won't go in GB I tried ...
6
votes
1answer
10k views

Attempting to install tmux on CentOS 6.x fails with error: ‘EVBUFFER_EOL_LF’ undeclared

I tried compiling tmux using the following steps: yum -y install ncurses-devel libevent-devel wget http://downloads.sourceforge.net/tmux/tmux-1.9a.tar.gz tar -xvzf tmux-1.9a.tar.gz cd tmux-1.9a ./...