Solution to environment variable problems when installing oracle in Linux

Source: Internet
Author: User

During the Oracle Installation Process today, the entire process was relatively smooth with reference to the information downloaded from the Internet to install oracle on RHEL5, but encountered some problems, although not very serious, however, after all, it is a problem and still uncomfortable. Please solve it here.
The main problem is the environment variables of oracle users. One step during oracle installation is to log on as an oracle user and edit the. bash_profile file. The edited content is as follows.

. Bash_profile file content:
 
  1. #. Bash_profile
  2. # Get the aliases and functions
  3. If[-F ~ /. Bashrc]; then
  4. .~ /. Bashrc
  5. Fi
  6. # User specific environment and startup programs
  7. PATH = $ PATH: $ HOME/bin
  8. TMP =/tmp; export TMP
  9. TMPDIR = $ TMP; export TMPDIR
  10. ORACLE_BASE =/opt/oracle; export ORACLE_BASE
  11. ORACLE_HOME = $ ORACLE_BASE/10.2; Export ORACLE_HOME
  12. ORACLE_SID = TSH1; export ORACLE_SID
  13. ORACLE_TERM = xterm; export ORACLE_TERM
  14. PATH = $ ORACLE_HOME/bin: $ PATH
  15. Export PATH
  16. LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/lib; export LD_LIBRARY_PATH
  17. CLASSPATH = $ ORACLE_HOME/JRE: $ ORACLE_HOME/jlib: $ ORACLE_HOME/rdbms/jlib; export CLASSPATH
  18. If[$ USER ="Oracle"]; Then
  19. If[$ SHELL ="/Bin/ksh"]; Then
  20. Ulimit-p16384
  21. Ulimit-n65536
  22. Else
  23. Ulimit-u16384-N65536
  24. Fi
  25. Fi

When I log on as an oracle user, the following error is prompted:

Error message:
 
  1. -Bash:/home/oracle/. bash_profile: line26: Syntax error near unexpected token 'then'
  2. -Bash:/home/oracle/. bash_profile: line26:'If[$ USER ="Oracle"]; Then'

I checked a lot of information and wrote it like this. I also checked the shell programming materials and didn't see any problems. Please take a look.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.