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.

Filter by
Sorted by
Tagged with
254 votes
10 answers
321k views

When does `cron.daily` run?

When do entries in cron.daily (and .weekly and .hourly) run, and is it configurable? I haven't found a definitive answer to this, and am hoping there is one. I'm running RHEL5 and CentOS 4, but for ...
warren's user avatar
  • 18.6k
141 votes
2 answers
450k views

How can I verify if TLS 1.2 is supported on a remote web server from the RHEL/CentOS shell?

I'm on CentOS 5.9. I'd like to determine from the linux shell if a remote web server specifically supports TLS 1.2 (as opposed to TLS 1.0). Is there an easy way to check for that? I'm not seeing a ...
Mike B's user avatar
  • 11.9k
134 votes
4 answers
326k views

how do you create an ssh key for another user?

I'm trying to create an ssh key for another user. I'm logged in as root. Can I just edit the files generated by ssh-keygen and change root to the user I want?
user962449's user avatar
  • 1,467
132 votes
20 answers
148k 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 ...
qodeninja's user avatar
  • 2,763
127 votes
15 answers
304k views

Mount CIFS Host is down

I have an issue with a mount point that was previously configured. It shows the folder, but the mount is missing and holds "?" values for size, permissions, etc. So I tried to remount using cifs and ...
Kevin's user avatar
  • 1,403
121 votes
10 answers
473k 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 ...
mimipc's user avatar
  • 1,997
110 votes
10 answers
256k views

How do I update a CentOS server's time from an authoritative time server?

I have CentOS machine and each time I've noticed that the server loses correct time after a while. It is usually behind by several minutes after time passes from having manually set the correct time. ...
user111196's user avatar
  • 1,257
110 votes
9 answers
139k 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 ...
Tommy B.'s user avatar
  • 1,423
107 votes
6 answers
116k views

"POSSIBLE BREAK-IN ATTEMPT!" in /var/log/secure — what does this mean?

I've got a CentOS 5.x box running on a VPS platform. My VPS host misinterpreted a support inquiry I had about connectivity and effectively flushed some iptables rules. This resulted in ssh listening ...
Mike B's user avatar
  • 11.9k
106 votes
5 answers
549k views

Best way to gracefully restart CentOS?

I always used the command: shutdown -r now However, sometimes that causes MySQL issues. What's the most graceful way to restart CentOS? I've seen: reboot and halt How can I gently reboot the ...
User's user avatar
  • 1,405
104 votes
17 answers
169k 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 ...
DLH's user avatar
  • 1,115
103 votes
6 answers
306k views

Adding a directory to $PATH in CentOS?

We just got our new server(s) up and we're running CentOS on them all. After successfully installing Ruby Enterprise Edition, I would now like to add the REE /bin (located at /usr/lib/ruby-enterprise/...
vonconrad's user avatar
  • 1,281
97 votes
12 answers
34k 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 ...
bdemarest's user avatar
  • 1,081
96 votes
8 answers
242k views

Show all users and their groups/vice versa

I know I have existing groups and users but I'm not sure about their association. Is there an shell command I can use to list all users or all groups and a command to list all groups/users for a ...
Steve Robbins's user avatar
95 votes
7 answers
126k views

My /var/log/btmp file is huge! What should I do?

My /var/log/btmp file is 1.3 GB in size. I've read that the file is "Used to store information about failed login". What does this mean for my server? And can I delete this file?
Juddling's user avatar
  • 1,085
82 votes
7 answers
120k 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,...
Soviero's user avatar
  • 4,366
81 votes
2 answers
218k 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?
Michaël Perrin's user avatar
80 votes
6 answers
283k 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 ...
user1463822's user avatar
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 ...
wfaulk's user avatar
  • 6,938
74 votes
4 answers
235k 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 ...
Snowcrash's user avatar
  • 1,157
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 ...
ewwhite's user avatar
  • 198k
68 votes
9 answers
116k views

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-...
Jim Hunziker's user avatar
  • 1,862
66 votes
6 answers
21k views

Server wiped after "yum remove python" [closed]

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 ...
tadoman's user avatar
  • 773
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 ...
ewwhite's user avatar
  • 198k
63 votes
3 answers
98k views

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 "...
larry's user avatar
  • 4,067
62 votes
5 answers
289k 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 ...
Toqeer's user avatar
  • 1,241
53 votes
4 answers
263k views

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 ~]...
ujjain's user avatar
  • 4,013
51 votes
6 answers
48k views

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's user avatar
  • 8,521
49 votes
3 answers
218k views

Disable the public key check for rpm installation

I want to make a DVD with some useful packages (for example php-common). The only problem is that if I try to install on a computer that's not connected to internet, I can't validate the public key. ...
zozo's user avatar
  • 803
48 votes
6 answers
161k views

tell yum to ignore a single dependency

I'm trying to install winswitch on CentOs 6. It requires nxagent. But in centos, the package name is nx. Is there a way to tell yum to skip checking the nxagent dependency (I installed nx already)? ...
IttayD's user avatar
  • 1,107
48 votes
2 answers
83k views

How can I see the contents of the mail whose ID I get from mailq command?

I used mailq command and I got a line like for example: A705238B4C 603953 Wed May 23 11:09:58 [email protected] So, now I'm wondering is there a way where I can "read" an actual content of the ...
Nikola's user avatar
  • 847
47 votes
4 answers
182k views

Tcpdump on multiple interfaces

I need to capture traffic on a CentOS 5 server which acts as a web proxy with 2 wan interfaces and 1 LAN. In order to troubleshoot a weird proxy problem, I would like to have a capture of a full ...
Nahidul islam's user avatar
47 votes
9 answers
187k views

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. #...
ironsand's user avatar
  • 707
47 votes
8 answers
127k views

ls hangs for a certain directory

There is a particular directory (/var/www), that when I run ls (with or without some options), the command hangs and never completes. There is only about 10-15 files and directories in /var/www. ...
Jake Wilson's user avatar
  • 8,884
45 votes
4 answers
307k views

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 ...
zigojacko's user avatar
  • 1,453
44 votes
8 answers
223k views

What is the value of JAVA_HOME for CentOS?

I have install java through yum on CentOS, however another java programme needs to know what the JAVA_HOME environmental variable is. I know all about setting environmental variables, but what do I ...
Amandasaurus's user avatar
  • 31.9k
44 votes
5 answers
108k 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 /...
GoingMyWay's user avatar
43 votes
8 answers
159k views

where are the default ulimit values set? (linux, centos)

I have two CentOS 5 servers with nearly identical specs. When I login and do ulimit -u, on one machine I get unlimited, and on the other I get 77824. When I run a cron like: * * * * * ulimit -u &...
nomercysir's user avatar
42 votes
13 answers
274k 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.
Evgeny's user avatar
  • 599
42 votes
2 answers
88k views

CentOS /usr/local/lib system wide $LD_LIBRARY_PATH?

I install custom software in /usr/local/lib. How do I set the PATH and LD_LIBRARY_PATH in CentOS 6 system-wide to use /usr/local/lib. I realize there may be more than one way. What's the simplest and ...
unixman83's user avatar
  • 1,932
42 votes
3 answers
74k 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 ...
amq's user avatar
  • 733
41 votes
5 answers
134k views

How to list RPM dependencies?

Our production server is running CentOS release 5.2 (Final). How do I see/get/list all the dependencies of an already installed RPM package? For example: SQLite v3.3.6 is already installed in the ...
Gnanam's user avatar
  • 1,479
41 votes
1 answer
141k views

What does "<service_name> dead but subsys locked" mean?

I'm trying to run memcached on a centos box and it runs for a while, but then ends up in this state: memcached dead but subsys locked netstat shows this: tcp 0 0 :::11211 ...
Nick Brosnahan's user avatar
40 votes
3 answers
83k views

Where does the route to 169.254.0.0 comes from?

Running CentOS 5.4 Why do I have route to 169.254.0.0 although it does not appear in Network > Ethernet Device > Route configuration dialog? Destination Gateway Genmask Flags ...
jackhab's user avatar
  • 791
40 votes
5 answers
11k views

Should I be concerned that swap is being used on a host with nearly 40GB of free memory?

I have a production host, below: The system is using 1GB of swap, while maintaining nearly 40GB of free, unused memory space. Should I be concerned about this, or is it mostly normal?
MrDuk's user avatar
  • 875
39 votes
4 answers
100k views

How to enable PowerTools repository in CentOS 8?

Since I had a lot of trouble finding out how to do this anywhere, I'd like to ask, how do I enable the PowerTools repository in CentOS 8? (equivalent of CodeReady Linux Builder repo in RHEL 8)
omusil's user avatar
  • 493
38 votes
3 answers
109k views

Finding latest successful logins and failed attempts to a CentOS server

I'm looking for a log file or any service to report the latest login attempts that have failed due to username/password mismatch. Are there any such utilities available for CentOS? (built-in is ...
lashgar's user avatar
  • 681
38 votes
6 answers
266k views

No mysqld or mysql.server after mariadb-server install

So... likely I'm an idiot, but I'm stuck. I just set up a CentOS 7 on Digial Ocean and I can't seem to get the MariaDB/MySQL server running. Some output [root@hostname ~]# yum list installed |grep ...
danneth's user avatar
  • 995
38 votes
4 answers
47k views

Official online RPM package browser / search for CentOS [closed]

I am looking for something that resembles packages.debian.org Debian Package Browser only for CentOS 5 and/or RHEL 5 [Red Hat Enterprise Linux].
unixman83's user avatar
  • 1,932
38 votes
1 answer
70k views

firewalld vs iptables - when to use which [closed]

TL;DR On new CentOS server installs should I be using firewalld or just disable that and go back to using /etc/sysconfig/iptables ? firewalld and iptables serve similar purposes. Both do packet ...
bgp's user avatar
  • 853

1
2 3 4 5
214