UnixServerAdmin

Server Administration & Management

How to Fix rpmdb: unable to join the environment

This post will probably help you to fix an error occurring when you try to upgrade some package like this:

rpmdb: unable to join the environment
error: db4 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages index using db3 – Resource temporarily unavailable (11)
error: cannot open Packages database in /var/lib/rpm
warning: /root/webmin-1.360-1.noarch.rpm: V3 DSA signature: NOKEY, key ID 11f63c51
rpmdb: unable to join the environment
error: db4 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages database in /var/lib/rpm
rpmdb: unable to join the environment
error: db4 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages database in /var/lib/rpm

How To Fix :-

# rm -f /var/lib/rpm/__db*     (Remove Old Lock Files running this command)

# rpm -vv –rebuilddb     (Now you have to rebuild RPM database)

# yum clean all

# yum update all

Advertisements

April 30, 2014 Posted by | Tips & Tricks, Unix/Linux | , , | 2 Comments

test ping.bat

: loop 0
ping -n 10 8.8.8.8

IF  %ERRORLEVEL%==0   ( goto loop 1 )

start c:1.mp3
ping -n 13 localhost > NUL

: loop 1
ping -n 5 192.168.1.1

IF  %ERRORLEVEL%==0   ( goto loop 0 )

start c:1.mp3
ping -n 13 localhost > NUL  ( goto loop 0 )

 

Note:- 8.8.8.8 to check Internet Connectivity & 192.168.1.1 to check Gateway Connectivity and 01.mp3 is siren ring.

April 20, 2014 Posted by | Tips & Tricks, Windows | , , | Leave a comment

tomcat_httpsd.conf_virtual-hosting-Secure for Java + PHP

We can run java and PHP based websites on same servers using SSL Certificate,
Here are six websites, inwhich four are based on Java and two are based on PHP

1. https://revenue.unixserveradmin.com – Java
2. https://revenue.unixserveradmin.com – Java
3. https://revenue.unixserveradmin.com – Java
4. https://revenue.unixserveradmin.com – Java
5. https://noc.unixserveradmin.com – PHP
6. https://online.unixserveradmin.com – PHP

# vim /etc/httpd/conf/httpd.conf

Line No. 201 to 212

#############################################################
LoadModule jk_module modules/mod_jk.so
JkWorkersFile /etc/httpd/conf/worker.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLevel info
JkLogStampFormat “[%a %b %d %H:%M:%S %Y] ”
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat “%w %V %T”
JkEnvVar SSL_CLIENT_V_START
JkMount /revenue* tomcat1
JkMount /mis* tomcat2
JkMount /sms* tomcat3
JkMount /sla* tomcat4

#############################################################
For Java Hosting
#############################################################

NameVirtualHost *:443

<VirtualHost *:443>
ServerAdmin info@unixserveradmin.com
ServerName revenue.unixserveradmin.com
ServerAlias http://www.revenue.unixserveradmin.com
RewriteEngine On
RewriteLog logs/apache-mod_rewrite
RewriteRule ^/(.*)$ /revenue/$1[L,PT]
JkMount /* tomcat1
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log commo
SSLEngine on
SSLCertificateFile  /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile  /etc/pki/tls/private/localhost.key
SSLCertificateChainFile  /etc/pki/tls/certs/ca-bundle.crt
</VirtualHost>

<VirtualHost *:443>
ServerAdmin info@unixserveradmin.com
ServerName mis.unixserveradmin.com
ServerAlias http://www.mis.unixserveradmin.com
RewriteEngine On
RewriteLog logs/apache-mod_rewrite
RewriteRule ^/(.*)$ /mis/$1[L,PT]
JkMount /* tomcat2
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
SSLEngine on
SSLCertificateFile  /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile  /etc/pki/tls/private/localhost.key
SSLCertificateChainFile  /etc/pki/tls/certs/ca-bundle.crt
</VirtualHost>

<VirtualHost *:443>
ServerAdmin info@unixserveradmin.com
ServerName sms.unixserveradmin.com
ServerAlias http://www.sms.unixserveradmin.com
RewriteEngine On
RewriteLog logs/apache-mod_rewrite
RewriteRule ^/(.*)$ /sms/$1[L,PT]
JkMount /* tomcat3
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
SSLEngine on
SSLCertificateFile  /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile  /etc/pki/tls/private/localhost.key
SSLCertificateChainFile  /etc/pki/tls/certs/ca-bundle.crt
</VirtualHost>

<VirtualHost *:443>
ServerAdmin info@unixserveradmin.com
ServerName sla.unixserveradmin.com
ServerAlias http://www.sla.unixserveradmin.com
RewriteEngine On
RewriteLog logs/apache-mod_rewrite
RewriteRule ^/(.*)$ /sms/$1[L,PT]
JkMount /* tomcat4
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
SSLEngine on
SSLCertificateFile  /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile  /etc/pki/tls/private/localhost.key
SSLCertificateChainFile  /etc/pki/tls/certs/ca-bundle.crt
</VirtualHost>

#############################################################
For PHP Hosting
#############################################################

<VirtualHost *:443>
ServerAdmin info@unixserveradmin.com
DocumentRoot /var/www/html/noc/
ServerName noc.unixserveradmin.com
ServerAlias http://www.noc.unixserveradmin.com
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
SSLEngine on
SSLCertificateFile  /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile  /etc/pki/tls/private/localhost.key
SSLCertificateChainFile  /etc/pki/tls/certs/ca-bundle.crt
</VirtualHost>

<VirtualHost *:443>
ServerAdmin info@unixserveradmin.com
DocumentRoot /var/www/html/online/
ServerName online.unixserveradmin.com
ServerAlias http://www.online.unixserveradmin.com
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
SSLEngine on
SSLCertificateFile  /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile  /etc/pki/tls/private/localhost.key
SSLCertificateChainFile  /etc/pki/tls/certs/ca-bundle.crt
</VirtualHost>

#############################################################

April 10, 2014 Posted by | Apache, Tomcat | , | Leave a comment