In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The software to use:
Red Hat Enterprise Linux AS release 4 (Nahant Update 7) 10201_database_linux_x86_64.cpio rlwrap-0.42.tar.gz
-
1. Install Redhat 4.7
two。 Configure network and hostname
3. Connect to a linux host using xshell
4. Control RHEL4 through xmanager remote Desktop under Windows
5. Upload 10201 _ database_linux_x86_64.cpio rlwrap-0.42.tar.gz
6. Installation of Red Hat Enterprise Linux 4.7 dependency packages
7. Install oracle softwar
8. Installation of rlwrap-0.42
-
two。 Setting the network and hostname by modifying the configuration file involves a total of 4 files:
/ etc/sysconfig/network-scripts/ifcfg-eth0 ip address and netmask / etc/sysconfig/network gateway / etc/resolv.conf hostname and DNS/etc/hosts hostname
2.1 set ip and subnet mask
Vi / etc/sysconfig/network-scripts/ifcfg-eth0 # my set IPADDR=192.168.1.13NETMASK=255.255.255.0NETWORK=192.168.1.0
2.2 set up the gateway
Vi / etc/sysconfig/network#my set HOSTNAME=OrclGATEWAY=192.168.1.254
2.3Setting DNS
Vi / etc/resolv.conf # my set nameserver 192.168.1.254
2.4 set hostname
Vi / etc/hosts#my set 192.168.1.13 Orcl
3. Connect to a linux host using xhell
3.1 check whether the sshd service is started
Netstat-tulnp | grep 22 tcp 0 0: 22:: * LISTEN 16698/sshd netstat-tulnp | grep 'sshd' tcp 0 0: 22: * LISTEN 16698/sshd
3.2 configure xhell connection linux host write the ip address in the host bar
4. Control RHEL4 through xmanager remote Desktop under Windows
Step 1: # vi / etc/X11/xdm/xdm-config before the last line: DisplayManager.requestPort: 0! Comment out this line.
Step 2:
Chmod + w / etc/X11/xdm/Xservers # vi / etc/X11/xdm/Xservers comments this line before the last line:: 0 local / usr/X11R6/bin/X with a # sign.
Step 3:
# vi / etc/X11/xdm/Xaccess find # * # any host can get a login window to remove the # sign before this line and change it to: * # any host can get a login window
Step 4:
Enter the command xdm to start the xdm service. Now you can log in to RHEL4 remotely using tools such as xmanager under windows.
In addition: if you want to run xdm automatically after the server starts
1. Add / usr/X11R6/bin/xdm2 to / etc/rc.local file, modify / etc/X11/gdm/gdm.conf file, find [xdmcp] paragraph [xdmcp] and change Enable=false to Enable=true.
Note:
In RHEL4, if there is no Xservers file
Because of the lack of the xorg-x11-xdm package, you can find it on the RHEL4 CD.
5. Upload 10201 _ database_linux_x86_64.cpio
The save directory of mkdir / oraapp software cd / oraapp/
Upload oracle10G using xftp
Upload is a little slow, please wait patiently.
# ls 10201_database_linux_x86_64.cpio.gz#gunzip 10201_database_linux_x86_64.cpio.gz# ls 10201_database_linux_x86_64.cpio# cpio-idmv
< 10201_database_linux_x86_64.cpio #ls -ld database/drwxr-xr-x 6 94110 42424 4096 2005-10-23 database 6. Red Hat Enterprise Linux 4.7依赖包的安装 binutils-2.15.92.0.2-10.EL4 compat-db-4.1.25-9 control-center-2.8.0-12 gcc-3.4.3-9.EL4 gcc-c++-3.4.3-9.EL4 glibc-2.3.4-2 glibc-common-2.3.4-2 gnome-libs-1.4.1.2.90-44.1 libstdc++-3.4.3-9.EL4 libstdc++-devel-3.4.3-9.EL4 make-3.80-5 pdksh-5.2.14-30 sysstat-5.0.5-12 xscreensaver-4.18-5.rhel4.2 # rpm -qa | grpe glic 查看相关的软件是否安装 # mkdir /mnt/cdrom 挂载光驱# mount -t iso9660 /dev/cdrom /mnt/cdrom# cd /mnt/cdrom/RedHat/RPMS/# rpm -ivh glibc-2.3.4-2.41.x86_64.rpm 7 .安装oracle软件 7.1 创建oracle用户组 # groupadd oinstall# groupadd dba # useradd -g oinstall -G dba oracle 7.2配置oracle相关的参数 # vi /etc/sysctl.conf 在sysctl.conf 文件中加入 #my Oracle kernel.shmall = 2097152kernel.shmmax = 2147483648kernel.shmmni = 4096kernel.sem = 250 32000 100 128fs.file-max = 65536net.ipv4.ip_local_port_range = 1024 65000net.core.rmem_default = 262144net.core.rmem_max = 262144net.core.wmem_default = 262144net.core.wmem_max = 262144 # sysctl -p 使刚才的配置生效 # vi /etc/security/limits.conf 在limits.conf文件中加入 #my oracle setoracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536 # vi /etc/pam.d/login 在login文件中加入 #my oracle set session required pam_limits.so # vi /etc/profile 在profile文件中加入 #my oracle setif [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fifi 7.3 创建oracle安装目录 # mkdir -p /u01/app/oracle# chown -R oracle:oinstall /u01# chmod -R 755 /u01 7.4 配置oracle用户环境变量 # su - oracle $ vi .bash_profile 在.bash_profile文件中加入 #my oracle setexport ORACLE_BASE=/u01/app/oracleexport ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1export ORACLE_SID=scott export NLS_LANG=american_america.zhs16gbk 7.5 进入图形化环境安装oracle10G # chown -R oracle:oinstall /oraapp/# xhost + # export DISPLAY=192.168.1.4:0.0# su - oracle # cd /oraapp/database/$ ./runInstaller 这样在Xbrowser中就出现了oracle安装中的第一个画面 选择高级安装 下一步 下一步 定制安装 下一步 可以看到在oracle用户的环境变量中设置的ORACLE_HOME 下一步 选择上iSQL *Plus 10.2.1.0 下一步 全部成功 下一步 默认下一步 选择仅安装数据库软件 下一步 安装 提示以root用户身份运行以上两个脚本 以oracle的环境变量,root的身份执行两个脚本 # su - oracle $ su Password: # cd $ORACLE_BASE/oraInventory/# ./orainstRoot.sh 更改权限/u01/app/oracle/oraInventory 到 770.更改组名/u01/app/oracle/oraInventory 到 oinstall.脚本的执行已完成# cd $ORACLE_HOME# ./root.sh 安装完成 退出 可以看到isqlplus的端口号是5560, 这个端口号可以在portlist.ini文件中看到 # cat $ORACLE_HOME/install/portlist.iniiSQL*Plus HTTP 端口号 =5560 在PATH中添加oracle可执行文件路径: vi .bash_profile添加 export PATH=$PATH:$ORACLE_HOME/bin:.$ . .bash_profile 8. rlwrap-0.42 的安装 8.1 rlwrap简介 在 linux中使用sqlplus对数据库进行操作,常常由于敲错命令或需要反复执行某条语句,需要像linux本身有的历史回调的功能, rlwrap 可以用来支持oracle下sqlplus历史命令的回调功能,提高操作效率。 8.2 下载 http://utopia.knoware.nl/~hlub/uck/rlwrap/#rlwrap 目前最新版本 rlwrap-0.42.tar.gz (274 k) # wget http://utopia.knoware.nl/~hlub/uck/rlwrap/rlwrap-0.42.tar.gz 8.3 安装 # tar -zxvf rlwrap-0.42.tar.gz # ./configure# make# make install 8.4 安装rlwrap错误问题的解决 【You need the GNU readline library(ftp://ftp.gnu.org/gnu/readline/ ) to build this program.】 如果安装rlwrap的时候出现上述问题,那么你可能缺失两个包: libtermcap-devel- 2.0.8-46.1.i386.rpm readline-devel-5.1-1.1.i386.rpm 需要在系统光盘或或镜像文件中使用rpm进行安装缺失的软件包后再执行 rlwrap工具的安装 验证安装的结果切换到oracle用户使用rlwrap方式登陆到数据库进行测试 [root@OEL ~]# su - oracle[oracle@OEL ~]$ rlwrap sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Fri Dec 5 10:51:22 2014Copyright (c) 1982, 2009, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL>Select status from vastness instancesSQL > select * from v$version
After the execution of the statement, you can use the up and down arrows to callback the instruction, and you can use the backspace Backspace key to delete it, which greatly improves the efficiency.
8.5 write configuration file for ease of use
[oracle@OEL ~] $vi .bashrc # User specific aliases and functionsalias sqlplus='rlwrap sqlplus'alias rman='rlwrap rman'alias adrci='rlwrap adrci' [oracle@OEL ~] $source .bashrc
In this way, we can also have the function of viewing history commands of linux system under sqlplus.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 230
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.