Feeds:
Posts
Comments

Archive for the ‘GENERAL’ Category

Yum Update Error

Error: === [root@host ~]# yum update Loading “installonlyn” plugin Setting up Update Process Setting up repositories Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=os error was [Errno 4] IOError: Error: Cannot find a valid baseurl for repo: base Fix: === This error is due to the disabled recursion queries in /etc/named.conf file. \ From: ==== options { directory [...]

Read Full Post »

How to change server time in VPS. ====================== Actually it is not possible to to change time inside the VPS however it is possible to change timezone. The timezone can be changed using standard Linux method by replacing the /etc/localtime with correct timezone which we want. This can be done by just copying the required [...]

Read Full Post »

Stoping audit: ========= 1. chkconfig audit off 2. service audit stop Make sure it’s stopped: =============== ps -ef | grep auditd It also involves a kernel module (named “auditd”), which you may also want to disable. Doing so will prevent the userspace tools that support auditing from generating errors when they can no longer find [...]

Read Full Post »

Symptoms: ======== Apache hangs with semget: No space left on device error message on /etc/httpd/logs/error_log Cause: ===== About every system semaphore is used. Apache 1.3.27 can leave them used if killed. Resolutions: ======== Close these semaphores. Checking out which proccess is using Semaphores: ============================== # ipcs -s If there is lots of lines owned by [...]

Read Full Post »

Symptoms: ======= ‘yum update’ result File “/usr/lib/python2.4/site-packages/yum/repos.py”, line 200, in populateSack sack.populate(repo, with, callback, cacheonly) File “/usr/lib/python2.4/site-packages/yum/yumRepo.py”, line 91, in populate dobj = repo.cacheHandler.getPrimary(xml, csum) File “/usr/lib/python2.4/site-packages/yum/sqlitecache.py”, line 100, in getPrimary return self._getbase(location, checksum, ‘primary’) File “/usr/lib/python2.4/site-packages/yum/sqlitecache.py”, line 93, in _getbase self.updateSqliteCache(db, parser, checksum, metadatatype) File “/usr/lib/python2.4/site-packages/yum/sqlitecache.py”, line 382, in updateSqliteCache cur.execute(”DELETE FROM “+table+ ” [...]

Read Full Post »

Sometimes you moved a domain from one server to another and you do need to change DNS quickly. Perl: === To do it: perl -i.bak -pe “s/0.0.0.0/1.2.3.4/g” /var/named/domain.com.db This example shows how to change from IP 0.0.0.0 to 1.2.3.4 It do also make a backup of /var/named/domain.com.db as /var/named/domain.com.db.bkp If you do not want backup [...]

Read Full Post »

Symptom: ======= * Postgres database make server slow. With “ps auxw | grep postgres” you’ll get a almost 100% CPU use from “postgres: postgres DATABASE [local] SELECT” line * with a pg_dump DATABASE you’ll get: “Attempt to lock table failed. ERROR: cannot open segment 2 of relation pg_class_relname_nsp_index No such file or directory” Problem: ===== [...]

Read Full Post »

Linux system runlevel:INIT

If the system is already up and running, you can use the init command to start/stop the status of the system. Options: 0     halt system 1     single user mode (for maintenance purposes, won’t allow others to login) 3     multi-user mode (normal mode) 5     multi-user mode with GUI started (normal level for [...]

Read Full Post »

A quick and usefull command for checking if a server is under ddos is That will list the IPs taking the most amount of connections to a server. It is important to remember that the ddos is becoming more sophistcated and they are using fewer connections with more attacking ips. If this is the case [...]

Read Full Post »

Here’s how we do it on RHEL: Logged in as root: * Create file at /etc/cron.hourly/clockset * with these two lines only: rdate -s time-a.nist.gov > /dev/null hwclock –systohc > /dev/null * chmod 700 /etc/cron.hourly/clockset OR make a crontab entry: 0 6 * * * /etc/cron.hourly/clockset open firewall ports: rdate is for port 37. NTP [...]

Read Full Post »

Older Posts »

Follow

Get every new post delivered to your Inbox.