centos5 interview questions
Top centos5 frequently asked interview questions
I am running CentOS 5.4 which only has version 5.8 of perl available by default, and I have a program which requires perl 5.10, so I compiled perl 5.10 on CentOS. How do I specify which perl I want to run the program with because the perl command uses 5.8 by default.
Source: (StackOverflow)
How can I install git on CENTOS 5.5 machine?
I tried to install it from yum but got following msg.
root@host [~]# sudo yum install git
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: centos.mirrors.tds.net
* base: mirror.ubiquityservers.com
* extras: mirrors.serveraxis.net
* updates: pubmirrors.reflected.net
addons | 951 B 00:00
base | 2.1 kB 00:00
extras | 2.1 kB 00:00
updates | 1.9 kB 00:00
Excluding Packages in global exclude list
Finished
Setting up Install Process
No package git available.
Nothing to do
root@host [~]#
Source: (StackOverflow)
I want to start my server through nohup.php but the command is not running and displays following error
nohup:ignoring input and appending output to 'nohup.out'
I am using ssh through putty, this is what i am doing
nohup php server1.php
Source: (StackOverflow)
when installing process of openerp 6, i want to generate a config file with this command,
cd /home/openerp/openerp-server/bin/
./openerp-server.py -s --stop-after-init -c /home/openerp/openerp-server.cfg
but it was always showed a message
ImportError: No module named psycopg2
when i check for psycopg2 package, it's already installed,
Package python-psycopg2-2.4.5-1.rhel5.x86_64
already installed and latest version
Nothing to do
what's wrong with this? my server is centos, i've installed python 2.6.7.
Really need your help guys..
Source: (StackOverflow)
I have installed Python 2.6.6 on CentOS 5.4,
[siyuan.tong@SC-055 lxml-2.3beta1]$ python
Python 2.6.6 (r266:84292, Jan 4 2011, 09:49:55)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
I want to use the lxml module, but build from sources failed:
src/lxml/lxml.etree.c:157929: error: ‘xsltLibxsltVersion’ undeclared (first use in this function)
src/lxml/lxml.etree.c:157941: error: ‘__pyx_v_4lxml_5etree_XSLT_DOC_DEFAULT_LOADER’ undeclared (first use in this function)
src/lxml/lxml.etree.c:157941: error: ‘xsltDocDefaultLoader’ undeclared (first use in this function)
src/lxml/lxml.etree.c:157950: error: ‘__pyx_f_4lxml_5etree__xslt_doc_loader’ undeclared (first use in this function)
error: command 'gcc' failed with exit status 1
Source: (StackOverflow)
My development server (CentOS 5) is running Subversion 1.4.2, and I wish to upgrade it to 1.5. I have read in various blogs and documents scattered around the web that this may be done by using RPMForge. I have followed the instructions found on CentOS Wiki, including installing yum-priorities and setting my priorities as indicated (1 and 2 for core repo sources, and 20 for RPMForge).
However, when I attempt to run:
$ yum info subversion
the version number given to me is still 1.4.2, with a status of Installed. My other option at this point is compiling from source, but I would like to find a package-managed solution for ease of future upgrades.
Any thoughts?
Source: (StackOverflow)
I'm attempting to use the %{dist}
tag in my RPM spec file to provide distribution-specific dependencies between Fedora Core (e.g. fc12
), CentOS 5 (e.g. el5
) and Amazon's Linux AMI:
Release: %_svn_revision%{?dist}
and
# Depencencies
%{?rhel:Requires: ...}
%{?fedora:Requires: ...}
Unfortunately, %{dist}
doesn't appear to be defined in CentOS 5.5, and I haven't found a distribution-specific conditional that matches CentOS 5.5 (I thought el5
would match, but doesn't appear to). This ticket reported the missing %{dist}
in CentOS in 2008, but hasn't been updated since 2009.
How can I get %{dist}
defined in CentOS and what conditional should I use to match CentOS 5?
Can any RPM gurus point me in the right direction?
Source: (StackOverflow)
When ever i try to install GCC on my linux (centos) It comes back with missing
glibc-headers-2.5-58.el5_6.4.x86_64 from updates has depsolving problems --> Missing Dependency: kernel-headers is needed by package glibc-headers-2.5-
58.el5_6.4.x86_64 (updates)
glibc-headers-2.5-58.el5_6.4.x86_64 from updates has depsolving problems
-->
Missing Dependency: kernel-headers >= 2.2.1 is needed by package glibc-headers-2.5- 58.el5_6.4.x86_64 (updates)
Error: Missing Dependency: kernel-headers >= 2.2.1 is needed by package glibc-headers-2.5-58.el5_6.4.x86_64 (updates)
Error: Missing Dependency: kernel-headers is needed by package glibc-headers-2.5-58.el5_6.4.x86_64 (updates)
I try yum install kernel-header & kernel-devel but get back:
No package kernel-headers available.
Any suggestions?
Source: (StackOverflow)
I'm having problems installing the RMagick rubygem on Centos 5. I've followed the steps detailed in http://rmagick.rubyforge.org/install2-linux.html but when I try:
sudo gem install rmagick
the result is:
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... no
Can't install RMagick 2.11.0. Can't find Magick-config in /usr/bin:/bin
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/ruby
Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/rmagick-2.11.0 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.8/gems/rmagick-2.11.0/ext/RMagick/gem_make.out
The directory /usr/local/bin contains Magick-config but I haven't been able to get rubygems to look there. I tried the following but the result was the same:
sudo gem install rmagick -- --with-opt-dir=/usr/local/bin
Any suggestions would be appreciated.
Source: (StackOverflow)
i searched and found out how to change the default value of max_allowed_packet in mysql.
but each time i used the command mentioned in the subject , the default value stayed untouched!
i used these commands :
mysql --user=root --password=mypass
mysql> SET GLOBAL max_allowed_packet=32*1024*1024;
Query OK, 0 rows affected (0.00 secs)
mysql> SHOW VARIABLES max_allowed_packet;
and then the result is max_allowed_packet = 1048576
what am i missing ?
can anyone help ?
Source: (StackOverflow)
i use centos 5.4 ,the default python version is python2.4,so i use the python2.6.2.tar.gz compile a python 2.6 version
and now i want to intstall board review project it need install python-devel package,if i use
yum install python-devel,it will install the python2.4 relevent version python-devel,
how could i get a python2.6 version devel package install?
Source: (StackOverflow)
I've been trying to get rabbitmq-server-2.4.0 up and running on Centos
5.5 on an Amazon AWS instance.
My instance uses the following kernel: 2.6.18-xenU-ec2-v1.2
I've tried installation of erlang and rabbitmq-server using:
1) yum repos
2) direct rpm installation
3) compiling from source.
In every case, I get the following message when attempting to start the
RabbitMQ-Server process:
pthread/ethr_event.c:98: Fatal error in wait__(): Function not
implemented (38)
Any help would be appreciated.
Source: (StackOverflow)
i need to install psycopg2
for openerp
installation process, but i always found that error. i've already used pip
and easy_install
, my gcc
is the latest version. Really need your help to solve my problem...
this is my complete error with easy_install..
[root@server01 ~]# easy_install psycopg2
Searching for psycopg2
Reading http://pypi.python.org/simple/psycopg2/
Reading http://initd.org/psycopg/
Reading http://initd.org/projects/psycopg2
Best match: psycopg2 2.4.5
Downloading http://initd.org/psycopg/tarballs/PSYCOPG-2-4/psycopg2-2.4.5.tar.gz
Processing psycopg2-2.4.5.tar.gz
Running psycopg2-2.4.5/setup.py -q bdist_egg --dist-dir /tmp/easy_install-anWVvJ/psycopg2-2.4.5/egg-dist-tmp-cZbdtn
no previously-included directories found matching 'doc/src/_build' In file included from psycopg/psycopgmodule.c:27:
./psycopg/psycopg.h:31:22: error: libpq-fe.h: No such file or directory In file included from psycopg/psycopgmodule.c:29:
...
error: Setup script exited with error: command 'gcc' failed with exit status 1
Source: (StackOverflow)
I am trying to install Bugzilla on my Centos server. but I got this error:
Checking for DateTime-TimeZone (v0.71) not found
and
COMMANDS TO INSTALL REQUIRED MODULES (You *must* run all these commands
and then re-run this script):
/usr/bin/perl install-module.pl DateTime::TimeZone
If I run: /usr/bin/perl install-module.pl DateTime::TimeZone
then I get this:
CPAN: Storable loaded ok (v2.15)Reading '/root/.cpan/Metadata'
Database was generated on Sun, 09 Oct 2011 17:27:24 GMT
Installing DateTime::TimeZone version 1.39...
CPAN: Module::CoreList loaded ok (v2.56)
DateTime::TimeZone is up to date (1.39).
How can I fix this?
Source: (StackOverflow)