Tuesday, October 30, 2007
Solaris Ethernet connectivity related files
/etc/hosts
/etc/nodenames
/etc/hostname.[device]
/etc/defaultrouter
/etc/defaultdomain
/etc/nodename
/etc/nodenames
/etc/hostname.[device]
/etc/defaultrouter
/etc/defaultdomain
/etc/nodename
Monday, October 29, 2007
Perl regular expressions
(a*b*)* in perl == ((a*b*)*)
matches can be accessed in internal var$ $1,..$n
complete match is in $&
[a-zA-Z0-9] = \w
(\w*) = macthes anything alphanumeric + "_"
$line =~ m/((\w*-*)*)/; will match combinations of above plus "-"
$result = $1;
or
$result = $line =~ m/((\w*-*)*)/;
matches can be accessed in internal var$ $1,..$n
complete match is in $&
[a-zA-Z0-9] = \w
(\w*) = macthes anything alphanumeric + "_"
$line =~ m/((\w*-*)*)/; will match combinations of above plus "-"
$result = $1;
or
$result = $line =~ m/((\w*-*)*)/;
Tuesday, October 23, 2007
Putty login with no password
1. ssh-keygen -t rsa -C ali@ali.com -f ~/.ssh/id_rsa
2. mail -s "my private ssh key" ali@ali.com < ~/.ssh/id_rsa
3. cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys2
4. chmod 600 ~/.ssh/authorized_keys2
5. download http://the.earth.li/~sgtatham/putty/0.60/x86/puttygen.exe
6. Convert the save key from email and save as private key file.
7. in Putty->SSH->Auth select the file.
To disable password based login after creating the public/private key pair
change the following in /etc/ssh/sshd_confing
PermitRootLogin no
PasswordAuthentication no
UsePAM no
*** REMEMBER NOT TO LOSE THE private key
HAVE PHUN
2. mail -s "my private ssh key" ali@ali.com < ~/.ssh/id_rsa
3. cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys2
4. chmod 600 ~/.ssh/authorized_keys2
5. download http://the.earth.li/~sgtatham/putty/0.60/x86/puttygen.exe
6. Convert the save key from email and save as private key file.
7. in Putty->SSH->Auth select the file.
To disable password based login after creating the public/private key pair
change the following in /etc/ssh/sshd_confing
PermitRootLogin no
PasswordAuthentication no
UsePAM no
*** REMEMBER NOT TO LOSE THE private key
HAVE PHUN
Monday, October 22, 2007
Oracle drop user error
ORA-00600: internal error code, arguments: [qmxiUnpPacked2], [121], [], [], [],
solution:
connect as sysdba
1)SQL> shutdown immediate
2)SQL> startup migrate
3)SQL> spool patch.log
4)SQL> @?/rdbms/admin/catpatch
5)SQL> spool off
solution:
connect as sysdba
1)SQL> shutdown immediate
2)SQL> startup migrate
3)SQL> spool patch.log
4)SQL> @?/rdbms/admin/catpatch
5)SQL> spool off
Oracle create database and user
Oracle create user in 3 steps;
1. RUN DBCA successfully.
2. SQL> create user username identified by password default tablespace users temporary tablespace temp;
3. SQL> grant connect, resource to username;
1. RUN DBCA successfully.
2. SQL> create user username identified by password default tablespace users temporary tablespace temp;
3. SQL> grant connect, resource to username;
Sunday, October 21, 2007
mysql startup on solaris
cd /usr/local/mysql1/bin
./mysql_install_db --user=mysql --ldata=/sqldata
./mysqld_safe --datadir=/sqldata --user=mysql &
./mysql_install_db --user=mysql --ldata=/sqldata
./mysqld_safe --datadir=/sqldata --user=mysql &
Saturday, October 20, 2007
Solaris Samba Mount using shlight
shlight //srv0r/Segnts/Gest/SUPPORT //root/win -U alisadeghi -P alipassword -W domain
Subscribe to:
Posts (Atom)