首页 文章 精选 留言 我的

精选列表

搜索[官方产品],共10012篇文章
优秀的个人博客,低调大师

CentOS6,CentOS7官方镜像安装Oracle11G

安装准备 1.操作系统 CentOS6或CentOS7 2.数据库版本 linux.x64_11gR2_database_1of2.zip linux.x64_11gR2_database_2of2.zip 3.下载Oracle11G 下载地址:https://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html 4.修改hosts文件 sh 复制代码 # 编辑hosts文件 vi /etc/hosts # 添加 10.0.0.206 work006 注意: 10.0.0.206为该电脑IP可用ip addr查看 work006为主机名 5.安装一些必要的软件 sh 复制代码 yum install wget unzip net-tools -y wget:下载用的 unzip:解压oracle安装文件 net-tools:查看本机网络情况 比如netstat 6.系统必须设置SWAP分区 安装 1.使用oracle提供的环境配置工具 CentOS7: sh 复制代码 wget http://public-yum.oracle.com/public-yum-ol7.repo -O /etc/yum.repos.d/public-yum-ol7.repo && wget http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol7 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle && yum install oracle-rdbms-server-11gR2-preinstall -y CentOS6: sh 复制代码 wget http://public-yum.oracle.com/public-yum-ol6.repo -O /etc/yum.repos.d/public-yum-ol6.repo && wget http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle && yum install oracle-rdbms-server-11gR2-preinstall -y 注意: 这个工具会调整内核参数,建立一些必要的linux用户&组 可能网络不好会安装不成功,多install一下 完成后备份一下这个目录的文件到其他目录(该文件夹是修改系统后日志和原本的内核配置备份) /var/log/oracle-rdbms-server-11gR2-preinstall 查看内核参数 sysctl -f 2.创建一些目录和配置 配置oracle系统配置文件 sh 复制代码 cat >> /etc/oraInst.loc <<EOF inventory_loc=/home/oracle/ora11g/oraInventory inst_group=oinstall EOF 授权 sh 复制代码 chmod 664 /etc/oraInst.loc 创建oracle安装的目录&授权 sh 复制代码 mkdir -p /data0/oracle/app/ && mkdir /data0/oracle/tmp/ && chown -R oracle:oinstall /data0/oracle/app/ && chmod -R 775 /data0/oracle/app/ && chmod a+wr /data0/oracle/tmp/ 3.设置oracle用户密码 sh 复制代码 passwd oracle 注意:oracle用户是安装工具自己创建的 4.切换到oracle用户 新开一个ssh窗口,以oracle用户登录 5.修改环境变量 打开文件 sh 复制代码 vi .bash_profile 在文件末尾添加 sh 复制代码 TMP=/data0/oracle/tmp TMPDIR=/data0/oracle/tmp export TMP TMPDIR ORACLE_BASE=/data0/oracle/app/oracle ORACLE_HOME=/data0/oracle/app/oracle/product/11.2.0/dbhome_1 ORACLE_SID=orcl PATH=$ORACLE_HOME/bin:$PATH export ORACLE_BASE ORACLE_SID ORACLE_HOME PATH 保存 sh 复制代码 :x 刷新配置文件 sh 复制代码 source .bash_profile 6.上传安装文件到/home/oracle目录并解压,然后授予权限 sh 复制代码 cd /home/oracle && unzip linux.x64_11gR2_database_1of2.zip && unzip linux.x64_11gR2_database_2of2.zip && chown -R oracle:oinstall /home/oracle/database 7.配置db_install.rsp 备份到/home/oracle/rsp/ sh 复制代码 cp -r /home/oracle/database/response /home/oracle/rsp 配置安装响应文件db_install.rsp文件,修改为以下内容 sh 复制代码 # 我的/home/oracle/rsp/db_install.rsp oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0 # INSTALL_DB_AND_CONFIG安装并自动配置数据库实例和监听 建议首次安装用这个 # 不然配置另外两个文件,新建实例和监听 oracle.install.option=INSTALL_DB_AND_CONFIG ORACLE_HOSTNAME=localhost UNIX_GROUP_NAME=oinstall INVENTORY_LOCATION=/home/oracle/ora11g/oraInventory SELECTED_LANGUAGES=zh_CN,en ORACLE_HOME=/data0/oracle/app/oracle/product/11.2.0/dbhome_1 ORACLE_BASE=/data0/oracle/app/oracle oracle.install.db.InstallEdition=EE oracle.install.db.isCustomInstall=true oracle.install.db.customComponents=oracle.server:11.2.0.1.0,oracle.sysman.ccr:10.2.7.0.0,oracle.xdk:11.2.0.1.0,oracle.rdbms.oci:11.2.0.1.0,oracle.network:11.2.0.1.0,oracle.network.listener:11.2.0.1.0,oracle.rdbms:11.2.0.1.0,oracle.options:11.2.0.1.0,oracle.rdbms.partitioning:11.2.0.1.0,oracle.oraolap:11.2.0.1.0,oracle.rdbms.dm:11.2.0.1.0,oracle.rdbms.dv:11.2.0.1.0,orcle.rdbms.lbac:11.2.0.1.0,oracle.rdbms.rat:11.2.0.1.0 oracle.install.db.DBA_GROUP=dba oracle.install.db.OPER_GROUP=oinstall oracle.install.db.config.starterdb.type=GENERAL_PURPOSE # 这个是服务名 oracle.install.db.config.starterdb.globalDBName=orcl # 实例sid oracle.install.db.config.starterdb.SID=orcl oracle.install.db.config.starterdb.characterSet=AL32UTF8 oracle.install.db.config.starterdb.memoryOption=true # 最小256M oracle.install.db.config.starterdb.memoryLimit=1024 # 是否安装学习的scott和hr(我就知道这两个) oracle.install.db.config.starterdb.installExampleSchemas=true oracle.install.db.config.starterdb.enableSecuritySettings=true # 密码全设置成oracle(安装时会提示,个人学习忽略) oracle.install.db.config.starterdb.password.ALL=OracleSys654321 oracle.install.db.config.starterdb.control=DB_CONTROL oracle.install.db.config.starterdb.dbcontrol.enableEmailNotification=false oracle.install.db.config.starterdb.automatedBackup.enable=false oracle.install.db.config.starterdb.storageType=FILE_SYSTEM_STORAGE oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=/data0/oracle/app/oracle/oradata # true DECLINE_SECURITY_UPDATES=true 8.安装oracle(安装过程出现警告忽略,不操作即可) sh 复制代码 /home/oracle/database/runInstaller -silent -ignorePrereq -responseFile /home/oracle/rsp/db_install.rsp 安装过程可以另开一个shell查看日志 sh 复制代码 tail -f /home/oracle/ora11g/oraInventory/logs/installActions2020-03-12_08-04-30PM.log installActions2020-03-12_08-04-30PM.log为屏幕上显示的日志文件 日志文件中看到Exit Status is 3即为安装完成 9.切换root用户执行脚本 sh 复制代码 /data0/oracle/app/oracle/product/11.2.0/dbhome_1/root.sh 10.切换oracle用户查看安装情况 sqlplus登录 sh 复制代码 sqlplus / as sysdba 查看状态 sh 复制代码 select status from v$instance; 11.切换root用户重启系统 sh 复制代码 reboot 12.配置防火墙并开放1521端口 CentOS6 打开文件 sh 复制代码 vi /etc/sysconfig/iptables 在( -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT ) 下添加 sh 复制代码 -A INPUT -m state --state NEW -m tcp -p tcp --dport 1521-j ACCEPT 保存并退出 sh 复制代码 :x 重启防火墙 sh 复制代码 service iptables restart CentOS7 sh 复制代码 firewall-cmd --add-port=1521/tcp --permanent && firewall-cmd --add-port=1521/tcp 13.修改监听文件 切换目录 sh 复制代码 cd /data0/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin 修改listener.ora和tnsnames.ora这两个文件把主机名换成本机IP即可 14.启动数据库 启动监听 sh 复制代码 lsnrctl start sqlplus登录 sh 复制代码 sqlplus / as sysdba 启动 sh 复制代码 startup 15.修改oracle服务启动配置 sh 复制代码 vi /etc/oratab 将 sh 复制代码 orcl:/data0/oracle/app/oracle/product/11.2.0/dbhome_1:N 改 sh 复制代码 orcl:/data0/oracle/app/oracle/product/11.2.0/dbhome_1:Y 16.外网连接数据库并测试 用户名:sys 密码:oracle 服务名:orcl 角色:SYSDBA 17.常用命令 sh 复制代码 # oracle用户下启动|关闭数据库 # 启动 dbstart $ORACLE_HOME # 关闭 dbshut $ORACLE_HOME # oracle用户下启动|关闭数据库监听 # 启动 lsnrctl start # 关闭 lsnrctl stop # sqlplus下启动|关闭数据库 # sqlplus登录 sqlplus / as sysdba # 启动 startup # 关闭 shutdown 18.切换root配置oracle服务为开机自启 编辑文件 sh 复制代码 vi /etc/rc.local 添加命令 sh 复制代码 su - oracle -c 'dbstart $ORACLE_HOME' 修改权限 sh 复制代码 chmod a+x /etc/rc.local 19.清除安装文件 /home/oracle目录下的安装oracle的文件均可清除(慎用下面那个命令) sh 复制代码 rm -rf /home/oracle/* 20.修改oracle端口(11015) 停止监听 sh 复制代码 lsnrctl stop 修改端口 sh 复制代码 cd /data0/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin 修改listener.ora和tnsnames.ora这两个文件把端口1521修改成11015即可 查看参数 sqlplus登录 sh 复制代码 sqlplus / as sysdba 查看 sh 复制代码 show parameter local_listener 若为第一次修改VALUE为空 sh 复制代码 alter system set local_listener="(address = (protocol = tcp)(host = izuf68yfs65r3cmglfxf2pz)(port = 11015))"; 注意: izuf68yfs65r3cmglfxf2pz为主机名 11015为端口 启动监听 sh 复制代码 lsnrctl start 查看监听 sh 复制代码 netstat -an|grep 11015

优秀的个人博客,低调大师

官方文档 Upgrading Elasticsearch

Upgrading Elasticsearch Before upgrading Elasticsearch: Consult thebreaking changesdocs. Use theElasticsearch Migration Pluginto detect potential issues before upgrading. Test upgrades in a dev environment before upgrading your production cluster. Alwaysback up your databefore upgrading. Youcannot roll backto an earlier version unless you have a backup of your data. If you are using custom plugins, check that a compatible version is available. Elasticsearch can usually be upgraded using a rolling upgrade process, resulting in no interruption of service. This section details how to perform both rolling upgrades and upgrades with full cluster restarts. To determine whether a rolling upgrade is supported for your release, please consult this table: Upgrade From Upgrade To Supported Upgrade Type 1.x 5.x Reindex to upgrade 2.x 2.y Rolling upgrade(wherey > x) 2.x 5.x Full cluster restart 5.0.0 pre GA 5.x Full cluster restart 5.x 5.y Rolling upgrade(wherey > x) Indices created in Elasticsearch 1.x or before Elasticsearch is able to read indices created in theprevious major version only. For instance, Elasticsearch 5.x can use indices created in Elasticsearch 2.x, but not those created in Elasticsearch 1.x or before. This condition also applies to indices backed up withsnapshot and restore. If an index was originally created in 1.x, it cannot be restored into a 5.x cluster even if the snapshot was made by a 2.x cluster. Elasticsearch 5.x nodes will fail to start in the presence of too old indices. SeeReindex to upgradefor more information about how to upgrade old indices. !!!回滚升级就是一次升级一个节点!!!! A rolling upgrade allows the Elasticsearch cluster to be upgraded one node at a time, with no downtime for end users. Running multiple versions of Elasticsearch in the same cluster for any length of time beyond that required for an upgrade is not supported, as shards will not be replicated from the more recent version to the older version. Reindex to upgrade Elasticsearch is able to use indices created in the previous major version only. For instance, Elasticsearch 5.x can use indices created in Elasticsearch 2.x, but not those created in Elasticsearch 1.x or before. Elasticsearch 5.x nodes will fail to start in the presence of too old indices. If you are running an Elasticsearch 2.x cluster which contains indices that were created before 2.x, you will either need to delete those old indices or to reindex them before upgrading to 5.x. SeeReindex in place. If you are running an Elasticsearch 1.x cluster, you have two options: First upgrade to Elasticsearch 2.4.x, reindex the old indices, then upgrade to 5.x. SeeReindex in place. Create a new 5.x cluster and use reindex-from-remote to import indices directly from the 1.x cluster. SeeUpgrading with reindex-from-remote. Reindex in place The easiest way to reindex old (1.x) indices in place is to use theElasticsearch Migration Plugin. You will need to upgrade to Elasticsearch 2.3.x or 2.4.x first. Upgrading with reindex-from-remote If you are running a 1.x cluster and would like to migrate directly to 5.x without first migrating to 2.x, you can do so usingreindex-from-remote. 转自:https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-upgrade.html#setup-upgrade 本文转自张昺华-sky博客园博客,原文链接:http://www.cnblogs.com/bonelee/p/7443844.html,如需转载请自行联系原作者

资源下载

更多资源
Mario

Mario

马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

Rocky Linux

Rocky Linux

Rocky Linux(中文名:洛基)是由Gregory Kurtzer于2020年12月发起的企业级Linux发行版,作为CentOS稳定版停止维护后与RHEL(Red Hat Enterprise Linux)完全兼容的开源替代方案,由社区拥有并管理,支持x86_64、aarch64等架构。其通过重新编译RHEL源代码提供长期稳定性,采用模块化包装和SELinux安全架构,默认包含GNOME桌面环境及XFS文件系统,支持十年生命周期更新。

WebStorm

WebStorm

WebStorm 是jetbrains公司旗下一款JavaScript 开发工具。目前已经被广大中国JS开发者誉为“Web前端开发神器”、“最强大的HTML5编辑器”、“最智能的JavaScript IDE”等。与IntelliJ IDEA同源,继承了IntelliJ IDEA强大的JS部分的功能。

用户登录
用户注册