Questions tagged [centos]

CentOS (Community Enterprise Operating System) is based on the Red Hat Enterprise Linux operating system. QUESTIONS MUST BE ABOUT RUNNING PROGRAMS UNDER CENTOS. Questions about server administration may be asked on https://serverfault.com

CentOS is a community-supported, mainly free software operating system based on Enterprise Linux (RHEL). It exists to provide a free enterprise class computing platform and strives to maintain 100% binary compatibility with its upstream distribution. CentOS stands for Community Enterprise Operating System.

Currently supported versions:

  • CentOS 5 (April 2007 - March 2017)
  • CentOS 6 (July 2011 - November 2020)
  • CentOS 7 (July 2014 - June 2024)
12486 questions
375
votes
12 answers

Open firewall port on CentOS 7

I am using CentOS 7 and I have to ensure that ports 2888 and 3888 are open. I read this article but this did not work because on CentOS 7 OS there is no iptables save command. Someone told me that the above URL is not valid for CentOS 7. and I…
Knows Not Much
  • 30,395
  • 60
  • 197
  • 373
275
votes
7 answers

How to ignore xargs commands if stdin input is empty?

Consider this command: ls /mydir/*.txt | xargs chown root The intention is to change owners of all text files in mydir to root The issue is that if there are no .txt files in mydir then xargs thows an error saying there is no path specified. This…
HyderA
  • 20,651
  • 42
  • 112
  • 180
274
votes
6 answers

How to use a different version of python during NPM install?

I have terminal access to a VPS running centos 5.9 and default python 2.4.3 installed. I also installed python 2.7.3 via these commands: (I used make altinstall instead of make install) wget…
Nasser Torabzade
  • 6,490
  • 8
  • 27
  • 36
266
votes
14 answers

How to install latest version of git on CentOS 8.x/7.x/6.x

I used the usual: yum install git It did not install the latest version of git on my CentOS 6. How can I update to the latest version of git for CentOS 6? The solution can be applicable to newer versions of CentOS such as CentOS 7.
AmirHd
  • 10,308
  • 11
  • 41
  • 60
266
votes
2 answers

How to grep a string in a directory and all its subdirectories?

How to grep a string or a text in a directory and all its subdirectories'files in LINUX ??
Rogers
  • 2,905
  • 3
  • 14
  • 11
255
votes
10 answers

pip install - locale.Error: unsupported locale setting

Full stacktrace: ➜ ~ pip install virtualenv Traceback (most recent call last): File "/usr/bin/pip", line 11, in sys.exit(main()) File "/usr/lib/python3.4/site-packages/pip/__init__.py", line 215, in main …
ericn
  • 12,476
  • 16
  • 84
  • 127
248
votes
3 answers

nginx missing sites-available directory

I installed Nginx on Centos 6 and I am trying to set up virtual hosts. The problem I am having is that I can't seem to find the /etc/nginx/sites-available directory. Is there something I need to do in order to create it? I know Nginx is up and…
Fr0ntSight
  • 2,696
  • 3
  • 17
  • 14
228
votes
11 answers

Nginx 403 forbidden for all files

I have nginx installed with PHP-FPM on a CentOS 5 box, but am struggling to get it to serve any of my files - whether PHP or not. Nginx is running as www-data:www-data, and the default "Welcome to nginx on EPEL" site (owned by root:root with 644…
Angus Ireland
  • 2,385
  • 3
  • 22
  • 21
219
votes
7 answers

How do I find which rpm package supplies a file I'm looking for?

As an example, I am looking for a mod_files.sh file which presumably would come with the php-devel package. I guessed that yum would install the mod_files.sh file with the php-devel x86_64 5.1.6-23.2.el5_3 package, but the file appears to not to be…
wherestheph
  • 2,369
  • 2
  • 14
  • 6
199
votes
16 answers

Automatically start forever (node) on system restart

I am using node's forever module to keep my node server running. Forever however terminates when there is a system restart. Is there any way I can automatically start the node server (with forever) when the system restarts?
kehers
  • 4,076
  • 3
  • 30
  • 31
190
votes
21 answers

VirtualBox: mount.vboxsf: mounting failed with the error: No such device

I'm using VirtualBox with OS X as host and CentOS on the guest VM. In OS X I created folder myfolder, added it as shared folder to the VM, turned on the VM, in CentOS created folder /home/user/myfolder and typing: sudo mount -t vboxsf myfolder…
cnaize
  • 3,139
  • 5
  • 27
  • 45
188
votes
12 answers

httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

I tried to restart my Apache server on CentOS 5.0 and got this message: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName Here is the /etc/hosts file: 127.0.0.1 server4-245 …
user1220351
  • 1,885
  • 2
  • 12
  • 6
186
votes
9 answers

CentOS 64 bit bad ELF interpreter

I have just installed CentOS 6 64bit version, I'm trying to install a 32-bit application on a 64-bit machine and got this error: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory How do I resolve this?
c11ada
  • 4,302
  • 15
  • 48
  • 62
176
votes
15 answers

ffprobe or avprobe not found. Please install one

I want to add tags to mp3 converted by youtube-dl & ffmpeg: youtube-dl -o '/Output/qpgTC9MDx1o.mp3' qpgTC9MDx1o -f bestaudio --extract-audio --metadata-from-title "%(artist)s - %(title)s" 2>&1 I have this error in the output result: [youtube]…
Anass
  • 2,101
  • 2
  • 15
  • 20
160
votes
5 answers

Where is the php.ini file on a Linux/CentOS PC?

I can't find PHP.ini location on my server. I've checked all Stack Overflow answers but I can't find my php.ini location. I have Linux, Cent OS, zPanel. Last version of PHP. My computer: Linux Mint 15 KDE.
MM PP
  • 4,050
  • 9
  • 35
  • 61
1
2 3
99 100