重庆思庄Oracle、Redhat认证学习论坛
标题: 史上最新的rhel7.5+oracle 18c安装成功 [打印本页]
作者: 郑全 时间: 2018-4-13 18:17
标题: 史上最新的rhel7.5+oracle 18c安装成功
本帖最后由 郑全 于 2018-4-13 19:13 编辑
受朋友所托,安装了rhel7.5+18c,为了方便交流,记录了部分,名字随意取的,如果你要认真,那你就输了.
2018年4月11日rhel7.5发布,赶紧下载下来,最简单的安装,server with gui.
安装上来看看,安装完成,没有看到ansible.
[root@dbserver ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.5 (Maipo)
[root@dbserver ~]# yum list ansible
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Error: No matching Packages to list
先不管了,
然后,由于是vmare中安装的,去掉virbro0,具体方法见论坛中前面写的帖子:http://bbs.cqsztech.com/forum.ph ... hlight=%CD%F8%C7%C5
,rhel7以后,启用的透明大页,存在性能问题,先关闭,具体方法,见论坛中前面写的帖子:http://bbs.cqsztech.com/forum.ph ... 8%C3%F7%B4%F3%D2%B3
其它操作系统没有管了.
作者: 郑全 时间: 2018-4-13 18:34
本帖最后由 郑全 于 2018-4-13 19:11 编辑
接下来进行数据库的安装.
1.建立组和用户
这个和以前没有区别吧
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
2.建立目录
mkdir -p /u01/app/oracle/product/18.0/db_1
chown -R /u01
chmod -R 775 /u01
3.解压安装目录
18c的安装介质是一个image,就是安装好的介质.解出来就可以用.
$ cd /u01/app/oracle/product/18.0/db_1
$ unzip -q /tmp/db_home.zip
4.运行.runInstaller即可.
./runInstaller
选择单机即可.
当然,18c,也提供了rpm包方式安装,我这里没有去测试.
这里的操作系统软件包安装,和12c 版本一样,使用yum直接安装即可.
Operating System Resource Parameter ,使用 fixed 按钮即可解决,可以不用事先设置.
注意:
1.有一个软件包: compat-libstdc++-33-3.2.3(x86_64) 在rhel7以上的版本上不存在了,可以不用管它,这个见前面发过的贴子:http://bbs.cqsztech.com/forum.ph ... hlight=compat-libst
2.另外,18c要求最低内存8g,主要是要安装cdb,我这里不安装这些,2g内存也可以.
作者: 郑全 时间: 2018-4-13 18:39
在上面的安装中,选择只安装软件.
下面进行数据库的创建.
作者: 郑全 时间: 2018-4-13 18:54
目前18c只提供了云平台以及exadata的安装介质,在本地linux的安装介质还没有发布,大家都知道,exadata其实就是 x86+linux,因此,使用这个介质,应该也可以在本地安装,介质下载可以参照 edelivery.oracle.com/ 去下载.
使用dbca创建实例.
由于安装介质是exadata的,所以,在创建实例时,默认会报ora-12754的错,具体解决办法,参见我前面写的帖子:http://bbs.cqsztech.com/forum.ph ... 0&highlight=18c
这个时候,我们选择,只创建脚本,不创建实例,
脚本之后创建在$ORACLE_BASE/admin/sztech1/scripts下面
然后,修改三个初始参数,添加 _exadata_feature_on=true
并执行./sztech1.sh
最后创建成功数据库.
...
SQL> startup ;
ORACLE instance started.
Total System Global Area 838856896 bytes
Fixed Size 8663232 bytes
Variable Size 322961408 bytes
Database Buffers 499122176 bytes
Redo Buffers 8110080 bytes
Database mounted.
Database opened.
SQL> spool off
SQL> exit;
Disconnected from Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.1.0.0.0
[oracle@dbserver scripts]$ ps -ef|grep ora
root 2808 1 0 17:57 ? 00:00:22 /u01/app/oracle/tfa/dbserver/tfa_home/jre/bin/java -server -Xms32m -Xmx64m -Djava.awt.headless=true -Ddisable.checkForUpdate=true oracle.rat.tfa.TFAMain /u01/app/oracle/tfa/dbserver/tfa_home
root 12456 12401 0 18:04 pts/1 00:00:00 su - oracle
oracle 12457 12456 0 18:04 pts/1 00:00:00 -bash
root 14901 11848 0 18:24 pts/0 00:00:00 su - oracle
oracle 14902 14901 0 18:24 pts/0 00:00:00 -bash
oracle 15804 1 0 18:28 ? 00:00:00 /u01/app/oracle/product/18.0/db_1/bin/tnslsnr LISTENER -inherit
oracle 17774 1 0 18:40 ? 00:00:00 /bin/sh ./OSWatcher.sh 30 48 NONE /u01/app/oracle/tfa/repository/suptools/dbserver/oswbb/oracle/archive
oracle 18122 17774 0 18:40 ? 00:00:00 /bin/sh ./OSWatcherFM.sh 48 /u01/app/oracle/tfa/repository/suptools/dbserver/oswbb/oracle/archive
oracle 19791 1 0 18:43 ? 00:00:00 ora_pmon_sztech1
oracle 19793 1 0 18:43 ? 00:00:00 ora_clmn_sztech1
oracle 19795 1 0 18:43 ? 00:00:00 ora_psp0_sztech1
oracle 19797 1 2 18:43 ? 00:00:02 ora_vktm_sztech1
oracle 19801 1 0 18:43 ? 00:00:00 ora_gen0_sztech1
oracle 19803 1 0 18:43 ? 00:00:00 ora_mman_sztech1
oracle 19807 1 0 18:43 ? 00:00:00 ora_gen1_sztech1
oracle 19810 1 0 18:43 ? 00:00:00 ora_diag_sztech1
oracle 19812 1 0 18:43 ? 00:00:00 ora_ofsd_sztech1
oracle 19815 1 0 18:43 ? 00:00:00 ora_dbrm_sztech1
oracle 19817 1 0 18:43 ? 00:00:00 ora_vkrm_sztech1
oracle 19819 1 0 18:43 ? 00:00:00 ora_svcb_sztech1
oracle 19821 1 0 18:43 ? 00:00:00 ora_pman_sztech1
oracle 19823 1 0 18:43 ? 00:00:00 ora_dia0_sztech1
oracle 19825 1 0 18:43 ? 00:00:00 ora_dbw0_sztech1
oracle 19827 1 0 18:43 ? 00:00:00 ora_lgwr_sztech1
oracle 19829 1 0 18:43 ? 00:00:00 ora_ckpt_sztech1
oracle 19831 1 0 18:43 ? 00:00:00 ora_lg00_sztech1
oracle 19833 1 0 18:43 ? 00:00:00 ora_smon_sztech1
oracle 19835 1 0 18:43 ? 00:00:00 ora_lg01_sztech1
oracle 19837 1 0 18:43 ? 00:00:00 ora_smco_sztech1
oracle 19839 1 0 18:43 ? 00:00:00 ora_reco_sztech1
oracle 19841 1 0 18:43 ? 00:00:00 ora_w000_sztech1
oracle 19843 1 0 18:43 ? 00:00:00 ora_lreg_sztech1
oracle 19845 1 0 18:43 ? 00:00:00 ora_w001_sztech1
oracle 19847 1 0 18:43 ? 00:00:00 ora_pxmn_sztech1
oracle 19851 1 2 18:43 ? 00:00:03 ora_mmon_sztech1
oracle 19854 1 0 18:43 ? 00:00:00 ora_mmnl_sztech1
oracle 19856 1 0 18:43 ? 00:00:00 ora_d000_sztech1
oracle 19858 1 0 18:43 ? 00:00:00 ora_s000_sztech1
oracle 19860 1 0 18:43 ? 00:00:00 ora_tmon_sztech1
oracle 19865 1 0 18:43 ? 00:00:00 ora_m000_sztech1
oracle 19867 1 0 18:43 ? 00:00:00 ora_m001_sztech1
oracle 19873 1 0 18:43 ? 00:00:00 ora_tt00_sztech1
oracle 19875 1 0 18:43 ? 00:00:00 ora_tt01_sztech1
oracle 19877 1 0 18:43 ? 00:00:00 ora_tt02_sztech1
oracle 19880 1 0 18:43 ? 00:00:00 ora_aqpc_sztech1
oracle 19882 1 0 18:43 ? 00:00:00 ora_w002_sztech1
oracle 19888 1 0 18:43 ? 00:00:00 ora_p000_sztech1
oracle 19890 1 0 18:43 ? 00:00:00 ora_p001_sztech1
oracle 19892 1 0 18:43 ? 00:00:00 ora_p002_sztech1
oracle 19894 1 0 18:43 ? 00:00:00 ora_cjq0_sztech1
oracle 19896 1 0 18:43 ? 00:00:00 ora_p003_sztech1
oracle 20069 1 0 18:43 ? 00:00:00 ora_w003_sztech1
oracle 20103 1 0 18:43 ? 00:00:00 ora_m002_sztech1
oracle 20105 1 0 18:43 ? 00:00:00 ora_m003_sztech1
oracle 20124 1 0 18:43 ? 00:00:00 ora_w004_sztech1
oracle 20143 1 0 18:43 ? 00:00:00 ora_qm02_sztech1
oracle 20147 1 0 18:43 ? 00:00:00 ora_q002_sztech1
oracle 20149 1 0 18:43 ? 00:00:00 ora_q003_sztech1
oracle 20302 18122 0 18:44 ? 00:00:00 sleep 60
oracle 20520 17774 0 18:44 ? 00:00:00 sleep 30
oracle 20731 12457 0 18:45 pts/1 00:00:00 ps -ef
oracle 20732 12457 0 18:45 pts/1 00:00:00 grep --color=auto ora
[oracle@dbserver scripts]$ ps -ef|grep ora|wc -l
63
[oracle@dbserver scripts]$ lsnrctl
LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 13-APR-2018 18:45:55
Copyright (c) 1991, 2017, Oracle. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbserver)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 18.0.0.0.0 - Production
Start Date 13-APR-2018 18:28:39
Uptime 0 days 0 hr. 17 min. 16 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/18.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/dbserver/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbserver)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "sztech1" has 1 instance(s).
Instance "sztech1", status READY, has 1 handler(s) for this service...
Service "sztech1XDB" has 1 instance(s).
Instance "sztech1", status READY, has 1 handler(s) for this service...
The command completed successfully
至此,在rhel7.5 上的18c 安装成功.
作者: 郑全 时间: 2018-4-13 18:55
下面显示相关信息:
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
SQL> select banner from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
1* select comp_name,version,status from dba_registry
COMP_NAME VERSION STATUS
----------------------------------- ------------------------------ --------------------
Oracle Database Catalog Views 18.0.0.0.0 VALID
Oracle Database Packages and Types 18.0.0.0.0 VALID
Oracle Real Application Clusters 18.0.0.0.0 OPTION OFF
JServer JAVA Virtual Machine 18.0.0.0.0 VALID
Oracle XDK 18.0.0.0.0 VALID
Oracle Database Java Packages 18.0.0.0.0 VALID
OLAP Analytic Workspace 18.0.0.0.0 VALID
Oracle XML Database 18.0.0.0.0 VALID
Oracle Workspace Manager 18.0.0.0.0 VALID
Oracle Text 18.0.0.0.0 VALID
Oracle Multimedia 18.0.0.0.0 VALID
COMP_NAME VERSION STATUS
----------------------------------- ------------------------------ --------------------
Spatial 18.0.0.0.0 VALID
Oracle OLAP API 18.0.0.0.0 VALID
Oracle Label Security 18.0.0.0.0 VALID
Oracle Database Vault 18.0.0.0.0 VALID
15 rows selected.
作者: 郑全 时间: 2018-4-13 19:03
去掉口令到期时间:
alter profile default LIMIT PASSWORD_LIFE_TIME unlimited;
作者: 郑全 时间: 2018-4-13 19:42
本帖最后由 郑全 于 2018-4-13 19:48 编辑
加上em:
SQL> execute dbms_xdb_config.sethttpport(5501);
PL/SQL procedure successfully completed.
SQL> select dbms_xdb_config.gethttpport() from dual;
DBMS_XDB_CONFIG.GETHTTPPORT()
-----------------------------
5501
[oracle@dbserver ~]$ lsnrctl status
LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 13-APR-2018 19:33:36
Copyright (c) 1991, 2017, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbserver)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 18.0.0.0.0 - Production
Start Date 13-APR-2018 19:30:05
Uptime 0 days 0 hr. 3 min. 31 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/18.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/dbserver/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbserver)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbserver)(PORT=5501))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "sztech1" has 1 instance(s).
Instance "sztech1", status READY, has 1 handler(s) for this service...
Service "sztech1XDB" has 1 instance(s).
Instance "sztech1", status READY, has 1 handler(s) for this service...
The command completed successfully
测试windows进行访问,发现无法访问:
应该是防火墙没有添加端口:
这个可以参见前面的帖子:http://bbs.cqsztech.com/forum.ph ... 17630&highlight=18c
[root@dbserver ~]# firewall-cmd --list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: ens33
sources:
services: ssh dhcpv6-client
ports:
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
[root@dbserver ~]# firewall-cmd --permanent --add-port 1521/tcp
success
[root@dbserver ~]# firewall-cmd --permanent --add-port 5501/tcp
success
[root@dbserver ~]# firewall-cmd --reload
success
[root@dbserver ~]# firewall-cmd --list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: ens33
sources:
services: ssh dhcpv6-client
ports: 1521/tcp 5501/tcp
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
之后,远程可以进行sql连接,以及em的访问.
当然,你也可以简单的把防火墙关闭也行.
作者: 郑全 时间: 2018-4-13 19:46
无图无真相: