Archive for the ‘Miscellaneous Admin Commands’ Category

Mysql Server processlist shows negative value(-) in connect column for system user

Wednesday, June 9th, 2010

Some times process list out put show negative value like bellow :
Command :

watch /usr/local/mysql/bin/mysqladmin -ppass processlist

8 | system user | | Connect | -1247 | Has read all relay log; waiting for the slave I/O thread to update it |
One of the reason :
make sure both Server has same [...]

Linux:How to configure logrotate for ModSecurity(source install)

Monday, April 26th, 2010

Problem: When you install Mod-security from source , by default log-rotate will not rotate those logs file as the path for log files are not defined logrotate configuration file by default. So if you want to allow logo-ratate to rotate your modsecurity log files. here is the steps:
1. Create a file modsecurity under /etc/logrotate.d

[...]

Linux:How to create multiple OpenVPN instances

Monday, April 26th, 2010

Problem :
How to configure openvpn to create multiple instances and listen more then 2 ports(1194,1195) ??
Solution:
you need more then 2 openvpn configuration file. example : openvpn.conf and openvpn1.conf
Now you need to define different port , Server Ip address,ifconfig-pool-persist, and log files
For openvpn.conf :

port 1194
proto tcp
dev tun
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
log [...]

how to configure logrotate for apache log files

Wednesday, March 24th, 2010

Problem : When you install apache from source , by default logrotate will not rotate those logs file as the path for log files are different.
Solution: You can edit httpd file under /etc/logrotate.d/ directory and insert bellow lines

/usr/local/apache/logs/*log {
missingok
notifempty
sharedscripts
postrotate
[...]

Linux:How to use aide to check file system integrity

Monday, March 15th, 2010

Installing Aide:

Yum install aide

Creating the database:

aide -c /etc/aide.conf –i
Output : AIDE database at /var/lib/aide/aide.db.new.gz initialized.
This process creates a new file, aide.db.new.gz in /var/lib/aide/.You must rename this file to aide.db.gz, which is the correct name for the AIDE database.

Testing Aide:

aide -c /etc/aide.conf –C

Linux/windows-How to add a printer from cups by using .ppd file

Friday, February 12th, 2010

Recently I was trying to add a Canon LBP3460  Printer in my linux Server, I was trying to use .ppd which was available from canon website, but that file would not work.
so I download the file from : http://openprinting.org/printer_list.cgi , and its works perfectly .
here is the procedure::
Download the .ppd file from http://openprinting.org/printer_list.cgi
Upload the file [...]

Linux print job administration

Friday, January 22nd, 2010

How to find every Printer Status :

lpc status

How to view print job for a particular printer:

lpq -Pprinter-spool-name
[root@Host~]# lpq -PGI_LBP
GI_LBP is ready and printing
Example:
Rank Owner Job File(s) [...]