国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Home Database Mysql Tutorial Ubuntu12.04(32位)安裝Oracle 11g(32位)全過程

Ubuntu12.04(32位)安裝Oracle 11g(32位)全過程

Jun 07, 2016 pm 03:07 PM
32 bit oracle Install

Ubuntu12.04 ( 32 位)安裝 Oracle11g ( 32 位)全過程 1. 將系統(tǒng)更新到最新: sudo apt-get update sudo apt-get dist-upgrade 2. 安裝 Oracle 所需的依賴包: sudo apt-get install automake sudo apt-get install autotools-dev sudo apt-get install b

Ubuntu12.0432位)安裝Oracle11g32位)全過程


1.將系統(tǒng)更新到最新:

sudo apt-get update
sudo apt-get dist-upgrade


2.安裝Oracle所需的依賴包:

sudo apt-get install automake

sudo apt-get install autotools-dev
sudo apt-get install binutils
sudo apt-get install bzip2
sudo apt-get install elfutils
sudo apt-get install expat
sudo apt-get install gawk
sudo apt-get install gcc
sudo apt-get install gcc-multilib
sudo apt-get install g++-multilib
sudo apt-get install ia32-libs
sudo apt-get install ksh
sudo apt-get install less
sudo apt-get install lesstif2
sudo apt-get install lesstif2-dev
sudo apt-get install lib32z1
sudo apt-get install libaio1
sudo apt-get install libaio-dev
sudo apt-get install libc6-dev
sudo apt-get install libc6-dev-i386
sudo apt-get install libc6-i386
sudo apt-get install libelf-dev
sudo apt-get install libltdl-dev
sudo apt-get install libmotif4
sudo apt-get install libodbcinstq4-1libodbcinstq4-1:i386
sudo apt-get install libpth-dev
sudo apt-get install libpthread-stubs0
sudo apt-get installlibpthread-stubs0-dev
sudo apt-get install libstdc++5
sudo apt-get install lsb-cxx
sudo apt-get install make
sudo apt-get install openssh-server
sudo apt-get install pdksh
sudo apt-get install rlwrap
sudo apt-get install rpm
sudo apt-get installsysstat
sudo apt-get install unixodbc
sudo apt-get installunixodbc-dev
sudo apt-get install unzip
sudo apt-get installx11-utils
sudo apt-get install zlibc

很多都是Ubuntu已經(jīng)自帶的了,謹慎起見都執(zhí)行一遍吧。


3.檢查系統(tǒng)變量

/sbin/sysctl-a | grep sem

/sbin/sysctl-a | grep shm

/sbin/sysctl-a | grep file-max

/sbin/sysctl-a | grep aio-max

/sbin/sysctl-a | grep ip_local_port_range

/sbin/sysctl-a | grep rmem_default

/sbin/sysctl-a | grep rmem_max

/sbin/sysctl-a | grep wmem_default

/sbin/sysctl-a | grep wmem_max


然后根據(jù)上面命令中得到的參數(shù)值在/etc/sysctl.conf中增加對應(yīng)數(shù)據(jù),比如:
fs.aio-max-nr= 1048576
fs.file-max = 6815744
kernel.shmall =2097152kernel.shmmax = 536870912
kernel.shmmni = 4096kernel.sem =250 32000 100 128

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 = 1048586


運行一下命令更新內(nèi)核參數(shù):
sysctl –p


4.添加對當前用戶(假如用戶名是zhs)用戶的內(nèi)核限制在/etc/security/limits.conf文件中增加以下數(shù)據(jù)
zhs soft nproc 2047

zhs hard nproc 16384

zhs soft nofile 1024

zhs hard nofile 65536

zhs soft stack 10240


5.查看/etc/pam.d/login,增加以下行(有了就不用增加了):

session required pam_limits.so
同樣檢查/etc/pam.d/su,沒有以下行就自己加上:

session required pam_limits.so


6.創(chuàng)建需要的文件夾(用于安裝oracle)并設(shè)置其所有權(quán):
sudo mkdir -p /opt/oracle
sudo mkdir -p /opt/oraInventory

sudo chown -R zhs:zhs /opt/oracle

sudo chown -R zhs:zhs /opt/oraInventory

后兩步中,第一個zhs代表當前用戶,第二個zhs代表當前用戶所在的組,linux用戶通常屬于好幾個組,其中有一個組名和用戶名相同。這兩步可能可以不用執(zhí)行,因為那兩個目錄本身就是zhs創(chuàng)建的。


7.安裝JRE環(huán)境

如果Ubuntu上沒安裝JRE的話,需要安裝JRE(我這里直接安裝了JDK,以JDK為例):

Oracle官網(wǎng)下載JDK6(考慮到兼容性問題,安裝6):

下載jdk-6u45-linux-i586.bin這個文件。放到主文件夾(home目錄)下,進入終端:

$sudo chmod 777 jdk-6u37-linux-x64.bin //將文件賦予運行權(quán)限

$sudo -s ./jdk-6u37-linux-x64.bin /usr/lib/jdk //JDK安裝到/usr/lib/jdk目錄下。

注意:最后安裝完成后可能安裝到了主文件夾下了,這是使用命令將其全部復(fù)制到/usr/lib/jdk目錄下即可。(如果沒有權(quán)限,就使用sudochmod 777獲取權(quán)限再復(fù)制)

配置JDK的環(huán)境變量,使用編輯器打開主文件夾下的.bashrc配置文件(隱藏),向其中加入如下內(nèi)容:

#JDK
JAVA_HOME=/usr/lib/jdk/jdk1.6.0_45
JRE_HOME=${JAVA_HOME}/jre
export ANDROID_JAVA_HOME=$JAVA_HOME
export CLASSPATH=.:${JAVA_HOME}/lib:$JRE_HOME/lib:$CLASSPATH
export JAVA_PATH=${JAVA_HOME}/bin:${JRE_HOME}/bin
export JAVA_HOME;
export JRE_HOME;
export CLASSPATH;
HOME_BIN=~/bin/
export PATH=${PATH}:${JAVA_PATH}:${HOME_BIN};

注意核對一下目錄結(jié)構(gòu)是不是正確的。

接著使新設(shè)的環(huán)境變量生效,在終端執(zhí)行命令:source.bashrc

最后驗證JDK是否安裝正確:

java -version

出現(xiàn)了JDK版本信息就表示正確了。


8.Oracle配置環(huán)境變量。同樣在主文件夾下的.bashrc配置文件中加入如下內(nèi)容:

#Oracle
#
這個寫剛剛創(chuàng)建的文件夾
export ORACLE_BASE=/opt/oracle?
#
這個后面可以隨便填寫
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
#
數(shù)據(jù)庫的sid
export ORACLE_SID=orcl

export ORACLE_UNQNAME=orcl
#
默認字符集
export NLS_LANG=.AL32UTF8
#
環(huán)境變量
export PATH=${PATH}:${ORACLE_HOME}/bin/;


接著使新設(shè)的環(huán)境變量生效,在終端執(zhí)行命令:source.bashrc


9.oracle本身并不支持ubuntu來安裝,所以要進行欺騙oracle的安裝程序(sudo執(zhí)行):

ln -s /etc /etc/rc.d

ln -s /lib/i386-linux-gnu/libgcc_s.so.1 /lib/

ln -s /usr/bin/awk /bin/awk

ln -s /usr/bin/basename /bin/basename

ln -s /usr/bin/rpm /bin/rpm

ln -s /usr/lib/i386-linux-gnu/libpthread_nonshared.a/usr/lib/libpthread_nonshared.a

ln -s /usr/lib/i386-linux-gnu/libc_nonshared.a/usr/lib/libc_nonshared.a
ln -s /usr/lib/i386-linux-gnu/libstdc++.so.6 /lib/

ln -s /usr/lib/i386-linux-gnu/libstdc++.so.6 /usr/lib/

ln -s /usr/lib/i386-linux-gnu/libstdc++.so.5 /lib/

ln -s /usr/lib/i386-linux-gnu/libstdc++.so.5 /usr/lib/


sudo touch /etc/redhat-release
sudo echo ‘Red Hat Linux release 5’> /etc/redhat-release


因為Ubuntu將某些庫文件根據(jù)32位系統(tǒng)和64位系統(tǒng)分別存放了,但Oracle只認/usr/lib/lib目錄,所以需要進行上面的軟鏈接。


10.下載32(x86)Oraclefor Linux安裝程序,解壓后得到database文件夾


11.在終端設(shè)置語言環(huán)境

export LANG=en_US或者exportLANG=zh_CN.gbk

這一步如果不設(shè)的話,Oracle安裝程序的啟動界面可能會出現(xiàn)亂碼。


12.database文件夾下的runInstaller文件賦予可執(zhí)行權(quán)限:

sudo chmod 777 runInstaller

跳轉(zhuǎn)到database目錄,在終端下執(zhí)行:

./runInstaller


13.出現(xiàn)填寫電郵地址的界面,電郵地址不要填寫且復(fù)選框不要勾選,點擊“下一步”按鈕。彈出帶叉號標志的提示點擊“YES”按鈕后就可進入下一步。


14.剩下的過程基本上很順利了,只需要設(shè)置一下密碼就行了,其他的設(shè)置都在啟動安裝程序前完成了,不要進行改動!


15.圖形界面下進行依賴檢查的時候會列出很多依賴檢查失敗了,無法進入下一步了,此時選中右上角的“忽略所有”就可以進入下一步了。


16.安裝的過程會出現(xiàn)兩個錯誤(接近70%的時候)

第一個錯誤:

Errorin invoking target 'agent nmhs' of makefile'opt/oracle/product/11.2.0/dbhome_1/sysman/lib/ins_emagent.mk'. See'/opt/oraInventory/logs/installActions2014-08-09_03-15-56AM.log' fordetails.


解決方法:

打開一個新的終端,輸入如下命令:

sed-i 's/^\(\s*\$(MK_EMAGENT_NMECTL)\)\s*$/\1 -lnnz11/g'$ORACLE_HOME/sysman/lib/ins_emagent.mk

然后在圖形界面點擊‘Retry’就能繼續(xù)安裝了。


第二個錯誤:

Errorin invoking target 'all_no_orcl' of makefile'/opt/oracle/product/11.2.0/dbhome_1/rdbms/lib/ins_rdbms.mk'. See'/opt/oraInventory/logs/installActions2014-08-09_03-16-32AM.log' fordetails.


解決方法:

在新終端中輸入如下四個命令:

sed-i 's/^\(TNSLSNR_LINKLINE.*\$(TNSLSNR_OFILES)\) \(\$(LINKTTLIBS)\)/\1-Wl,--no-as-needed \2/g' $ORACLE_HOME/network/lib/env_network.mk

sed-i 's/^\(ORACLE_LINKLINE.*\$(ORACLE_LINKER)\) \(\$(PL_FLAGS)\)/\1-Wl,--no-as-needed \2/g' $ORACLE_HOME/rdbms/lib/env_rdbms.mk

sed-i 's/^\(\$LD \$LD_RUNTIME\) \(\$LD_OPT\)/\1 -Wl,--no-as-needed \2/g'$ORACLE_HOME/bin/genorasdksh

sed-i 's/^\(\s*\)\(\$(OCRLIBS_DEFAULT)\)/\1 -Wl,--no-as-needed \2/g'$ORACLE_HOME/srvm/lib/ins_srvm.mk

然后在圖形界面點擊‘Retry’就能繼續(xù)安裝了。

下面的安裝過程就沒有什么問題了。


17.最后應(yīng)該就順利完成了,按照安裝程序提示最后執(zhí)行兩個腳本:

sudo /opt/oraInventory/orainstRoot.sh
sudo /opt/oracle/product/11.2.0/dbhome_1/root.sh

就完成了全部的安裝。




注:本人用ubuntu12.0412.10,按照此方法裝oracle都成功了

參考資料:http://blog.csdn.net/idber/article/details/9039857



Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to uninstall MySQL and clean residual files How to uninstall MySQL and clean residual files Apr 29, 2025 pm 04:03 PM

To safely and thoroughly uninstall MySQL and clean all residual files, follow the following steps: 1. Stop MySQL service; 2. Uninstall MySQL packages; 3. Clean configuration files and data directories; 4. Verify that the uninstallation is thorough.

Oracle's Role in the Business World Oracle's Role in the Business World Apr 23, 2025 am 12:01 AM

Oracle is not only a database company, but also a leader in cloud computing and ERP systems. 1. Oracle provides comprehensive solutions from database to cloud services and ERP systems. 2. OracleCloud challenges AWS and Azure, providing IaaS, PaaS and SaaS services. 3. Oracle's ERP systems such as E-BusinessSuite and FusionApplications help enterprises optimize operations.

MongoDB vs. Oracle: Choosing the Right Database for Your Needs MongoDB vs. Oracle: Choosing the Right Database for Your Needs Apr 22, 2025 am 12:10 AM

MongoDB is suitable for unstructured data and high scalability requirements, while Oracle is suitable for scenarios that require strict data consistency. 1.MongoDB flexibly stores data in different structures, suitable for social media and the Internet of Things. 2. Oracle structured data model ensures data integrity and is suitable for financial transactions. 3.MongoDB scales horizontally through shards, and Oracle scales vertically through RAC. 4.MongoDB has low maintenance costs, while Oracle has high maintenance costs but is fully supported.

MySQL vs. Oracle: Licensing, Features, and Benefits MySQL vs. Oracle: Licensing, Features, and Benefits May 08, 2025 am 12:05 AM

The main difference between MySQL and Oracle is licenses, features, and advantages. 1. License: MySQL provides a GPL license for free use, and Oracle adopts a proprietary license, which is expensive. 2. Function: MySQL has simple functions and is suitable for web applications and small and medium-sized enterprises. Oracle has powerful functions and is suitable for large-scale data and complex businesses. 3. Advantages: MySQL is open source free, suitable for startups, and Oracle is reliable in performance, suitable for large enterprises.

MySQL and Oracle: Exploring Performance and Scalability MySQL and Oracle: Exploring Performance and Scalability Apr 29, 2025 am 12:12 AM

The difference between MySQL and Oracle in performance and scalability is: 1. MySQL performs better on small to medium-sized data sets, suitable for fast scaling and efficient reading and writing; 2. Oracle has more advantages in handling large data sets and complex queries, suitable for high availability and complex business logic. MySQL extends through master-slave replication and sharding technologies, while Oracle achieves high availability and scalability through RAC.

MySQL vs. Oracle: Understanding Licensing and Cost MySQL vs. Oracle: Understanding Licensing and Cost May 03, 2025 am 12:19 AM

MySQL uses GPL and commercial licenses for small and open source projects; Oracle uses commercial licenses for enterprises that require high performance. MySQL's GPL license is free, and commercial licenses require payment; Oracle license fees are calculated based on processors or users, and the cost is relatively high.

Getting Started: Installing Notepad   for Beginners Getting Started: Installing Notepad for Beginners Apr 29, 2025 am 12:25 AM

The steps for installing and initial use of Notepad are as follows: 1) Visit notepad-plus-plus.org to download the appropriate version; 2) Double-click the installation file and install it as prompts; 3) Start Notepad, create a new file and enter text; 4) Save the file and select the file type; 5) Write and run a simple Python program, such as print("Hello,Notepad !"). Through these steps, you can start programming with Notepad smoothly.

How to learn Java without taking detours. Share methods and techniques for efficiently learning Java How to learn Java without taking detours. Share methods and techniques for efficiently learning Java May 20, 2025 pm 08:24 PM

The key to learning Java without taking detours is: 1. Understand core concepts and grammar; 2. Practice more; 3. Understand memory management and garbage collection; 4. Join online communities; 5. Read other people’s code; 6. Understand common libraries and frameworks; 7. Learn to deal with common mistakes; 8. Make a learning plan and proceed step by step. These methods can help you master Java programming efficiently.

See all articles