安装oracleXE快捷版(一)
yum找不到包,参考了一些文章,用iso上的包安装了。在文章后面贴有我实际的操作(黑体)和日志。
更换yum源
https://www.cnblogs.com/zrxuexi/p/11587173.html
Red Hat Enteripse Linux5下配置yum源的方法
https://blog.csdn.net/liubo5005/article/details/3950556
RedHat5配置yum源 (把光驱挂载到/mnt下)
https://blog.csdn.net/qq_36784975/article/details/80923653
#把光驱挂载到/mnt下
[root@localhost yum.repos.d]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/sr0 on /media/RHEL_5.7 x86_64 DVD type iso9660 (ro,nosuid,nodev,uid=0)
[root@localhost yum.repos.d]# mount /dev/sr0 /mnt
mount: block device /dev/sr0 is write-protected, mounting read-only
[root@localhost yum.repos.d]#
#配置yum源为光驱
[root@localhost yebl]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# ls
bak redhat.repo rhel-debuginfo.repo
[root@localhost yum.repos.d]# vim rhel-debuginfo.repo
[root@localhost yum.repos.d]#
[root@localhost yum.repos.d]# cat rhel-debuginfo.repo
[rhel-debuginfo]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=file:///mnt/Server
enabled=1
gpgcheck=0
[root@localhost yum.repos.d]#
[root@localhost yum.repos.d]# yum clean all
Loaded plugins: product-id, security, subscription-manager
Updating Red Hat repositories.
Cleaning up Everything
[root@localhost yum.repos.d]# yum makecache
Loaded plugins: product-id, security, subscription-manager
Updating Red Hat repositories.
rhel-debuginfo | 1.5 kB 00:00
rhel-debuginfo/filelists | 2.8 MB 00:00
rhel-debuginfo/other | 8.2 MB 00:00
rhel-debuginfo/group | 1.0 MB 00:00
rhel-debuginfo/primary | 913 kB 00:00
rhel-debuginfo 3261/3261
rhel-debuginfo 3261/3261
rhel-debuginfo 3261/3261
Metadata Cache Created
[root@localhost yum.repos.d]# yum repolist
Loaded plugins: product-id, security, subscription-manager
Updating Red Hat repositories.
repo id repo name status
rhel-debuginfo Red Hat Enterprise Linux 5Server - x86_64 - Debug 3,261
repolist: 3,261
[root@localhost yum.repos.d]#
安装依赖
[root@localhost yum.repos.d]# yum install libaio libaio-devel bc -y
[root@localhost yum.repos.d]# rpm -qa|grep libaio
libaio-devel-0.3.106-5
libaio-0.3.106-5
libaio-devel-0.3.106-5
libaio-0.3.106-5
[root@localhost yum.repos.d]# rpm -qa|grep ^bc
bc-1.06-21
[root@localhost yum.repos.d]#
=============================================================
Oracle-1-安装
https://blog.csdn.net/aaronhadoop/article/details/45315287/
CentOS7 安装 oracleXE(快捷版)教程
https://blog.csdn.net/qq_26820293/article/details/78566063
[root@localhost yum.repos.d]# su - root
[root@localhost ~]# dd if=/dev/zero of=/swapfile bs=1024 count=1048576
1048576+0 records in
1048576+0 records out
1073741824 bytes (1.1 GB) copied, 4.49441 seconds, 239 MB/s
[root@localhost ~]# mkswap /swapfile
Setting up swapspace version 1, size = 1073737 kB
[root@localhost ~]# swapon /swapfile
[root@localhost ~]# date
Wed Jan 8 10:48:11 EST 2020
[root@localhost ~]# date -s "2020-01-08 21:39:35"
Wed Jan 8 21:39:35 EST 2020
[root@localhost ~]# cp /etc/fstab /etc/fstab.backup_$(date +%N)
[root@localhost ~]# echo '/swapfile swap swap defaults 0 0' /etc/fstab
/swapfile swap swap defaults 0 0 /etc/fstab
[root@localhost ~]# chown root:root /swapfile
[root@localhost ~]# chmod 0600 /swapfile
[root@localhost ~]# swapon -a
[root@localhost ~]# swapon -s
Filename Type Size Used Priority
/dev/mapper/VolGroup00-LogVol01 partition 2064376 124 -1
/swapfile file 1048568 0 -2
[root@localhost ~]#
安装包下载地址:http://www.oracle.com/technetwork/cn/database/database-technologies/express-edition/downloads/index.html
下载完之后上传到Linux系统
解压安装包
unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip
解压之后得到 Disk1 文件夹
[root@localhost Disk1]# rpm -ivh oracle-xe-11.2.0-1.0.x86_64.rpm
Preparing... ########################################### [100%]
1:oracle-xe ########################################### [100%]
Executing post-install steps...
You must run '/etc/init.d/oracle-xe configure' as the root user to configure the database.
[root@localhost Disk1]# /etc/init.d/oracle-xe configure
Oracle Database 11g Express Edition Configuration
-------------------------------------------------
This will configure on-boot properties of Oracle Database 11g Express
Edition. The following questions will determine whether the database should
be starting upon system boot, the ports it will use, and the passwords that
will be used for database accounts. Press <Enter> to accept the defaults.
Ctrl-C will abort.
Specify the HTTP port that will be used for Oracle Application Express [8080]: 【回车】
Specify a port that will be used for the database listener [1521]:【回车】
Specify a password to be used for database accounts. Note that the same
password will be used for SYS and SYSTEM. Oracle recommends the use of
different passwords for each database account. This can be done after
initial configuration:
Password can't be null. Enter password:123456
Confirm the password:123456
Do you want Oracle Database 11g Express Edition to be started on boot (y/n) [y]:y
Starting Oracle Net Listener...Done
Configuring database...Done
Starting Oracle Database 11g Express Edition instance...Done
Installation completed successfully.
[root@localhost Disk1]#
我的Oracle密码123456
[root@localhost Disk1]# vi /etc/profile
环境profile文件末尾加入以下内容
# Oracle Settings TMP=/tmp; export TMP TMPDIR=$TMP; export TMPDIR ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE ORACLE_HOME=$ORACLE_BASE/product/11.2.0/xe; export ORACLE_HOME ORACLE_SID=XE; export ORACLE_SID ORACLE_TERM=xterm; export ORACLE_TERM PATH=/usr/sbin:$PATH; export PATH PATH=$ORACLE_HOME/bin:$PATH; export PATH TNS_ADMIN=$ORACLE_HOME/network/admin LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi # oracle end
[root@localhost Disk1]# source /etc/profile
[root@localhost Disk1]# echo $ORACLE_BASE
/u01/app/oracle
[root@localhost Disk1]#