Browsing all articles in Linux-related
Sep
6

yum update – TypeError: unsubscriptable object

Author andy18    Category Linux-related     Tags

I was trying to update the cPanel server today to the latest version and part of the cPanel scripts do is to update run ‘yum update’ which updates the latest rpm packages to the latest edition. Most of the servers in list completed except one which falls with some weird error saying “TypeError : unsubscriptable object” read more

Nov
11

Unable to start Apache

Author andy18    Category Linux-related     Tags

Some weird error shows up today when trying to start the Apache services at one of the Centos server. The command “service httpd start” executed without any errors but there’s no apache processes running at the server backend. However, apache error logs have the following logged:

[Tue Nov 11 11:28:17 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/local/apache/bin/suexec)
[Tue Nov 11 11:28:17 2008] [crit] (28)No space left on device: mod_rewrite: could not create rewrite_log_lock
Configuration Failed

read more

Jul
25

Finding the rpm package for Linux binary

Author andy18    Category Linux-related     Tags

Use the following command to find the exact rpm packages needed if you can’t find the exact rpm to be used. Example, if your system is missing the ‘nslookup’ command binary, running the following command will shows you the exact package name.

shell># rpm -qf /usr/bin/nslookup
bind-utils-9.3.4-6.0.2.P1.el5_2

Jul
24

RPM error : Package XXXXXXX.rpm is not signed

Author andy18    Category Linux-related     Tags

If you have downloaded any rpms to your local Linux distro server and getting the message :

Package XXXXX.rpm is not signed

You may edit yum.conf by setting the gpgcheck from gpgcheck=1 to gpgcheck=0

Jul
21

Installing yum on Linux VPS

Author andy18    Category Linux-related     Tags

You will need yum if you wish to install any rpms on your Linux machine. However, yum usually is not installed by default on any VPS hosting provider. In order to get this install, you will need the following rpms downloaded. If your Linux VPS is running Centos, just go to the mirror site and browse to /distro.version/os/i386/CentOS/ and grab the following to your server.

libxml2-2.6.26-2.1.2.1.i386.rpm
libxml2-python-2.6.26-2.1.2.1.i386.rpm
python-elementtree-1.2.6-5.i386.rpm
sqlite-3.3.6-2.i386.rpm
python-sqlite-1.1.7-1.2.1.i386.rpm
rpm-python-4.4.2-48.el5.i386.rpm
python-urlgrabber-3.1.0-2.noarch.rpm
yum-3.2.8-9.el5.centos.1.noarch.rpm

Install the rpms above as in order and you should have a working yum once it is done. If you are getting some warning message saying:

warning: libxml2-2.6.26-2.1.2.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897

Import the RPM key by hitting:

rpm -import http://ftp.telus.net/pub/centos/RPM-GPG-KEY-CentOS-5

Dec
5

Remove files older than x day

Author andy18    Category Linux-related     Tags

The following command will remove all files older than x days:

find /path_to_files -mtime +x -exec rm {} \;

Nov
30

Full duplex or Half duplex?

Author andy18    Category Linux-related     Tags

In Linux environment, you may check if your NIC is running in full/half duplex by executing the following command:

root@localhost [~]# ethtool eth0

Output of the result as:

Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: g
Wake-on: g
Current message level: 0×00000007 (7)
Link detected: yes

root@localhost [~]# dmesg | grep -i duplex

Output of the result as:

e100: eth0: e100_watchdog: link up, 100Mbps, full-duplex
e100: eth0: e100_watchdog: link up, 100Mbps, full-duplex
e100: eth0: e100_watchdog: link up, 100Mbps, full-duplex
e100: eth0: e100_watchdog: link up, 100Mbps, full-duplex

e100: eth0: e100_watchdog: link up, 100Mbps, full-duplex

Jun
26

Mass ‘replace’ in Linux

Author andy18    Category Linux-related     Tags

The following command will have ease your jobs if you would like to do a mass replace of certain keywords in a directory to a certain words

replace ‘oldword’ ‘newword’ — /full/physical/path/*