准备工作: centos7系统正常工作且已经联网。 centos7有图形界面,因为后续安装有需要图形界面操作 oracle11g安装包下载完成(下载资源网址http://www.oracle.com/technetwork/cn/database/enterprise-edition/downloads/112010-linuxsoft-098940-zhs.html)
准备工作:
centos7系统正常工作且已经联网。
centos7有图形界面,因为后续安装有需要图形界面操作
oracle11g安装包下载完成(下载资源网址http://www.oracle.com/technetwork/cn/database/enterprise-edition/downloads/112010-linuxsoft-098940-zhs.html)
安装步骤:
1. 安装oracle11g之前,先要安装centos几个系统包
compat-libstdc++-33.i686
elfutils-libelf-devel.i686
libstdc++-devel.i686
gcc-c++.i686
libaio-devel.i686
unixODBC.i686
unixODBC-devel.i686
安装方法: 联网状态下,使用yum命令。
yum search 包名 // 搜索镜像站点的资源,看是否有该包。 不同系统可能包名名称多少有点差距,所以执行该步就是为了让不同系统的用户浏览本文档时,找到自己相对应的包,一般包名核心名称不会变,只是后面会加些版本号之类的。
yum install 包名 // 安装上述包, 一个一个挨个安装。 最好search一个包,找到对应包名,然后install该包
没网状态下,只能想办法从其它机器上下载这些包,再回来解压安装。
2. oracle必须有单独的linux用户去管理,所以必须新建用户
第一步: root用户登录
第二步: groupadd dba
groupadd oinstall //添加dba用户组 和oinstall用户组
第三步: useradd oracle -d /home/oracle -g oinstall -G dba -m //创建用户oracle , 创建该用户的主文件夹/home/oracle , 设置该用户的初始用户组 oinstall,次要用户组 dba。-m 是强制创建用户主文件夹的意思,可写可不写。
passwd oracle // 为oracle用户设置密码
第四步: 预先创建安装目录
mkdir -p /opt/oracle/product
mkdir -p /opt/oracle/product/11.2.0
mkdir -p /opt/oraInventory
mkdir -p /opt/oracle/oradata
设置目录的所有者所属组和权限
chown -R oracle.oinstall /opt/oracle //设置/opt/oracle的所有者为oracle 用户组为oinstall
chown -R oracle.oinstall /opt/oracle /oradata
chown -R oracle.oinstall /opt/oracle/product/11.2.0
chown -R oracle.dba /opt/oraInventory
chown oracle.dba /opt/oracle
第五步: 设置环境变量
(1) su - oracle // 切换到oracle用户
(2) cd //进去主文件夹目录下
(3) vim .bash_profile // 打开环境变量设置文件
(4) 添加 如下环境变量
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0
export ORACLE_OWNER=oracle
export ORACLE_SID=orcl
export PATH=$PATH:$HOME/bin:.:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
export NLS_LANG="SIMPLIFIED CHINESE_CHINA.AL32UTF8"
注:添加之前, 默认环境变量中会有PATH环境变量,切记将其注释掉
#PATH=$PATH:$HOME/.local/bin:$HOME/bin
#export PATH
保存并退出
(5) . .bash_profile // 使.bash_profile文件立即生效
3. 上传oracle11g文件到oracle用户主文件夹下,并安装
第一步: 检查是否是oracle用户登录 (whoami命令)
第二步: mkdir /home/oracle/oraclesetup // 创建oraclesetup 文件夹
第三步: 将oracle11g文件传到oraclesetup 文件夹, 并解压
unzip linux_11gR2_database_1of2.zip
unzip linux_11gR2_database_2of2.zip
生成database文件夹
第四步: chmod +x install/.oui
chmod +x install/unzip
chmod +x runInstaller //确定这三个文件有执行权限,有了可以不执行该三个命令
第五步: oracle账户登录图形界面, 右击鼠标右键,打开一个命令端口(是图形界面中打开一个命令端口);
进入database目录
一般有如下文件说明上述步骤基本执行正确
第六步: 将该终端的语系设置成英文的,否则一会打开oracle图形安装界面会出现乱码
export LANG=en_US.UTF8
第七步: 执行runInstaller界面
(1)runInstaller
出现图形安装界面
Email不用填, 下面勾选框取消勾选,下一步
(2)
选择 创建和配置数据库 选项, 下一步
(3) 选择 desktop class版(学习用)
(4)
注意字符集(character set)配置为unicode(AL32UTF8), 创建用户密码(需要数字,字母大小写结合), 其余默认就行,下一步
(5) "Prerequisite Checks", 默认,下一步,出现界面,勾选“ignore all”,下一步
(6) "summary"默认, 点击“finish”
然后慢慢等待解压安装
途中有可能会出现如下报错: Error in invoking target 'agent nmhs' of makefile,解决方法如下
之后, “retry”,当看到如下界面便ok了
4. 配置监听程序
第一步: 重新在图形界面打开一个命令端口,输入netca, 出现如下窗口, 选择“Listener configuration”
如果netca后,命令行端口提示无此命令,则oracle用户退出, 再次重新登录图形界面,打开命令行界面,设置语系
export LANG=en_US.UTF-8
执行netca
第二步:按如下步骤进行
yes
默认
5. 配置另一监听器
填入你的主机IP
最终finish
6. 测试
oracle登录文字界面,测试
成功!!!

InnoDBBufferPool reduces disk I/O by caching data and indexing pages, improving database performance. Its working principle includes: 1. Data reading: Read data from BufferPool; 2. Data writing: After modifying the data, write to BufferPool and refresh it to disk regularly; 3. Cache management: Use the LRU algorithm to manage cache pages; 4. Reading mechanism: Load adjacent data pages in advance. By sizing the BufferPool and using multiple instances, database performance can be optimized.

Compared with other programming languages, MySQL is mainly used to store and manage data, while other languages such as Python, Java, and C are used for logical processing and application development. MySQL is known for its high performance, scalability and cross-platform support, suitable for data management needs, while other languages have advantages in their respective fields such as data analytics, enterprise applications, and system programming.

MySQL is worth learning because it is a powerful open source database management system suitable for data storage, management and analysis. 1) MySQL is a relational database that uses SQL to operate data and is suitable for structured data management. 2) The SQL language is the key to interacting with MySQL and supports CRUD operations. 3) The working principle of MySQL includes client/server architecture, storage engine and query optimizer. 4) Basic usage includes creating databases and tables, and advanced usage involves joining tables using JOIN. 5) Common errors include syntax errors and permission issues, and debugging skills include checking syntax and using EXPLAIN commands. 6) Performance optimization involves the use of indexes, optimization of SQL statements and regular maintenance of databases.

MySQL is suitable for beginners to learn database skills. 1. Install MySQL server and client tools. 2. Understand basic SQL queries, such as SELECT. 3. Master data operations: create tables, insert, update, and delete data. 4. Learn advanced skills: subquery and window functions. 5. Debugging and optimization: Check syntax, use indexes, avoid SELECT*, and use LIMIT.

MySQL efficiently manages structured data through table structure and SQL query, and implements inter-table relationships through foreign keys. 1. Define the data format and type when creating a table. 2. Use foreign keys to establish relationships between tables. 3. Improve performance through indexing and query optimization. 4. Regularly backup and monitor databases to ensure data security and performance optimization.

MySQL is an open source relational database management system that is widely used in Web development. Its key features include: 1. Supports multiple storage engines, such as InnoDB and MyISAM, suitable for different scenarios; 2. Provides master-slave replication functions to facilitate load balancing and data backup; 3. Improve query efficiency through query optimization and index use.

SQL is used to interact with MySQL database to realize data addition, deletion, modification, inspection and database design. 1) SQL performs data operations through SELECT, INSERT, UPDATE, DELETE statements; 2) Use CREATE, ALTER, DROP statements for database design and management; 3) Complex queries and data analysis are implemented through SQL to improve business decision-making efficiency.

The basic operations of MySQL include creating databases, tables, and using SQL to perform CRUD operations on data. 1. Create a database: CREATEDATABASEmy_first_db; 2. Create a table: CREATETABLEbooks(idINTAUTO_INCREMENTPRIMARYKEY, titleVARCHAR(100)NOTNULL, authorVARCHAR(100)NOTNULL, published_yearINT); 3. Insert data: INSERTINTObooks(title, author, published_year)VA


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

Dreamweaver Mac version
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SublimeText3 Mac version
God-level code editing software (SublimeText3)