January 13th, 2012 by vicky
Have you ever had problem updating perl via yum and yum spitting a conflict error message at you? I’ve met this problem on few CentOS 5 boxes of mine and thought I share the solution.
I happens on 64bit boxes and the error is for example like this
file /usr/share/man/man1/splain.1.gz from install of perl-5.8.8-32.el5_7.6.x86_64 conflicts with file from package perl-5.8.8-32.el5_6.3.i386
file /usr/share/man/man1/xsubpp.1.gz from install of perl-5.8.8-32.el5_7.6.x86_64 conflicts with file from package perl-5.8.8-32.el5_6.3.i386
file /usr/share/man/man3/CGI.3pm.gz from install of perl-5.8.8-32.el5_7.6.x86_64 conflicts with file from package perl-5.8.8-32.el5_6.3.i386
Obviously it is a problem of having a i386 version along the 64bit. First you need to remove the i386 version and then install perl again. You can do it by executing this command:
yum -y remove perl.i386 && yum -y install perl
It should work and you end up with a correct installation of perl. Until the next update
Posted in General linux admin | No Comments »
June 6th, 2011 by vicky
If you are on cpanel (or any other centos server) and need the security feature that root cannot log in via ssh (I will cover this elsewhere) you can do it by adding new user by using these commands:
# adduser testuser
# passwd testuser
that will create the user “testuser” and prompts you to enter his password
With this you would not be able to su to root, therefore you need to add this user to wheel group by using command:
# usermod -f wheel testuser
Voila, now user “testuser” will be able to su – to root and you can disable direct root login in your ssh configuration.
Posted in General linux admin, Security | No Comments »
November 21st, 2010 by vicky
Do you use your spare server power to compute BOINC projects? Seti@Home or MilkyWay or some others ?
You surely encountered error on CentOS 5 or RHEL 5 these errors:
./boincmgr: error while loading shared libraries: libXcomposite.so.1: cannot open shared object file: No such file or directory
./boincmgr: error while loading shared libraries: libXdamage.so.1: cannot open shared object file: No such file or directory
The cure is actually pretty easy, you just need to install the missing libraries
yum install libXcomposite libXdamage
And your problem should be vanished.. Also, you may need these libraries, but those should be installed by default: zlib, openssl, curl-devel
Happy computing
Posted in General linux admin | No Comments »
January 14th, 2010 by admin
I really started to like nginx web server, and here is my procedure step by step how to install this server on CentOS 5.4
yum install gcc pcre-devel openssl-devel
wget http://nginx.org/download/nginx-0.7.65.tar.gz && tar xvfz nginx-0.7.65.tar.gz
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_gzip_static_module
make
make install
ln -s /usr/local/nginx/conf /etc/nginx
ln -s /usr/local/nginx/logs /var/log/nginx
ln -s /usr/local/nginx/sbin/nginx /usr/sbin/nginx
Then grab this init script for red hat from http://wiki.nginx.org/RedHatNginxInitScript and put it in /etc/init.d/nginx file. Chmod 755 the file and you are ready.
Posted in General linux admin | No Comments »
November 10th, 2009 by vicky
I had strange problem on one of my CentOS 5.4 servers. I stoped auditd service and disables SElinux, the server, however, was still logging all those annoying things like
Nov 10 18:27:01 server kernel: type=1105 audit(1257874021.909:87975): user pid=27986 uid=0 auid=0 msg=’PAM: session open acct=”root” : exe=”/usr/sbin/crond” (hostname=?, addr=?, terminal=cron res=success)’
Nov 10 18:27:02 server kernel: type=1104 audit(1257874022.828:87976): user pid=27986 uid=0 auid=0 msg=’PAM: setcred acct=”root” : exe=”/usr/sbin/crond” (hostname=?, addr=?, terminal=cron res=success)’
into /var/log/messages log, filling it up with garbage.
After some time spent investigating I fixed it. I edited /etc/audit/audit.rules and replaced line
-D
with this line
-e 0
After that I started auditd service, stopped it and no more logs in /var/log/messages
Posted in General linux admin | 1 Comment »
November 5th, 2009 by vicky
Have you ever wondered how to show line numbers in vi or vim while editing file? I do that always when I patch some software or install MODs that come with “go to line xxx and rewrite this…”. And the solution is really simple.
In vi/vim type :set number to show line numbers and :set nonumber to hide line numbers.
Posted in General linux admin | No Comments »
March 8th, 2009 by vicky
Not seeing hidden linux files ( dot beginning files) in your ftp you can enable this option in your ftp client. (show linux hidden files). It it does not work you can force your linux ftp server to show them via this command in /etc/proftpd.conf
ListOptions -a
Put it into the conf file and restart proftpd service.
Posted in General linux admin | No Comments »
March 1st, 2009 by vicky
I recently got to administer a few linux boxes and wondered why vi does not show colors when I edit files. Some servers did it, some did not. It was differently set up by datacenter images and I really did not have time to investigate.
Now it just annoyed me because I could not find few syntax errors on one server and here is the solution.
Open up some file in vi or vim and hit ESC, then type “:syntax on” and the magic happens… let there be color
If you do like it without color, type “:syntax off”
Posted in General linux admin | No Comments »
November 5th, 2008 by vicky
Here is how I speed up apache by compressing pages with mod_deflate module and setting higher cache expiration times in mod_expires module. Here is how… Read the rest of this entry »
Posted in General linux admin | No Comments »
October 14th, 2008 by vicky
Ever wondered how to disable the email alert sent when cron is executed? Easy help, there are various ways to achieve this, so feel free to use the one you like the best.
They all work, though. Read the rest of this entry »
Posted in General linux admin | No Comments »