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

How to install oracle database with Linux non-graphical interface

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces the Linux non-graphical interface how to install oracle database, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.

Note:

A Linux OS without a graphical interface, how to install oracle software and database, here are two major steps

1. Clone software

2. Build the database manually

I. Clone software

1. Basic configuration

1.1) system package installation

Yum-y install binutils compat-libstdc++-33 compat-libstdc++-33.i686 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc.i686 glibc-common glibc-devel glibc-devel.i686 glibc-headers ksh libaio libaio.i686 libaio-devel libaio-devel.i686 libgcc libgcc.i686 libstdc++ libstdc++.i686 libstdc++-devel make sysstat unixODBC unixODBC-devel

1.2) user creation

Groupadd oinstall

Groupadd dba

Useradd-g oinstall-G dba oracle

Echo 123456 | passwd-- stdin oracle

1.3) File configuration

1.3.1) Environmental variables

Vi ~ oracle/.bash_profile

Export ORACLE_BASE=/data/app/oracle

Export ORACLE_HOME=$ORACLE_BASE/product/11.2.0.4/db_1

Export ORACLE_SID=test # up to 8 characters; operating system and oracle instance associated link; ORACLE_HOME+ORACLE_SID== > hash== > shared memory segment

Export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin # appends the installed oracle command to the execution search path

Location of the export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib # dynamic library

Export nls_lang= "SIMPLIFIED CHINESE_CHINA.ZHS16GBK" # client character set Settings

# load configuration: oracle user logout and re-login or source .bash _ profile

1.3.2) Host

Echo "10.240.1.7 Database-backup" > > / etc/hosts # avoid misreporting startup noumount Times error ORA-00000: normal, successful completion

1.3.3) Software catalog

Mkdir-p / data/app/oracle/product/11.2.0.4/db_1

Chown-R oracle:oinstall / data/app

1.3.4) Resource restrictions

1.3.4 vim / etc/sysctl.conf is added to the bottom of the file

Kernel.shmall = 2097152

# Total amount of shared memory available (bytes or pages); number of pages; 2097152 4096max 1024max 1024max 1024max 8G; if the memory is greater than 8G, this parameter must be modified

Kernel.shmmax = 2147483648

# to > = half of physical memory Maximum size of shared memory segment (bytes); recommendation > = sga_max_size (oracle applies for memory size)

# what is the maximum memory segment of a single program; 4G is divided into two mem_seg1 mem_seg2 segments, which affects efficiency

Kernel.shmmni = 4096

# Maximum number of shared memory segments system-wide; page size

Kernel.sem = 250 32000 100 128

SEMMSL SEMMNS SEMOPM SEMMNI

Maximum number of signal objects per set of signal objects in SEMMSL Maximum number of semaphores per set;

Maximum number of signal objects within the SEMMNS Maximum number of semaphores system-wide; system; SEMMNS = SEMMSL*SEMMNI

Maximum operands supported by each signal object in SEMOPM

Maximum number of signal object sets in SEMMNI Maximum number of semaphore identifiers; system

Maximum number of file handles allowed in fs.file-max # system

Range of IPv4 ports available to net.ipv4.ip_local_port_range # applications

Default value of net.core.rmem_default # socket receive buffer size

Maximum size of the net.core.rmem_max # socket receive buffer

Default value of net.core.wmem_default # socket send buffer size

Maximum size of the net.core.wmem_max # socket send buffer

# Note: the maximum application for OS32bit,oracle is 1.7G; 64bitOS should be installed.

# load parameter sysctl-p

1.3.4,2) / etc/security/limits.conf oracle limit operating on linux

[root@dba ~] # grep-v'^ #'/ etc/security/limits.conf

Oracle soft nproc 2047 # oracle number of proc opened on linux

Oracle hard nproc 16384

Number of oracle soft nofile 1024 # oracle file opened on linux

Oracle hard nofile 65536

[root@dba ~] # grep 'limit' / etc/pam.d/system-auth

Session required pam_limits.so

1.3.4) turn off the firewall, SELINUX

Iptables-F

Change / etc/selinux/config file-- > SELINUX=disabled

2. Clone ORACLE_HOME

2.1) completely replicate the remote ORACLE_HOME locally

# enter the local ORACLE_HOME path

Su-oracle

Cd / data/app/oracle/product/11.2.0.4/

# completely copy the remote ORACLE_HOME to the local

Scp-pr oracle@10.240.1.8:/data/app/oracle/product/11.2.0.4/db_1/.

2.2) execute clone.pl clone script to change parameter configuration (ORACLE_SID, ORACLE_HOME)

$cd / data/app/oracle/product/11.2.0.4/db_1/clone/bin

$ls

Clone.pl prepare_clone.pl

# Note that after each parameter, there can be no space after the equal sign, otherwise it will be recognized as an invalid option

$perl clone.pl ORACLE_SID=test ORACLE_BASE=/data/app/oracle ORACLE_HOME=/data/app/oracle/product/11.2.0.4/db_1/ ORACLE_HOME_NAME=OraDb11g_home1

. Finally, the following information indicates that the clone was successful.

The following configuration scripts need to be executed as the "root" user.

/ data/app/oracle/product/11.2.0.4/db_1/root.sh

To execute the configuration scripts:

1. Open a terminal window

2. Log in as "root"

3. Run the scripts

The cloning of OraDb11g_home1 was successful.

.

Second, build the database manually

1. Configuration parameter file (simple parameters in the test environment, which can be supplemented if necessary)

[oracle@Database-backup ~] $cd $ORACLE_HOME/dbs

[oracle@Database-backup dbs] $pwd

/ data/app/oracle/product/11.2.0.4/db_1/dbs

[oracle@Database-backup dbs] $

[oracle@Database-backup dbs] $cat inittest.ora

Db_name=test

Db_files = 80

Db_file_multiblock_read_count = 8

Log_checkpoint_interval = 10000

Processes = 50

Parallel_max_servers = 5

Log_buffer = 32768

Max_dump_file_size = 10240 # limit trace file size to 5 Meg each

Global_names = TRUE

# control_files = (ora_control1, ora_control2)

Sga_max_size=300M

Sga_target=300M

* .local_listener=' (ADDRESS_LIST= (Address= (Protocol=tcp) (Host=10.240.1.7) (Port=1521)'# avoid errors in starting the database (invalid configuration of ORA-00119 and ORA-00130 local_listener)

[oracle@Database-backup dbs] $

2. Start the database to nomount

# enter the database

[oracle@Database-backup dbs] $sqlplus / as sysdba

# Open the database to nomount status

SQL > startup nomount

ORACLE instance started.

Total System Global Area 313159680 bytes

Fixed Size 2252824 bytes

Variable Size 104861672 bytes

Database Buffers 201326592 bytes

Redo Buffers 4718592 bytes

SQL >

3. Create the database to open status-> premise: mkdir-p / data/app/dbf/;chown-R oracle:oinstall / data/app/dbf/

SQL > CREATE DATABASE test

USER SYS IDENTIFIED BY change_on_install

USER SYSTEM IDENTIFIED BY manager

LOGFILE GROUP 1 ('/ data/app/dbf/redo01.log') SIZE 100m

GROUP 2 ('/ data/app/dbf/redo02.log') SIZE 100m

GROUP 3 ('/ data/app/dbf/redo03.log') SIZE 100m

MAXLOGFILES 5

MAXLOGMEMBERS 5

MAXLOGHISTORY 1

MAXDATAFILES 100

MAXINSTANCES 1

CHARACTER SET ZHS16GBK

NATIONAL CHARACTER SET AL16UTF16

DATAFILE'/ data/app/dbf/system01.dbf' SIZE 325m REUSE

EXTENT MANAGEMENT LOCAL

SYSAUX DATAFILE'/ data/app/dbf/sysaux01.dbf' SIZE 325m REUSE

DEFAULT TABLESPACE users datafile'/ data/app/dbf/users.dbf' size 50m

DEFAULT TEMPORARY TABLESPACE tempts1

TEMPFILE'/ data/app/dbf/temp01.dbf'

SIZE 20 M REUSE

UNDO TABLESPACE undotbs

DATAFILE'/ data/app/dbf/undotbs01.dbf'

SIZE 200 M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED

Database created.

SQL >

4. Confirm the status of the database

SQL > select status from v$instance

STATUS

-

OPEN

SQL >

5. Automatically extend the DBF settings to avoid the shortage of time and space of loading data dictionary tables / packages / scott users by executing scripts later.

Alter database datafile 1 autoextend on

Alter database datafile 2 autoextend on

Alter database datafile 3 autoextend on

Alter database datafile 4 autoextend on

6. Create data dictionary / package / scott user

Data dictionary view: @? / rdbms/admin/catalog.sql

System package / stored procedure: @? / rdbms/admin/catproc.sql

User PROFILE table: @? / sqlplus/admin/pupbld.sql

The above has completed the installation of oracle software and database.

Problem collation and improvement

1. * sqlplus / as sysdba prompt that the libclntsh.so.11.1 file was not found

[oracle@Database-backup ~] $sqlplus / as sysdba

Sqlplus: error while loading shared libraries: libclntsh.so.11.1: cannot open shared object file: No such file or directory

[oracle@Database-backup ~] $cd $ORACLE_HOME/lib/

[oracle@Database-backup lib] $ls libclntsh.so*

Libclntsh.so libclntsh.so.10.1-- > only 10.1 cp-rp associated attributes are completely copied. Normally, if there is a libclntsh.so.11.1 file, it may be a permission problem.

[oracle@Database-backup lib] $cp-rp libclntsh.so.10.1 libclntsh.so.11.1

[oracle@Database-backup lib] $sqlplus / as sysdba

... It's normal.

2. Login with sys password

Orapwd file=orapwtest password=test

3. ORA-00904: "wm_concat": invalid identifier

Execute create WMSYS user script

SQL > @? / rdbms/admin/owmctab.plb

SQL > @? / rdbms/admin/owmaggrs.plb

SQL > @? / rdbms/admin/owmaggrb.plb

4. Error in creating database

ERROR at line 1:

ORA-01092: ORACLE instance terminated. Disconnection forced

ORA-01501: CREATE DATABASE failed

ORA-01519: error while processing file'? / rdbms/admin/dtxnspc.bsq' near line 5

ORA-00604: error occurred at recursive SQL level 1

ORA-30012: undo tablespace 'UNDOTBS02' does not exist or of wrong type

Process ID: 35451

Session ID: 2661 Serial number: 1

Reason: the parameter file is inconsistent with the default undo space for creating the database script.

Thank you for reading this article carefully. I hope the article "how to install oracle database on Linux non-graphical interface" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

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