Install » Historie » Version 4
Jeremias Keihsler, 04.09.2024 09:45
| 1 | 1 | Jeremias Keihsler | h1. Install |
|---|---|---|---|
| 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 | * Download the boot.iso 9.x from a mirror next to you |
||
| 10 | https://download.rockylinux.org/pub/rocky/9/isos/x86_64/Rocky-9.4-x86_64-boot.iso |
||
| 11 | * a fast Internet connection. |
||
| 12 | * bootable USB-drive (create e.g. with Fedora Media Writer or similar) |
||
| 13 | |||
| 14 | h2. 2 Preliminary Note |
||
| 15 | |||
| 16 | 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. |
||
| 17 | |||
| 18 | 3 | Jeremias Keihsler | _Screenshots are taken from an CentOS 7.x installation. Remove this remark as soon as pictures are replaced with CentOS 9.x screenshots. Content is basically equivalent._ |
| 19 | |||
| 20 | 1 | Jeremias Keihsler | h2. 3 Configure The Base System |
| 21 | |||
| 22 | Boot from your first USB drive. |
||
| 23 | As it can take a long time to test the installation media we skip this test here and press @<ENTER>@ at the boot prompt: |
||
| 24 | |||
| 25 | !{width 500}centos7_inst01.png! |
||
| 26 | |||
| 27 | Choose your language next: |
||
| 28 | |||
| 29 | !{width 500}centos7_inst02.png! |
||
| 30 | |||
| 31 | CentOS 9 uses a central point of configuration. |
||
| 32 | We will enter each section and return until all our settings are done. |
||
| 33 | |||
| 34 | !{width 500}centos7_inst03.png! |
||
| 35 | |||
| 36 | h3. Network & Hostname |
||
| 37 | |||
| 38 | Set the hostname manually, e.g. @server1.example.com@ |
||
| 39 | |||
| 40 | Enable the network interfaces and @configure@ each of them |
||
| 41 | |||
| 42 | !{width 500}centos7_inst04.png! |
||
| 43 | |||
| 44 | 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. |
||
| 45 | |||
| 46 | !{width 500}centos7_inst07.png! |
||
| 47 | |||
| 48 | 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. |
||
| 49 | |||
| 50 | !{width 500}centos7_inst06.png! |
||
| 51 | |||
| 52 | h3. Date & Time |
||
| 53 | |||
| 54 | Choose your time zone: |
||
| 55 | |||
| 56 | 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. |
||
| 57 | |||
| 58 | <pre><code class="bash"> |
||
| 59 | 0.de.pool.ntp.org |
||
| 60 | 1.de.pool.ntp.org |
||
| 61 | 2.de.pool.ntp.org |
||
| 62 | 3.de.pool.ntp.org |
||
| 63 | </code></pre> |
||
| 64 | |||
| 65 | 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. |
||
| 66 | |||
| 67 | !{width 500}centos7_inst08.png! |
||
| 68 | |||
| 69 | h3. Keyboard |
||
| 70 | |||
| 71 | Select your keyboard layout: |
||
| 72 | |||
| 73 | !{width 500}centos7_inst09.png! |
||
| 74 | |||
| 75 | h3. Installation Source |
||
| 76 | |||
| 77 | you may point to a local source or a web-based-server |
||
| 78 | |||
| 79 | !{width 500}centos7_inst10.png! |
||
| 80 | |||
| 81 | h3. Software Selection |
||
| 82 | |||
| 83 | for this example we go for a standard @GNOME-Desktop@ |
||
| 84 | |||
| 85 | But you may want to consider a more appropriate selection for your system. |
||
| 86 | |||
| 87 | !{width 500}centos7_inst11.png! |
||
| 88 | |||
| 89 | h3. Installation Destination NON-RAID |
||
| 90 | |||
| 91 | Typically you will choose @Local Standard Disks@ here |
||
| 92 | |||
| 93 | !{width 500}centos7_inst12.png! |
||
| 94 | |||
| 95 | Now we must select a partitioning scheme for our installation. Usually you will want to configure the layout on your own. |
||
| 96 | |||
| 97 | !{width 500}centos7_inst13.png! |
||
| 98 | |||
| 99 | 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. |
||
| 100 | |||
| 101 | |_. type |_. logical volume name |_. mount point |_. size | |
||
| 102 | |_. small database server | lv_swap | swap | 512| |
||
| 103 | |_. | lv_home | \home | 1024| |
||
| 104 | |_. | lv_var_log | \var\log | 1024| |
||
| 105 | |_. | lv_var | \var | 8192| |
||
| 106 | |_. | lv_root | \ | 8192| |
||
| 107 | |||
| 108 | Click on @Done@ to continue: |
||
| 109 | |||
| 110 | !{width 500}centos7_inst14.png! |
||
| 111 | |||
| 112 | * The hard drive is going to be formatted |
||
| 113 | * After the drive being formatted the partitioning layout needs to be written to disk |
||
| 114 | |||
| 115 | h3. Installation Destination RAID1 |
||
| 116 | |||
| 117 | taken from: https://www.tuxfixer.com/centos-7-installation-with-lvm-raid-1-mirroring/ |
||
| 118 | |||
| 119 | Select both disks from the available devices and choose “I will configure partitioning” option: |
||
| 120 | |||
| 121 | !{width 500}centos_7_inst_raid1_01.png! |
||
| 122 | |||
| 123 | You will be redirected to MANUAL PARTITIONING screen. |
||
| 124 | |||
| 125 | First create boot partition with the following parameters: |
||
| 126 | * mount point: /boot |
||
| 127 | * size: 1024MB |
||
| 128 | * device type: RAID |
||
| 129 | * RAID level: RAID 1 (Mirroring) |
||
| 130 | * file system: xfs |
||
| 131 | |||
| 132 | !{width 500}centos_7_inst_raid1_02.png! |
||
| 133 | |||
| 134 | 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. |
||
| 135 | |||
| 136 | Let’s start from swap creation with the following parameters: |
||
| 137 | * mount point: swap |
||
| 138 | * device type: LVM |
||
| 139 | * files system: swap |
||
| 140 | |||
| 141 | During swap creation choose Device Type: LVM and click on Modify button in Volume Group area: |
||
| 142 | |||
| 143 | !{width 500}centos_7_inst_raid1_03.png! |
||
| 144 | |||
| 145 | Now we need to create centos Volume Group on the top of RAID 1 (using automatic size policy): |
||
| 146 | |||
| 147 | !{width 500}centos_7_inst_raid1_04.png! |
||
| 148 | |||
| 149 | swap partition is now created as a Logical Volume named centos-swap: |
||
| 150 | |||
| 151 | !{width 500}centos_7_inst_raid1_05.png! |
||
| 152 | |||
| 153 | Now create root partition with the following parameters: |
||
| 154 | * mount point: / |
||
| 155 | * device type: LVM (use previously created centos VG on top of RAID 1) |
||
| 156 | * files system: xfs |
||
| 157 | |||
| 158 | !{width 500}centos_7_inst_raid1_06.png! |
||
| 159 | |||
| 160 | root partition is now created as a Logical Volume named centos-root. |
||
| 161 | |||
| 162 | 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. |
||
| 163 | |||
| 164 | h2. 4 Install The Base System |
||
| 165 | |||
| 166 | |||
| 167 | !{width 500}centos7_inst15.png! |
||
| 168 | |||
| 169 | !{width 500}centos7_inst16.png! |
||
| 170 | |||
| 171 | h3. Set ROOT password |
||
| 172 | |||
| 173 | Give @root@ a password: |
||
| 174 | |||
| 175 | !{width 500}centos7_inst17.png! |
||
| 176 | |||
| 177 | h3. Create Additional User |
||
| 178 | |||
| 179 | 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. |
||
| 180 | |||
| 181 | !{width 500}centos7_inst18.png! |
||
| 182 | |||
| 183 | |||
| 184 | !{width 500}centos7_inst19.png! |
||
| 185 | |||
| 186 | !{width 500}centos7_inst20.png! |
||
| 187 | |||
| 188 | h2. Initial Setup |
||
| 189 | |||
| 190 | |||
| 191 | |||
| 192 | !{width 500}centos7_inst21.png! |
||
| 193 | |||
| 194 | h3. Licence Information |
||
| 195 | |||
| 196 | |||
| 197 | !{width 500}centos7_inst22.png! |
||
| 198 | !{width 500}centos7_inst23.png! |
||
| 199 | |||
| 200 | If you enable kdump, you may want to stay with the preset defaults. |
||
| 201 | |||
| 202 | Let's go Finish |
||
| 203 | |||
| 204 | !{width 500}centos7_inst24.png! |
||
| 205 | |||
| 206 | Finally, the installation is complete, and you can remove your CD or DVD from the computer and reboot it: |
||
| 207 | |||
| 208 | Welcome to your GNOME-Desktop-Environment. |
||
| 209 | |||
| 210 | After finishing our installation let's login the very first time. |
||
| 211 | |||
| 212 | !{width 500}centos7_inst25.png! |
||
| 213 | |||
| 214 | We change the screen to a text console via @CTRL-ALT-F2@ |
||
| 215 | |||
| 216 | Please provide your username @root@. Do you still remember the password you thought of a few minutes ago? |
||
| 217 | |||
| 218 | !{width 500}centos7_inst26.png! |
||
| 219 | |||
| 220 | get all the latest updates via @yum update@ |
||
| 221 | |||
| 222 | !{width 500}centos7_inst27.png! |
||
| 223 | |||
| 224 | The installation begins. This will take a few minutes: |
||
| 225 | |||
| 226 | h2. 5 Post Installation Steps |
||
| 227 | |||
| 228 | 4 | Jeremias Keihsler | h3. check RAID1 status |
| 229 | |||
| 230 | if XFS on top of LVM on top of RAID1 is used during install following outputs should appear |
||
| 231 | |||
| 232 | <pre><code class="shell"> |
||
| 233 | pvs |
||
| 234 | </code></pre> |
||
| 235 | |||
| 236 | <pre> |
||
| 237 | PV VG Fmt Attr PSize PFree |
||
| 238 | /dev/md127 rl_hostXX lvm2 a-- 143.14g 0 |
||
| 239 | </pre> |
||
| 240 | |||
| 241 | <pre><code class="shell"> |
||
| 242 | vgs |
||
| 243 | </code></pre> |
||
| 244 | |||
| 245 | <pre> |
||
| 246 | VG #PV #LV #SN Attr VSize VFree |
||
| 247 | rl_hostXX 1 3 0 wz--n- 143.14g 0 |
||
| 248 | </pre> |
||
| 249 | |||
| 250 | <pre><code class="shell"> |
||
| 251 | lvs |
||
| 252 | </code></pre> |
||
| 253 | |||
| 254 | <pre> |
||
| 255 | LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert |
||
| 256 | home rl_hostXX -wi-ao---- 18.62g |
||
| 257 | root rl_hostXX -wi-ao---- <93.13g |
||
| 258 | swap rl_hostXX -wi-ao---- 31.39g |
||
| 259 | </pre> |
||
| 260 | |||
| 261 | <pre><code class="shell"> |
||
| 262 | cat /proc/mdstat |
||
| 263 | </code></pre> |
||
| 264 | |||
| 265 | <pre> |
||
| 266 | Personalities : [raid1] |
||
| 267 | md127 : active raid1 nvme3n1p3[0] nvme2n1p2[1] |
||
| 268 | 150096896 blocks super 1.2 [2/2] [UU] |
||
| 269 | bitmap: 1/2 pages [4KB], 65536KB chunk |
||
| 270 | |||
| 271 | unused devices: <none> |
||
| 272 | </pre> |
||
| 273 | |||
| 274 | |||
| 275 | |||
| 276 | |||
| 277 | 1 | Jeremias Keihsler | h3. Install additional packages |
| 278 | |||
| 279 | With @minimal Desktop@ the most important packages are already installed. If you are curious about installed and available package-groups use |
||
| 280 | <pre><code class="bash"> |
||
| 281 | 2 | Jeremias Keihsler | dnf grouplist |
| 282 | 1 | Jeremias Keihsler | </code></pre> |
| 283 | and install additional groups via |
||
| 284 | <pre><code class="bash"> |
||
| 285 | 2 | Jeremias Keihsler | dnf groupinstall "xxx" |
| 286 | 1 | Jeremias Keihsler | </code></pre> |