Oracle-1-installation, oracle11g installation tutorial

Source: Internet
Author: User

Oracle-1-installation, oracle11g installation tutorial
I. Environment preparation
1.1. Description
Working path/data/hdfs/data1/jianxin/
1.2. Software Version
Oracle-xe-11.2.0-1.0.x86_64.rpm.zip
1.3 modify tmpfs
1.3.1. oracle XE provides the minimum requirement in the init. ora file. The default value is 1 GB. Expand tmpfs to 2G:
Modify the/etc/fstab file:
Tmpfs/dev/shm tmpfs defaults 0 0
To:
Tmpfs/dev/shm tmpfs ults, size = 2048 M 0 0
1.3.2. Reload tmpfs
Umount/dev/shm; mount/dev/shm
1.3.3. df-h/dev/shm to view the output:
[Root @ bigdata3 ~] # Df-h/dev/shm
Filesystem Size Used Avail Use % Mounted on
Tmpfs 12G 610 M 12G 6%/dev/shm
1.4 install dependency packages
Install dependency packages
Yum install libaio-devel bc-y
(Yum install libaio *)
It is actually installed:
Libaio-0.3.107-10.el6.x86_64
Libaio-devel-0.3.107-10.el6.x86_64
Bc-1.06.95-1.el6.x86_64
Ii. Formal Installation
2.1 unzip decompression and rpm Installation
Cd/data/hdfs/data1/jianxin/
Unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip
Cd Disk1
Rpm-ivh oracle-xe-11.2.0-1.0.x86_64.rpm
2.2 execute the command/etc/init. d/oracle-xe configure Configuration
/Etc/init. d/oracle-xe configure
Initial configuration: 123456
Confirm password: 123456
Username: root
Password 123456
Configuration information: http port (check whether port 8080 conflict with each other), Oracle listening port, and logon password.
After the installation is complete, the system automatically creates a user named oracle. The home dir is located at/u01/app/oracle, that is, the location where the database is installed.
2.3.1. Modify Environment Variables
Vi/etc/profile, add

# Oracle SettingsTMP=/tmp; export TMPTMPDIR=$TMP; export TMPDIRORACLE_BASE=/u01/app/oracle; export ORACLE_BASEORACLE_HOME=$ORACLE_BASE/product/11.2.0/xe; export ORACLE_HOMEORACLE_SID=XE; export ORACLE_SIDORACLE_TERM=xterm; export ORACLE_TERMPATH=/usr/sbin:$PATH; export PATHPATH=$ORACLE_HOME/bin:$PATH; export PATHTNS_ADMIN=$ORACLE_HOME/network/adminLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATHCLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATHif [ $USER = "oracle" ]; then  if [ $SHELL = "/bin/ksh" ]; then    ulimit -p 16384    ulimit -n 65536  else    ulimit -u 16384 -n 65536  fifi
Note:
2.3.1.1 and XE versions only have one instance. If you modify the SID, an error is returned, so you do not need to modify the SID.
2.3.1.2, BASE, and HOME variables are not followed by a slash '/'. An error may occur.
2.3.1.3 and TNS_ADMIN must be included.
2.3.2,
Source/etc/profile
[Root @ bigdata3 jianxin] # echo $ ORACLE_BASE
/U01/app/oracle
[Root @ bigdata3 jianxin] # echo $ ORACLE_HOME
/U01/app/oracle/product/11.2.0/xe
2.4 initialize the database
Su oracle
Cd/u01/app/oracle/product/11.2.0/xe/dbs/
Cp init. ora initXE. ora
Change vi initXE. ora to the following:
db_name='XE'memory_target=1Gprocesses = 150audit_file_dest='/u01/app/oracle/admin/orcl/adump'audit_trail ='db'db_block_size=8192db_domain=''db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'db_recovery_file_dest_size=2Gdiagnostic_dest='/u01/app/oracle'dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'open_cursors=300remote_login_passwordfile='EXCLUSIVE'undo_tablespace='UNDOTBS1'# You may want to ensure that control files are created on separate physical# devicescontrol_files = ('/u01/app/oracle/oradata/', '/u01/app/oracle/oradata/')compatible ='11.2.0'
Iii. Installation Verification
3.1. Verify 1. Run the following command line:
Switch to the oracle user, use sqlplus to connect to the database, and enter the sqlplus Console
[Root @ bigdata3 jianxin] # sqlplus/nolog
SQL * Plus: Release 11.2.0.2.0 Production on Mon Apr 27 20:05:39 2015
Copyright (c) 1982,201 1, Oracle. All rights reserved.
SQL> connect as sysdba
Enter user-name: sys
Enter password: 123456
Connected.
SQL>
(You can perform the following operations first)
The 11g xe version has a built-in set database XE, so you do not need to manually create a database, but you need to initialize the database structure and run the following two lines of code:
SQL> @? /Rdbms/admin/catalog. SQL
SQL> @? /Rdbms/admin/catproc. SQL
If database didn't open occurs during running, restart and load the database.
After the command is executed, run the following test command:
SQL> CREATE USER myaccount IDENTIFIED BY "123456" DEFAULT TABLESPACE USERS)
SQL> GRANT DBA TO myaccount;
SQL> CREATE TABLE test_table (txt VARCHAR2 (100) NOT NULL );
SQL> insert into test_table values ('yjx Oracle ');
SQL> select * from test_table;
SQL> select COUNT (1) from tab;
3.2.1 web Interface

Http: // 172.16.16.13: 8080/apex


3.2.2 graphical tool Configuration


3.2.3 port occupation


4. Other commands
4.1.1 start the Oracle command startup/startup mount (START and load the database)
4.1.2 shut down the Oracle command shutdown
4.2.1 go to the SQL Plus console
[Root @ bigdata3 jianxin] # sqlplus/nolog
SQL * Plus: Release 11.2.0.2.0 Production on Mon Apr 27 20:05:39 2015
Copyright (c) 1982,201 1, Oracle. All rights reserved.
SQL> connect as sysdba
Enter user-name: sys
Enter password: 123456
Connected.
SQL>
4.2.2 exit the sqlplus Console
SQL> quit;/exit;
Disconnected from Oracle Database 11g Express Edition Release 11.2.0.2.0-64bit Production
V. Others
Reference url
Http://docs.oracle.com/cd/E17781_01/install.112/e18802/toc.htm
Http://blog.csdn.net/reda0821/article/details/7816562

Http://blog.csdn.net/hqs_1992/article/details/41895389


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.