In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Centos 8 has finally been released quite a while after Redhat RHEL 8 was released, and I can't wait to download its ISO files for installation testing. Compared to centos 7, the file size is much larger.
After obtaining the centos 8 iso image file, burn it to cd or bootable usb drive. If it is a physical server, you need to confirm whether it boots with UEFI. Compared to older BIOS, UEFI requires some extra work, such as manual partitioning, you have to create a separate partition/boot/efi, otherwise the installation may not proceed.
Pre-installation planning
If it is used in production systems, it needs to be planned before deployment, and it is not allowed to start work as soon as it arrives. What projects are planned? There really is no standard. Before I move bricks, I generally consider several aspects for your reference:
Disk Redundancy Configuration: What RAID Level Does Multiple Disks Do?
IP address allocation: Good planning can avoid management confusion and avoid IP address conflicts with other servers.
Host name: Host name is best to be able to take meaning, such as my common use name + IP ending way (web118, indicating that the system is web use, IP address last field is 118). In the era of not much experience, I have managed more than 500 physical servers, the host name is localhost, maintenance is really fatal ah!
ü Disk partition: It is strongly recommended that physical servers do not make a root to the end!!! One of the benefits of partitioning is data isolation. In the long-term operation and maintenance management process, the probability of file system corruption still exists. File system repair can be tricky if you're down to the roots. Another scenario, assuming a separate partition for logs, is that the logs plug the partition, which will not cause the system to hang (one root to the end, the logs fill the entire root partition, I am afraid remote login is a problem).
ü Directory naming: mainly names partition mounting points outside the system disk, such as/data,/backup, etc.
Start system installation
Prepare the installation media and understand the basic configuration of the device, then insert the bootable installation media and ensure that the boot media is set to the highest priority.
The normal boot interface is shown below:
Cursor key to select the first line "Install Centos Linux 8.0.1905", Enter to go to the next step. If you intend to install in text mode, press the "esc" key directly to enter the boot interface and enter the command: linux text (previous versions can be entered directly). In case you can't get to the boot interface, try changing the boot mode to traditional BIOS.
Compared to the graphical interface installation centos 8, text mode is a lot of trouble, but it is time-consuming and laborious, especially manual partitioning.
Therefore, in order to install more efficiently, it is better to change the original habit and install it from the graphical interface.
Centos 8 custom layout is reasonable, all in one interface, simple and crisp.
I need to customize Time & Data, Software Selection, Network & Host Name, and Required System Installation Destination. In order to ensure the installation efficiency, you can first select the system installation location with the mouse, the purpose of this is to check whether the hard disk is recognized by the system. If the hard drive is not recognized by the system, and other aspects of customization have been done first, waste time and cannot continue.
ØCustom system installation location
My 100 gigabyte hard drive has been correctly identified. If there are multiple disks, it will be displayed in multiple rows and icons, and the mouse can select a disk. In the Custom Partition section, click "Custom"(default is automatic), and then click "Done" button on the left side of the top of the interface after confirming that there is no error. Enter the custom partition interface, click the button "+" to manually partition.
First create partition/boot/efi, select, click "Add mount point".
Modify the partition size to 1G (the default takes up all disk space) and ensure that the file system type is "EFI System partition." After confirmation, click "Update Setting".
Continue to click the plus sign "+" in this interface to add swap partition,/boot partition, root partition/, system log partition/var, etc. A custom created disk partition layout looks like this:
Click the button "Done" to pop up the partition summary interface, click the button "Accept Changes" to complete the operation of customizing the system installation position.
Customized time zone
After returning to the installation summary interface, click "Time & Data" and select the location of China on the map. After selecting it, the area on the upper left will be automatically filled with "Asia" and the city will be filled with "Shanghai."
Click "Done" to complete the settings and return to the main customization interface.
ØCustom installation required software package
Click "Software Selection" to enter the package selection interface. Optional minimal install or custom install Custom Operation System. I usually choose custom installation and select the sub-items "Standard","Developmet Tools" and "System Tools".
An older version of centos, you can press F2 to view the package information contained in the right child. After confirmation, click the button "Done" to complete the setting and return to the main customization interface.
Customized host name and network
Click the hyperlink "Network & Host Name" on the main interface to enter the network customization interface. Under normal circumstances, the network card is recognized by the system, and the name of the network card will be displayed. Multiple network cards will be displayed in multiple lines.
(1) Modify the host name: enter the pre-planned characters, click the button "Apply" to take effect immediately;
(2) Continue to the previous interface, click the button "Configure…" at the lower right side of the mouse to pop up the sub-interface, click "IPv4 Setting", and then continue to click the drop-down list box "Method."
Continue to click the button "Add" in this interface, and fill in the corresponding contents in the edit box according to the pre-planning.
(3) Click the right slide button to enable the network connection (from OFF to ON).
After confirmation, click the "Done" button to return to the main interface of custom installation.
ØFormal installation
After all items are customized, click the button "Begin Installation". The installer will perform a series of operations such as hard disk formatting and copying files to corresponding directories. During this process, user settings can be made, that is, root password can be set.
It is strongly recommended to set complex passwords in production environment, and use kepass password management tool to generate passwords randomly, which is a very good choice.
Wait until the interface button "Reboot" appears, the installation process is complete, click this button to restart the system, and eject the installation media.
Post-processing and system delivery
After the system is installed, the minimum requirement is to be able to connect remotely. If the network is not set up during installation or is not set up correctly, you need to enter the system from the console (physical server is the monitor) after the system restarts to set up the network.
Change host name
The console takes effect by executing the following commands:
hostnamectl set-hostname mysql116
hostnamectl set-hostname mysql116
After executing this command, open the file/etc/hostname to see the changes made. Instead of directly modifying/etc/hostname, edit this file directly, and it will take effect only if the system is restarted.
Setting up the network
Run ip add to see if the network has settings.
Check the network interface configuration file again to see if there is a setting. If there is a setting, you need to set the BOOT value to yes.
As shown above, if you don't have an ip address, editing files manually is more error-prone, and you can't copy and paste from other places and modify them. In older versions of centos, there was the setup tool to set things up graphically. Centos 7 and later versions use nmtui (network management text user interface) for network settings.
Select Edit a connection and press Enter.
Cursor selected "", continue to enter. The next interface, ipv4 configuration left side with the cursor selected, enter select "Manual." Then continue to move the cursor to the right side of the line "show," enter, pop-up editing interface.
Fill in all values according to the plan in advance.
After confirmation, position the cursor to the "" button at the bottom of the rightmost side, complete the setting and return to the previous interface. Continue to position the cursor to the "" button at the bottom of the rightmost side, enter, and return to the main interface.
In the main interface, position the cursor to "Quit" and exit to the command line to complete the setting.
Open and edit the network interface file to see if the above settings automatically modify the interface file.
To modify the script, execute the following command:
sed -i s#/etc/sysconfig/network-scripts/ifcfg-ens18
For the modifications to take effect, continue with the following instructions:
service NetworkManager restart
Please note that centos 8 does not exist!!
After the network restarts successfully, execute ip add or ping other hosts to verify the correctness of the network settings.
Shut down unnecessary services
Connect to the newly installed centos 8 server system using a remote administration tool such as SecureCRT and execute commands to see which programs or services are started with the system boot
[root@mysqlq126 ~]# systemctl list-unit-files |grep enable
In fact, there are many services do not need to start, waste resources, can be closed. You can use the command systemctl disable firewalld such a way to close one by one, but too much trouble, how good batch closure ah! Remember that there is a tool ntsysv, centos 8 does not install this software, use the following instructions to install:
yum install ntsysv
After installing ntsysv, execute ntsysv command in any path to call up the setting interface.
To verify that the ntsysv settings are consistent with the systemctl command operation, I temporarily cancel the services "atd" and "firewalld" from the ntsysv service list, click "ok" to make their exit effective, and then enter the following command on the command line:
[root@mysqlq126 ~]# systemctl list-unit-files |egrep -i 'firewalld|atd'
From the output, we know that this is exactly what we want. Then run ntsysv again, enter the service list, shut down all unwanted services, and restart the system (this is the fastest).
Close selinux
First check if selinux is on, use the command getenforce , if the output is "Enforcing", it indicates that selinux is not set to unusable.
Next, edit the file/etc/sysconfig/selinux so that the value of SELINUX is disabled, which can be modified with the following command:
sed -i s#SELINUX=enforcing#SELINUX=disabled# /etc/sysconfig/selinux
After the document is modified, it will not take effect. If you don't plan on restarting the system, you can execute setenforce 0 to temporarily shut down the annoying selinux.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.