Archive for September, 2008

h1

Install Latest postgresql using yum from pgsqlrpms

September 29, 2008

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

[root@server ~]# yum erase postgresql postgresql-server
[root@server ~]# wget http://yum.pgsqlrpms.org/reporpms/8.3/pgdg-centos-8.3-4.noarch.rpm
[root@server ~]# rpm -ivh pgdg-centos-8.3-4.noarch.rpm
[root@server ~]# yum install postgresql postgresql-server
[root@server ~]# chkconfig postgresql on
[root@server ~]# service postgresql initdb
[root@server ~]# chkconfig postgresql on && service postgresql start

[root@server ~]# /usr/bin/postgres –version
postgres (PostgreSQL) 8.3.4
[root@server ~]#

Set port and the interface to bind to

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

vi /var/lib/pgsql/data/postgresql.conf

# – Connection Settings –

listen_addresses = ‘*’
port = 5432

Advertisements
h1

Manually delete records for any domain from plesk psa database

September 27, 2008

Manually delete records for any domain from psa database ( this is plesk windows with psa in mysql database, but should work on msaccess db too )

cd %plesk_dir%\mysql\bin && mysql.exe -u admin -P8306 psa -p

PASSWORD

use psa \G

delete from db_users where db_id=(SELECT id FROM data_bases where dom_id=(SELECT id FROM domains where name=’example.com’));
delete from data_bases where dom_id=(SELECT id FROM domains where name=’example.com’);
delete from mail where id=(SELECT id FROM domains where name=’example.com’);
delete from subdomains where id=(SELECT id FROM domains where name=’example.com’);
delete from dns_recs where id=(SELECT id FROM domains where name=’example.com’);
delete from domains where id=(SELECT id FROM domains where name=’example.com’);
delete from hosting where dom_id=(SELECT id FROM sys_users where home=’C:/inetpub/vhosts//example.com’);
delete from FROM sys_users where home=’C:/inetpub/vhosts//example.com’;
delete from dns_zone where displayName=’example.com’;

exit;

iisweb /delete “example.com”
echo y | del “C:\Inetpub/vhosts\example.com”
echo y | del “C:\Program Files\SWsoft\Plesk\Mail Servers\Mail Enable\Postoffices\example.com”
echo y | del “C:\Program Files\SWsoft\Plesk\Mail Servers\Mail Enable\config\Postoffices\example.com”

“C:\Program Files\SWsoft\Plesk\admin\bin\domain.exe” -r example.com
“C:\Program Files\SWsoft\Plesk\admin\bin\DNSMng.exe” restart

Besides you might need to delete post office manually from mailenable.msc -> postoffices and a few other things in GUI

h1

NMAP

September 23, 2008

echo ” ========== Installing NMAP network Scanner ================= ”
echo “…………………………………………………………………………………………………………………..”
echo “…………………………………………………………………………………………………………………..”

echo “Cleaning old nmap installation, if any ”

yum -y remove nmap
echo “…………………………………………………………………………………………………………………..”
echo “Install beings ”
yum -y install nmap

if [ -f /usr/bin/nmap ]
then

echo ” Nmap successfully installed”
sleep 2
echo ” Testing Nmap ”
echo ” ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++”
sleep 3
/usr/bin/nmap localhost -v
sleep 5
else
echo ” Nmap faield to install”
fi

echo ” =========== Install NMAP network Scanner process completed  ===============”
echo “…………………………………………………………………………………………………………………..”
echo “…………………………………………………………………………………………………………………..”
echo “…………………………………………………………………………………………………………………..”