Saturday, May 29, 2010

mount iso in /etc/fstab

add the below to /etc/fstab
/mnt/centos.iso /media/iso iso9660 loop 0 0

Thursday, May 13, 2010

windows delete share and connect to the same share with another username

windows delete share and connect to the same share with another username

net use \\servername\sharename /delete

WEEHA

Friday, May 07, 2010

mikrotik select gateway based on source address

ip firewall mange
prerouting, mark packets from a special source with a routing mark (any name you like) and add the 0.0.0.0/0 route again and choose the routing mark you specified before with a desired gatway which can be different from the original 0.0.0.0/0 route gatway

Tuesday, April 13, 2010

change timezone in centos

yum -y install tzdata
cp /usr/share/zoneinfo/Asia/Tehran /etc/localtime

BIG thanks to: http://blog.connexeon.com/sysadmin/linux/change-timezone-on-centos/

mikrotik data connections with other types of interfaces

there are 2 interfaces that seem to work ethernet/ip and ip/ip both need for the two end points to have accessible valid ip addresses.
In case you use mikrotik to do PPPOE, you need to put the host OS nic in PROMISC=yes mode so that the PPPOE ack packets can be received by the gust OS.

Monday, April 05, 2010

linux enable NTSF mount in read/write mode

yum -y install dkms-fuse fuse fuse-ntfs-3g

Sunday, March 14, 2010

httpd.conf and the Aliases

When the alias reads like below
Alias /cacti/ /var/www/cacti/

DirectoryIndex index.php
Options -Indexes
AllowOverride all
order deny,allow
deny from all
allow from 127.0.0.1
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc on
php_flag track_vars on


to display the alias successfully in the browser do not forget the terminating slash at the end, so
http://localhost/cacti/ is right.

Tuesday, February 23, 2010

Persistent SSH SOCKS5 tunnel in Linux

ssh -c arcfour -o TCPKeepAlive=yes -N -f -D localhost:1080 user@remoteserver.com

instead of -c arcfour one can use -c blowfish-cbc as well. The performance of the tunnel gets better with a more lightweight cipher.

Monday, January 25, 2010

dbca logs

here you can find dbca logs $ORACLE_HOME/cfgtoollogs/dbca
thanks to OTN

Oracle dbca press finish nothing happens

If you press finish at the end of database creation of dbca and nothing happens, it is (in my case) an X problem. What I did was not to use the X server on windows instead I installed X11 on linux and used that one and it went smoothly.

Saturday, January 23, 2010

Sunday, January 03, 2010

Linksys WAP54GS to act as router with dd-wrt

to make WAP54GS a router
1. Install dd-wrt
2. change the assignment of WAN port from vlan1 to vlan0
3. TADA!!!!!

/etc/sysconfig/desktop

/etc/sysconfig/desktop to choose the window manager permanently

Friday, January 01, 2010

vmware change MAC

in the virtual machine (config) vmx file:

# ethernet0.addressType = "generated"
# RANGE ALLOWED: 00:50:56:00:00:00-00:50:56:3F:FF:FF
ethernet0.addressType = "static"
# ethernet0.generatedAddress = "00:0c:29:94:43:71"
ethernet0.Address = "00:0c:29:94:43:70"

Wednesday, December 09, 2009

rsync without SSH

rsync -av rsync://server/rsync_share_name

Monday, November 30, 2009

slow sendmail startup

When sendmail is slow at startup do either of these things in /etc/hosts
127.0.0.1 localhost.localname machinename

or

192.168.1.100 machinename.domainname

if you have only machinename sendmail will be slow

Friday, October 23, 2009

firefox download flash

do a about:cache?device=disk and search for the URL or filename


many thanks to
http://labnol.blogspot.com/2005/11/save-flash-from-firefox-and-ie.html

Wednesday, October 21, 2009

MYSQL grant REMEBER 'user'@'server'

REMEMBER THIS:
grant all on DB1 to 'user'@'localhost' identified by 'password';

putty connect to session instead of server from command line

to make putty connect to session (based on the name of the session) instead of server from command line DO:

putty @SESSION_NAME

putty default font permanent

To change the default font in putty change the font settings in the Default Settings in the main window