3、 设置系统参数 修改#vi /etc/sysctl.conf添加下面代码: kernel.shmall = 2097152 kernel.shmmax = 2147483648 (一般情况下可以设置最大共享内存为物理内存的一半,如果物理内存是 2G,则可以设置最大共享内存为 1073741824(1G=1024*1024*1024)) kern
3、 设置系统参数
修改#vi /etc/sysctl.conf添加下面代码:
kernel.shmall = 2097152
kernel.shmmax = 2147483648
(一般情况下可以设置最大共享内存为物理内存的一半,如果物理内存是 2G,则可以设置最大共享内存为 1073741824(1G=1024*1024*1024))
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
修改后运行#sysctl –p命令使得内核改变立即生效
4、设置oracle用户对Shell的限制要求:
a) 编辑文件:#vi /etc/security/limits.conf 加入以下语句:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
b) 编辑文件:#vi /etc/pam.d/login 加入以下语句:
session required /lib/security/pam_limits.so
c) 编辑文件:#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
5、配置oracle用户环境
使用Oracle用户登陆:
#su – oracle
$vi .bash_profile
以下是配置文件的内容
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
umask 022
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
export ORACLE_BASE=/opt/ora10
export ORACLE_HOME=/opt/ora10/product/10.2.0.1
export PATH=$ORACLE_HOME/Apache/perl/bin:$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
export ORACLE_OWNER=oracle
export ORACLE_SID=oradb
export ORACLE_TERM=xterm
unset USERNAME
三、 安装过程
1、重新启动服务器以oracle用户登录,启动X-window进行本地直接安装。
#su – oracle
$ startx
(我是从Xwindow下启动的,所以掠过此步,但在root下#xhost +)
将Oracle10g光盘文件拷贝到前面建立的安装文件夹(/tmp/oracle)下。(如果是下载,将10201_database_linux_x86_64.cpio.gz拷贝到/tmp/oracle下,
1. Unzip the file: gunzip
2. Extract the file: cpio -idmv
到当前目录)
2、正式安装
1) 点击“任务栏” → “应用程序” → “系统工具” → “终端”:
$ /tmp/oracle/runInstaller (CD到/tmp/oracle/ $./runInstaller)
非常值得称道的是,10g的安装相比以前9i多了一个 Checking operating system certification 的步骤。特别实用。安装文件会自动检测所需的条件。如果有不符合的地方,安装程序会报告给你.并会给出具体原因。
2) 经过一小段的时间,会出现“选择安装方法”的信息窗口;点选“高级安装(A)”,继续安装请单击“下一步(N)”按键;进入“指定产品清单目录和身份证 明”窗口:确认产品清单目录的完整路径(D):/oracle/oraInventory;指定操作系统组名(S):oinstall;继续安装请单击 “下一步(N)”按键;进入“选择安装类型”窗口,点选“企业版(E)”,继续安装请单击“下一步(N)”按键;进入“指定主目录详细信息”窗口;名称 (M):OraDb10g_home1 路径(A): /opt/oracle/product/10.2.0.1/;继续安装请单击“下一步(N)”按键;
3) 进入“产品特定的先决条件检查”窗口,经过一小段时间检查,会出现以下的检查信息窗口;在“正在检查网络配置需要”项目内,选中状态栏目的内容,继续安装 请单击“下一步(N)”按键;进入“选择配置选项”窗口,点选“创建数据库(C)” ,继续安装请单击“下一步(N)”按键;进入“选择数据库配置”窗口,点选“一般用途(G)” ,继续安装请单击“下一步(N)”按键;进入“指定数据库配置选项”窗口;数据库命名中的设置;全局数据库名: oradb SID: oradb;数据库字符集:简体中文ZHS16GBK ;继续安装请单击“下一步(N)”按键;
4) 进入“选择数据库管理选项”窗口,点选“使用Database Control管理数据库”,继续安装请单击“下一步(N)”按键;进入“指定数据库存储选项”窗口,点选“文件系统”;指定数据库文件位置: /oracle/product/10.2.0/oradata/;继续安装请单击“下一步(N)”按键;进入“指定备份和恢复选项”窗口,点选“不启用 自动备份”,继续安装请单击“下一步(N)”按键;进入“指定数据库方案的口令”窗口;点选“所有的帐户都使用同一个口令”,输入口令。继续安装请单击 “下一步(N)”按键;进入“概要信息”窗口,继续安装请单击“下一步(N)”按键;进入“安装”窗口,详细安装如下:A、安装部分片;B、复制文件部 分;C、连接数据系统部分;D、设置数据系统部分;
5) 进入“配置助手”窗口:配置:Oracle Database Configuration Assistant时,会出现“Database Configuration Assistant”新窗口,详细配置过程:A、正在复制数据库文件;B、正在创建并启动Oracle实例;C、正在进行数据库创建;完成以上三个部分, 会出现一个数据库创建完成信息提示窗口,点击“确定”按键。
6) 配置:iSQL*Plus配置辅助程序。配置过程中,会出现一个执行配置脚本信息提示窗口,在终端下运行,执行orainstRoot.sh脚本的过程:点击“任务栏” → “应用程序” → “系统工具” → “终端”,
$ su root (转换成root超级用户环境) Password: ****** (输入root用户的密码)
# /opt/oracle/oraInventory/orainstRoot.sh (输入执行脚本的详细路径)
详细操作:
# /opt/oracle/oracle/product/10.2.0.1/root.sh (输入执行脚本的详细路径)
执行完成orainstRoot.sh、root.sh脚本后,关闭“超级用户的终端”,回到“执行配置脚本”提示窗口,继续安装请单击“确定”按键;进入“安装结束”窗口,退出安装程序请单击“退出(X)”按键;
四、 自启动设置
Oracle 10g需要启动以下服务(在oracle用户下)
$ lsnrctl start
$ dbstart
$ emctl start dbconsole
$ isqlplusctl start
所以需要做以下配置:
默认dbstart是不起作用的。需要以下配置
1.修改/etc/oratab
$ vi /etc/oratab
oradb:/opt/ora10/product/10.2.0.1:Y(原来是N改为Y)
2.拷贝一个系统配置好的 PFILE 到 dbs 目录下
# cp /opt/ora10/admin/oradb/pfile/init.ora.2292007201045 $ORACLE_HOME/dbs/init.ora ($ORACLE_HOME路径要看安装路径而定)
现在你可以测试一下
$ dbstart
注:如果安装版本是10201,可能会出现这个错误:
Failed to auto-start Oracle Net Listene using /ade/vikrkuma_new/oracle/bin/tnslsnr
修改dbstart的第78行 ($ORACLE_HOME/bin/dbstart)
ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle
为ORACLE_HOME_LISTNER=$ORACLE_HOME
$ dbshut
最后在/etc/rc.d/rc.local中加入如下代码:
su - oracle -c "lsnrctl start"
su - oracle -c "dbstart"
su - oracle -c "emctl start dbconsole"
su - oracle -c "isqlplusctl start"
这样重启动服务器后Oracle就会自动启动了。
五、 Oracle 10g设置
iSQL*Plus URL:连接地址:http://server:5560/isqlplus
iSQL*Plus DBA URL:连接地址:http://server:5560/isqlplus/dba
Enterprise Manager 10g Database Control URL:连接地址:http://server:1158/em
用户名:sys
口令:******
连接身份:SYSDBA
继续登陆请单击 “我同意”按键;
#su – oracle
$ startx
$netca启动配置网络配置助手
$sqlplus /nolog启动sqlplus
$dbca 启动数据库配置助手(DCA),建oracle数据库
其他参考网址:
在 Linux x86 上安装 Oracle 数据库 10g
http://www.oracle.com/technology/global/cn/pub/articles/smiley_10gdb_install.html
Oracle® Database Quick Installation Guide
10g Release 2 (10.2) for Linux x86-64
http://download-west.oracle.com/docs/cd/B19306_01/install.102/b15668/toc.htm
Installing Oracle Database 10g Release 1 and 2 (32-bit/64-bit) on Red Hat Enterprise Linux AS 4, 3, 2.1, Red Hat Fedora Core 4, 3, 1, RH 9 on x86 and x86-64 (AMD64/EM64T) Architecture
http://www.puschitz.com/InstallingOracle10g.shtml
MySQLviewshavelimitations:1)Theydon'tsupportallSQLoperations,restrictingdatamanipulationthroughviewswithjoinsorsubqueries.2)Theycanimpactperformance,especiallywithcomplexqueriesorlargedatasets.3)Viewsdon'tstoredata,potentiallyleadingtooutdatedinforma

ProperusermanagementinMySQLiscrucialforenhancingsecurityandensuringefficientdatabaseoperation.1)UseCREATEUSERtoaddusers,specifyingconnectionsourcewith@'localhost'or@'%'.2)GrantspecificprivilegeswithGRANT,usingleastprivilegeprincipletominimizerisks.3)

MySQLdoesn'timposeahardlimitontriggers,butpracticalfactorsdeterminetheireffectiveuse:1)Serverconfigurationimpactstriggermanagement;2)Complextriggersincreasesystemload;3)Largertablesslowtriggerperformance;4)Highconcurrencycancausetriggercontention;5)M

Yes,it'ssafetostoreBLOBdatainMySQL,butconsiderthesefactors:1)StorageSpace:BLOBscanconsumesignificantspace,potentiallyincreasingcostsandslowingperformance.2)Performance:LargerrowsizesduetoBLOBsmayslowdownqueries.3)BackupandRecovery:Theseprocessescanbe

Adding MySQL users through the PHP web interface can use MySQLi extensions. The steps are as follows: 1. Connect to the MySQL database and use the MySQLi extension. 2. Create a user, use the CREATEUSER statement, and use the PASSWORD() function to encrypt the password. 3. Prevent SQL injection and use the mysqli_real_escape_string() function to process user input. 4. Assign permissions to new users and use the GRANT statement.

MySQL'sBLOBissuitableforstoringbinarydatawithinarelationaldatabase,whileNoSQLoptionslikeMongoDB,Redis,andCassandraofferflexible,scalablesolutionsforunstructureddata.BLOBissimplerbutcanslowdownperformancewithlargedata;NoSQLprovidesbetterscalabilityand

ToaddauserinMySQL,use:CREATEUSER'username'@'host'IDENTIFIEDBY'password';Here'showtodoitsecurely:1)Choosethehostcarefullytocontrolaccess.2)SetresourcelimitswithoptionslikeMAX_QUERIES_PER_HOUR.3)Usestrong,uniquepasswords.4)EnforceSSL/TLSconnectionswith

ToavoidcommonmistakeswithstringdatatypesinMySQL,understandstringtypenuances,choosetherighttype,andmanageencodingandcollationsettingseffectively.1)UseCHARforfixed-lengthstrings,VARCHARforvariable-length,andTEXT/BLOBforlargerdata.2)Setcorrectcharacters


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

Notepad++7.3.1
Easy-to-use and free code editor

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.

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.

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SublimeText3 Chinese version
Chinese version, very easy to use
