Step-by-Step teaching you to install the Oracle Tutorial in CentOS 7

Source: Internet
Author: User
Tags dba error code mkdir oracle database installation oracle documentation centos iptables

In exchange for a number of systems and finally the use of CentOS installation Oralce successful, I also refer to the web of a lot of information and Oracle's official documents

1, download Oracle, I choose here is the 11GR2 version, download down there are two files, using the unzip command to extract to the same directory

2. Set up Oracle installation directory on disk

Mkdir-p/oracle/oraclebase #这是oracle的安装基目录

Mkdir-p/oracle/orainventory #这是一些文件日志的目录

3. Create Oracle Users and Groups

Here is why to create users and groups, because the database holds some important data, not who want to access to access, must be the user's permissions to manage, only the user joined the current group, and given their permissions to be able to operate the database.

Groupadd Oinstall #创建用户组oinstall

Groupadd DBA #创建用户组dba

Useradd-g oinstall-g dba-m Oracle #创建用户oracle and joins Oinstall and DBA user groups

passwd Oracle #设置用户oracle的登录密码, enter password two times according to prompts

Chown-r Oracle:oinstall/oracle/oraclebase #设置目录所有者为oinstall用户组的oracle用户

Chown-r oracle:oinstall/oracle/orainventory

4, modify the operating system name

Vi/etc/redhat-release #编辑

Modified to: redhat-7

I am not very clear here, because the Oracle officially certified system is redhat, Oracle Linux, SuSE, and so on, and finally chose CentOS to install Oracle, but also because CentOS is a redhat distribution, I think compatibility is still possible.

5. Modify Kernel parameters

This step was mainly due to the minimum requirements for Oracle Database installation configuration in the official Oracle documentation, so you need to modify

Vi/etc/sysctl.conf #编辑,

#在最后添加以下代码

Net.ipv4.icmp_echo_ignore_broadcasts = 1

Net.ipv4.conf.all.rp_filter = 1

Fs.file-max = 6815744 #设置最大打开文件数

FS.AIO-MAX-NR = 1048576

Kernel.shmall = 2097152 #共享内存的总量, 8G memory settings: 2097152*4k/1024/1024

Kernel.shmmax = 2147483648 #最大共享内存的段大小

Kernel.shmmni = 4096 #整个系统共享内存端的最大数

Kernel.sem = 250 32000 100 128

Net.ipv4.ip_local_port_range = 9000 65500 #可使用的IPv4端口范围

Net.core.rmem_default = 262144

net.core.rmem_max= 4194304

net.core.wmem_default= 262144

net.core.wmem_max= 1048576

After you save the exit, do the following to make the configuration effective

Sysctl-p #使配置立即生效

6. Set limits on Oracle users

Vi/etc/security/limits.conf #在末尾添加以下代码

Oracle Soft Nproc 2047

Oracle Hard Nproc 16384

Oracle Soft Nofile 1024

Oracle Hard Nofile 65536

Note: Suddenly remembered, add if vi Edit file content more words, you can enter the command mode input "$" to jump to the end of the text.

7, configure the user's environment variables

Vi/home/oracle/.bash_profile

#在最后添加以下代码

Export Oracle_base=/data/oracle #oracle数据库安装目录

Export Oracle_home= $ORACLE _base/product/11.2.0/db_1 #oracle数据库路径

Export ORACLE_SID=ORCL #oracle启动数据库实例名

Export Oracle_term=xterm #xterm窗口模式安装

Export path= $ORACLE _home/bin:/usr/sbin: $PATH #添加系统环境变量

Export ld_library_path= $ORACLE _home/lib:/lib:/usr/lib #添加系统环境变量

Export #防止安装过程出现乱码

Export Nls_lang=american_america. ZHS16GBK #设置Oracle客户端字符集, must be consistent with the set of Oracle installations, such as: ZHS16GBK, otherwise the data import export Chinese garbled problem

After you save the exit, enter the following command to make the configuration effective

source. Bash_profile #使设置立刻生效

8. Close SELinux

Vi/etc/selinux/config

#编辑配置文件

#注释掉SELINUX =enforcing

# comment out selinuxtype=targeted

Selinux=disabled #增加

9. Configure the Firewall

Since I installed the system is CentOS 7 live version, so there are a lot of things do not, I added the following code, did not find the iptables restart command, and then restarted the system, anyway, the end is no impact, I guess my version of the firewall. The online code is as follows:

Vi/etc/sysconfig/iptables #编辑防火墙配置文件, add the following

-A rh-firewall-1-input-m state–state new-m tcp-p tcp–dport 1521-j ACCEPT

/etc/init.d/iptables Restart #重启防火墙使配置生效

10, check the dependency relationship

Here I checked the two steps, first of all, according to the official document, I refer to the official document Redhat-7 all the needs of things, as follows:

Binutils-2.23.52.0.1-12.el7.x86_64

Compat-libcap1-1.10-3.el7.x86_64

Gcc-4.8.2-3.el7.x86_64

Gcc-c++-4.8.2-3.el7.x86_64

glibc-2.17-36.el7.i686

Glibc-2.17-36.el7.x86_64

glibc-devel-2.17-36.el7.i686

Glibc-devel-2.17-36.el7.x86_64

Ksh

libaio-0.3.109-9.el7.i686

Libaio-0.3.109-9.el7.x86_64

libaio-devel-0.3.109-9.el7.i686

Libaio-devel-0.3.109-9.el7.x86_64

libgcc-4.8.2-3.el7.i686

Libgcc-4.8.2-3.el7.x86_64

libstdc++-4.8.2-3.el7.i686

Libstdc++-4.8.2-3.el7.x86_64

libstdc++-devel-4.8.2-3.el7.i686

Libstdc++-devel-4.8.2-3.el7.x86_64

libxi-1.7.2-1.el7.i686

Libxi-1.7.2-1.el7.x86_64

libxtst-1.2.2-1.el7.i686

Libxtst-1.2.2-1.el7.x86_64

Make-3.82-19.el7.x86_64

Sysstat-10.1.5-1.el7.x86_64

Check the use of the following command can be directly installed online, if the installation of the affirmation will prompt, otherwise installed

Yum Install binutils #以第一个包为例子

Next, incidentally, I refer to an article to detect the relationship between the method has been used, this command has wildcards, the installation of more than the package, the scope of radiation wider, to ensure foolproof.

Yum install gcc* gcc-* gcc-c++-* glibc-devel-* glibc-headers-* compat-libstdc* libstdc* elfutils-libelf-devel* libaio-devel* sysstat* unixodbc-* pdksh-*

This has a pdksh may be prompted without this package, but it does not matter, in the first step has been detected installed Ksh

11, the next installation of the graphical interface, the first to switch to the user created above Oracle, the best logout after landing.

12, the CD into the above extracted Oracle installation files directory database

Note: Because the top of the database owner is root,oracle without permission to access, you can use the following command, the owner of this folder is Oracle.

Su-root #切换到root用户

Chown-r Oracle/.../database

13, run the following command to start the installation interface

Export Lang=en_us #设置编码 to prevent garbled graphics interface

./runinstaller

Note: This may be a reminder of how the display failed, which I ignored, seemingly unaffected.

Next step in the installation steps, very simple, step-by-step to do it, select the section by default can

In the following installation may be prompted with errors such as email ignored to continue,

Then there may be a host name and IP does not map the use of the following command to modify the hosts file can be

Vi/etc/hosts

#进入之后将你的主机名加入到127.0.0.1, note that the host name, not your username

14, I also encountered in the installation process of two other errors is about makefile, and a warning, but I ignored, after installation, also did not find any problems, the error code posted here, left to solve

Install Makfile Error

Info:exception thrown from Action:make

Exception name:makefileexception

Exception String:error in invoking target ' install ' of makefile '/oracle/oraclebase/product/11.2.0/db_1/ctx/lib/ins_ Ctx.mk '. '/oracle/orainventory/logs/installactions2014-12-22_05-24-27pm.log ' for details.

Exception severity:1

Info:calling Action unixActions10.2.0.3.0 Make

Registeronly = False

Installmakepath =/usr/bin/make

Installmakefilename =/oracle/oraclebase/product/11.2.0/db_1/racg/lib/ins_has.mk

Installtarget = Racg_install

Undomakefilename =

Installarguments = oracle_home=/oracle/oraclebase/product/11.2.0/db_1

LogFile =/oracle/oraclebase/product/11.2.0/db_1/install/make.log

Undotarget =

Progmsg = linking RACG executables

Info:linking RACG Executables

Info:linking RACG Executables

Info:the output of this make operation be also available at: '/oracle/oraclebase/product/11.2.0/db_1/install/make.log '

INFO:

Agent NMHS Makefile Error

Info:exception thrown from Action:make

Exception name:makefileexception

Exception String:error in invoking target ' agent NMHS ' of makefile '/oracle/oraclebase/product/11.2.0/db_1/sysman/lib/ Ins_emagent.mk '. '/oracle/orainventory/logs/installactions2014-12-22_05-24-27pm.log ' for details.

Exception severity:1

Info:calling Action unixActions10.2.0.3.0 Make

Registeronly = False

Installmakepath =/usr/bin/make

Installmakefilename =/oracle/oraclebase/product/11.2.0/db_1/rdbms/lib/ins_rdbms.mk

Installtarget = ALL_NO_ORCL

Undomakefilename =

Installarguments = oracle_home=/oracle/oraclebase/product/11.2.0/db_1

LogFile =/oracle/oraclebase/product/11.2.0/db_1/install/make.log

Undotarget =

Progmsg = linking RDBMS executables

Info:linking RDBMS Executables

Info:linking RDBMS Executables

Info:the output of this make operation be also available at: '/oracle/oraclebase/product/11.2.0/db_1/install/make.log '

INFO:

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.