seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 1 | .. This work is licensed under a Creative Commons Attribution 4.0 International License.
|
| 2 | .. http://creativecommons.org/licenses/by/4.0
|
| 3 | .. Copyright 2017 Huawei Technologies Co., Ltd.
|
| 4 |
|
seshukm | 1594143 | 2017-11-08 12:48:13 +0530 | [diff] [blame] | 5 | SO Install & Configure
|
Seshu-Kumar-M | bf2b9e1 | 2017-10-11 16:33:41 +0800 | [diff] [blame] | 6 | ==========================================
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 7 |
|
| 8 | Get Ubuntu
|
| 9 | ----------
|
| 10 | Get the Ubuntu ISO image from ubuntu.com. The recommended version is 16.04.3 LTS (Long Term Support), desktop edition.
|
| 11 |
|
| 12 | Get VirtualBox and VirtualBox Guest Additions
|
| 13 | ---------------------------------------------
|
| 14 | Make sure you have the VirtualBox Guest Additions ISO for your version of VirtualBox. I'm using VirtualBox 5.1.28. Save the Guest Additions ISO on your host computer along with the Ubuntu ISO. Get the Guest Additions ISO from here:
|
seshukm | eb81845 | 2018-05-23 16:06:56 +0530 | [diff] [blame] | 15 | http://download.virtualbox.org/virtualbox
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 16 | *NOTE*: Guest Additions versions prior to 5.1 will not work with Ubuntu 16.04.3. If you have an earlier version of VirtualBox, you should upgrade to the latest 5.1 version.
|
| 17 |
|
| 18 | Create a new VM in VirtualBox for Ubuntu
|
| 19 | ----------------------------------------
|
| 20 | Type: Linux
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 21 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 22 | Version: Ubuntu (64-bit)
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 23 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 24 | At least 2048 MB memory
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 25 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 26 | At least 40 GB VDI
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 27 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 28 | Network: Attached to: NAT
|
| 29 |
|
| 30 | Create a port-forwarding rule for SSH
|
| 31 | -------------------------------------
|
| 32 | Create a port-forwarding rule so that you can use PuTTY (or other SSH client) to connect to the VM.
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 33 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 34 | Go to "Network" settings in VirtualBox, add a port forwarding rule:
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 35 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 36 | Name: SSH
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 37 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 38 | Protocol: TCP
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 39 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 40 | Host IP: 127.0.0.1
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 41 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 42 | Host Port: 1022
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 43 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 44 | Guest IP: <leave blank>
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 45 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 46 | Guest Port: 22
|
| 47 |
|
seshukm | cb4f870 | 2018-08-21 20:49:19 +0800 | [diff] [blame^] | 48 | .. image:: ../images/Configure_ubuntu_SO_1.png
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 49 |
|
| 50 | .
|
| 51 |
|
seshukm | cb4f870 | 2018-08-21 20:49:19 +0800 | [diff] [blame^] | 52 | .. image:: ../images/Configure_ubuntu_SO_2.png
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 53 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 54 | Create Shared Folder
|
| 55 | --------------------
|
| 56 | This is oriented to Windows users. If you're using a MAC or a Linux host computer, the details may be different. You can share any folder on the host computer with the Ubuntu VM. On Windows, a practical choice is to share the C:\Users folder, so that your Windows home directory will be accessible from the Ubuntu VM.
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 57 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 58 | Go to "Shared Folders" settings in VirtualBox, add a share:
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 59 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 60 | Folder Path: C:\Users
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 61 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 62 | Folder Name: Users
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 63 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 64 | Auto-mount: <checked>
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 65 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 66 | Read-only: <unchecked>
|
| 67 |
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 68 | .. image:: images/Configure_ubuntu_SO_3.png
|
| 69 |
|
| 70 | .
|
| 71 |
|
| 72 | .. image:: images/Configure_ubuntu_SO_4.png
|
| 73 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 74 | Install Ubuntu in the VM
|
| 75 | ------------------------
|
| 76 | On the "Storage" panel in VirtualBox, click on "[ optical drive ]" and then "Choose Disk Image". Select your Ubuntu ISO image.
|
| 77 |
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 78 | .. image:: images/Configure_ubuntu_SO_5.png
|
| 79 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 80 | After selecting the ISO image, start the VM.
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 81 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 82 | Follow the prompts to install Ubuntu.
|
| 83 |
|
| 84 | Proxy Configuration (optional)
|
| 85 | ------------------------------
|
| 86 | If you're behind a corporate firewall, configure some proxy settings. NOTE: your proxy configuration may require username and password credentials, not shown here.
|
| 87 | **Ubuntu system proxy setting:**
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 88 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 89 | System Settings → Network → Network proxy
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 90 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 91 | (Replace "proxyhost" and port with your actual proxy information)
|
| 92 |
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 93 | .. image:: images/Configure_ubuntu_SO_6.png
|
| 94 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 95 | **apt proxy setting:**
|
| 96 | Edit /etc/apt/apt.conf and add one line at the top (replace "proxyhost:port" with your actual proxy information):
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 97 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 98 | Acquire::http::Proxy "http://proxyhost:port";
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 99 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 100 | Reboot the VM.
|
| 101 |
|
| 102 | Install SSH Server
|
| 103 | ------------------
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 104 |
|
| 105 | .. code-block:: bash
|
| 106 |
|
| 107 | sudo apt update
|
| 108 | sudo apt install openssh-server
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 109 |
|
| 110 | Connect to the VM from your host computer
|
| 111 | -----------------------------------------
|
| 112 | The PuTTY SSH client is popular. A connection to localhost:1022 (or whatever port you have forwarded) will go to the VM.
|
| 113 |
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 114 | .. image:: images/Configure_ubuntu_SO_7.png
|
| 115 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 116 | Install VirtualBox Guest Additions
|
| 117 | ----------------------------------
|
| 118 | On the "Storage" panel in VirtualBox, click on "[ optical drive ]" and then "Choose Disk Image". Select your VirtualBox Guest Additions ISO image.
|
| 119 |
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 120 | .. image:: images/Configure_ubuntu_SO_8.png
|
| 121 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 122 | In a VM terminal window, mount the cdrom:
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 123 |
|
| 124 | .. code-block:: bash
|
| 125 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 126 | sudo mkdir -p /media/cdrom
|
| 127 | sudo mount /dev/cdrom /media/cdrom
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 128 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 129 | Install necessary dependencies:
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 130 |
|
| 131 | .. code-block:: bash
|
| 132 |
|
| 133 | sudo apt update
|
| 134 | sudo apt install gcc g++ dkms
|
| 135 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 136 | Install the guest additions. NOTE: look for errors in the command output! If you see an error that says you are missing kernel headers, the most likely cause is that you are using a VirtualBox version that is too old. The error message is misleading.
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 137 |
|
| 138 | .. code-block:: bash
|
| 139 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 140 | cd /media/cdrom
|
| 141 | sudo ./VBoxLinuxAdditions.run
|
| 142 |
|
seshukm | cb4f870 | 2018-08-21 20:49:19 +0800 | [diff] [blame^] | 143 | .. image:: ../images/Configure_ubuntu_SO_9.png
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 144 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 145 | Add yourself to the vboxsf user group (replace "userid" with your user ID):
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 146 |
|
| 147 | .. code-block:: bash
|
| 148 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 149 | sudo usermod -a -G vboxsf userid
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 150 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 151 | Reboot the VM.
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 152 |
|
seshukm | 613e448 | 2017-10-11 10:17:45 +0530 | [diff] [blame] | 153 | In a VM terminal window, verify that you can access your home directory on the host computer, which should be mounted under here:
|
| 154 | /media/sf_Users
|
| 155 |
|
| 156 | Further Reading
|
| 157 | ----------------------------------------
|
seshukm | bf35542 | 2017-11-06 09:14:42 +0530 | [diff] [blame] | 158 |
|
| 159 | .. toctree::
|
| 160 | :maxdepth: 1
|
| 161 |
|
| 162 | Install_Docker.rst
|
| 163 | Configure_git_and_gerrit.rst
|
| 164 | Workspace_and_Development_Tools.rst |