Essay: Develop an essay that will  analyze and explain the principles of inheritance, encapsulation, and  polymorphism. Define each term, provide examples for each principle, and  explain how the principles are important in object-oriented design and  programming.

Explanation & Answer length: 750 Words

 NGINX This lab gets our hands dirty with the other and far bigger super-major Linux distribution, Ubuntu. With the missteps recently made by Red Hat and discussed in lab three, expect that gap to grow. Ubuntu is clearly ready to capitalize; the screenshot below is a link from the main page of We often call Linux operating systems “distributions” because, like we’ve discussed in lecture … Linux isn’t an operating system. Linux is a kernel, and a collection of tools directly around, and related to … the kernel. Everything else that a vendor puts around it, that makes it a whole operating system … is not Linux. So we end up with these distributions, these piles of software, built around the Linux kernel, organized by vendors, that become the value we expect of an operating system. Red Hat Linux, Ubuntu Linux … hopefully you get the idea. Ubuntu Linux is based, in turn, upon Debian Linux (made by Deb and Ian). Debian-based Linux distributions tend to use the “.deb” package format and the apt package manager, very analogous to the situation with “.rpm” packages and the yum or dnf package managers on Rocky Linux and Red Hat-based distributions, of which there are several, as discussed at the beginning of lab 3. Other Debian-based distributions include Kali Linux, which some of you have already used in CS 574, and ParrotOS, another security distribution I’m starting to like better than Kali. Ubuntu is so popular that many popular Debian derivatives are based directly on Ubuntu: Linux Mint (used in prior iterations of this class), Kubuntu (Ubuntu with the KDE desktop instead of GNOME), Lubuntu (LXDE/LXQT desktop), Xubuntu (with Xfce), and Ubuntu Budgie (with the Budgie desktop). Most of the people who use Ubuntu came across it because up until recently, Ubuntu Desktop definitely used to have the best-looking desktop Linux … the one that was closest to a Linux you could give your grandparents to use. Ubuntu used to develop its own desktop environment, called “Unity,” but has recently dropped it in favor of making its own additions to the community-developed GNOME desktop environment. I wholeheartedly suggest you try Ubuntu Desktop on your own time later … but for this lab, we’ll be using Ubuntu Server, with no graphical desktop like our minimal Rocky install, to conserve resources. part 0: get it Go to, click the download menu along the top bar, Ubuntu Server, and on the overengineered process wrought on by the first server download page, choose “manual server installation.” On the following page, hit the green button to Ubuntu Server 20.04.2 LTS. The download is just over 1 GB. Note: LTS stands for “long-term” support, which means that among major releases of the operating system, an LTS release targets stability, and Ubuntu will sell support for this release for up to ten years, depending upon how you pay for it. Unlike Red Hat, there is no free similar distribution (like CentOS was and Rocky now is for Red Hat) for free patches … because patches for Ubuntu are just provided for free; Canonical, the company behind Ubuntu simply chooses not to tie patches and updates to paid support … Red Hat wants you to pay for that. 1 part 1: install it Create a new custom VM on your shared VM network, using the following specifications: CPU: single virtual core/processor RAM: 1 GB (1024 MB) hard disk: 20 GB guest OS: Ubuntu 64-bit Please de-select “Easy Install.” The installation of Linux, and Ubuntu especially, are easy enough, and we don’t want to hide from the details here … especially when VMware’s “Easy Install” just seems to make things hard. When the installer window comes up, if you’ve done Debian Linux before, you might recognize similarities. Ubuntu’s installer is similar in design and spirit to FreeBSD’s text-drawn menus installer. Just like there, you’ll be using the space bar and return keys to select things, and the arrow keys and tab to navigate between textbased UI elements. 1. Select your language. 2. After selecting the language, the Ubuntu installer offered to update itself. It’s worth noting that while Ubuntu’s distributions are generally pretty good, their installer can be hideously unstable … which is why they’ve developed a post-boot on-line installer update feature. This installer update feature has almost always led to a crash for me, but I’m going to give it another chance. If it fails for you, just reboot from the installation media (the ISO) and try the installation again, without letting it update. 2 If you don’t see this screen or one like it, don’t worry. You can just skip this step. 3. Select your keyboard layout. 4. Network setup is next; just like with the last two OSs, we’re going to set up a static IP right here in the installer. Choose your VM’s only network interface with a return, then choose to edit IPv4, and change from automatic configuration to manual. For the subnet, the installer expects the network address of your VMware NAT subnet, in CIDR notation. This is the .0 reserved “network” address on that subnet, followed by “/24,” relating the netmask and thus the size of the subnet. Mine is For address, remember your Ubuntu system is .74 on your VMware subnet. The gateway is .2, as usual. For the name server, provide the IP address of your OpenBSD VM, and cs470.local as the only search domain. 5. Proxy? We don’t need no stinkin’ proxy. You’re directly connected to the internet. Leave this one blank. 6. On the mirror selection screen, the default archive mirror is fine, whichever mirror it provides. 7. On the storage configuration screens, starting by selecting “custom storage layout.” As I said before with Rocky, avoid LVM like the plague unless you’re on a massive piece of physical hardware where you can actually use this. The only disk option you should have under “available devices” should be /dev/sda … note that in Linux, sd is the disk device type, a means the first disk, b the second and so on, and your partitions, as in Rocky, will be numbered. 3 Select /dev/sda, and first, choose to use it as the boot device. Select it again, and choose to add a GPT partition. Make a 18 GB root filesystem, with the ext4 filesystem. Completing the setup of the root filesystem by selecting “create” will return you to the screen where you selected to create the root filesystem on /dev/sda. It should show that just under 2 GB remain available (mine said 1.997G). Select /dev/sda again, and create a swap petition with all remaining space. Your disk setup should look like the next screenshot … once you’re content with your disk setup, choose “done.” It’s going to ask you to confirm whether you want to take destructive actions … remember that your VM’s hard disk is just a virtual disk in a file on your computer. “Continue” without hesitation. 4 The Ubuntu installer will then go to the “profile setup” screen, where it’ll ask you to set up a user. Use whatever you like for your own name, user “ubuntu” as your server’s name, continue to use the same username you’ve been using for the non-root user on the rest of your VMs, and choose a good password … … and after you hit “done” on this screen, DO select to install OpenSSH server on the “SSH Setup” screen. Do NOT select to import an SSH identity. After you hit “done” on the SSH setup screen, you get “featured server snaps.” Take a pass, go straight to “done.” Hitting done starts the installation, and the top of the screen said “install complete!” but the installer was clearly still runing “curtin hook” to finalize the installation … hmmmm. I do not think it means what they think it means! 5 After a couple minutes, I got the option to “reboot now,” and I took it … you should too. The installer, as a parting gift, asked me to remove the installation medium (again, this is the .ISO file in the VM’s virtual optical drive that it is referring to) and press the enter key to reboot. Make sure the ISO file is “disconnected” from the virtual optical drive in your VM, and hit return. This is one of the few changes that you can make to the VM while it’s turned on … because we’re just ejecting a CD-ROM from the computer. 8. After the reboot, you’ll get a login prompt and if you let it sit for a minute, the login prompt will be followed and chased off screen by a bunch of final, first-boot setup stuff, like generating a host key pair for the VM’s SSH service. if you hit the carriage return key after it stops doing things – my VM stopped after it “reached target cloud-init target,” you’ll get a fresh login prompt. 6 Note that you set no root password … on Ubuntu, like on macOS, and a lot of OSs these days, the root account is typically locked as a consquence of not setting a password … no password will work to log you in. You are expected to use sudo whenever you use your admin mojo here. part 2: configuration and additional installations 9. In case your installer failed to configure the network properly, I’m leaving this in here. If you are able to ping your Ubuntu VM, SSH into it, and look up DNS names on the internet with the host command, you can skip ahead to step #10. Just in case you can’t, because failures to set up the network were that frequent last year, I’m leaving this step in here. You might also just want to know how the network is configured statically in Ubuntu … it’s fairly strange. ‼ YES, THE INSTALLER IN UBUNTU USED TO SUCK THIS BAD DURING THE TRANSITION TO NETPLAN! If your Ubuntu VM’s network works properly after the installer, you can skip ahead to #10. If you need to configure Ubuntu’s networking manually, you need to do all this network configuration on the VM’s console. Typically, services aren’t watching their configuration files and automatically adapting the configuration. cloud-init, however, is a rare exception to this rule … once you remove the network configuration (the file 50-cloud-init.yaml) below, network connectivity to your Ubuntu VM will immediately be broken, and you will not be able to SSH into it until you get the network back up again. Ubuntu 16.04 used the file /etc/network/interfaces to configure its network(s) … but that file, and its backing subsystems, have been deprecated as of Ubuntu 18.04 in favor of the super-duper megaoverengineered netplan. netplan stores its configurations in the folder /etc/netplan, and because the Ubuntu installer detected we were running under VMware, it bundled the network configuration along with – and named it after – a common suite of cloud instance initialization scripts, cloud-init. cloud-init, like a lot of things in life, is really intrusive, under the guise of trying to be helpful. Let’s get it out of the network configuration business. $ sudo apt remove ifupdown This command removes the old network configuration subsystem from Ubuntu 16.04 and prior versions. $ sudo vi /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg We’re creating the file in the above command, to tell cloud-init not to configure the network, we put this line in it: network: {config: disabled} Remove the old network configuration that leaned on cloud-init … $ sudo rm /etc/netplan/50-cloud-init.yaml 7 … and create your own, new network configuration file: $ sudo vi /etc/netplan/01-vmnet.yaml Give it the following contents … and check your network adapter’s name with the command ip a (mine was ens33 in the sample below) before you do … network: version: 2 renderer: networkd ethernets: ens33: dhcp4: no addresses: [] gateway4: nameservers: search: [cs470.local] addresses: [] Once you’ve looked it over a couple times for typos, save it out, and tell netplan to generate the necessary configuration … $ sudo netplan generate … and then apply it. $ sudo netplan apply Linux distributions, increasingly, are moving away from the ifconfig command towards the ip command. To check out your network configuration, try the command ip a … if you can’t ping your gateway, you got one of the IP addresses wrong. If you can’t ping outside your gateway (say, you got your gateway IP wrong, probably. If you can’t look up names, or ping you probably got your nameserver wrong, or it’s not working correctly. 10. Ordinarily, we’d set up SSH here, but we’re going to set up the NFS client on this VM instead, and get our SSH directory – and the entirety of our /home directories from the NFS server on the Rocky VM. In order to do that, we need to initialize Ubuntu’s package management system, apt: $ sudo apt update You should see apt go out and grab the lists of the latest packages from Ubuntu’s repository, probably the same “repo” as set up in number six above, and finish with something like … 63 packages can be upgraded. Run ‘apt list –upgradable’ to see them. … only we don’t care about that, we want NFS first. 8 $ sudo apt install nfs-common apt will tell you that it’s going to download and install so much software, and ask for your confirmation to proceed. After it’s done installing, you should be able to mount the NFS share of /home from your Rocky VM. First, cd out of /home … $ cd / … and then manually mount it … $ sudo mount rocky:/home /home … running the mount and/or df commands should confirm that it’s properly mounted. If it’s not, you goofed something up above this, and should backtrack. 11. You should also now be able to SSH into your Ubuntu VM without using a password, using key-based authentication, as your public key is in place in ~/.ssh/authorized_keys thanks to the NFS mount. Test it. Log into your Ubuntu VM over SSH … you may have to accept its SSH host key, as it is a new SSH server to your client, but it should not ask for a password. Pretty cool, huh? Since /home is now shared with the other two computers, your SSH public keyring is already there. 12. Having the same home directory everywhere is badass; let’s make this NFS mount permanent. Use vi to add the following line to /etc/fstab on your Ubuntu VM: rocky:/home /home nfs defaults 0 0 Check twice for typos – remember, a problem mounting any filesystem listed in /etc/fstab will cause your system to fail to fully boot – and test it out by rebooting your VM. 13. Once you get your VM back from reboot, let’s take a couple minutes to install packages used later by your instructor for grading purposes: csh (via tcsh), GNU binutils, and net-tools. $ sudo apt install tcsh binutils net-tools 14. It’s time for network time! $ sudo apt install ntp ntpdate Enable NTP so that it will start up when you next boot your Ubuntu VM … $ sudo systemctl enable ntp.service … fire it up immediately … $ sudo systemctl start ntp.service 9 … and verify it’s running. $ ps auxww | grep ntpd | grep -v grep The -v switch with grep excludes, instead of matches lines, so we’re making sure we only see a line if there’s an ntpd process, not a line for our grep process trying to find ntpd. 15. Mail and mail forwarding next … Ubuntu 20.04 appears to come with no built-in mail subsystem. $ which mail This command returned no output. $ which sendmail This command returned no output … and most mail servers offer a sendmail command, for historical reasons. $ apt list –installed | grep -i mail This command also returned no useful output, just a warning about how apt’s command line interface (CLI) is in flux, and to be careful using it in scripts. So, let’s install postfix; it’s way easier to configure than sendmail. $ sudo apt install postfix After confirming you want to install postfix, you’ll be greeted with this FreeBSD-looking dialog. We’re going to choose “no configuration,” and then set it up manually, because none of the options match our use case for mail on our Ubuntu VM. We want mail to be sent via SMTP, but not to be received, and we want to exercise our DNS and network configuration to get mail to its destination. 10 In the middle of the output that follows, you should see something like this … Preparing to unpack …/postfix_3.4.13-0ubuntu1_amd64.deb … Unpacking postfix (3.4.13-0ubuntu1) … Setting up ssl-cert (1.0.39) … Setting up postfix (3.4.13-0ubuntu1) … Adding group `postfix’ (GID 119) … Done. Adding system user `postfix’ (UID 116) … Adding new user `postfix’ (UID 116) with group `postfix’ … Not creating home directory `/var/spool/postfix’. Creating /etc/postfix/ Adding group `postdrop’ (GID 120) … Done. /etc/aliases does not exist, creating it. Postfix ( was not set up. Start with cp /usr/share/postfix/ /etc/postfix/ . If you need to make changes, edit /etc/postfix/ (and others) as needed. To view Postfix configuration values, see postconf(1). After modifying, be sure to run ‘systemctl reload postfix’. Created symlink /etc/systemd/system/ → /lib/systemd/system/postfix.service. Processing triggers for ufw (0.36-6) … Processing triggers for systemd (245.4-4ubuntu3.11) … The package installation script, as you see, makes a new separate user, called postfix, to run the postfix mail server as As it tells us, let’s create the postfix configuration file … $ sudo cp -p /etc/postfix/ /etc/postfix/ … we’re not using the sample under /usr/share/postfix because it’s really thin (take a look at it). As with our Rocky VM, let’s edit the configuration file … $ sudo vi /etc/postfix/ … and set the following values under the areas for each variable’s sample. As you’ll note going through it helpfully provides its own documentation. In files like this, it just saves you time if you put the value right there next to the explanation for each configuration item. Your fingers and eyeballs need move nowhere to know what you’re doing. myhostname = ubuntu.cs470.local mydomain = cs470.local 11 myorigin = $myhostname sendmail_path = /usr/sbin/sendmail newaliases_path = /usr/bin/newaliases mailq_path = /usr/bin/mailq setgid_group = postdrop manpage_directory = /usr/share/man sample_directory = /usr/share/postfix inet_protocols = ipv4 … this last one was already set in the file I got from the package, and recommended that you copy earlier in this step. A lot of these settings were things I felt the postfix package should have filled out for us, since they’re just aiming at other pieces of postfix … but this is probably explained by our choice of “no configuration” at that menu of choices apt threw us. The options sample_directory, readme_directory, and html_directory should be commented out (add a # at the start of these lines to turn them into comments). Once you’re done, save out the file, and tell postfix to start up. $ sudo postfix start You might get a warning about a symbolic link leaving /etc/postfix … you may safely ignore it. Now we need to edit /etc/aliases. Add the following line to forward root’s mail … root: peter@cs470.local … and of course, replace my username with yours, and run newaliases to tell the mail subsystem to re-process the aliases database. $ sudo newaliases Now let’s test our mail configuration. To do that, we need a command-line mailer, but … $ which mail … returns no output. So let’s install apt-file to search the apt database for specific commands … $ sudo apt install apt-file … have apt-file built its database … $ sudo apt-file update 12 … and finally, search for mail or mailx … $ apt-file search mail Wow, this command returns a lot of output. Let’s have it refine its output a bit by piping it through grep … $ apt-file search mail | grep -…

Do you similar assignment and would want someone to complete it for you? Click on the ORDER NOW option to get instant services at

Do you have a similar assignment and would want someone to complete it for you? Click on the ORDER NOW option to get instant services at We assure you of a well written and plagiarism free papers delivered within your specified deadline.