[转]在Fedora上安装Oracle 11g XE

来源:互联网 发布:sigil mac 编辑:程序博客网 时间:2024/04/29 19:35

在某处看到一篇介绍关于oracle- 11g xe在fedora上安装的文章,转载过来。


原文地址:http://blog.mclaughlinsoftware.com/2011/09/27/oracle-11g-xe-on-fedora/


前5步是解压,省略...

  1. You need to drop down into a Terminal session, which you can launch by clicking onApplications,System Tools, and Terminal in the menu.
[plain] view plaincopy
  1. sudo rpm -iv oracle-xe-11.2.0-1.0.x86_64.rpm  


This command will install the packages in verbose syntax and display the following messages:

[sudo] password for mclaughlinm: Preparing packages for installation... oracle-xe-11.2.0-1.0 Executing post-install steps... You must run '/etc/init.d/oracle-xe configure' as the root user to configure the database.

  1. This step requires that you assume the role of the root user, which can be done with this syntax:
[plain] view plaincopy
  1. sudo sh  

In this root shell, you run the Oracle 11g XE configuration with this command:

[plain] view plaincopy
  1. /etc/init.d/oracle-xe configure  


The following are the text prompts that you accept to configure Oracle 11g XE:

[text] view plaincopy
  1. <textarea readonly="" name="code" class="plain">Oracle Database 11g Express Edition Configuration  
  2. -------------------------------------------------  
  3. This will configure on-boot properties of Oracle Database 11g Express   
  4. Edition.  The following questions will determine whether the database should   
  5. be starting upon system boot, the ports it will use, and the passwords that   
  6. will be used for database accounts.  Press <Enter> to accept the defaults.   
  7. Ctrl-C will abort.  
  8.    
  9. Specify the HTTP port that will be used for Oracle Application Express [8080]:  
  10.    
  11. Specify a port that will be used for the database listener [1521]:  
  12.    
  13. Specify a password to be used for database accounts.  Note that the same  
  14. password will be used for SYS and SYSTEM.  Oracle recommends the use of   
  15. different passwords for each database account.  This can be done after   
  16. initial configuration:  
  17. Confirm the password:  
  18.    
  19. Do you want Oracle Database 11g Express Edition to be started on boot (y/n) [y]:  
  20.    
  21. Starting Oracle Net Listener...Done  
  22. Configuring database...  
  23. Starting Oracle Database 11g Express Edition instance...Done  
  24. Installation completed successfully.</textarea><br><br>  

After completing the configuration, you need to do two things. First, you need to modify the.bash_profilefile for your user (covered in the next step). Second, you need to reboot your system.

  1. This step requires that you exit the root shell by typing the exit command. This should put you back into your administration account withsudoer privileges. You use vi to edit and add the following to the.bash_profile file.
[plain] view plaincopy
  1. # Oracle Settings  
  2. TMP=/tmp; export TMP  
  3. TMPDIR=$TMP; export TMPDIR  
  4.    
  5. ORACLE_HOSTNAME=localhost.localdomain; export ORACLE_HOSTNAME  
  6. ORACLE_UNQNAME=DB11G; export ORACLE_UNQNAME  
  7. ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE  
  8. ORACLE_HOME=$ORACLE_BASE/product/11.2.0/xe; export ORACLE_HOME  
  9. ORACLE_SID=XE; export ORACLE_SID  
  10. NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`; export NLS_LANG  
  11. ORACLE_TERM=xterm; export ORACLE_TERM  
  12. PATH=/usr/sbin:$PATH; export PATH  
  13. PATH=$ORACLE_HOME/bin:$PATH; export PATH  
  14.    
  15. LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH  
  16. CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH  
  17.    
  18. if [ $USER = "oracle" ]; then  
  19.   if [ $SHELL = "/bin/ksh" ]; then  
  20.     ulimit -p 16384  
  21.     ulimit -n 65536  
  22.   else  
  23.     ulimit -u 16384 -n 65536  
  24.   fi  
  25. fi  


You can now log in to the Oracle database with the following syntax from the command line. You’ll be prompted for thesystem password that you entered during the configuration steps. I’ll add another post on SQL Developer later this week.

[sql] view plaincopy
  1. <textarea readonly="" name="code" class="plain">sqlplus system</textarea><br><br>  

原创粉丝点击