This article has participated in the “Digitalstar Project” and won a creative gift package to challenge the creative incentive money.
🌲 preface
On August 13, 2021, Oracle 21C officially released the Linux64 local installation package.
In order to experience and improve my Oracle one-click setup script, I downloaded and installed a wave of it, and share the installation process below.
❤️ also releases the latest OracleShell scripts, supporting single-node deployment in 21C and one-click deployment in RAC.
How to obtain scripts:
- GitHub Keep updating at 🔥
- Gitee Keep updating at 🔥
🌛 Environment Preparations
Vagrant is still used for one-click deployment of OS environment, which is relatively convenient and quick.
❤ ️Play with the Vagrant series of columns❤ ️
I’m lazy, so I’m using Vagrant, but I’ll install the host environment manually and just run the script.
Environmental information:
The host version | Oracle version | The IP address | memory |
---|---|---|---|
Oracle Linux 7.9 | Oracle 21C | 10.211.55.100 | 8G |
Vagrant host image sources (7, 8) :
generic/oracle7 generic/oracle8
Oracle 21C installation package
Database Grid
☀️ 21C Single-node deployment
Vagrant deploys the hosting environment
📢 Note: If you manually install the operating system, you can skip this section and go directly to theOracle installation
Chapter.
Vagrant mirror source added
Here I downloaded my image source to /Users/ LPC /Downloads/ and renamed it oel7_pd and box oel7.
vagrant box add /Users/lpc/Downloads/oel7_pd --name oel7
vagrant box list
Copy the code
2. Configure VagrantFile
📢 Note: Please fill in the following information according to your own environment!!
Go to the custom directory and execute the following script to create the VagrantFile:
cat <<EOF>VagrantFile Vagrant.configure("2") do |config| config.vm.box = "oel7" config.vm.provision :shell, path: "/Volumes/DBA/vagrant/ora21c/scripts/ora_preinstall.sh" config.vm.synced_folder "/Volumes/DBA/vagrant/software", "/vagrant" config.vm.network :forwarded_port, guest: 1521, host: 1521 config.vm.network :forwarded_port, guest: 22, host: 22 config.vm.network "public_network", ip: "10.211.55.100" config. The vm. The provider "parallels do | to | pd, pd name =" ora21c "pd. The memory = 8192 pd. Cpus = 2 end end EOF
Copy the code
⚠️ Note: How to configure VagrantFile is not explained here, but refer to the column. I’m going to use thetaParallels
Virtual machine software, if using Virtualbox virtual machine software friends, will need to scriptparallels
Modified tovirtualbox
Can.
3. Prepare installation media and scripts
Basically configure these two lines in the VagrantFile:
config.vm.provision :shell, path: "/Volumes/DBA/vagrant/ora21c/scripts/ora_preinstall.sh"
config.vm.synced_folder "/Volumes/DBA/vagrant/software", "/vagrant"
Copy the code
The first line refers to the script that automatically configates the operating system once the Vagrant host is installed. The second line indicates that the Vagrant host automatically maps directories once it is installed.
Ora_preinstall. sh Script contents:
cat <<EOF>ora_preinstall.sh
#change root password
echo oracle | passwd --stdin root
#change sshd_config
sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config
systemctl reload sshd.service
#mkdir software dir
mkdir /soft
#cp software to softdir
cp /vagrant/* /soft
#chmod shell script
chmod +x /soft/OracleShellInstall.sh
EOF
Copy the code
Installation media content:
LINUX.X64_213000_db_home.zip
OracleShellInstall.sh
Copy the code
You only need to upload the Oracle one-click installation script and the Oracle 21C Database installation package.
4. Initialize the host environment
If you are using the Virtualbox virtual machine software, perform Vagrant Up. Those who use the Parallels virtual machine software need to perform Vagrant up –provider= Parallels.
vagrant up --provider=parallels
Copy the code
After a short wait, the host is successfully initialized:
Oracle 21C standalone script installation
Once the environment is ready, performing the installation is as simple as a single command line.
Use XSHELL or other tools to connect to the host and execute the script:
/ oracleshellinstall. sh -i 10.211.55.100 -iso NCopy the code
To explain, Vagrant’s initial environment is configured with yum sources, so there is no need to manually mount the image sources, so I added the parameter -iso N. Those who manually install the OS still need to manually mount the image sources.
The installation process takes less than 30 minutes. To create a PDB, add the -pb PDB name.
More customized parameters can be seen before: Year ️ I wrote over 4000 lines of Shell scripts and finally implemented one-click Oracle RAC installation!! .
📚 is at the end
Oracle 21C RAC installation tutorial to follow!!
For more details on how to use scripts, subscribe to the Oracle One-click Script Installation column
- 15 minutes! One-click deployment of single-node CDB and PDB for Oracle 12CR2
- 20 minutes! Single-click Oracle 18C CDB and PDB deployment
- 25 minutes! One-click Deployment of Oracle 11GR2 HA single-node cluster
- 30 minutes! Single-click Oracle 19C CDB and PDB deployment
- 1.5 hours! One-click Deployment of Oracle 11GR2 RAC clusters
This is the end of sharing ~
If you think the article is helpful to you, please like it, favorites it, pay attention to it, comment on it, and support it four times with one button. Your support is the biggest motivation for my creation.
❤️ technical exchange can follow the public number: Lucifer think twice before you do ❤️