centos5.4 安装配置oracle10g
生活随笔
收集整理的這篇文章主要介紹了
centos5.4 安装配置oracle10g
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
準備環境: 首先自然是一個5.4的centos操作系統了 把需要安裝的oracle11g數據可上傳到服務器,我這里使用的是UltraEdit中自帶的sftp來傳輸的.(sftp的速度比ftp快很多,據說是經過壓縮處理的,我沒有驗證過,不過感覺比FTP快很多!)我把安裝文件上傳到了/var/ftp/pub/目錄下 我單獨添加了一塊硬盤來作為oracle的安裝分區,并且讓/opt掛載,來安裝oracle11G,所以格式化硬盤,寫入fstab開機掛載. [root@jadeshow ~]#?mkfs -t ext3 /dev/hdb?
mke2fs 1.39 (29-May-2006)?
/dev/hdb is entire device, not just one partition!?? //提示是一 //個設備,這里可以選擇不管他,或者你劃分一個區出來.?
Proceed anyway? (y,n)?y?
Filesystem label=?
OS type: Linux?
Block size=4096 (log=2)?
Fragment size=4096 (log=2)?
1048576 inodes, 2097152 blocks?
104857 blocks (5.00%) reserved for the super user?
First data block=0?
Maximum filesystem blocks=2147483648?
64 block groups?
32768 blocks per group, 32768 fragments per group?
16384 inodes per group?
Superblock backups stored on blocks:?
??????? 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632 Writing inode tables: done?
Creating journal (32768 blocks):?
done?
Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 24 mounts or?
180 days, whichever comes first.? Use tune2fs -c or -i to override. Vim /etc/sysctl.conf添加 kernel.shmmax = 2147483648 ? 上面kernel.shmmax/kernel.sem等是典型的核心參數配置.您可能需要根據您的實際環境進行適當的變動 檢查所作更改是否正確 [root@jadeshow oracle]#?sysctl -a |grep sem kernel.sem = 250??????? 32000?? 100???? 128 [root@jadeshow oracle]#?sysctl -a |grep shm vm.hugetlb_shm_group = 0 kernel.shmmni = 4096 kernel.shmall = 268435456 kernel.shmmax = 2147483648 [root@jadeshow oracle]#?sysctl -a |grep file-max fs.file-max = 65536 [root@jadeshow oracle]#?sysctl -a |grep ip_local net.ipv4.ip_local_port_range = 1024???? 65000 [root@jadeshow database]#?vim /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#?????? enforcing - SELinux security policy is enforced.
#?????? permissive - SELinux prints warnings instead of enforcing.
#?????? disabled - SELinux is fully disabled.
SELINUX=disabled???????//關閉selinux
# SELINUXTYPE= type of policy in use. Possible values are:
#?????? targeted - Only targeted network daemons are protected.
#?????? strict - Full SELinux protection.
SELINUXTYPE=targeted
設定用戶shell 一般來說,出于性能上的考慮,還需要需要進行如下的設定,以便改進Oracle用戶的有關 nofile(可打開的文件描述符的最大數)和nproc(單個用戶可用的最大進程數量) [root@jadeshow oracle]#?vim /etc/security/limits.conf # 添加如下的行 *?????????????? soft??? nproc?? 2047???????//軟限制 *?????????????? hard??? nproc?? 16384???//硬限制 *?????????????? soft??? nofile? 1024??????? *?????????????? hard??? nofile? 65536 添加如下的行到/etc/pam.d/login 文件: session required???? /lib/security/pam_limits. 軟件要求: binutils-2.17.50.0.6-2.el5,compat-libstdc++-33-3.2.3-61,elfutils-libelf-0.125-3.el5,elfutils-libelf-devel-0.125,gcc-4.1.1-52,gcc-c++-4.1.1-52,glibc-2.5-12,glibc-common-2.5-12,glibc-devel-2.5-12,glibc-headers-2.5-12,libaio-0.3.106,libaio-devel-0.3.106 ,libgcc-4.1.1-52,libstdc++-4.1.1 ,libstdc++-devel-4.1.1-52.e15,make-3.81-1.1,sysstat-7.0.0 此處建議使用yum來安裝,依次使用yum install <安裝的軟件> 來安裝. 設置oracle環境變量 用戶管理 [ root@jadeshow /]#?groupadd dba?????????//添加一個dba用戶組?
[root@jadeshow /]#?groupadd oinstall?
[root@jadeshow /]#?useradd?? -g oinstall -G dba?oracle?????????????????????????????????????????????????//添加一個用戶oracle其主組屬于oinstall 從組屬于 dba [root@jadeshow opt]#?passwd oracle??//修改oracle用戶的密碼 [root@jadeshow opt]#?mkdir -p /opt/oracle/install//創建oracle安裝目錄 [root@jadeshow opt]#chown -R oracle.dba /opt/oracle/?//修改目錄所屬組及所屬用戶 ? [root@jadeshow oracle]#cp /etc/sysconfig/i18n /opt/oracle/.i18n 配置用戶環境: [root@jadeshow ~]#?vim? /home/oracle/.bash_profile
# .bash_profile # Get the aliases and functions
if [ -f ~/.bashrc ]; then
??????? . ~/.bashrc
fi # User specific environment and startup programs PATH=$PATH:$HOME/bin export PATH
export ORACLE_BASE=/opt/oracle/app
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0.1
export ORACLE_SID=orcl
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/binI
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
解壓數據庫 [root@jadeshow pub]#?unzip 10201_database_linux32.zip 啟動圖形界面? init 5 以oracle用戶登錄 到安裝文件的目錄下 執行 ./runinstaller (菜鳥寫博,老鳥飛過。歡迎拍磚,深入交流!)
本文轉自 玨石頭 51CTO博客,原文鏈接:http://blog.51cto.com/gavinshaw/229394,如需轉載請自行聯系原作者
mke2fs 1.39 (29-May-2006)?
/dev/hdb is entire device, not just one partition!?? //提示是一 //個設備,這里可以選擇不管他,或者你劃分一個區出來.?
Proceed anyway? (y,n)?y?
Filesystem label=?
OS type: Linux?
Block size=4096 (log=2)?
Fragment size=4096 (log=2)?
1048576 inodes, 2097152 blocks?
104857 blocks (5.00%) reserved for the super user?
First data block=0?
Maximum filesystem blocks=2147483648?
64 block groups?
32768 blocks per group, 32768 fragments per group?
16384 inodes per group?
Superblock backups stored on blocks:?
??????? 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632 Writing inode tables: done?
Creating journal (32768 blocks):?
done?
Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 24 mounts or?
180 days, whichever comes first.? Use tune2fs -c or -i to override. Vim /etc/sysctl.conf添加 kernel.shmmax = 2147483648 ? 上面kernel.shmmax/kernel.sem等是典型的核心參數配置.您可能需要根據您的實際環境進行適當的變動 檢查所作更改是否正確 [root@jadeshow oracle]#?sysctl -a |grep sem kernel.sem = 250??????? 32000?? 100???? 128 [root@jadeshow oracle]#?sysctl -a |grep shm vm.hugetlb_shm_group = 0 kernel.shmmni = 4096 kernel.shmall = 268435456 kernel.shmmax = 2147483648 [root@jadeshow oracle]#?sysctl -a |grep file-max fs.file-max = 65536 [root@jadeshow oracle]#?sysctl -a |grep ip_local net.ipv4.ip_local_port_range = 1024???? 65000 [root@jadeshow database]#?vim /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#?????? enforcing - SELinux security policy is enforced.
#?????? permissive - SELinux prints warnings instead of enforcing.
#?????? disabled - SELinux is fully disabled.
SELINUX=disabled???????//關閉selinux
# SELINUXTYPE= type of policy in use. Possible values are:
#?????? targeted - Only targeted network daemons are protected.
#?????? strict - Full SELinux protection.
SELINUXTYPE=targeted
設定用戶shell 一般來說,出于性能上的考慮,還需要需要進行如下的設定,以便改進Oracle用戶的有關 nofile(可打開的文件描述符的最大數)和nproc(單個用戶可用的最大進程數量) [root@jadeshow oracle]#?vim /etc/security/limits.conf # 添加如下的行 *?????????????? soft??? nproc?? 2047???????//軟限制 *?????????????? hard??? nproc?? 16384???//硬限制 *?????????????? soft??? nofile? 1024??????? *?????????????? hard??? nofile? 65536 添加如下的行到/etc/pam.d/login 文件: session required???? /lib/security/pam_limits. 軟件要求: binutils-2.17.50.0.6-2.el5,compat-libstdc++-33-3.2.3-61,elfutils-libelf-0.125-3.el5,elfutils-libelf-devel-0.125,gcc-4.1.1-52,gcc-c++-4.1.1-52,glibc-2.5-12,glibc-common-2.5-12,glibc-devel-2.5-12,glibc-headers-2.5-12,libaio-0.3.106,libaio-devel-0.3.106 ,libgcc-4.1.1-52,libstdc++-4.1.1 ,libstdc++-devel-4.1.1-52.e15,make-3.81-1.1,sysstat-7.0.0 此處建議使用yum來安裝,依次使用yum install <安裝的軟件> 來安裝. 設置oracle環境變量 用戶管理 [ root@jadeshow /]#?groupadd dba?????????//添加一個dba用戶組?
[root@jadeshow /]#?groupadd oinstall?
[root@jadeshow /]#?useradd?? -g oinstall -G dba?oracle?????????????????????????????????????????????????//添加一個用戶oracle其主組屬于oinstall 從組屬于 dba [root@jadeshow opt]#?passwd oracle??//修改oracle用戶的密碼 [root@jadeshow opt]#?mkdir -p /opt/oracle/install//創建oracle安裝目錄 [root@jadeshow opt]#chown -R oracle.dba /opt/oracle/?//修改目錄所屬組及所屬用戶 ? [root@jadeshow oracle]#cp /etc/sysconfig/i18n /opt/oracle/.i18n 配置用戶環境: [root@jadeshow ~]#?vim? /home/oracle/.bash_profile
# .bash_profile # Get the aliases and functions
if [ -f ~/.bashrc ]; then
??????? . ~/.bashrc
fi # User specific environment and startup programs PATH=$PATH:$HOME/bin export PATH
export ORACLE_BASE=/opt/oracle/app
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0.1
export ORACLE_SID=orcl
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/binI
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
解壓數據庫 [root@jadeshow pub]#?unzip 10201_database_linux32.zip 啟動圖形界面? init 5 以oracle用戶登錄 到安裝文件的目錄下 執行 ./runinstaller (菜鳥寫博,老鳥飛過。歡迎拍磚,深入交流!)
本文轉自 玨石頭 51CTO博客,原文鏈接:http://blog.51cto.com/gavinshaw/229394,如需轉載請自行聯系原作者
總結
以上是生活随笔為你收集整理的centos5.4 安装配置oracle10g的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 《银翼杀手2049》:活着不只为了“存在
- 下一篇: Windows Phone 实用开发技巧