最重要的是,下载并安装 Oracle 11g 数据库软件安装所需的多个软件包,同时解决软件包之间的依赖关系。请注意,经过 Oracle 验证的 RPM 软件包
最重要的是,下载并安装 Oracle 11g 数据库软件安装所需的多个软件包,同时解决软件包之间的依赖关系请注意,经过 Oracle 验证的 RPM 包可通过 Oracle Unbreakable Linux Network (ULN) 访问,这需要支持合同或从 Oracle 公共 yum 存储库访问。
首先,我们需要将 Linux 计算机配置为能够使用公司代理连接到互联网,我们通过编辑 /etc/profile.d/proxy.sh 文件以及一些环境变量(如 FTP_PROXY)来完成此操作和 HTTP_PROXY
导出 http_proxy=http://test-apache-001-dev.corporateict.domain:8123/
导出 ftp_proxy=http://test-apache-001-dev.corporateict.domain:8123/
导出 no_proxy=.corporateict.domain
导出 HTTP_PROXY=http://test-apache-001-dev.corporateict.domain:8123/
导出 FTP_PROXY=http://test-apache-001-dev.corporateict.domain:8123/
再次以 root 身份登录以调用对环境所做的更改。
然后,我们使用 wget 下载包含存储库位置的文件
[root@kens-orasql-001 yum.repos.d]# wget http://public-yum.oracle.com/public-yum-el5.repo
我们必须更新此文件,并将适用于我们的 Linux 版本的标记的启用=0 行更改为启用=1 – 在我们的例子中,我们使用的是 OEL 5.7,因此我们必须更新这些行:
改变
[ol5_u7_base]
name=Oracle Linux $releasever – U7 – $basearch – base
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/7/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
启用=0
到
[ol5_u7_base]
name=Oracle Linux $releasever – U7 – $basearch – base
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/7/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
启用=1
然后我们运行 yum update,然后运行 yum install oracle-validated
[root@kens-orasql-002 yum.repos.d]# <strong>yum update</strong> Loaded plugins: rhnplugin, security This system is not registered with ULN. ULN support will be disabled. ol5_u7_base | 1.1 kB 00:00 ol5_u7_base/primary | 1.5 MB 00:07 ol5_u7_base 4605/4605 Skipping security plugin, no data Setting up Update Process No Packages marked for Update
[root@kens-orasql-002 yum.repos.d]# <strong>yum install oracle-validated</strong> Loaded plugins: rhnplugin, security This system is not registered with ULN. ULN support will be disabled. Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package oracle-validated.x86_64 0:1.1.0-14.el5 set to be updated --> Processing Dependency: kernel-uek >= 2.6.32 for package: oracle-validated --> Processing Dependency: libXp.so.6 for package: oracle-validated --> Processing Dependency: /usr/lib/libodbccr.so for package: oracle-validated --> Processing Dependency: /usr/lib64/libodbccr.so for package: oracle-validated --> Processing Dependency: unixODBC-devel for package: oracle-validated --> Processing Dependency: libaio-devel for package: oracle-validated --> Processing Dependency: sysstat for package: oracle-validated --> Processing Dependency: /usr/lib64/libaio.so for package: oracle-validated --> Processing Dependency: /usr/lib/libodbc.so.1 for package: oracle-validated --> Processing Dependency: /usr/lib/libaio.so for package: oracle-validated --> Processing Dependency: compat-gcc-34-c++ for package: oracle-validated --> Processing Dependency: compat-gcc-34 for package: oracle-validated --> Processing Dependency: libdb-4.2.so()(64bit) for package: oracle-validated --> Processing Dependency: libodbc.so.1()(64bit) for package: oracle-validated --> Running transaction check ---> Package compat-db.x86_64 0:4.2.52-5.1 set to be updated ---> Package compat-gcc-34.x86_64 0:3.4.6-4.1 set to be updated ---> Package compat-gcc-34-c++.x86_64 0:3.4.6-4.1 set to be updated ---> Package kernel-uek.x86_64 0:2.6.32-200.13.1.el5uek set to be installed --> Processing Dependency: kernel-firmware >= 2.6.32-200.13.1.el5uek for package: kernel-uek ---> Package libXp.i386 0:1.0.0-8.1.el5 set to be updated ---> Package libaio-devel.i386 0:0.3.106-5 set to be updated ---> Package libaio-devel.x86_64 0:0.3.106-5 set to be updated ---> Package sysstat.x86_64 0:7.0.2-11.el5 set to be updated ---> Package unixODBC.i386 0:2.2.11-7.1 set to be updated ---> Package unixODBC.x86_64 0:2.2.11-7.1 set to be updated ---> Package unixODBC-devel.i386 0:2.2.11-7.1 set to be updated ---> Package unixODBC-devel.x86_64 0:2.2.11-7.1 set to be updated --> Running transaction check ---> Package kernel-uek-firmware.noarch 0:2.6.32-200.13.1.el5uek set to be updated --> Finished Dependency Resolution Dependencies Resolved ====================================================================================================================================================================== Package Arch Version Repository Size ====================================================================================================================================================================== Installing: oracle-validated x86_64 1.1.0-14.el5 ol5_u7_base 24 k Installing for dependencies: compat-db x86_64 4.2.52-5.1 ol5_u7_base 1.6 M compat-gcc-34 x86_64 3.4.6-4.1 ol5_u7_base 4.3 M compat-gcc-34-c++ x86_64 3.4.6-4.1 ol5_u7_base 13 M kernel-uek x86_64 2.6.32-200.13.1.el5uek ol5_u7_base 25 M kernel-uek-firmware noarch 2.6.32-200.13.1.el5uek ol5_u7_base 2.5 M libXp i386 1.0.0-8.1.el5 ol5_u7_base 22 k libaio-devel i386 0.3.106-5 ol5_u7_base 12 k libaio-devel x86_64 0.3.106-5 ol5_u7_base 11 k sysstat x86_64 7.0.2-11.el5 ol5_u7_base 187 k unixODBC i386 2.2.11-7.1 ol5_u7_base 830 k unixODBC x86_64 2.2.11-7.1 ol5_u7_base 835 k unixODBC-devel i386 2.2.11-7.1 ol5_u7_base 743 k unixODBC-devel x86_64 2.2.11-7.1 ol5_u7_base 799 k Transaction Summary ====================================================================================================================================================================== Install 14 Package(s) Upgrade 0 Package(s) Total size: 50 M Is this ok [y/N]: y Downloading Packages: warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 1e5e0159 ol5_u7_base/gpgkey | 1.4 kB 00:00 Importing GPG key 0x1E5E0159 "Oracle OSS group (Open Source Software group) " from http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5 Is this ok [y/N]: y Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : unixODBC 1/14 Installing : compat-gcc-34 2/14 Installing : sysstat 3/14 Installing : compat-db 4/14 Installing : unixODBC 5/14 Installing : unixODBC-devel 6/14 Installing : unixODBC-devel 7/14 Installing : libaio-devel 8/14 Installing : libaio-devel 9/14 Installing : kernel-uek-firmware 10/14 Installing : libXp 11/14 Installing : compat-gcc-34-c++ 12/14 Change references of /dev/hd in /etc/fstab to disk label Installing : kernel-uek 13/14 WARNING: No module ehci-hcd found for kernel 2.6.32-200.13.1.el5uek, continuing anyway WARNING: No module ohci-hcd found for kernel 2.6.32-200.13.1.el5uek, continuing anyway WARNING: No module uhci-hcd found for kernel 2.6.32-200.13.1.el5uek, continuing anyway Installing : oracle-validated 14/14 Installed: oracle-validated.x86_64 0:1.1.0-14.el5 Dependency Installed: compat-db.x86_64 0:4.2.52-5.1 compat-gcc-34.x86_64 0:3.4.6-4.1 compat-gcc-34-c++.x86_64 0:3.4.6-4.1 kernel-uek.x86_64 0:2.6.32-200.13.1.el5uek kernel-uek-firmware.noarch 0:2.6.32-200.13.1.el5uek libXp.i386 0:1.0.0-8.1.el5 libaio-devel.i386 0:0.3.106-5 libaio-devel.x86_64 0:0.3.106-5 sysstat.x86_64 0:7.0.2-11.el5 unixODBC.i386 0:2.2.11-7.1 unixODBC.x86_64 0:2.2.11-7.1 unixODBC-devel.i386 0:2.2.11-7.1 unixODBC-devel.x86_64 0:2.2.11-7.1 Complete! [root@kens-orasql-002 yum.repos.d]#
我们可以看到oracle验证的RPM已经安装了。
[root@kens-orasql-001 yum.repos.d]# <strong>rpm -qa |grep oracle-valid</strong> oracle-validated-1.1.0-14.el5
我们还可以检查并查看用户和组是否也已创建。
[root@kens-orasql-001 yum.repos.d]# <strong>cat /etc/passwd |grep oracle</strong> oracle:x:54321:54321::/home/oracle:/bin/bash [root@kens-orasql-001 yum.repos.d]# <strong>cat /etc/group |grep dba </strong> dba:x:54322:oracle
它还更新了 /etc/security/limits.conf 文件
[root@kens-orasql-001 yum.repos.d]# cat /etc/security/limits.conf # Oracle-Validated setting for nofile soft limit is 131072 oracle soft nofile 131072 # Oracle-Validated setting for nofile hard limit is 131072 oracle hard nofile 131072 # Oracle-Validated setting for nproc soft limit is 131072 oracle soft nproc 131072 # Oracle-Validated setting for nproc hard limit is 131072 oracle hard nproc 131072 # Oracle-Validated setting for core soft limit is unlimited oracle soft core unlimited # Oracle-Validated setting for core hard limit is unlimited oracle hard core unlimited # Oracle-Validated setting for memlock soft limit is 50000000 oracle soft memlock 50000000 # Oracle-Validated setting for memlock hard limit is 50000000 oracle hard memlock 50000000
最后,我们可以看到 /etc/sysctl.conf 也已更新,并添加了一些“Oracle-Validated”设置。
# For 11g, Oracle-Validated setting for fs.file-max is 6815744 # For 10g, uncomment 'fs.file-max = 327679', and comment 'fs.file-max = 6553600' entry and re-run sysctl -p # fs.file-max = 327679 fs.file-max = 6815744 # Oracle-Validated setting for kernel.msgmni is 2878 kernel.msgmni = 2878 # Oracle-Validated setting for kernel.msgmax is 8192 kernel.msgmax = 8192 # Oracle-Validated setting for kernel.msgmnb is 65536 kernel.msgmnb = 65536 # Oracle-Validated setting for kernel.sem is '250 32000 100 142' kernel.sem = 250 32000 100 142 # Oracle-Validated setting for kernel.shmmni is 4096 kernel.shmmni = 4096 # Oracle-Validated setting for kernel.shmall is 1073741824 kernel.shmall = 1073741824 # Oracle-Validated setting for kernel.shmmax is 4398046511104 on x86_64 and 4294967295 on i386 architecture. Refer Note id 567506.1 kernel.shmmax = 4398046511104 # Oracle-Validated setting for kernel.sysrq is 1 kernel.sysrq = 1 # Oracle-Validated setting for net.core.rmem_default is 262144 net.core.rmem_default = 262144 # For 11g, Oracle-Validated setting for net.core.rmem_max is 4194304 # For 10g, uncomment 'net.core.rmem_max = 2097152', comment 'net.core.rmem_max = 4194304' entry and re-run sysctl -p # net.core.rmem_max = 2097152 net.core.rmem_max = 4194304 # Oracle-Validated setting for net.core.wmem_default is 262144 net.core.wmem_default = 262144 # For 11g, Oracle-Validated setting for net.core.wmem_max is 1048576 # For 10g, uncomment 'net.core.wmem_max = 262144', comment 'net.core.wmem_max = 1048576' entry for this parameter and re-run sysctl -p # net.core.wmem_max = 262144 net.core.wmem_max = 1048576 # Oracle-Validated setting for fs.aio-max-nr is 3145728 fs.aio-max-nr = 3145728 # For 11g, Oracle-Validated setting for net.ipv4.ip_local_port_range is 9000 65500 # For 10g, uncomment 'net.ipv4.ip_local_port_range = 1024 65000', comment 'net.ipv4.ip_local_port_range = 9000 65500' entry and re-run sysctl -p # net.ipv4.ip_local_port_range = 1024 65000 net.ipv4.ip_local_port_range = 9000 65500 # Oracle-Validated setting for vm.min_free_kbytes is 51200 to avoid OOM killer vm.min_free_kbytes = 51200

MySQL索引基数对查询性能有显着影响:1.高基数索引能更有效地缩小数据范围,提高查询效率;2.低基数索引可能导致全表扫描,降低查询性能;3.在联合索引中,应将高基数列放在前面以优化查询。

MySQL学习路径包括基础知识、核心概念、使用示例和优化技巧。1)了解表、行、列、SQL查询等基础概念。2)学习MySQL的定义、工作原理和优势。3)掌握基本CRUD操作和高级用法,如索引和存储过程。4)熟悉常见错误调试和性能优化建议,如合理使用索引和优化查询。通过这些步骤,你将全面掌握MySQL的使用和优化。

MySQL在现实世界的应用包括基础数据库设计和复杂查询优化。1)基本用法:用于存储和管理用户数据,如插入、查询、更新和删除用户信息。2)高级用法:处理复杂业务逻辑,如电子商务平台的订单和库存管理。3)性能优化:通过合理使用索引、分区表和查询缓存来提升性能。

MySQL中的SQL命令可以分为DDL、DML、DQL、DCL等类别,用于创建、修改、删除数据库和表,插入、更新、删除数据,以及执行复杂的查询操作。1.基本用法包括CREATETABLE创建表、INSERTINTO插入数据和SELECT查询数据。2.高级用法涉及JOIN进行表联接、子查询和GROUPBY进行数据聚合。3.常见错误如语法错误、数据类型不匹配和权限问题可以通过语法检查、数据类型转换和权限管理来调试。4.性能优化建议包括使用索引、避免全表扫描、优化JOIN操作和使用事务来保证数据一致性

InnoDB通过undolog实现原子性,通过锁机制和MVCC实现一致性和隔离性,通过redolog实现持久性。1)原子性:使用undolog记录原始数据,确保事务可回滚。2)一致性:通过行级锁和MVCC确保数据一致。3)隔离性:支持多种隔离级别,默认使用REPEATABLEREAD。4)持久性:使用redolog记录修改,确保数据持久保存。

MySQL在数据库和编程中的地位非常重要,它是一个开源的关系型数据库管理系统,广泛应用于各种应用场景。1)MySQL提供高效的数据存储、组织和检索功能,支持Web、移动和企业级系统。2)它使用客户端-服务器架构,支持多种存储引擎和索引优化。3)基本用法包括创建表和插入数据,高级用法涉及多表JOIN和复杂查询。4)常见问题如SQL语法错误和性能问题可以通过EXPLAIN命令和慢查询日志调试。5)性能优化方法包括合理使用索引、优化查询和使用缓存,最佳实践包括使用事务和PreparedStatemen

MySQL适合小型和大型企业。1)小型企业可使用MySQL进行基本数据管理,如存储客户信息。2)大型企业可利用MySQL处理海量数据和复杂业务逻辑,优化查询性能和事务处理。

InnoDB通过Next-KeyLocking机制有效防止幻读。1)Next-KeyLocking结合行锁和间隙锁,锁定记录及其间隙,防止新记录插入。2)在实际应用中,通过优化查询和调整隔离级别,可以减少锁竞争,提高并发性能。


热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

DVWA
Damn Vulnerable Web App (DVWA) 是一个PHP/MySQL的Web应用程序,非常容易受到攻击。它的主要目标是成为安全专业人员在合法环境中测试自己的技能和工具的辅助工具,帮助Web开发人员更好地理解保护Web应用程序的过程,并帮助教师/学生在课堂环境中教授/学习Web应用程序安全。DVWA的目标是通过简单直接的界面练习一些最常见的Web漏洞,难度各不相同。请注意,该软件中

WebStorm Mac版
好用的JavaScript开发工具

VSCode Windows 64位 下载
微软推出的免费、功能强大的一款IDE编辑器

mPDF
mPDF是一个PHP库,可以从UTF-8编码的HTML生成PDF文件。原作者Ian Back编写mPDF以从他的网站上“即时”输出PDF文件,并处理不同的语言。与原始脚本如HTML2FPDF相比,它的速度较慢,并且在使用Unicode字体时生成的文件较大,但支持CSS样式等,并进行了大量增强。支持几乎所有语言,包括RTL(阿拉伯语和希伯来语)和CJK(中日韩)。支持嵌套的块级元素(如P、DIV),

PhpStorm Mac 版本
最新(2018.2.1 )专业的PHP集成开发工具