CentOS 6.4上安装 Oracle 11g R2图文教程
“//”后是注释,“#”代表root用户下操作,“$”代表Oracle用户下操作。
#chkconfig iptables off //永久关闭防火墙或
#service iptabels stop //暂时关闭防火墙,重启系统后会自动打开
1.硬件检查:
1.1 内存要求:内存大于1G(使用虚拟机安装时内存要稍微大一些,否则安装检查不通过)
#cat /proc/meminfo //查看内存大小
1.2 交换分区要求:交换分区是内存的1.5倍,可根据实际情况调整
#grep SwapTotal /proc/meminfo //查看交换分区大小
1.3 硬盘空间要求硬盘空间要满足所需软件的大小,要求/tmp 分区不少于 400M ,安装目录应大于4G:
#df –h //查看磁盘空间使用情况
#du –ch //查看目录空间大小
2.软件检查: 2.1 检查安装oracle所依赖的组件包是否安装上:
#rpm–qa |grep 软件包名称 //检查软件包是否安装上
1.binutils-2.17.50.0.6
2.compat-libstdc++-33-3.2.3
3.elfutils-libelf-0.125
4.elfutils-libelf-devel-0.125
5.elfutils-libelf-devel-static-0.125
6.gcc-4.1.2
7.gcc-c++-4.1.2
8.glibc-2.5-24
9.glibc-common-2.5
10.glibc-devel-2.5
11.glibc-headers-2.5
12.kernel-headers-2.6.18
13.pdksh-5.2.14
14.libaio-0.3.106
15.libaio-devel-0.3.106
16.libgcc-4.1.2
17.libgomp-4.1.2
18.libstdc++-4.1.2
19.libstdc++-devel-4.1.2
20.make-3.81
21.numactl-devel-0.9.8.i386
22.sysstat-7.0.2
23.unixODBC-2.2.11
24.unixODBC-devel-2.2.11
2.2 安装缺少的软件包:
#rpm –ivh 软件包名称 //使用本地光盘镜像安装软件包
#yum install 软件包名称 //使用yum联网安装
3.配置系统环境 3.1修改内核参数:
#vi /etc/sysctl.conf
fs.file-max= 6815744
fs.aio-max-nr=1048576
net.ipv4.ip_local_port_range= 9000 65500
net.core.rmem_default= 262144
net.core.rmem_max= 4194304
net.core.wmem_default= 262144
net.core.wmem_max= 1048576
kernel.sem= 250 32000 100 128
kernel.shmall= 2097152(可以按照系统默认,不修改)
kernel.shmmax= 536870912(可以按照系统默认,不修改)
#sysctl –p //让内核参数生效
3.2修改进程数和最大会话数
#vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
3.3关联设置
#vi /etc/pam.d/login
session required pam_limits.so
3.4修改/etc/profile
#vi /etc/profile
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
4.创建安装用户、组和目录 4.1创建安装用户和组
#groupadd oinstall //创建oinstall组
#groupadd dba //创建dba组
#useradd -g oinstall -G dba oracle //新建用户oracle,设定其主组为oinstall,副组为dba
#id oracle //检查结果
#passwd oracle //设置oracle用户密码
4.2创建软件安装目
#mkdir -p /home/oracle_11/app/ //创建安装根目录
#chown -R oracle:oinstall /home/oracle_11/ //安装根目录所属用户和组为oracle用户和oinstall组
#chmod -R 755 /home/oracle_11/ //修改目录的访问权限为所属用户完全控制,所属组和其他用户可读和执行
4.3设置用户环境变量
#vi /home/oracle/.bash_profile
exportORACLE_BASE=/home/oracle_11/app //软件安装基目录
exportORACLE_SID=orcl //实例名
exportORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1 //软件安装产品目录
exportPATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
#source /home/oracle/.bash_profile //加载文件使配置生效
#env|more //查看配置的环境变量是否正确

The main role of MySQL in web applications is to store and manage data. 1.MySQL efficiently processes user information, product catalogs, transaction records and other data. 2. Through SQL query, developers can extract information from the database to generate dynamic content. 3.MySQL works based on the client-server model to ensure acceptable query speed.

The steps to build a MySQL database include: 1. Create a database and table, 2. Insert data, and 3. Conduct queries. First, use the CREATEDATABASE and CREATETABLE statements to create the database and table, then use the INSERTINTO statement to insert the data, and finally use the SELECT statement to query the data.

MySQL is suitable for beginners because it is easy to use and powerful. 1.MySQL is a relational database, and uses SQL for CRUD operations. 2. It is simple to install and requires the root user password to be configured. 3. Use INSERT, UPDATE, DELETE, and SELECT to perform data operations. 4. ORDERBY, WHERE and JOIN can be used for complex queries. 5. Debugging requires checking the syntax and use EXPLAIN to analyze the query. 6. Optimization suggestions include using indexes, choosing the right data type and good programming habits.

MySQL is suitable for beginners because: 1) easy to install and configure, 2) rich learning resources, 3) intuitive SQL syntax, 4) powerful tool support. Nevertheless, beginners need to overcome challenges such as database design, query optimization, security management, and data backup.

Yes,SQLisaprogramminglanguagespecializedfordatamanagement.1)It'sdeclarative,focusingonwhattoachieveratherthanhow.2)SQLisessentialforquerying,inserting,updating,anddeletingdatainrelationaldatabases.3)Whileuser-friendly,itrequiresoptimizationtoavoidper

ACID attributes include atomicity, consistency, isolation and durability, and are the cornerstone of database design. 1. Atomicity ensures that the transaction is either completely successful or completely failed. 2. Consistency ensures that the database remains consistent before and after a transaction. 3. Isolation ensures that transactions do not interfere with each other. 4. Persistence ensures that data is permanently saved after transaction submission.

MySQL is not only a database management system (DBMS) but also closely related to programming languages. 1) As a DBMS, MySQL is used to store, organize and retrieve data, and optimizing indexes can improve query performance. 2) Combining SQL with programming languages, embedded in Python, using ORM tools such as SQLAlchemy can simplify operations. 3) Performance optimization includes indexing, querying, caching, library and table division and transaction management.

MySQL uses SQL commands to manage data. 1. Basic commands include SELECT, INSERT, UPDATE and DELETE. 2. Advanced usage involves JOIN, subquery and aggregate functions. 3. Common errors include syntax, logic and performance issues. 4. Optimization tips include using indexes, avoiding SELECT* and using LIMIT.


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

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Dreamweaver Mac version
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment