RedHat环境搭建

tech2023-01-15  118

=======---------------------------------======                Redhat yum源更换 =======---------------------------------======

1、确认版本

    cat /proc/version 或者 cat /etc/redhat-release

2、根据版本下载yum源

    wget http://mirrors.163.com/centos/7/os/x86_64/Packages/rpm-4.11.3-43.el7.x86_64.rpm     wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm     wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-urlgrabber-3.10-10.el7.noarch.rpm     wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-167.el7.centos.noarch.rpm     wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-53.el7.noarch.rpm

3、卸载默认yum源

    rpm -qa|grep yum|xargs rpm -e --nodeps     

4、安装yum源

    在yum源的下载目录执行rpm -ivh --force *.rpm

5、配置文件

    备份/etc/yum.repos.d 目录     在目录 /etc/yum.repos.d 下载 wget http://mirrors.163.com/.help/CentOS7-Base-163.repo     vi CentOS7-Base-163.repo     命令模式下:1,$s/$releasever/7/g

6、收尾

    yum clean all     yum makecache     yum –y install tree      =======---------------------------------======               sshfs 安装: =======---------------------------------====== yum install -y epel-release yum -y install fuse-sshfs 如果是内网环境先设置临时代理 export http_proxy=http://192.168.xxx.xxx:port 如果设置了代理还无法安装fuse-sshfs,可在外网下载rpm包再rsync到本地安装

wget http://ftp.tu-chemnitz.de/pub/linux/dag/redhat/el7/en/x86_64/rpmforge/RPMS/fuse-sshfs-2.5-1.el7.rf.x86_64.rpm rpm -ivh fuse-sshfs-2.2-1.el7.rf.x86_64.rpm

=======---------------------------------======        Oracle客户端安装 =======---------------------------------======

一、rpm包安装

rpm -ivh oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm rpm -ivh oracle-instantclient11.2-odbc-11.2.0.4.0-1.x86_64.rpm rpm -ivh oracle-instantclient11.2-jdbc-11.2.0.4.0-1.x86_64.rpm rpm -ivh oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.x86_64.rpm rpm -ivh oracle-instantclient11.2-devel-11.2.0.4.0-1.x86_64.rpm 默认安装目录:/usr/lib/oracle/ 迁移到指定的目录:  mkdir -p /u01/oracle/app/11.2/  rsync -rtuv /usr/lib/oracle/11.2/ /u01/oracle/app/11.2/  添加环境变量 vi /etc/profile export ORACLE_BASE=/u01/oracle/app export ORACLE_HOME=$ORACLE_BASE/11.2/client64 export LD_LIBRARY_PATH=$ORACLE_HOME/lib export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin:$ORACLE_HOME/bin

如果需要权限管理oracle 客户端: groupadd -g 201 oinstall groupadd -g 202 dba useradd -m -u 202 -g oinstall -G dba -d /home/oracle -s /bin/bash oracle chown -R oracle:oinstall /u01

二、zip包安装

mkdir /u01 uzip linux.x64_11gR2_client.zip ./runInstalle 需要要Linux支持图像界面,有xserver等问题。建议用rmp安装

最新回复(0)