Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Saturday, January 16, 2016

Updating bashrc file in Ubuntu

Update bashrc file for to default required path variables, xclock setup etc. I find this is clean way then setting up or updating path variables under each user profile unless it is mandatory. This is clean way for sandbox setup at least not for production though.

.bashrc file location:

/etc/bash.bashrc

####Sirish Reddy: Settings ########
PATH=/u01/app/jdk1.6.0_25/bin:$PATH
export LANG=en_US
xhost local:oracle
xhost local:sirishg
xhost local:apache

Monday, December 21, 2015

Remote FTP Directory Sync using lftp

http://www.cyberciti.biz/faq/lftp-mirror-example/

$lftp user@my.ftp.com
$mirror -c source target

Reverse Sync to Server:
Change local directory to  where you saved the files /home/somedirectory
$lcd /home/somedirectory
$mirror -R

Friday, June 5, 2015

Send Command / Process to Back Ground From Terminal

Here are the list of command to send a process or command to back ground from terminal

1) Press ctrl+z
2) Then type bg (bg means back ground)
3) Then type "disown"

To make sure process is running in back ground execute below command,
ps auxw | grep

Wednesday, May 15, 2013

Setting up SSH public/private keys


Setting up SSH public/private keys

SSH (Secure Shell) can be set up with public/private key pairs so that you don't have to type the password each time. Because SSH is the transport for other services such as SCP (secure copy), SFTP (secure file transfer), and other services (CVS, etc), this can be very convenient and save you a lot of typing.​
     

SSH Version 2

​On the local machine, type the BOLD part. The non-bold part is what you might see as output or prompt.
  • Step 1:
    % ssh-keygen -t dsa
    Generating public/private dsa key pair.
    Enter file in which to save the key (~/.ssh/id_dsa):
    (just type return)
    Enter passphrase (empty for no passphrase):
    (just type return)
    Enter same passphrase again:
    (just type return)
    Your identification has been saved in ~/.ssh/id_dsa
    Your public key has been saved in ~/.ssh/id_dsa.pub
    The key fingerprint is:
    Some really long string
    %
  • Step 2:
    Then, paste the content of the local ~/.ssh/id_dsa.pub file into the file ~/.ssh/authorized_keys on the remote host.
  • RSA instead of DSA
    • If you want something strong, you could try
      % ssh-keygen -t rsa -b 4096
    • Instead of the names id_dsa and id_dsa.pub, it will be id_rsa and id_rsa.pub , etc.
    • The rest of the steps are identical.
That's it!
FAQ:
  • Q: I follow the exact steps, but ssh still ask me for my password!
  • A: Check your remote .ssh directory. It should have only your own read/write/access permission (octal 700)
    % chmod 700 ~/.ssh

SSH Version 1

  • Step 1:
    % cd ~/.ssh
    % ssh-keygen -t rsa1
    Generating public/private rsa1 key pair.
    Enter file in which to save the key (~/.ssh/identity):
    (just type return)
    Enter passphrase (empty for no passphrase):
    (just type return) Enter same passphrase again: (just type return)
    Your identification has been saved in ~/.ssh/identity
    Your public key has been saved in ~/.ssh/identity.pub
    The key fingerprint is:
    Some really long string
    %
  • Step 2:
    Then, paste content of the local ~/.ssh/identity.pub file into the file ~/.ssh/authorized_keys on the remote host.

​​
Reference​
​​
​​


​                   
http://www.ece.uci.edu/~chou/ssh-key.html

Tuesday, May 14, 2013

Installing Oracle 11g Enterprise Edition on Ubuntu 12.10



Required Software’s

VMware Player

Download and install VMware Player (Non-Commercial Software)

Ubuntu 12.10

Download and install Ubuntu 12.10 32 bit or 64 bit based on your Hardware.

XClock Problem

To setup $DISPLAY across the user try running this as root before you do "su - oracle" or other users.
$>xhost local:oracle
$>xhost local:sirishg

Oracle Installation Process

Follow the below link,
Note:
About link works for Ubuntu 32 Bit as well.

Note: Just ignored all above missing packages.





Note: Run the above commands as root user.

Post Installation Errors

Error Message while starting sqlplus
sqlplus: error while loading shared libraries: libclntsh.so.11.1: cannot open shared object file: No such file or directory.
Reason for the Problem
libclntsh.so.11.1 was missing.
Solution
Below solution solve this problem as well.
Error message while starting Net Manager
oracle@ubuntu:~/app/oracle/product/11.2.0/dbhome_1/bin$ ./netca
UnsatisfiedLinkError exception loading native library: njni11
java.lang.UnsatisfiedLinkError: /home/oracle/app/oracle/product/11.2.0/dbhome_1/lib/libnjni11.so: libclntsh.so.11.1: cannot open shared object file: No such file or directory
java.lang.UnsatisfiedLinkError: jniGetOracleHome
            at oracle.net.common.NetGetEnv.jniGetOracleHome(Native Method)
            at oracle.net.common.NetGetEnv.getOracleHome(Unknown Source)
            at oracle.net.ca.NetCALogger.getOracleHome(NetCALogger.java:230)
            at oracle.net.ca.NetCALogger.initOracleParameters(NetCALogger.java:215)
            at oracle.net.ca.NetCALogger.initLogger(NetCALogger.java:130)
            at oracle.net.ca.NetCA.main(NetCA.java:404)

Error: jniGetOracleHome
Oracle Net Services configuration failed.  The exit code is 1
Reason for the Problem
libclntsh.so.11.1 was missing.
Solution
Go to terminal and locate the missing file libclntsh.so.11.1 using below command,
Copy the above file to $ORACLE_HOME\lib (/home/oracle/app/oracle/product/11.2.0/dbhome_1/lib/)

Post Installation Configurations

Database Listener Configuration

If we need to configure database listener go to $ORACLE_HOME/lib and execute shell called netca

Create new Database

Exception while creating new Database

 

References

This is Important One

Solving compilation/link errors

Some issues should appear during installation.
If you have not created the symbolic links above, you will have to solve error lib//libagtsh.so: undefined reference to `nnfyboot' in make: rdbms/lib/dg4odbc] Error 1. For this, create the symbolic links and execute the commands:
export ORACLE_HOME=/opt/oracle/Oracle11gee/product/11.2.0/dbhome_1
cd $ORACLE_HOME/lib
ln -s libclient11.a libagtsh.a
$ORACLE_HOME/bin/genagtsh $ORACLE_HOME/lib/libagtsh.so 1.0


Now we will encounter many errors due to indirect library linking:
To solve error # libnnz11.so: could not read symbols: Invalid operation /sysman/lib/ins_emagent.mk, enter the command:
export ORACLE_HOME=/opt/oracle/Oracle11gee/product/11.2.0/dbhome_1
sed -i 's/^\(\s*\$(MK_EMAGENT_NMECTL)\)\s*$/\1 -lnnz11/g' $ORACLE_HOME/sysman/lib/ins_emagent.mk

To solve error # nsglsn.c:(.text+0xc29): undefined reference to `ons_subscriber_close' /network/lib/ins_net_server.mk, enter the command:
sed -i 's/^\(TNSLSNR_LINKLINE.*\$(TNSLSNR_OFILES)\) \(\$(LINKTTLIBS)\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/network/lib/env_network.mk
To solve error # libocrutl11.so: undefined reference to `lfifcp' rdbms/lib/ins_rdbms.mk, enter the commands:
sed -i 's/^\(ORACLE_LINKLINE.*\$(ORACLE_LINKER)\) \(\$(PL_FLAGS)\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/rdbms/lib/env_rdbms.mk

You also need to execute the following commands to prevent from later errors:
sed -i 's/^\(\$LD \$LD_RUNTIME\) \(\$LD_OPT\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/bin/genorasdksh
sed -i 's/^\(\s*\)\(\$(OCRLIBS_DEFAULT)\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/srvm/lib/ins_srvm.mk

Starting up the database

Once your server have been restarted, your database may not start. To solve this issue, first check in /etc/oratab that it has the 'Y' flag, if not, set it.
sudo gedit /etc/oratab

And replace N by Y
orcl:/opt/oracle/Oracle11gee/product/11.2.0/dbhome_1:Y

Manually starting up the database

Finally, to manually start Oracle, run these commands as oracle user
dbstart $ORACLE_HOME

Manually shutting down the database


dbshut $ORACLE_HOME

Thursday, January 3, 2013

Setup a SFTP Server on Ubuntu

Yet Another Computing Blog: Ubuntu - Setup a SFTP Server: This procedure will setup a SFTP server, thats FTP over SSH on Ubuntu Server. In this instance the FTP server will be for a group of people...