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
153
votes
9 answers

How can I use iptables on centos 7?

I installed CentOS 7 with minimal configuration (os + dev tools). I am trying to open 80 port for httpd service, but something wrong with my iptables service ... what's wrong with it? What am I doing wrong? # ifconfig/sbin/service iptables…
Meiblorn
  • 2,522
  • 2
  • 18
  • 23
151
votes
24 answers

ImportError: No module named psycopg2

In installation process of OpenERP 6, I want to generate a config file with these commands: cd /home/openerp/openerp-server/bin/ ./openerp-server.py -s --stop-after-init -c /home/openerp/openerp-server.cfg But it always showed the message:…
ws_123
  • 5,155
  • 7
  • 23
  • 20
133
votes
7 answers

Two versions of python on linux. how to make 2.7 the default

I've got two versions of python on my linuxbox: $python Python 2.6.6 (r266:84292, Jul 10 2013, 22:48:45) [GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> $…
Anthony
  • 33,838
  • 42
  • 169
  • 278
129
votes
12 answers

javac : command not found

I have installed java in my CentOS release 5.5 machine using the command yum install java. But I am unable to compile a class using javac. Do I need to install any other package? I have tried to locate the javac executable but i am unable to locate…
Bikash Barman
  • 1,309
  • 2
  • 9
  • 4
126
votes
9 answers

index.php not loading by default

I have just installed CentOS, Apache and PHP. When I visit my site http://example.com/myapp/, it says "forbidden". By default it's not loading the index.php file. When I visit http://example.com/myapp/index.php, it works fine. Any idea how to fix…
001
  • 62,807
  • 94
  • 230
  • 350
122
votes
14 answers

bash: mkvirtualenv: command not found

After following the instructions on Doug Hellman's virtualenvwrapper post, I still could not fire up a test environment. [mpenning@tsunami ~]$ mkvirtualenv test -bash: mkvirtualenv: command not found [mpenning@tsunami ~]$ It should be noted that…
Mike Pennington
  • 41,899
  • 19
  • 136
  • 174
118
votes
20 answers

EC2 Can't resize volume after increasing size

I have followed the steps for resizing an EC2 volume Stopped the instance Took a snapshot of the current volume Created a new volume out of the previous snapshot with a bigger size in the same region Deattached the old volume from the…
Wilman Arambillete
  • 1,411
  • 2
  • 11
  • 12
117
votes
20 answers

Unable to install pyodbc on Linux

I am running Linux (2.6.18-164.15.1.el5.centos.plus) and trying to install pyodbc. I am doing pip install pyodbc and get a very long list of errors, which end in error: command 'gcc' failed with exit status 1 I looked in /root/.pip/pip.log and…
IgorGanapolsky
  • 26,189
  • 23
  • 116
  • 147
112
votes
8 answers

Check if directory mounted with bash

I am using mount -o bind /some/directory/here /foo/bar I want to check /foo/bar though with a bash script, and see if its been mounted? If not, then call the above mount command, else do something else. How can I do this? CentOS is the operating…
Justin
  • 42,716
  • 77
  • 201
  • 296
112
votes
5 answers

Vagrant's port forwarding not working

I'm running into a small problem at the end of the Getting Started guide for vagrant. I'm working on a CentOS basebox that has Apache2 running (provisioning via Puppet). I've set up port forwarding for web requests using the following line in…
Hank Gay
  • 70,339
  • 36
  • 160
  • 222
110
votes
27 answers

Apache is downloading php files instead of displaying them

OS and server information: CentOS 6.4 (Final) Apache 2.2.15 PHP 5.5.1 I previously had php 5.3.x installed but decided to upgrade. I first uninstalled the php 5.3.x and then installed php 5.5.1 but after the installation completed apache did not…
Anthony Gainor
  • 1,149
  • 2
  • 10
  • 9
105
votes
7 answers

How to get a list of programs running with nohup

I am accessing a server running CentOS (linux distribution) with an SSH connection. Since I can't always stay logged in, I use "nohup [command] &" to run my programs. I couldn't find how to get a list of all the programs I started using…
Nils De Winter
  • 1,370
  • 3
  • 11
  • 20
104
votes
6 answers

cannot find autoconf. please check your autoconf installation Xampp in CentOS

Getting another error when configuring memcahed with php in XAMPP in CentOS # /opt/lampp/bin/phpize Configuring for: PHP Api Version: 20131106 Zend Module Api No: 20131226 Zend Extension Api No: 220131226 Cannot find autoconf.…
Lakshmikandan
  • 4,301
  • 3
  • 28
  • 37
104
votes
6 answers

How can I view the complete httpd configuration?

I'm trying to figure out what is the full complete configuration of an httpd setup. All the configurations files are scattered in different files (/etc/httpd/conf.d, httpd.conf, various mod configs) Is there a way to list the final httpd…
Gnafu
  • 1,591
  • 3
  • 10
  • 26
103
votes
12 answers

How to install Java SDK on CentOS?

I have CentOS 5, but I don't know the steps to install Java SDK on Linux. Where to download the RPM file and what can I do next to fully install that? Then I need to install Tomcat. Or is there any ready-made package for all?
John