Adding VNC Server to Red Hat Enterprise Linux 6.x
In many Linux distributions, a VNC server is installed by default,
but with Red Hat Enterprise Linux 6.x the package must be manually
added.
Remove files older than 7 days - Linux
The Linux find command has several different uses. One of these uses is to remove files that are older than x amount of days.
This particularly useful when we want to clear down trace files
that have been building up over time. To do this we can access to the
oracle bdump directory, then execute the following command line code:
$ find *.trc -mtime +7 -exec rm {} \;
The above code will remove all trace files in the current directory that are older than 7 days.Code breakdown
find -mtime + -exec \;
Find – finds the files specified by the filename-mtime + – days older than current system date-exec – command to execute with found filesFurther reading
It is possible to execute different commands upon found files, however this is outside the scope of this post. For more information on the find command please see the find man pages: Find Man Page
TNS-01189: The listener could not authenticate the user
Resolved: ORACLE_HOME_LISTNER is not set
I had the above error message when I tried to run dbstart, the problem is the dbstart script.
Edit $ORACLE_HOME/bin/dbstart, and found below lines:
ORACLE_HOME_LISTNER=$1
if [ ! $ORACLE_HOME_LISTNER ] ; then
echo "ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener"
else
LOG=$ORACLE_HOME_LISTNER/listener.log
Changed ORACLE_HOME_LISTNER=$1 to ORACLE_HOME_LISTNER=$ORACLE_HOME
Saved and exited, then ran "dbstart" successfully without errors
How to Uninstall Oracle 10g On Linux ?
Before uninstalling, close all oracle processes if there is any
$ORACLE_HOME/bin/shutdown abort
$ORACLE_HOME/bin/emctl stop dbconsole
$ORACLE_HOME/bin/lsnrctl stop
$ORACLE_HOME/bin/isqlplusctl stop
Backup $ORACLE_HOME if necessary (optional)
root> tar -xvf $ORACLE_HOME > /dev/rmt0/bkup
Unintall Steps:
1. run $ORACLE_HOME/bin/localconfig delete
2. rm -rf $ORACLE_BASE/*
3. rm -f /etc/oraInst.loc /etc/oratab
4. rm -rf /etc/oracle
5. rm -f /etc/inittab.cssd
6. rm -f /usr/local/bin/coraenv /usr/local/bin/dbhome /usr/local/bin/oraenv
7.remove the oracle user and the related group(dba,oinstall)
Reverse SSH Tunneling
Let's assume that Destination's IP is 192.168.20.55 (Linux box that you want to access).
You want to access from Linux client with IP 138.47.99.99.
Destination (192.168.20.55) <- |NAT| <- Source (138.47.99.99)
1. SSH from the destination to the source (with public ip) using command below:
2. Now you can SSH from source to destination through SSH tuneling:
Destination (192.168.20.55) <- |NAT| <- Source (138.47.99.99) <- Bob's server
3.1 From Bob's server:
Tip: you may run a command (e.g. watch, top) on Destination to keep the connection active.
Use SSH to Create an HTTP Proxy
SOCKS is built in to OpenSSH, so it's a trivial matter to set up a local SOCKS proxy with the -D flag.
For example:
$ ssh -D 12345 myuser@remote_ssh_server
will open up the port 12345 on your local machine as a SOCKS proxy so all your HTTP traffic can be specified to go through the SSH tunnel and out remote_ssh_server on the other end. Your proxy server is now set up.
Next, set up your browser to use the proxy server. Most browsers include proxy support. For Firefox 3, go to Edit→Preferences→Advanced→Network→Settings, and specify that you want to use a Manual Proxy, localhost, port 12345 and SOCKS v5 (although OpenSSH supports both versions 4 and 5).
Now your browser is using a secure tunnel to your remote SSH server.
Collecting Mini Dump file from Windows 2003 Server
Summary:
Under Windows 2003 Server, sometimes Dr. Watson logs are not generated when an application crashes. However, mini dump files are always generated for the Windows error reporting service. Unfortunately by default this service queues notifications and doesn’t usually alert the user until the server is rebooted. Below are instructions on configuring the Windows error reporting service to instantly display a dialog when a crash occurs, and how to retrieve the crash information.Description:
To stop the Windows error reporting service from queuing crash information:- Open the registry editor (Start -> Run -> regedit)
- Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PCHealth\ErrorReporting\
- Change the DWORD ForceQueueMode value to 0
- Restart the machine
To retrieve the mini dump file when an application crashes.
- After an application crashes a dialog with the following title will be displayed:
“(Application Name) has encountered a problem and needs to close. We are sorry for the inconvenience.”
- Click the “click here” hyperlink
- A second dialog will appear with an “Error signature” section and a “Reporting details” section. Keep a record of the “AppVer”.
- Click the “click here” that follows “To view technical information about the error report”.
- A third dialog with 2 complete paths will be displayed. They usually follow the format of:
(System Partition):\DOCUME~1\ADMINI~1\LOCALS~1\Temp\(Folder name starting with W)\(File name)
- Open Windows Explorer and navigate to the folder the starts with “W”
- (Do not dismiss any of the dialogs; doing so will remove the folder)
- Copy the folder to the desktop
- Create a text file and enter the “AppVer” into it, and add the file to the folder on the desktop
- ZIP the folder and send it to Group Logic