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.
642
questions
6
votes
1
answer
4k
views
Excessive number of sleeping processes in CentOS - howto diagnose? [closed]
I have a a large number of sleeping processes, about 600, the majority of which are Apache processes.
Should I kill all these sleeping processes, or will that make Apache fail completely?
Why are ...
82
votes
7
answers
122k
views
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,...
72
votes
2
answers
34k
views
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 ...
62
votes
5
answers
297k
views
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 ...
38
votes
7
answers
52k
views
How can I determine what is taking up so much space? [duplicate]
I was using df -h to print out human readable disk usage. I would like to figure out what is taking up so much space. For instance, is there a way to pipe this command so that it prints out files that ...
112
votes
9
answers
146k
views
Allow SFTP but disallow SSH?
I'm starting a very little hosting company for a few friends and little clients, nothing big.
I want to give my "clients" the right to manage their files on the server. I hate FTP as it is not secure ...
84
votes
2
answers
229k
views
How to open port for a specific IP address with firewall-cmd on CentOS? [duplicate]
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?
16
votes
4
answers
24k
views
SELinux preventing Apache from writing to a file
SELinux is preventing the apache user from writing to a log file which it owns. When I do setenforce 0 it works. Otherwise it shows this error
IOError: [Errno 13] Permission denied: '/var/www/webapp/...
74
votes
2
answers
7k
views
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 ...
65
votes
1
answer
24k
views
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 ...
10
votes
4
answers
27k
views
How to diagnose causes of oom-killer killing processes
I have a small virtual private server running CentOS and www/mail/db, which has recently had a couple of incidents where the web server and ssh became unresponsive.
Looking at the logs, I saw that ...
98
votes
12
answers
35k
views
How bad is it really to install Linux on one big partition?
We will be running CentOS 7 on our new server. We have 6 x 300GB drives in raid6 internal to the server. (Storage is largely external in the form of a 40TB raid box.) The internal volume comes to ...
33
votes
12
answers
52k
views
Disable local delivery in Sendmail
I am using Sendmail on a Centos server to send email for PHP scripts, but the problem is that mail is delivered to a local mailbox on the machine rather than what is specified in the MX records for ...
27
votes
3
answers
112k
views
Allowing FTP with IPTables
My current scenario involves allowing various rules, but I need ftp to be accessible from anywhere. The OS is Cent 5 and I am using VSFTPD. I can't seem to get the syntax correct. All other rules ...
5
votes
1
answer
47k
views
CentOS 7 x64 and HP Proliant DL360 G5 SCSI Controller compatibility
I've an HP Proliant DL360 G5 server with two 72gb HDD in RAID and 2 150gb HDD in RAID.
I've Windows Server installed on the 72gB HDD and I'm now trying to overwrite it with a fresh installation of ...
4
votes
1
answer
1k
views
Two identical files; Apache says one is forbidden
I've got this one file, favicon.ico. It's actually a large group of nested files, but purely for example, just this one.
If I do cp favicon.ico favicon2.ico, Apache can read the second one just fine.
...
132
votes
20
answers
149k
views
How do you install Node.JS on CentOS?
I've found numerous installation instructions for Node.js but they all seem so complicated -- I'm not a super sys admin but I can get around. I have yum on the system, but I didn't find any node.js ...
104
votes
17
answers
170k
views
CentOS vs. Ubuntu [closed]
I had a web server that ran Ubuntu, but the hard drive failed recently and everything was erased. I decided to try CentOS on the machine instead of Ubuntu, since it's based on Red Hat. That ...
81
votes
6
answers
287k
views
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 ...
15
votes
4
answers
6k
views
Managing an application across multiple servers, or PXE vs cfEngine/Chef/Puppet
We have an application that is running on a few (5 or so and will grow) boxes. The hardware is identical in all the machines, and ideally the software would be as well.
I have been managing them by ...
5
votes
4
answers
3k
views
Recovering from bad chown command
I was going to change the ownership of a directory to apache:apache, but I ended up running:
chown -R apache:apache /
Bad! Very bad! I knew what was going on when it started saying:
chown: ...
4
votes
2
answers
4k
views
Move /var to new set of disks
I currently only have remote access to this CentOS box, I need to move /var form the primary RAID to a new set of disks that was installed with more space, My current thoughts on how to accomplish ...
42
votes
13
answers
278k
views
How to find out details about hardware on the Linux machine?
-i.e - how to get a full list of hardware components in command line (on a machine with no window system)
Thank you.
31
votes
3
answers
52k
views
How do I get SELinux to allow Apache and Samba on the same folder?
In the configuration I have setup I wish to allow samba and apache to access /var/www
I am able to set a context to allow samba access, but then httpd doesn't have access.
Using setenforce to 0 ...
16
votes
3
answers
99k
views
Block outgoing connections on RHEL7/CentOS7 with firewalld?
RHEL7/CentOS7 features a new firewalld firewall service, that replaces the iptables service (both of which use iptables tool to interact with kernel's Netfilter underneath).
firewalld can be easily ...
9
votes
1
answer
40k
views
Configure Postfix to send/relay emails Gmail (smtp.gmail.com) via port 587
Using Centos 5.4, with Postfix. I can do a
mail [email protected]
subject: blah
test
.
Cc:
and the msg gets sent to gmail, but it resides in the spam folder, which is to be expected.
My goal is to ...
8
votes
1
answer
7k
views
centos: using epel repository on a server machine
Are there any downsides in enabling epel repository on a server machine or is it something every sysadmin does?
8
votes
3
answers
13k
views
How to Tee udp packets onto a different host
I would like to clone incoming UDP packets onto a different host, I found a way to do it Here but I could not build xtables-addons on centos 5.3 .
Is there any other way to tee upd packets?
45
votes
5
answers
111k
views
How to shrink /home and add more space on CentOS7
CentOS 7 file system is XFS, And resize2fs doesn't work. I need to shrink /home to 400G and add 100G space to /. What should I do?
# df -h
Filesystem Size Used Avail Use% Mounted on
/...
35
votes
13
answers
26k
views
Linux IO monitoring per file?
I am interested in a utility or process for monitoring disk IO per file on CentOS.
On Win2008, the resmon utility allows this type of drilldown, but none of the Linux utilities I have found do this (...
35
votes
2
answers
90k
views
How do I configure LDAP on Centos 6 for user authentication in the most secure and correct way?
During the last couple of days I have been using a lot of F-words, while browsing Internet for good documentation about how to setup an LDAP-server. So far I have found none, but plenty that are less ...
29
votes
7
answers
20k
views
CentOS 7 - end of life in 2024, then what
We are working on a software solution and some of our providers are really CentOS 7 centered.
CentoS 7 will continue to produce through the remainder of the RHEL 7 life cycle, which will end sometime ...
23
votes
2
answers
46k
views
How do I view the contents of a SELinux policy package
As the title says, how do I view the contents of a SELinux policy package? The resulting files end with .pp. I'm running on centos 6, but I guess it's the same way on "all" distros.
For example
...
21
votes
9
answers
34k
views
Automatically check for Security Updates on CentOS or Scientific Linux?
We have machines running RedHat-based distros such as CentOS or Scientific Linux. We want the systems to automatically notify us if there are any known vulnerabilities to the installed packages. ...
17
votes
4
answers
82k
views
How to change Linux services startup/boot order?
As the question is clear from the title, how do I change Linux services startup/boot order?
10
votes
2
answers
31k
views
Install libxml2 2.7.X on CentOS 5.X
CentOS ships with libxml2-2.6.26. I have to install at least 2.7.X version.
I downloaded RPMs for libxml2, libxml2-devel and libxml2-python (2.7.8) from XMLSOFT (http://xmlsoft.org/sources/).
I am ...
9
votes
8
answers
41k
views
How do I install PHP 5.3 on CentOS?
I have to install PHP 5.3 on my CentOS server. If I do yum install php, the base repository installs 5.1.6 which is too old for the applications I need to install. So I've been trying to use the IUS ...
8
votes
3
answers
963
views
Do old package versions in CentOS mean that they do not have security fixes?
We asked our admin to update SVN on our CentOS 6.5 server. He did so and the result was SVN 1.6.11. However the current version of SVN is 1.8.9.
I know the CentOS yum repository is not always up-to-...
6
votes
3
answers
35k
views
CentOS 5: How to resolve php53 RPM dependency conflict with php-foo and php-common?
We are running a CentOS 5.6 system, and want to install php53 with php-mcrypt.
However, this introduces a dependency conflict between php-common & php53-common. Does anyone have a good workaround ...
2
votes
1
answer
5k
views
Newer GLIBC for RHEL/CentOS 5.x
I have a situation where a group of developers is attempting to deploy a binary application to a series of RHEL 5.5 and CentOS 5.5 servers. Unfortunately, the application was developed on another ...
1
vote
1
answer
2k
views
Centos 6.6 yum issues with NTP update
Hi I'm having an issue with yum, I seem to have broken dependencies? I have a general knowledge of Linux but I'm not sure how to fix this. Running CentOS 6.6.
Here's the output from yum:
yum update
...
132
votes
10
answers
522k
views
How to extend an ext4 partition and filesystem?
I have a 400GB disk with a 320GB ext4 partition.
I would like to grow the ext4 partition to use the left space (80GB of free space).
+--------------------------------+--------+
| ext4 ...
74
votes
4
answers
245k
views
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 ...
42
votes
3
answers
75k
views
Increasing nproc for processes launched by systemd on CentOS 7
I have successfully increased the nofile and nproc value for the local users, but I couldn't find a proper solution for the processes launched by systemd. Adding max_open_files to the MariaDB ...
31
votes
7
answers
166k
views
How to monitor the hard disk status behind Dell PERC H710 Raid Controller with CentOS 6?
I have a Dell server running CentOS 6 using PERC H710 Raid Controller card with Raid 5 setup and I want to monitor the hard disk failure/working status behind the Raid Controller.
Then I should be ...
30
votes
1
answer
97k
views
MySQL [Warning] IP address could not be resolved
I'm running MySQL5.6.3 on a CentOS 6.1 virtual machine running on Windows XP in VirtualBox.
The network card is configured in bridge mode, so my physical & virtual machines share the same ...
29
votes
1
answer
87k
views
How to find out yum package names
Recently I needed to install yum mbstring but because I have two different versions of PHP installed I needed to install mbstring for php 5.5. Through some random google searches I figured out to run:
...
22
votes
3
answers
60k
views
How do I upgrade to the latest PHP version in CentOS with yum?
I found some blog posts about this, but it's rather lack of descriptions on possible side effects.
I could really use some detailed on these steps:
How to add a repo that provides PHP 5.4 into yum
...
18
votes
4
answers
3k
views
Monitoring production server [closed]
We have 3 dedicated server, splitted in several VPS using openVZ.
We're using munin to monitor the VPS with the production sites, and monit on some one of the VPS to make sure it restarts the service ...
13
votes
3
answers
28k
views
Setting up Exim to forward mail
I'm trying to setup Exim on a fresh CentOS install so that it will receive mail for a collection of given addresses, and forward the mail respectively to another address. For example, receiving mail ...