Install » Historie » Version 7
Jeremias Keihsler, 13.04.2019 10:53
| 1 | 1 | Jeremias Keihsler | h1. Install Procedure for CentOS 7.x |
|---|---|---|---|
| 2 | |||
| 3 | I want to say first that this is not the only way of setting up such a system. There are many ways of achieving this goal but this is the way I take. |
||
| 4 | |||
| 5 | h2. 1 Requirements |
||
| 6 | |||
| 7 | To install such a system you will need the following: |
||
| 8 | |||
| 9 | 2 | Jeremias Keihsler | * Download the two CentOS 7.x DVDs from a mirror next to you (the list of mirrors can be found here: http://isoredirect.centos.org/centos/6/isos/x86_64/). |
| 10 | 1 | Jeremias Keihsler | * a fast Internet connection. |
| 11 | |||
| 12 | h2. 2 Preliminary Note |
||
| 13 | |||
| 14 | In this tutorial I use the hostname @server1.example.com@ with the IP address @192.168.0.100@ and the gateway @192.168.0.1@. These settings might differ for you, so you have to replace them where appropriate. |
||
| 15 | |||
| 16 | h2. 3 Configure The Base System |
||
| 17 | |||
| 18 | Boot from your first CentOS 7.x DVD. |
||
| 19 | As it can take a long time to test the installation media we skip this test here and press @<ENTER>@ at the boot prompt: |
||
| 20 | |||
| 21 | !{width 500}centos7_inst01.png! |
||
| 22 | |||
| 23 | Choose your language next: |
||
| 24 | |||
| 25 | !{width 500}centos7_inst02.png! |
||
| 26 | |||
| 27 | Instead of the step-by-step approach the previous CentOS-installer took, CentOS 7 uses a central point of configuration. |
||
| 28 | We will enter each section and return until all our settings are done. |
||
| 29 | |||
| 30 | !{width 500}centos7_inst03.png! |
||
| 31 | |||
| 32 | h3. Network & Hostname |
||
| 33 | |||
| 34 | Set the hostname manually, e.g. @server1.example.com@ |
||
| 35 | |||
| 36 | Enable the network interfaces and @configure@ each of them |
||
| 37 | |||
| 38 | !{width 500}centos7_inst04.png! |
||
| 39 | |||
| 40 | On to the configure network. The default setting here is to configure the network interfaces with DHCP, but we are installing a server, so static IP addresses are not a bad idea… Click on the Edit button after selecting the interface. |
||
| 41 | |||
| 42 | !{width 500}centos7_inst07.png! |
||
| 43 | |||
| 44 | In the window that pops up uncheck Dynamic IP configuration (DHCP) and Enable IPv6 support and give your network card a static IP address (in this tutorial I'm using the IP address 192.168.0.100 for demonstration purposes) and a suitable netmask (e.g. 255.255.255.0; if you are not sure about the right values, http://www.subnetmask.info might help you) also enter a gateway (e.g. 192.168.0.1) and up to two DNS servers (e.g. 8.8.8.8 and 145.253.2.75). By default all interfaces are not connected automatically, in most cases you want to change this. |
||
| 45 | |||
| 46 | !{width 500}centos7_inst06.png! |
||
| 47 | |||
| 48 | h3. Date & Time |
||
| 49 | |||
| 50 | Choose your time zone: |
||
| 51 | |||
| 52 | Check Date and Time, as many services are very dependant on the timestamp you should set an approprate time-server or even better a time-server-pool. If you have internet access and are based in germany you might want to use following public NTP-server-pool. |
||
| 53 | |||
| 54 | <pre><code class="bash"> |
||
| 55 | 0.de.pool.ntp.org |
||
| 56 | 1.de.pool.ntp.org |
||
| 57 | 2.de.pool.ntp.org |
||
| 58 | 3.de.pool.ntp.org |
||
| 59 | </code></pre> |
||
| 60 | |||
| 61 | check www.ntp.org for details. If you don't have access to a public NTP-server ask your admin for a local NTP-server. |
||
| 62 | |||
| 63 | !{width 500}centos7_inst08.png! |
||
| 64 | |||
| 65 | h3. Keyboard |
||
| 66 | |||
| 67 | Select your keyboard layout: |
||
| 68 | |||
| 69 | !{width 500}centos7_inst09.png! |
||
| 70 | |||
| 71 | h3. Installation Source |
||
| 72 | |||
| 73 | you may point to a local source or a web-based-server |
||
| 74 | |||
| 75 | !{width 500}centos7_inst10.png! |
||
| 76 | |||
| 77 | h3. Software Selection |
||
| 78 | |||
| 79 | for this example we go for a standard @GNOME-Desktop@ |
||
| 80 | |||
| 81 | But you may want to consider a more appropriate selection for your system. |
||
| 82 | |||
| 83 | !{width 500}centos7_inst11.png! |
||
| 84 | |||
| 85 | 5 | Jeremias Keihsler | h3. Installation Destination NON-RAID |
| 86 | 1 | Jeremias Keihsler | |
| 87 | Typically you will choose @Local Standard Disks@ here |
||
| 88 | |||
| 89 | !{width 500}centos7_inst12.png! |
||
| 90 | |||
| 91 | Now we must select a partitioning scheme for our installation. Usually you will want to configure the layout on your own. |
||
| 92 | |||
| 93 | !{width 500}centos7_inst13.png! |
||
| 94 | |||
| 95 | 4 | Jeremias Keihsler | This will result in a small @/boot@ and a large @/@ partition as well as a swap partition. Of course, you're free to partition your hard drive however you like it. |
| 96 | 1 | Jeremias Keihsler | |
| 97 | |_. type |_. logical volume name |_. mount point |_. size | |
||
| 98 | |_. small database server | lv_swap | swap | 512| |
||
| 99 | |_. | lv_home | \home | 1024| |
||
| 100 | |_. | lv_var_log | \var\log | 1024| |
||
| 101 | |_. | lv_var | \var | 8192| |
||
| 102 | |_. | lv_root | \ | 8192| |
||
| 103 | |||
| 104 | Click on @Done@ to continue: |
||
| 105 | |||
| 106 | !{width 500}centos7_inst14.png! |
||
| 107 | |||
| 108 | * The hard drive is going to be formatted |
||
| 109 | * After the drive being formatted the partitioning layout needs to be written to disk |
||
| 110 | 5 | Jeremias Keihsler | |
| 111 | h3. Installation Destination RAID1 |
||
| 112 | |||
| 113 | taken from: https://www.tuxfixer.com/centos-7-installation-with-lvm-raid-1-mirroring/ |
||
| 114 | |||
| 115 | Select both disks from the available devices and choose “I will configure partitioning” option: |
||
| 116 | |||
| 117 | 6 | Jeremias Keihsler | !{width 500}centos_7_inst_raid1_01.png! |
| 118 | 1 | Jeremias Keihsler | |
| 119 | 7 | Jeremias Keihsler | You will be redirected to MANUAL PARTITIONING screen. |
| 120 | |||
| 121 | First create boot partition with the following parameters: |
||
| 122 | * mount point: /boot |
||
| 123 | * size: 1024MB |
||
| 124 | * device type: RAID |
||
| 125 | * RAID level: RAID 1 (Mirroring) |
||
| 126 | * file system: xfs |
||
| 127 | |||
| 128 | !{width 500}centos_7_inst_raid1_02.png! |
||
| 129 | |||
| 130 | Now let’s create swap and root partitions. We will create them inside the volume group called centos which will be placed on top of RAID 1. |
||
| 131 | |||
| 132 | Let’s start from swap creation with the following parameters: |
||
| 133 | * mount point: swap |
||
| 134 | * device type: LVM |
||
| 135 | * files system: swap |
||
| 136 | |||
| 137 | During swap creation choose Device Type: LVM and click on Modify button in Volume Group area: |
||
| 138 | |||
| 139 | !{width 500}centos_7_inst_raid1_03.png! |
||
| 140 | |||
| 141 | Now we need to create centos Volume Group on the top of RAID 1 (using automatic size policy): |
||
| 142 | |||
| 143 | !{width 500}centos_7_inst_raid1_04.png! |
||
| 144 | |||
| 145 | swap partition is now created as a Logical Volume named centos-swap: |
||
| 146 | |||
| 147 | !{width 500}centos_7_inst_raid1_05.png! |
||
| 148 | |||
| 149 | Now create root partition with the following parameters: |
||
| 150 | * mount point: / |
||
| 151 | * device type: LVM (use previously created centos VG on top of RAID 1) |
||
| 152 | * files system: xfs |
||
| 153 | |||
| 154 | !{width 500}centos_7_inst_raid1_06.png! |
||
| 155 | |||
| 156 | root partition is now created as a Logical Volume named centos-root. |
||
| 157 | |||
| 158 | Click on Done button, accept all the changes made to the partitions on SUMMARY OF CHANGES screen, return to INSTALLATION SUMMARY screen and continue installation as usual. |
||
| 159 | |||
| 160 | 1 | Jeremias Keihsler | h2. 4 Install The Base System |
| 161 | |||
| 162 | |||
| 163 | !{width 500}centos7_inst15.png! |
||
| 164 | |||
| 165 | !{width 500}centos7_inst16.png! |
||
| 166 | |||
| 167 | h3. Set ROOT password |
||
| 168 | |||
| 169 | Give @root@ a password: |
||
| 170 | |||
| 171 | !{width 500}centos7_inst17.png! |
||
| 172 | |||
| 173 | h3. Create Additional User |
||
| 174 | |||
| 175 | you should always have a user even in a server environment. Use your root access only when necessary to prevent unintended changes to the system. |
||
| 176 | |||
| 177 | !{width 500}centos7_inst18.png! |
||
| 178 | |||
| 179 | |||
| 180 | !{width 500}centos7_inst19.png! |
||
| 181 | |||
| 182 | !{width 500}centos7_inst20.png! |
||
| 183 | |||
| 184 | h2. Initial Setup |
||
| 185 | |||
| 186 | |||
| 187 | |||
| 188 | !{width 500}centos7_inst21.png! |
||
| 189 | |||
| 190 | h3. Licence Information |
||
| 191 | |||
| 192 | |||
| 193 | !{width 500}centos7_inst22.png! |
||
| 194 | !{width 500}centos7_inst23.png! |
||
| 195 | |||
| 196 | If you enable kdump, you may want to stay with the preset defaults. |
||
| 197 | |||
| 198 | Let's go Finish |
||
| 199 | |||
| 200 | !{width 500}centos7_inst24.png! |
||
| 201 | |||
| 202 | Finally, the installation is complete, and you can remove your CD or DVD from the computer and reboot it: |
||
| 203 | |||
| 204 | Welcome to your GNOME-Desktop-Environment. |
||
| 205 | |||
| 206 | After finishing our installation let's login the very first time. |
||
| 207 | |||
| 208 | !{width 500}centos7_inst25.png! |
||
| 209 | |||
| 210 | We change the screen to a text console via @CTRL-ALT-F2@ |
||
| 211 | |||
| 212 | Please provide your username @root@. Do you still remember the password you thought of a few minutes ago? |
||
| 213 | |||
| 214 | !{width 500}centos7_inst26.png! |
||
| 215 | |||
| 216 | get all the latest updates via @yum update@ |
||
| 217 | |||
| 218 | !{width 500}centos7_inst27.png! |
||
| 219 | |||
| 220 | The installation begins. This will take a few minutes: |
||
| 221 | |||
| 222 | h2. 5 Post Installation Steps |
||
| 223 | |||
| 224 | h3. Install additional packages |
||
| 225 | |||
| 226 | With @minimal Desktop@ the most important packages are already installed. If you are curious about installed and available package-groups use |
||
| 227 | <pre><code class="bash"> |
||
| 228 | yum grouplist |
||
| 229 | </code></pre> |
||
| 230 | and install additional groups via |
||
| 231 | <pre><code class="bash"> |
||
| 232 | yum groupinstall "xxx" |
||
| 233 | </code></pre> |