Linux installation oracle11g R2 detailed

Source: Internet
Author: User
Tags chmod



Environment Description: An environment built on VMware virtual machines,


Operating system: Centos7.0

Database version: oracle11g R2

System memory: 3G

HDD: 40G


Installation process, also encountered a few problems, here is not detailed, the next article specifically summarizes the problems encountered and solutions.


Installation Preparation:


Modify Host Name

# sed-i "s/hostname=localhost.localdomain/hostname=oracletest/"/etc/sysconfig/network

# hostname Oracletest


Add host name and IP correspondence record

# vi/etc/hosts

10.1.23.186 Oracletest

#关闭Selinux

# sed-i "s/selinux=enforcing/selinux=disabled/"/etc/selinux/config

# Setenforce 0


1. Install dependent packages


# yum -y install  gcc gcc-c++ make binutilscompat-libstdc++-33 elfutils-libelf elfutils-libelf-devel glibc glibc-commonglibc-devel

libaio libaio-devel libgcclibstdc++ libstdc++-devel unixODBC unixODBC-devel


2. Create users and Groups

# Groupaddoinstall

# Groupadd DBA

# useradd Oracle-g oinstall-d/home/oracle

# usermod-g Dbaoracle

# passwd Oracle



3. Modify Kernel Parameters


# vi/etc/sysctl.conf  #末尾添加如下

net.ipv4.ip_local_port_range= 9000 65500

fs.file-max = 6815744

kernel.shmall = 10523004

kernel.shmmax = 6465333657

kernel.shmmni = 4096

kernel.sem = 250 32000 100128

net.core.rmem_default=262144

net.core.wmem_default=262144

net.core.rmem_max=4194304

net.core.wmem_max=1048576

fs.aio-max-nr = 1048576



4. Modify System Resource limits


# vi/etc/security/limits.conf #末尾添加如下

oracle   soft  nproc   2047

oracle   hard  nproc   16384

oracle   soft  nofile   1024

oracle   hard  nofile   65536


# vi/etc/pam.d/login

session  & nbsp; required    pam_namespace.so   #下面添加一条pam_limits. So

session    required    pam_limits.so



# vi/etc/profile    #这个感觉没多大用

if[ $USER ="oracle"]; then

if[ $SHELL = "/bin/ksh"];then

ulimit-p 16384

ulimit-n 65536

else

ulimit-u 16384 -n 65536

fi

fi


5. Create the installation directory and set permissions


# mkdir /opt/oracle/app/

# mkdir /opt/oracle/oradata/

# chmod 755/opt/oracle/

# chmod 775/opt/oracle/app/

# chown oracle.oinstall -R /opt/oracle/


6. Set Oracle environment variables (log in with Oracle user settings)


vi~/.bash_profile

ORACLE_BASE=/opt/oracle/app

ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1

PATH=$PATH:$ORACLE_HOME/bin

ROACLE_SID=orcl

PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
LANG="zh_CN.UTF-8"               
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH LD_LIBRARY_PATH LANG


source.bash_profile  #立即生效


7. Install Oracle

Download and unzip: (Download to the Oracle website to download, download the steps slightly)

#cd/opt/soft

# unzip linux.x64_11gR2_database_1of2.zip

# unzip media/linux.x64_11gR2_database_2of2.zip

# xhost +   #使所有用户都能访问图形桌面

# su - oracle






# cd/opt/soft/databases

#./runinstaller

Configure the Security Update page, click Next (Note: The installation of the interface here, some may be garbled "appearance of various square lattice", the main and language environment, font, etc., can be installed in the Yi song 18030, can solve garbled problems; or directly set lang for the English environment, Installation in English is also possible)

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/59/A5/wKiom1TaMtSQn6HDAAJDzcJXVh8725.jpg "title=" 1.jpg " alt= "Wkiom1tamtsqn6hdaajdzcjxvh8725.jpg"/>

Confirm that no email address is provided, click Yes to proceed to next step

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/59/A5/wKiom1TaMwrDOa0GAAKru9kBFfA523.jpg "style=" float: none; "title=" 2.jpg "alt=" Wkiom1tamwrdoa0gaakru9kbffa523.jpg "/>









Select Create and configure database, click Next

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/59/A2/wKioL1TaM_6yKF3mAAHPw1mIzgM168.jpg "style=" float: none; "title=" 3.jpg "alt=" Wkiol1tam_6ykf3maahpw1mizgm168.jpg "/>

Select the server class and click Next

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/59/A5/wKiom1TaMwrykZ2aAAInu1QiWzY908.jpg "style=" float: none; "title=" 4.jpg "alt=" Wkiom1tamwrykz2aaainu1qiwzy908.jpg "/>

Select Single Instance database installation and click Next

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/59/A2/wKioL1TaM_-ibXwEAAHNC8f0sms769.jpg "style=" float: none; "title=" 5.jpg "alt=" Wkiol1tam_-ibxweaahnc8f0sms769.jpg "/>

Select Advanced Installation and click Next

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/59/A5/wKiom1TaMwvQ6B2CAAIECRUFAWo556.jpg "style=" float: none; "title=" 6.jpg "alt=" Wkiom1tamwvq6b2caaiecrufawo556.jpg "/>

default product language ' Simplified Chinese ' ' English '

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/59/A2/wKioL1TaM_-zlUnEAAJjBJ1pjH8442.jpg "style=" float: none; "title=" 7.jpg "alt=" Wkiol1tam_-zluneaajjbj1pjh8442.jpg "/>

Enterprise Edition

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/59/A5/wKiom1TaMwvDY2zDAAKctX_ZumM766.jpg "style=" float: none; "title=" 8.jpg "alt=" Wkiom1tamwvdy2zdaakctx_zumm766.jpg "/>

Specify the installation location

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/59/A2/wKioL1TaM_-CTzGiAAJGBMBWfKg698.jpg "style=" float: none; "title=" 9.jpg "alt=" Wkiol1tam_-ctzgiaajgbmbwfkg698.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/59/A5/wKiom1TaMwvDqVk0AAJNeKUxZp4578.jpg "style=" float: none; "title=" 10.jpg "alt=" Wkiom1tamwvdqvk0aajnekuxzp4578.jpg "/>



650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/59/A6/wKiom1TaM-aTmp9iAAIPodC_-uU264.jpg "style=" float: none; "title=" 11.jpg "alt=" Wkiom1tam-atmp9iaaipodc_-uu264.jpg "/>





Enter the global database name and SID

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/59/A2/wKioL1TaNNrg4dhPAAJic0Q_-hs268.jpg "style=" float: none; "title=" 12.jpg "alt=" Wkiol1tannrg4dhpaajic0q_-hs268.jpg "/>

Character Set selection ' ZHS16GBK '

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/59/A2/wKioL1TaNNqSS4v0AAKmTjwD8b0542.jpg "style=" float: none; "title=" 13.jpg "alt=" Wkiol1tannqss4v0aakmtjwd8b0542.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/59/A6/wKiom1TaM-bQPf55AALMOQTYT_E197.jpg "style=" float: none; "title=" 14.jpg "alt=" Wkiom1tam-bqpf55aalmoqtyt_e197.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/59/A2/wKioL1TaNNvwnv18AALyd6gGG6o202.jpg "style=" float: none; "title=" 15.jpg "alt=" Wkiol1tannvwnv18aalyd6ggg6o202.jpg "/>



650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/59/A6/wKiom1TaNJyiaX89AAJUvwHpJqU413.jpg "style=" float: none; "title=" 16.jpg "alt=" Wkiom1tanjyiax89aajuvwhpjqu413.jpg "/>


650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/59/A2/wKioL1TaNZDBmY_XAALfUyhtqAE240.jpg "style=" float: none; "title=" 17.jpg "alt=" Wkiol1tanzdbmy_xaalfuyhtqae240.jpg "/>



650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/59/A6/wKiom1TaNJzDzEx6AAJxwtrsvqw611.jpg "style=" float: none; "title=" 18.jpg "alt=" Wkiom1tanjzdzex6aajxwtrsvqw611.jpg "/>









Perform the Prerequisite check page, click Fix and check again

the failed content contains only the operating system kernel parameters, click ' Fix and check again ' .


(Note: Here if you have missing the package is not notified, you only need to install the appropriate package 32-bit and 64-bit are to be installed, after the installation is completed, check again or not, then you can directly ignore all, directly next)

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/59/A2/wKioL1TaNZGArmHAAANesFAKkzA311.jpg "style=" float: none; "title=" 19.jpg "alt=" Wkiol1tanzgarmhaaanesfakkza311.jpg "/>

Execute the Repair script and click OK to proceed to the next step

in Root the user executes the following command:

1 ) cd/tmp/cvu_11.2.0.1.0_oracle/

2 ) ./runfixup.sh

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/59/A6/wKiom1TaNJ2RBm5MAANiZPphzw0155.jpg "style=" float: none; "title=" 20.jpg "alt=" Wkiom1tanj2rbm5maanizpphzw0155.jpg "/>

Installation Summary page, click Finish to start the installation


650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/59/A6/wKiom1TaNQ6gskTDAAMLYKvr_nA831.jpg "style=" float: none; "title=" 21.jpg "alt=" Wkiom1tanq6gsktdaamlykvr_na831.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/59/A6/wKiom1TaNQ6j93CEAALk_nixkFI557.jpg "style=" float: none; "title=" 22.jpg "alt=" Wkiom1tanq6j93ceaalk_nixkfi557.jpg "/>





Installing the Product

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/59/A2/wKioL1TaNgPj50AHAAMgDphJ4iw982.jpg "style=" float: none; "title=" 23.jpg "alt=" Wkiol1tangpj50ahaamgdphj4iw982.jpg "/>

Database creation complete, click OK to proceed to the next step

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/59/A6/wKiom1TaNQ_Be3TRAAKlAUTkxzY540.jpg "style=" float: none; "title=" 24.jpg "alt=" Wkiom1tanq_be3traaklautkxzy540.jpg "/>

Execute the configuration script and click OK to proceed to the next step

in Root the user executes the following command:

1 ) cd/opt/app/orainventory/

2 ) ./orainstroot.sh

3 ) cd/opt/app/oracle/product/11.2.0/db_1/

4 ) ./root.sh (when there is Enter the full pathname of the local bin Directory:[/usr/local/bin]: when the

Click Enter)

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/59/A2/wKioL1TaNgPDEhJAAAGD_f6DCGs507.jpg "style=" float: none; "title=" 25.jpg "alt=" Wkiol1tangpdehjaaagd_f6dcgs507.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/59/A6/wKiom1TaNQ-ztUohAAHfZiKKG48264.jpg "style=" float: none; "title=" 26.jpg "alt=" Wkiom1tanq-ztuohaahfzikkg48264.jpg "/>



Oracle Common Commands

# su–oracle

Sqlplus/as SYSDBA

Sql> Startup #启动数据库实例

sql> Shutdown Immediate #关闭数据库实例

Sql> select * from tab; #查看所有表

Sql> select name from V$datafile #查看数据库存放目录

Sql> Show parameter Service #查看服务名

Sql> select * from V$instance; #查看实例名

Sql> select name from V$database; #查看数据库名

sql> SELECT * fromdba_users; #查看所有用户信息

Sql> select Username,password from Dba_users; #只查询用户和密码

sql> SELECT * fromv$pwfile_users; #查看具有sysdba权限的用户

sql> SELECT * FROMDBA_USTATS; #查看当前用户信息

Sql> SELECT * Fromuser_sys_privs #查看当前用户系统权限

Sql> SELECT * Fromuser_role_privs #查看当前用户角色

Sql> SELECT * Fromdba_sys_privs #查看指定用户所具有的系统权限

Sql> SELECT * Fromv$version #查看oracle版本

Sql> SELECT * Fromuser_views #查看视图信息

Lsnrctl Start #开启远程监听端口






10. Difference between Oracle user and system user

1>. Storage data is of different importance

The base tables and views that hold the data dictionary are maintained by the database itself, and no user can change it manually, and the SYS user has roles or permissions such as DBA, SYSDBA, Sysoper, and is the highest user of Oracle privileges.

System users only hold some level of internal data, such as some of the features or tools that Oracle has to manage information. For database administration, the system user has the normal DBA role permissions.

2>.

Users have SYSDBA or sysoper system permissions, login em can only use these two identities, can not use normal.

System users can only log on with normal as the EM unless you grant SYSDBA system or SYSPOER system permissions to it.

#sysdba和sysoper两个系统权限区别

Normal is a normal user

SYSDBA has the highest system privileges, and is sys after logging in

Sysoper is mainly used to start, close the database, Sysoper login after the user is public

The difference between the SYSDBA and the

Understand the creation process of Oracle Services:–>–> Create a database

Startup process: Instance launches –> Mount database –> Open Database

SYSDBA is a management Oracle instance, its existence does not depend on the entire database starts completely, as long as the instance starts, it already exists, logs in as SYSDBA, mounts the database, opens the database. The DBA role has the basis of existence only if the database is open or the entire database is fully started.


This article is from the "Technical Achievement Dream" blog, please be sure to keep this source http://pizibaidu.blog.51cto.com/1361909/1613521

Linux installation oracle11g R2 detailed

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.