Wednesday 29 May 2013

Delete files older than certain days in linux

Here following command will delete files older than 31 days in current folder.

find -ctime +31 -delete

Thursday 25 April 2013

Tuesday 19 March 2013

Installing Oracle 11r2 in RHEL / CentOS (simple installation procedure with OL yum repository for learning purpose)


1. Install RHEL or CentOS . (on completion of installation dont forget to disable Firewall & SE linux)

2. Complete the prerequisites for 11G installation with Public OL yum repository as per following link.
http://www.oracle.com/technetwork/articles/servers-storage-admin/ginnydbinstallonlinux-488779.html

3. Edit /etc/hosts and add a fully qualified name for server like follows.


<IP-address>  <fully-qualified-machine-name>  <machine-name>
192.168.1.10 oratest.mydomain.com oratest


4. Set environment variable for bash shell like follows.

ORACLE_BASE=/oratest/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1; export ORACLE_HOME
ORACLE_SID=DBtest; export ORACLE_SID

PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

5. Set the DISPLAY environment. DISPLAY=<machine-name>:0.0; export DISPLAY

6. Download RDBMS software from following link

http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

7. Once download complete unzip the files by unzip<filename>.zip

8. Goto OraDB11g/database (Extracted folder)

9. Make Directory for oracle software installation and give permission for same.
mkdir -p /disk1/DB
cd /disk1
chown -R oracle:oinstall /DB

10. Run the installer ./runInstaller

This will start the installation.


Friday 15 March 2013

Install Shrewsoft VPN client in Ubuntu for Juniper Firewall


1. Download ike-2.2.0-rc-2.tgz or Latest Version from http://www.shrew.net/download.

2. Unzip the Downloaded file by following command $tar -xzvf shrewsoft-client.tgz

3. Go through the Readme file in extracted folder.

4. Install the prerequisites for Shrewsoft VPN client. like following.

sudo apt-get install gcc flex bison cmake openssl libssl-dev qt4-dev-tools libedit-dev build-essential

5. Go to the extracted folder IKE

6. Run following commands one by one.

$cmake -DCMAKE_INSTALL_PREFIX=/usr/local-DQTGUI=YES -DETCDIR=/etc -DNATT=YES
$cmake
$make
$sudo make install

$sudo cp ~/Downloads/ike/source/iked/iked.conf.sample /usr/local/etc/iked.conf

7. Use a text editor to edit (as root) /etc/sysctl.conf
8. Change the following Entries from 1 to 0 (if these values are not defined you will need to add
them in order to override the default setting of 1).
net.ipv4.conf.default.rp _ filter=0
net.ipv4.conf.all.rp _ filter=0
9. Use a text editor to edit (as root) /etc/sysctl.d/10-network-security.conf
10. Change the following Entries from 1 to 0 (if these values are not defined you will need to add
them in order to override the default setting of 1).
net.ipv4.conf.default.rp _ filter=0
net.ipv4.conf.all.rp _ filter=0
11. Reboot the PC.
12. Execute the following command to confirm settings change has taken affect:
$> sysctl -a | egrep rp_filter | egrep -v arp
net.ipv4.conf.all.rp _ filter = 0
net.ipv4.conf.default.rp _ filter = 0
net.ipv4.conf.lo.rp _ filter = 0
net.ipv4.conf.eth0.rp _ filter = 0

13. start IKED
$sudo iked

14. Start GUI and configure the VPN or Import Porifile.
$qikea

15. If GUI not starting install it. $ sudo apt-get install ike-qtgui

Thursday 14 March 2013

VNC Server in RHEL, CentOS 5 & 6


1.Install VNC Server (EL:5 Servers)

#yum install vnc-server

2.create VNC login password

#vncpasswd

3.Edit following file and uncomment the two lines as mentioned in file.

#vi .vnc/xstartup

4.start an instance of VNC server & Check the log for moredetails.

#vncserver

5. Start VNC client in hostname field type ipaddress and :1 (xxx.xxx.xxx.xxx:1) and for authentication use the password set in Step two.




1.Install VNC Server (EL:6 Servers)

#yum install tigervnc-server

2.create VNC login password

#vncpasswd

3.Edit following file and  add two lines like following.

#vi /etc/sysconfig/vncservers

VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 1024x768"

4.start an instance of VNC server & Check the log for moredetails.

#service vncserver start

5. Start VNC client in hostname field type ipaddress and :1 (xxx.xxx.xxx.xxx:1) and for authentication use the password set in Step two.


Install VNC in CentOS-7

https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-remote-access-for-the-gnome-desktop-on-centos-7