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

Oracle Rookie Learning installs Oracle on RedHat 6.5

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

Share

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

Install Oracle 11 G on RedHat 6.5

Launch: http://www.example.com p=90

Upload database software to/tmp/and modify file permissions

chmod-R 755/tmp/database/create users and groups

Create oracle user, and add oracle user to oinstall and dba groups, which need to be used later when installing

[root@localhost ~]# groupadd oinstall[root@localhost ~]# groupadd dba[root@localhost ~]# useradd -g oinstall -G dba oracle[root@localhost ~]# passwd oracleChanging password for user oracle.New password: BAD PASSWORD: it is based on a dictionary wordBAD PASSWORD: is too simpleRetype new password: passwd: all authentication tokens updated successfully. [root@localhost~]#Create directory and modify files Create database installation directory u 01 [root@localhost~]#mkdir/home/u 01 Make a soft link to database installation directory [root@localhost~]#ln-s/home/u 01//u 01 [root@localhost~]#mkdir-p/u 01/app/oracle Modify/u 01 owner and group information of directory [root@localhost~]#chown-R oracle: oinstall/u 01/Modify u01 permissions to 755 [root@localhost~]#chmod-R 755/u 01/Add the following line to. bash_profile under oracle user

[root@localhost ~]# vim /home/oracle/.bash_profile

export ORACLE_BASE =/u 01/app/oracleexport ORACLE_HOME =$ORACLE_BASE/product/11.2.4/db_1export ORACLE_SID = testexport PATH =$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$ORACLE_HOME/jdk/bin:$PATHexport LANG ="en_US. UTF-8" export NLS_LANG = american_America.UTF8export NLS_DATE_FORMAT ="YY-MM-DD HH 24: MI: SS" Verify that there is no problem, no output means there is no problem [root@localhost oracle]#source. bash_profile [root@localhost oracle]#Install Oracle dependent software 1. Mount optical drive [root@localhost~]#/dev/cdrom/mnt/mount: block device/dev/sr0 is write-protected, mounting read-only [root@localhost~]#2. Fix yum file [root@localhost~]#cd/etc/yum. repos. d/[root@localhost yum. repos. d]#lsrhel-source. repo [root@localhost yum. repos. d]#cp rhel-source. repo rhel-source. repo. bak [root@localhost yum. repos. d]#vim rhel-source. repo [rhel-source] name = Red Hat Enterprise Linux $releasever-$basearch-Sourcebaseurl = file:///mnt/enabled = 1gpgcheck = 03. Clear yum source, and regenerate [root@localhost yum. repos. d]#yum claenall [root@localhost yum. repos. d]#yum makecache4. Use yum install software [root@localhost yum. repos. d] pos. d]#yum install binutils compat-libstdc ++-33 elfutils-libelt elfutils-libelt-devel gcc gcc-c ++ glibc glibc-common glibc-devel glib@-headers pdksh cvuqdisk libaio libaio-devel libgcc libgomp libstdc ++ libstdc ++-devel make numactl-devel sysstat unixODBC unixODBC-devel-y install Oracle database switch user (Graphic logout and login)

install Oracle

1. Open the graphical desktop terminal

[oracle@localhost ~]$ cd /tmp/database/

[oracle@localhost database]$ ./ runInstaller

2. Remove the check mark from the tab

3. select Yes

4. Select the second one to install the database software

5. Select Install Single Node

6. Select installation language, default is good (there seems to be no Chinese)

7. Select default Enterprise Edition

8. Default path, path preparation phase has been created, not created as above directory needs to be modified here

9. Directories and groups, by default

10. User group, default

11. Check before installation, select Ignore All to go next

12. Click finish to start installation

13. Tips may appear during installation, click ok directly

14. Installation complete Click close to close the window

Create database [oracle@localhost database]$dbca

1. select Next

2. Select Create Database

3. Select database template, default

4. Set SID, this SID needs to be the same as SID in oracle user's. bash_profile, above we set test

5. Cancel the top tick, next step

6. Set passwords for two users of oracle database. The following option is to use passwords for both users..., Of course, a user can also set a password.

7. Select the following options:

8. Click Done

9. Click OK

10. Click exit to complete installation

Open listener with Oracle [oracle@localhost/]$lsnrctl startLSNRCTL for Linux: Version 11.2.0.1.0-Production on 02-OCT-2018 11:51:04 Copyright (c) 1991, 2009, Oracle. All rights reserved.Starting /u01/app/oracle/product/11.2.4/db_1/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 11.2.0.1.0 - ProductionLog messages written to /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xmlListening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))STATUS of the LISTENER------------------------Alias LISTENERVersion TNSLSNR for Linux: Version 11.2.0.1.0 - ProductionStart Date 02-OCT-2018 11:51:05Uptime 0 days 0 hr. 0 min. 0 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFListener Log File /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xmlListening Endpoints Summary... (DESCRIPTION =(ADDRESS =(PROTOCOL = tcp)(HOST = localhost)(PORT = 1521))) The listener supports no servicesThe command completed successfully [oracle@localhost/]$into the database [oracle@localhost~]$sqlplus/as sysdbaSQL * Plus: Release 11.2.0.1.0 Production on Tue Oct 2 11:53:31 2018Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64 bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options Open the database and the following message appears indicating that the database has been started SQL> startup ORA-01081: cannot start already-running ORACLE-shut it down firstSQL> Incidentally query a table, and the data output indicates that there is no problem. SQL> select * from user_tables; optimize input, arrow keys

1. Download rlwrap software

[root@localhost /]# wget http://mirrors.aliyun.com/epel/6/x86_64/Packages/r/rlwrap-0.42-1.el6.x86_64.rpm

2. installation

[root@localhost /]# rpm -ivh rlwrap-0.42-1.el6.x86_64.rpm warning: rlwrap-0.42-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEYPreparing... ########################################### [100%] 1:rlwrap ########################################### [100%][root@localhost /]#

3. modify the configuration file

[oracle@localhost ~]$ vi .bash_profile

alias sqlplus='rlwrap sqlplus'alias rman='rlwrap rman'

4. Log in again or switch

End.

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