Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Linux oracle 11g installation

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Centos6.5 64-bit basic server installs oracle11g_r2 64-bit

Author: Liu Meiqiu

Date: 2017.06.05

1. Install the dependency package

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

Install the missing packages, such as oracle, during the installation process, when you check the packages and find that some required packages are not installed, according to the name of the uninstalled packages, we can find the missing packages from the CD or ISO where linux is installed.

Upload it to linux using ftp, and then use rpm-ivh xxx.rpm-- nodeps-- force to install (where-- nodeps-- force represents a mandatory installation, which is used if the installation using rpm-ivh xxx.rpm directly is unsuccessful).

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 View current system

2.mount / dev/cdrom / mnt mount CD to / 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 creates partition files

Mkdir / mnt/swap

Cd /

Mv swapadd / mnt/swap

Mkswap / mnt/swap/swapadd settings exchange file

Swapon / mnt/swap/swapadd enables virtual memory

Free-m

Swapoff-v / mnt/swap/swapadd when new virtual memory is not needed

#

Write / etc/fstab to enable 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

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

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

Change the current kernel parameters by executing the following command:

# / sbin/sysctl-p

4. Modify the system resource limit

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

Oracle soft nproc 2047

Oracle hard nproc 16384

Oracle soft nofile 1024

Oracle hard nofile 65536

# vim / etc/pam.d/login

Add a pam_limits.so under session required pam_namespace.so #

Session required pam_limits.so

5. Create 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 the oracle environment variable (set by oracle user login)

$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 # effective immediately

7. Install oracle

Download and decompress: (download to the oracle official website with brief download steps)

Download Chinese supported font zysong.ttf (optional)

# mkdir-p / usr/share/fonts/zh_CN/TrueType

# cp zysong.ttf / usr/share/fonts/zh_CN/TrueType/

You can also install the Chinese font file with the English interface without downloading the Chinese font file. During the installation, $export LANG=en_US.UTF-8 solves the garbled problem of the Chinese box and installs it with the English interface.

# cd / home/oracle

# unzip linux.x64_11gR2_database_1of2.zip

# unzip linux.x64_11gR2_database_2of2.zip

# xhost + # enables all users to access the graphical desktop. Xmanager is a high-performance X window server running on the MS Windows platform. You can run both Unix/Linux and Windows graphics applications on the local PC and execute the oracle graphics installation wizard.

# su-oracle

$cd database

$. / runInstaller

During the installation process, perform the prerequisite check page, click the patch and check again, and the check again still fails, then you can directly ignore it all and go straight to the next step.

Execute the following command as the root user:

1) cd / tmp/CVU_11.2.0.1.0_oracle/

2). / runfixup.sh

After all is ignored, the graphical interface installation process takes a long time until the following prompt appears:

Execute the configuration script to execute the following command for 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 (enter when "Enter the full pathname of the local bin directory: [/ usr/local/bin]:" appears)

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 # start the database instance

SQL > shutdown immediate # close the database instance

SQL > select * from tab; # View all tables

SQL > select name from vault datafile; # View the database storage directory

SQL > show parameter service # View the service name

SQL > select * from instance; # View instance name

SQL > select name from vault database; # View the database name

SQL > select * from dba_users; # View all user information

SQL > select username,password from dba_users; # only query users and passwords

SQL > select * from vested pwfileusers; # View users with sysdba permission

SQL > select * from dba_ustats; # View current user information

SQL > select * from user_sys_privs; # View the current user's system permissions

SQL > select * from user_role_privs; # View current user roles

SQL > select * from dba_sys_privs; # View the system permissions of the specified user

SQL > select * from version; # View oracle version

SQL > select * from user_views; # View View Information

Lsnrctl start # Open remote listening port

When PS:lsnrctl start cannot open the remote listening port

Method: modify listener.ora file

Open the listener.ora file with the following contents, and 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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report