Linux Oracle 11g Installation

Source: Internet
Author: User

centos6.5 64-bit basic server installation ORACLE11G_R2 64-bit

Liu Mei-beg

Date: 2017.06.05


1. Install dependent packages

# yum-y Install gcc gcc-c++ make binutilscompat-libstdc++-33 elfutils-libelf elfutils-libelf-devel glibc Glibc-commongli Bc-devel Libaio libaio-devel UnixODBC unixodbc-devel


When installing a missing package, such as during an Oracle installation, when checking the package, it is found that the required package is not installed, depending on the name of the installed package, we can find the missing package from the CD or ISO that installs Linux.

Use FTP to upload to Linux, and then use RPM–IVH xxx.rpm--nodeps--force to install (with--nodeps-Force on behalf of the mandatory installation, is in the direct use of RPM–IVH xxx.rpm installation is unsuccessful The installation process is slightly.


RPM-IVH libaio-0.3.107-10.el6.x86_64.rpm

RPM-IVH libaio-devel-0.3.107-10.el6.x86_64.rpm

RPM-IVH compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm


PS: CD Mount

1.cat/etc/issue viewing the current system

2.mount/dev/cdrom/mnt mount the disc to the/MNT directory #mount/dev/sr0/mnt

3.cd/mnt/packages/

4. Install with RPM-IVH



PS: Increase virtual memory

DD If=/dev/zero of=/swapadd bs=1024 count=4524288 create partition file

Mkdir/mnt/swap

CD/

MV Swapadd/mnt/swap

Mkswap/mnt/swap/swapadd setting up swap files

Swapon/mnt/swap/swapadd Enabling virtual memory

Free-m

Swapoff-v/mnt/swap/swapadd When you do not need to use the new virtual memory

############################################

Write/etc/fstab so that it is enabled at boot time:

/mnt/swap/swapadd swap swap defaults 0 0



2. Create users and Groups


# Groupadd Oinstall

# Groupadd DBA

# USERADD-G OINSTALL-G dba Oracle

# passwd Oracle


3. Modify Kernel Parameters


# vim/etc/sysctl.conf at the end add the following


Fs.file-max = 6815744

FS.AIO-MAX-NR = 1048576

Kernel.shmall = 2097152

Kernel.shmmax = 2147483648

Kernel.shmmni = 4096

Kernel.sem = 250 32000 100 128

Net.ipv4.ip_local_port_range = 9000 65500

Net.core.rmem_default = 4194304

Net.core.rmem_max = 4194304

Net.core.wmem_default = 262144

Net.core.wmem_max = 1048576


Execute the following command to change the current kernel parameters:


#/sbin/sysctl-p


4. Modify System Resource limits

# vim/etc/security/limits.conf at the end add the following


Oracle Soft Nproc 2047

Oracle Hard Nproc 16384

Oracle Soft Nofile 1024

Oracle Hard Nofile 65536


# Vim/etc/pam.d/login


Session required pam_namespace.so #下面添加一条pam_limits. So

Session Required Pam_limits.so



5. Create the installation directory and set permissions


# mkdir-p/opt/oracle/app/

# mkdir/opt/oracle/oradata/

# chown Oracle.oinstall-r/opt/oracle/

# chmod 755-r/opt/oracle/


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


$ vim ~/.bash_profile


Path= $PATH: $HOME/bin


Export PATH

Export Oracle_base=/opt/oracle/app

Export Oracle_home= $ORACLE _base/product/11.2.0/dbhome_1

Export path= $PATH: $ORACLE _home/bin

Export ORACLE_SID=ORCL # (note that this value is the same as the database instance name created below)

Export Oracle_unqname= $ORACLE _sid

$ source. Bash_profile #立即生效

7. Install Oracle



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

Download Chinese support font Zysong.ttf (not required)


#mkdir-P/usr/share/fonts/zh_cn/truetype

#cp zysong.ttf/usr/share/fonts/zh_cn/truetype/

You can also not download the Chinese font file in English interface installation, at the time of installation $ export Lang=en_us. UTF-8 solve the problem of Chinese block garbled, installed in English interface.


# cd/home/oracle

# Unzip Linux.x64_11gR2_database_1of2.zip

# Unzip Linux.x64_11gR2_database_2of2.zip

# Xhost + #使所有用户都能访问图形桌面, Xmanager is a high performance X Window server running on the MS Windows platform. You can run the Unix/linux and Windows graphics applications at the same time on your local PC to perform the Oracle Graphics Setup Wizard.

# su-oracle

$ CD Database

$./runinstaller



During the installation process, perform the prerequisite check page, click Fix and check again, check again or not, then you can ignore it directly and go directly to the next step.


Execute the following command with the root user:


1) cd/tmp/cvu_11.2.0.1.0_oracle/


2)./runfixup.sh


After ignoring all, the installation process of the graphical interface, the installation time is longer, until the installation of the following prompt:


Execute the configuration script to execute the following command with the root user:


1) cd/opt/oracle/orainventory/


2)./orainstroot.sh


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


4)./root.sh (When the "enter the full pathname of the local bin Directory:[/usr/local/bin]:" When the Enter)


End the installation of Oracle. It is best to restart the server after the installation is complete.





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 * from Dba_users; #查看所有用户信息


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


Sql> select * from V$pwfile_users; #查看具有sysdba权限的用户


Sql> select * from Dba_ustats; #查看当前用户信息


Sql> select * from User_sys_privs; #查看当前用户系统权限


Sql> select * from User_role_privs; #查看当前用户角色


Sql> select * from Dba_sys_privs; #查看指定用户所具有的系统权限


Sql> select * from V$version; #查看oracle版本


Sql> select * from User_views; #查看视图信息


Lsnrctl Start #开启远程监听端口


Ps:lsnrctl Start cannot open the remote listening port

Method: Modify the Listener.ora file

Listener.ora file Open, the content is as follows, adjust the host IP in it.

Vim/opt/oracle/app/product/11.2.0/dbhome_1/network/admin/listener.ora


# Listener.ora Network Configuration File:/opt/oracle/app/product/11.2.0/dbhome_1/network/admin/listener.ora

# Generated by Oracle configuration tools.


LISTENER =

(Description_list =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521))

(ADDRESS = (PROTOCOL = TCP) (host=192.168.10.252) (PORT = 1521))

)

)


Adr_base_listener =/opt/oracle/app



This article from the "It Technical Exchange Zone" blog, reproduced please contact the author!

Linux Oracle 11g Installation

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.