상세 컨텐츠

본문 제목

Installing A Unix-style System On Your Laptop Installing C

카테고리 없음

by neoprevlalhand1989 2020. 2. 12. 04:46

본문

If you an adventurous soul, you can also try to dual boot Linux and Windows or run Linux within a virtual machine under Windows. Peruse the web for instructions for your particular system. Installing C (for Mac users only) If you have Xcode installed, you already have gcc installed. If you have your Xcode development discs, go ahead and install Xcode.

» » » Here Oracle Database 18c RAC On Oracle Linux 7 Using VirtualBox and Vagrant This article describes the 'hands-off' installation of Oracle Database 18c RAC on Oracle Linux 7 using VirtualBox and Vagrant with no additional shared disk devices. Related articles. TL;DR If you are comfortable with VirtualBox, Vagrant and RAC you might want to jump straight to the GitHub repository and use the basic instructions. Introduction One of the biggest obstacles preventing people from setting up test RAC environments is the requirement for shared storage. In a production environment, shared storage is often provided by a SAN or high-end NAS device, but both of these options are very expensive when all you want to do is get some experience installing and using RAC. A cheaper alternative is to use virtualization to fake the shared storage.

Using VirtualBox you can run multiple Virtual Machines (VMs) on a single server, allowing you to run both RAC nodes on a single machine. In addition, it allows you to set up shared virtual disks, overcoming the obstacle of expensive shared storage. In previous releases I gave walk through of a manual installation, but this doesn't really make sense as you shouldn't be installing anything this way anymore, so instead I'm discussing a silent installation. I will be describing the contents of the Vagrant builds, so there will be links to the actual scripts on GitHub, rather than repeating them here. Before you launch into this installation, here are a few things to consider. The finished system includes the host operating system, three guest operating systems, two sets of Oracle Grid Infrastructure (Clusterware + ASM) and two Database instances all on a single machine. As you can imagine, this requires a significant amount of disk space, CPU and memory.

Following on from the last point, the RAC node VMs will each need at least 6G of RAM, but you will see I used 10G for each, and it was still slow. Don't assume you will be able to run this on a small PC or laptop. This procedure provides a bare bones installation to get the RAC working. There is no redundancy in the Grid Infrastructure installation or the ASM installation. To add this, simply create double the amount of shared disks and select the 'Normal' redundancy option when it is offered. Of course, this will take more disk space.

This is not, and should not be considered, instructions for a production-ready system. It's simply to allow you to see what is required to install RAC and give you a system to experiment with. The DNS is required to support the scan listener. In previous releases I suggested running the DNS on the host server, but this is easier. This article uses the 64-bit versions of Oracle Linux and Oracle 18c.

When doing this installation on my server, I split the virtual disks on to different physical disks. This is not necessary, but makes things run a bit faster. This will probably take over three hours to complete. Maybe a lot longer if you have severe memory or disk speed limitations. Required Software Download and install the following software on your PC. If you can't figure out this step, you probably shouldn't be considering a RAC installation.

A Git client for your PC, so you can clone the vagrant repository. You will also need to download the 18c Grid Infrastructure and Database zip files from here. You'll see what to do with that in a moment.

Clone Repository Pick an area on your PC file system to act as the base for this git repository and issue the following command. Git clone Copy the Oracle software under the './node1/software/' directory. From the 'rac/ol7183' subdirectory, the structure should look like this. When you clone the repository on Windows it is important you maintain the line terminators. All '.sh' scripts are run inside the Linux VMs, so they need UNIX style line terminators.

If your Git client is set to convert all files to Windows style line terminators on a clone/pull, you will run into problems when those scripts are called from Linux. Amend File Paths The 'config' directory contains a 'install.env' and a 'vagrant.yml' file. The combination of these two files contain all the config used for this build.

You can alter the configuration of the build here, but remember to make sure the combination of the two stay consistent. At minimum you will have to amend the following paths in the 'vagrant.yml' file, providing suitable paths for the shared disks on your PC.

Asmdisk1: /u05/VirtualBox/shared/ol7183rac/asmdisk1.vdi asmdisk2: /u05/VirtualBox/shared/ol7183rac/asmdisk2.vdi asmdisk3: /u05/VirtualBox/shared/ol7183rac/asmdisk3.vdi asmdisk4: /u05/VirtualBox/shared/ol7183rac/asmdisk4.vdi For example, if you were working on a Windows PC, you might create a path called 'C: VirtualBox shared ol7183rac' and use the following settings. Asmdisk1: C: VirtualBox shared ol7183rac asmdisk1.vdi asmdisk2: C: VirtualBox shared ol7183rac asmdisk2.vdi asmdisk3: C: VirtualBox shared ol7183rac asmdisk3.vdi asmdisk4: C: VirtualBox shared ol7183rac asmdisk4.vdi Build the RAC The following commands will leave you with a functioning RAC installation. Start the DNS server.

Cd dns vagrant up Start the second node of the cluster. This must be running before you start the first node. Cd./node2 vagrant up Start the first node of the cluster. This will perform all of the installations operations.

Depending on the spec of the host system, this could take a long time. On one of my servers it took about 3.5 hours to complete. Cd./node1 vagrant up Turn Off RAC Perform the following to turn off the RAC cleanly. Cd node2 vagrant halt cd./node1 vagrant halt cd./dns vagrant halt Remove Whole RAC The following commands will destroy all VMs and the associated files, so you can run the process again. Cd node2 vagrant destroy -f cd./node1 vagrant destroy -f cd./dns vagrant destroy -f Description of the Build From here on we will describe the sections in the build process.

Remember, all parameters come from the following two files. DNS Server Build The DNS server build is really simple.

You can see an example of the vagrant output I received. This VM took about 5 minutes to build.

The contains the definition of the VirtualBox VM that will be built, using the parameters from the file. The default values produce a VM with the following characteristics. OS: Oracle Linux 7.5. VM Name: ol7dns. CPUs: 1. RAM: 1G.

NIC 1: NAT Network. NIC 2: 192.168.56.100 - An IP on the 'public' network used by the cluster nodes.

Installing A Unix-style System On Your Laptop Installing Cost

Disk 1: The box disk with the operating system pre-installed. The last stage of the VM build it to run the script, which simply runs the script. The script does the following.

Sources the file to make sure all environment variables for the build are present. Gets the latest Yum repository file. Adds entries to the '/etc/hosts' file in the VM for the public, private and virtual IP addresses of each RAC node, as well as the SCAN IP addresses. These are built using environment variables. Installs and enables Dnsmasq. This presents the contents of the '/etc/hosts' file as a DNS server, which is a much simpler alternative to using BIND for the DNS setup. It's not going to be perfect for every DNS solution, but it is really good for this.

Once the vagrant up command completes you will be left with a functioning DNS server ready for use with your RAC. If you have any problems with the DNS build, don't continue with the RAC nodes until you fix them.

RAC Node 2 Build The basic setup of the OS for the RAC nodes are very similar, but node 2 doesn't perform any installation actions, so we need this in place before starting node 1. You can see an example of the vagrant output I received. This VM took about 5-10 minutes to build. The contains the definition of the VirtualBox VM that will be built, using the parameters from the file.

The default values produce a VM with the following characteristics. OS: Oracle Linux 7.5. VM Name: ol7183rac2. CPUs: 2. RAM: 10G. NIC 1: NAT Network. NIC 2: 192.168.56.102 - An IP on the 'public' network used by the cluster nodes.

NIC 3: 192.168.1.102 - An IP on the 'private' network used by the cluster nodes. Disk 1: The box disk with the operating system pre-installed. Disk 2: A disk which will be local to the VM, used for the '/u01' mount point.

Disk 3: A shared ASM disk 1. Disk 4: A shared ASM disk 2. Disk 5: A shared ASM disk 3. Disk 6: A shared ASM disk 4. The last stage of the VM build it to run the script, which simply runs the. The script does the following.

Sources the file to make sure all environment variables for the build are present. Run to partition the '/dev/sdb' local disk, create a file system on the resulting '/dev/sdb1' partition, add an entry into the '/etc/fstab' so it mounts automatically in future, and manually mount it for the first time. Run to configure the Yum repositories and install the OS packages needed for the RAC node. This includes the 'oracle-database-preinstall-18c' package, which does some of the OS setup for us. It also includes all packages listed in the documentation, even though some are already installed by the preinstall package. Some extra packages are included just because they are needed by the automation of the setup. Set the passwords for the 'root' and 'oracle' users.

This is pretty stupid, but we need this to make the whole process silent. Run to add the public, private and virtual addresses to the '/etc/hosts' file. We don't need the SCAN addresses as they are provided by the DNS. We could use the DNS to provide the local IP addresses too, but I prefer to have these here also. Configure the '/etc/resolv.conf' to point to the DNS server VM.

Run to configure Chrony, so we don't get NTP errors during the installation. Run to configure the shared disks used by ASM. If the ASM disks aren't already partitioned, it partitions them. It then configures UDEV, so the disks are mounted correctly in this VM after each restart. Run to create the environment scripts for the 'oracle' user, create the GRIDHOME and DBHOME directories, and partially prepare password-less authentication (user equivalence) for the 'oracle' user. This process will be completed by node 1. Source the '/home/oracle/scripts/setEnv.sh' script the previous script created.

Run to configure the host name for this VM. Partially prepare password-less authentication (user equivalence) for the 'root' user.

This process will be completed by node 1. This is not necessary for RAC to function, but it is necessary for the automation of this installation. Once the vagrant up command completes you will be left with a prepared RAC node 2. If you have any problems with the node 2 build, don't continue with the node 1 build until you fix them. RAC Node 1 Build The basic setup of the OS for the RAC nodes are very similar, but unlike node 2, the node 1 setup also includes the software installation and configuration actions.

Remember, the DNS and node 2 VMs should be running before starting this node. You can see an example of the vagrant output I received.

This VM took about 3.5 hours to build. The contains the definition of the VirtualBox VM that will be built, using the parameters from the file. The default values produce a VM with the following characteristics. OS: Oracle Linux 7.5. VM Name: ol7183rac1.

CPUs: 2. RAM: 10G. NIC 1: NAT Network. NIC 2: 192.168.56.101 - An IP on the 'public' network used by the cluster nodes. NIC 3: 192.168.1.101 - An IP on the 'private' network used by the cluster nodes. Disk 1: The box disk with the operating system pre-installed. Disk 2: A disk which will be local to the VM, used for the '/u01' mount point.

Disk 3: A shared ASM disk 1. Disk 4: A shared ASM disk 2. Disk 5: A shared ASM disk 3. Disk 6: A shared ASM disk 4. The last stage of the VM build it to run the script, which simply runs the. The script does all of the same actions as the node 2 build described above, but it also includes the installation and configuration steps.

Rather than repeat the explanations of the common steps we will just focus on the differences here. In addition to repeating the password-less authentication (user equivalence) steps from node 2 for the 'oracle' and 'root' users, the node 1 script uses sshpass and ssh-copy-id to complete the password-less authentication. Install the 'cvuqdisk' package on node 1 and node 2. Run to perform a silent installation of the Grid Infrastructure software. Run 'orainstRoot.sh' on node 1 then node 2.

Run 'root.sh' on node 1 then node 2. Run to perform a silent configuration of the Grid Infrastructure, then show the cluster status.

Run to perform a silent installation of the database software. Run 'root.sh' on node 1 then node 2. Run to perform a silent creation of a database using DBCA. Once complete it displays the status of the installed services. Once the vagrant up command completes you will be left with a fully configured and running 2 node RAC. For more information see:.

Hope this helps.

There’s something refreshing about installing a new operating system onto a computer. And now, it’s easier than ever to do it without wiping out your existing setup. Whether you want to learn bash scripting, try out a new program, or test hardware compatibility, running a Linux virtual machine (VM) will get you there. Best of all, it takes just a few minutes to do. The Basics Before we really get going, there’s an important distinction to make about terminology.

When it comes to virtualization, the operating system you already have is the host OS. The one you are installing is the guest. Simple, right? Also, now is a good time to take a moment and decide whether you will create a fixed size or dynamically allocated virtual hard drive for your VM. The difference is pretty straightforward: a fixed-size drive carves out a specific amount of storage space for the guest OS, while a dynamically allocated drive will expand the space as needed. Depending on your use of the VM, you should be able to decide pretty easily if you can predict the physical storage space needed. Although there are ways to resolve issues later (such as increasing a virtual disk’s space limit), it’s much easier to make the right decision from the get-go.

Let’s get started. Install VirtualBox VirtualBox is a free program provided by Oracle. This is the software that powers the entire virtualization process, so go ahead and download it if you haven’t already and then install it. Download Linux Next, you’ll need to track down a version of Linux that suits your needs.

This is easier said than done. There are a vast number of distributions that you can choose from. You can start with for help defining your specific needs and refer to for a quick rundown of some popular options. Once you find the version you want to try, download the installation file. You should end up with an ISO file in your Downloads folder.

Set Up Your Virtual Machine Now that you have VirtualBox installed and Linux downloaded, it’s time to get your guest OS set up. Open VirtualBox, click New, and use the following steps as a guide:. Name and operating system.

Give the VM a name, choose Linux from the Type dropdown, and select the Linux version as indicated. Go with Other Linux if your distribution isn’t listed. Memory size.

Select the memory size. This will siphon RAM from your system for the VM, so don’t overdo it. This number can be changed easily later under the VM settings menu.

Hard drive. Since we’re starting fresh, leave it on the default Create a virtual hard drive now. Hard drive file type.

There are multiple choices here for advanced users. Choose VDI for now unless you know you will need one of the other options. Storage on physical hard drive. Based on your decision earlier, select either Dynamically allocated for an expandable drive file or Fixed size for a static drive file. As the description states, please note that a dynamic drive file will expand as needed, but will not shrink again automatically when space on it is freed.

File location and size. Since you’re making a virtual hard drive within your existing file space, you can give this file a name and choose where it is stored. Adjust the slider or type in a specific number in the box to the right to specify the virtual hard drive size. In VirtualBox, you should now see that there is an item on the left-hand side listing your name from step 1 followed by Powered Off. Let’s go ahead and get it powered on. Install the Linux OS We’ve set the stage for the new guest operating system, but it still needs to be installed. Select your new VM on the left and click Start at the top.

The next window will prompt you to select a start-up disk for the VM. Click on the icon next to the dropdown to open a file explorer window, then track down the Linux ISO you downloaded earlier. Once you have selected the file, click Start. This will take you to the boot-up options for the OS, and from here you can simply follow the prompts.

Many Linux distributions will give you the option to try the software or outright install it – keep in mind that you have set up a virtual disk drive for this VM and you will not be affecting your files on the host machine by installing the new OS. Once the installation is complete, you’re all set! Linux Mint with Xfce delicious. Additional Notes Guest additions.

Some integrations with a Linux virtual machine can be tricky due to display drivers and other hardware dependencies. To resolve some of these issues, VirtualBox comes with a guest additions ISO image. Once you have the Linux OS installed and running, go to the menu items at the top, click on Devices, then click on Insert Guest Additions CD image to install them. My 64-bit Ubuntu installation insisted on using a fixed screen size and resolution until I installed the guest additions and restarted the VM. Consider going light. Unless you have plenty of processing power to spare, consider going with a lightweight distribution that is easy on your system’s resources. Look for variants of popular distributions such as, or that include a desktop environment that will be less resource intensive.

And are popular options and worked well for me in my VMs. If you’re having trouble running a particular distribution, you can try wiping the installation and trying again, searching for a solution online, or using another version altogether.