前言:
此刻大家对“centos安装lzsz”都比较珍视,朋友们都想要了解一些“centos安装lzsz”的相关文章。那么小编在网络上搜集了一些有关“centos安装lzsz””的相关内容,希望你们能喜欢,各位老铁们快快来学习一下吧!1.1 关selinux
vim /etc/selinux/config
1.2 配置IP地址
vim /etc/sysconfig/network-scripts/ifcfg-ens33
1.3 关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
1.4 安装lrzsz:
dnf install lrzsz -y
mount -t iso9660 /dev/sr0 /mnt;
cd /mnt/BaseOS/Packages
rpm -ivh lrzsz-0.12.20-43.el8.x86_64.rpm
1.5 改主机名
cp -p /etc/hosts{,.bak}
192.168.163.144 bowen.87long.com bowen
cp -p /etc/hostname{,.bak}
bowen.87long.com
1.6 reboot重启系统
1.7 修改SSH配置文件/etc/ssh/sshd_config:
GSSAPIAuthentication no
X11Forwarding no
UseDNS no
1.8 上传数据库文件并且安装先决条件检查包:
yum install -y
wget
rpm -ivh oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm --nodeps
1.9 swap交换分区
time dd if=/dev/zero of=/root/swapfile bs=1024k count=10240
mkswap -f /root/swapfile
chmod 0600 /root/swapfile
swapon /root/swapfile
cp -p /etc/fstab{,.bak}
vim /etc/fstab
/root/swapfile swap swap defaults 0 0
1.10 创建用户
创建用户:
/usr/sbin/groupadd -g 65535 oinstall
/usr/sbin/groupadd -g 65536 dba
/usr/sbin/groupadd -g 65537 oper
/usr/sbin/groupadd -g 65538 backupdba
/usr/sbin/groupadd -g 65539 dgdba
/usr/sbin/groupadd -g 65540 kmdba
/usr/sbin/groupadd -g 65541 racdba
/usr/sbin/useradd -u 65535 -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,racdba,oper oracle
passwd oracle
1.11 设置系统版本(/etc/redhat-release)
Red Hat Enterprise Linux AS release 4 (Taroon)
1.12 配置内核参数
/etc/sysctl.d/99-sysctl.conf:
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
/sbin/sysctl -p
/sbin/sysctl -p /etc/sysctl.d/99-sysctl.conf
/etc/security/limits.conf:
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
oracle hard memlock 134217728
oracle soft memlock 134217728
/etc/security/limits.d/oracle-database-preinstall-19c.conf:
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
oracle hard memlock 134217728
oracle soft memlock 134217728
chmod 644 oracle-database-preinstall-19c.conf
/etc/pam.d/login
session required /lib64/security/pam_limits.so
/etc/profile:
if [ "USER" = "oracle" ]; then
if [ "SHELL" = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
/usr/sbin/setenforce 0
source /etc/profile
1.13 创建目录、读写权限
mkdir -p /u01/app/oraInventory
mkdir -p /u01/app/oracle/product/19.3.0/dbhome_1
mkdir -p /u01/app/oracle/oradata
chown -R oracle:oinstall /u01/app/oracle/oradata /u01/app/oracle /u01/app/oraInventory
chmod -R 775 /u01/app/
1.14 设置Oracle用户环境变量
su - oracle
cp -p .bash_profile{,.bak}
vim /home/oracle/.bash_profile:
alias ls="ls -FA"
export TMP=/tmp
export TMPDIR=/tmp
export ORACLE_HOSTNAME=bowen.87long.com
export ORACLE_UNQNAME=cdb1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19.3.0/dbhome_1
export ORA_INVENTORY=/u01/app/oraInventory
export ORACLE_SID=cdb1
export PDB_NAME=pdb1
export DATA_DIR=/u01/app/oracle/oradata
export PATH=/usr/sbin:/usr/local/bin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
umask 022
source /home/oracle/.bash_profile
1.15 安装软件包
dnf install -y bc binutils elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel libXrender libXrender-devel libX11 libXau libXi libXtst libgcc librdmacm-devel libstdc++ libstdc++-devel libxcb make net-tools nfs-utils python3 python3-configshell python3-rtslib python3-six targetcli smartmontools sysstat unixODBC libnsl libnsl.i686 libnsl2 libnsl2.i686 xdpyinfo tigervnc-server -y
1.16 设置DISPLAY参数
su - root
vncserver
export DISPLAY=:0.0
xhost +
exit
su - oracle
export DISPLAY=:0.0
1.17 解压数据库安装文件到$ORACLE_HOME
su - oracle
cd $ORACLE_HOME
unzip LINUX.X64_193000_db_home.zip
1.18 删除数据库软件包
rm -rf LINUX.X64_193000_db_home.zip
1.19
export CV_ASSUME_DISTID=RHEL7.6
1.20
export LANG=C
1.21 安装Oracle19C
./runInstaller
setup software only
single instance database installation
Enterprise Edition
输入oracle base路径:/u01/app/oracle
输入Inventory 目录/u01/app/oraInventory 和组oinstall。
依次选择:dba oper backupdba dgdba kmdba racdba
输入root账号的密码自动运行配置脚本
汇总并保存应答文件
安装Oracle19C 软件
1.22 netca建立监听
1.23 DBCA建库
create a database
Advanced Configuration
Database Type:Oracle Single Instance database 和General Purpose or Transaction Processing
Global database name:cdb1 SID:cdb1 PDB Name:pdb1
选存储:File System,文件路径/u01/app/oradata
网络配置:选择建立好的监听器LISTENER。
选择字符集ZHS16GBK。
选择EM,端口5500.
输入用户名和密码。
完成安装。
标签: #centos安装lzsz