Questions tagged [centos]

CentOS is a free (as in beer and speech) GNU/Linux distribution that is community driven and based on source code released from RedHat.

CentOS is a free (as in beer and speech) GNU/Linux distribution that is community driven and based on source code released from RedHat. CentOS aims to be 100% binary compatible with RedHat Enterprise Linux. CentOS mainly changes packages to remove upstream vendor branding and artwork.

Support & Lifecycle

Each CentOS version is maintained for up to 10 years and a new version is released approximately every 2 years.

+----------+-------------- +---------------+---------------------+
|  Version | Release date  |  Full updates | Maintenance updates |
+----------+---------------+---------------+---------------------+
| 3        | 19 March 2004 | 20 July 2006  |31 October 2010      |
| 4        | 9 March 2005  | 31 March 2009 |29 February 2012     |
| 5        | 12 April 2007 | Q1 2014       |31 March 2017        |
| 6        | 10 July 2011  | Q2 2017       |30 November 2020     |
| 7        | 7 July 2014   | Q4 2020       |30 June 2024         |
+----------+---------------+---------------+---------------------+

External Resources:

10589 questions
81
votes
7 answers

Log all commands run by admins on production servers

It is company policy for admins to login to the servers via a personal username, and then run sudo -i to become root. Upon running sudo -i, sudo will create an environmental variable called SUDO_USER, which contains the original user's username. Is…
Soviero
  • 4,306
  • 7
  • 34
  • 59
80
votes
2 answers

How to open port for a specific IP address with firewall-cmd on CentOS?

I would like to open port 4567 for the IP address 1.2.3.4 with the firewall-cmd command on a CentOS 7.1 server. How can I achieve this, as the documentation I could find was too specific on this?
Michaël Perrin
  • 903
  • 1
  • 7
  • 7
80
votes
6 answers

Centos 7 save iptables settings

Problem: iptables resets to default settings after server reboot. I'm trying to set rule like this: iptables -I INPUT -p tcp --dport 3000 -j ACCEPT after that I do: service iptables save and it writes back something like this iptables: Saving…
user1463822
  • 903
  • 1
  • 7
  • 4
74
votes
2 answers

How should an IT department choose a standard Linux distribution?

There is a lot of community feeling about what Linux distributions are appropriate for production server environments and which aren't, however, a lot of this feeling seems religiously based, and seldom presented with supporting evidence. Assuming…
wfaulk
  • 6,828
  • 7
  • 45
  • 75
72
votes
2 answers

Why is it so difficult to upgrade between major versions of Red Hat and CentOS?

"Can we upgrade our existing production EL5 servers to EL6?" A simple-sounding request from two customers with completely different environments prompted my usual best-practices answer of "yes, but it will require a coordinated rebuild of all of…
ewwhite
  • 194,921
  • 91
  • 434
  • 799
68
votes
4 answers

failed to get D-Bus connection: Operation not permitted

I'm trying to list services on my CentOS image running in Docker using systemctl list-units but I get this error message: Failed to get D-Bus connection: Operation not permitted Any suggestions what the problem might be?
Snowcrash
  • 1,087
  • 2
  • 16
  • 19
66
votes
6 answers

Server wiped after "yum remove python"

A disaster just occurred to me after I ran the command yum remove python and now I can't boot the server up anymore. How it happened: I tried updating some apps via yum on my CentOS 5 VPS and the command was failing due to some weird python 2.4…
tadoman
  • 773
  • 1
  • 5
  • 8
65
votes
1 answer

Why are my XFS filesystems suddenly consuming more space and full of sparse files?

I've run XFS filesystems as data/growth partitions for nearly 10 years across various Linux servers. I've noticed a strange phenomenon with recent CentOS/RHEL servers running version 6.2+. Stable filesystem usage became highly variable following…
ewwhite
  • 194,921
  • 91
  • 434
  • 799
65
votes
9 answers

How can I check from the command line if a reboot is required on RHEL or CentOS?

I'm using CentOS and Red Hat Enterprise Linux on a few machines without the GUI. How can I check if recently installed updates require a reboot? In Ubuntu, I'm used to checking if /var/run/reboot-required is present.
Jim Hunziker
  • 1,802
  • 4
  • 17
  • 18
61
votes
3 answers

How to install libpq-dev on Centos 5.5

In order to develop one web application based on postgresql, i need to install libpq on my centos. I can install it by "apt-get install libpq-dev" on ubuntu, but i can not install it on centos by "yum install libpq". Who can tell me how to install…
larry
  • 3,927
  • 9
  • 35
  • 41
59
votes
5 answers

How to configure vsftpd to work with passive mode

Whenever I install vsftpd on centos, I only setup the jail environment for the users and rest is default configuration of vsftpd. I create user and try to connect with filezila ftp client, but I could not connect with passive mode. I always change…
Toqeer
  • 1,201
  • 3
  • 13
  • 20
51
votes
4 answers

How do I authenticate with LDAP via the command line?

The LDAP server is hosted on Solaris. The client is CentOS. OpenLDAP/NSLCD/SSH authentication via LDAP work fine, but I am not able to use the ldapsearch commands to debug LDAP issues. [root@tst-01 ~]# ldapsearch SASL/EXTERNAL authentication…
ujjain
  • 3,963
  • 15
  • 50
  • 88
50
votes
6 answers

How to make a global ~/.vimrc?

Right now, I make everyone do ~/.vimrc and put their settings there. How can I make a global, default .vimrc for new users?
Alex
  • 8,111
  • 24
  • 71
  • 99
45
votes
9 answers

Nginx fails to stop and nginx.pid is missing

I want to stop Nginx but it fails like this. $ sudo service nginx stop Stopping nginx: [FAILED] And nginx.conf that defines place of nginx.pid have a line. # /etc/nginx/nginx.conf pid …
ironsand
  • 687
  • 1
  • 7
  • 12
44
votes
3 answers

Create new vsftpd user and lock to (specify) home / login directory

I need to periodically give temporary and limited access to various directories on a CentOS linux server that has vsftp installed. I've created a user using useradd [user_name] and given them a password using passwd [password]. I've created a…
zigojacko
  • 1,433
  • 2
  • 12
  • 25