Server installation Rocky Linux 8.x installation and graphics card configuration

pre-step

  • mirror download
  • Make a boot disk (when the system cannot be installed, try to use other software to make a boot disk, such as UltraSO officially launched by ubunto )
  • Server BIOS entry method: generally F12, F11, F4, F2, Delete (click repeatedly to start the server).

Installation process

1. Install Rocky Linux 8.4

After successfully booting the system, the following interface will appear
insert image description here
. Interface description:

Install Rocky Linux 8 #Install Rocky Linux 8
Test this media & install Rocky Linux 8 #Test the installation file and install Rocky Linux 8Troubleshooting #Repair failure

Choose the first item here, install Rocky Linux 8, press Enter, and enter the following interface

insert image description here
Language selection interface, the official production server is recommended to install the English version.
ContinueContinue

insert image description here

Select-system SYSTEM-installation location Installtion Destir to enter the disk partition interface

insert image description here

The installation disk information appears, the default is fine
insert image description here

Select Storage Configuration storage configuration, Custom customization, click "Done" in the upper left corner to enter the following interface

insert image description here

The new mount point uses the following partition scheme: standard Standard Partition, click the "+" sign in the lower left corner.

Mount point: custom

Expected capacity: custom

Click Add mount point to add a mount point.

Notice:

Plan swap before partitioning
#Swap partition, generally set to 2 times the memory size / #All
remaining space Expected capacity: leave blank #Default is all remaining space




insert image description here

Add a mount point, as shown in the figure below

insert image description here
Click "Done" in the upper left corner to enter the following interface

insert image description here
Accept Changes Accept Changes

insert image description here

Software SOFTWARE" - "Software Selection", enter the following interface
insert image description here

Interface description:

1. Server, an integrated and easy-to-manage server;

2. Minimum installation, basic functions;

3. Customized operating system;

It is recommended to choose item 2 for the server to minimize the installation ( try to check all the software to avoid the lack of zip, vi, free and other commands in rocky Linux 8 affecting the operation )

Click Done

insert image description here
Select - user set Root Password password, enter the following interface

insert image description here
Set Root password
insert image description here
If the password length is too short, a prompt will appear, and the server recommends setting a more complex password

insert image description here

Start the installation Begin Installation

Enter the following interface, it is being installed.
insert image description here

After the installation is complete, click Reboot Sytem to restart the system, and you will enter the following interface

insert image description here

Enter root for the account number and press Enter, then enter the root password set above
and press Enter, and the system login is successful.

Second, set the ip address, gateway DNS.

  • Pre-preparation: connect the network card port to the network cable;

  • Specific steps:

    1. ip addr to check whether the network is connected.
      insert image description here
      If the network is not connected, perform the following settings.

    2. Dynamic ip address setting.

      cd /etc/sysconfig/network-scripts/ #Enter the network configuration file directory
      ls to find the name of the network card connected to the network cable

    3. Type "vi ifcfg-ens33" and press Enter to confirm (the network card name may be different). You can also directly enter "cd /etc/sysconfig/network-scripts/ifcfg-ens33" in the second step to edit the file directly.

      #Set to automatically obtain a dynamic IP address
      set ONBOOT=yes

    4. Static ip address setting .

    5. Enter "service network restart" to restart the service, or enter "systemctl restart netwrok" to restart.

    6. ip addr to check whether the network is connected

  • May encounter problems:

    1. networkmanager is not running , see references and error summary for solutions.
    2. The network card driver is not installed, etc.

3. Download aria2

step1: download

到githup上获取源码:

https://github.com/aria2/aria2/releases/download/release-1.33.0/aria2-1.33.0.tar.gz

cd /usr/local/src && wget https://github.com/aria2/aria2/releases/download/release-1.33.0/aria2-1.33.0.tar.gz

step2: upgrade gcc

编译aria2需要升级一下gcc,最低要求 gcc >= 4.8.2,如果你的gcc已经在符合这个要求就可以跳到下一步了

复制下面代码,保存为:update_gcc.sh
# 添加一个源
cd /etc/yum.repos.d
wget http://people.centos.org/tru/devtools-2/devtools-2.repo

# 安装所需包
yum install devtoolset-2-gcc devtoolset-2-binutils devtoolset-2-gcc-c++

# 保存原来的版本
mv /usr/bin/gcc /usr/bin/gcc-4.4.7
mv /usr/bin/g++ /usr/bin/g++-4.4.7
mv /usr/bin/c++ /usr/bin/c++-4.4.7

# 链接到新版本的gcc
ln -s /opt/rh/devtoolset-2/root/usr/bin/gcc /usr/bin/gcc
ln -s /opt/rh/devtoolset-2/root/usr/bin/c++ /usr/bin/c++
ln -s /opt/rh/devtoolset-2/root/usr/bin/g++ /usr/bin/g++

# 查看当前gcc版本
gcc --version

step3: Unzip and start compiling and installing

tar zxvf aria2-1.33.0.tar.gz && cd aria2-1.33.0 && mkdir build && cd build && ../configure && make && make install

step4: Create directory and configuration file

cd /etc/ && mkdir aria2 && cd aria2 && touch aria2c.conf && touch aria2.session

Edit the content of the aria2c.conf file, the content is as follows:

# 文件的保存路径(可使用绝对路径或相对路径), 默认: 当前启动位置
#dir=~/download
# 启用磁盘缓存, 0为禁用缓存, 需1.16以上版本, 默认:16M
disk-cache=5M
# 文件预分配方式, 能有效降低磁盘碎片, 默认:prealloc
# 预分配所需时间: none < falloc ? trunc < prealloc
# falloc和trunc则需要文件系统和内核支持, NTFS建议使用falloc, EXT3/4建议trunc
file-allocation=none
# 断点续传
continue=true

## 下载连接相关 ##

# 最大同时下载任务数, 运行时可修改, 默认:5
max-concurrent-downloads=5
# 同一服务器连接数, 添加时可指定, 默认:1
max-connection-per-server=15
# 最小文件分片大小, 添加时可指定, 取值范围1M -1024M, 默认:20M
# 假定size=10M, 文件为20MiB 则使用两个来源下载; 文件为15MiB 则使用一个来源下载
min-split-size=10M
# 单个任务最大线程数, 添加时可指定, 默认:5
split=5
# 整体下载速度限制, 运行时可修改, 默认:0
#max-overall-download-limit=0
# 单个任务下载速度限制, 默认:0
#max-download-limit=0
# 整体上传速度限制, 运行时可修改, 默认:0
max-overall-upload-limit=20kb
# 单个任务上传速度限制, 默认:0
max-upload-limit=5kb
# 禁用IPv6, 默认:false
disable-ipv6=true
# 禁用https证书检查
check-certificate=false
#运行覆盖已存在文件
allow-overwrite=true
#自动重命名
auto-file-renaming

## 进度保存相关 ##

# 从会话文件中读取下载任务
input-file=/etc/aria2/aria2.session
# 在Aria2退出时保存`错误/未完成`的下载任务到会话文件
save-session=/etc/aria2/aria2.session
# 定时保存会话, 0为退出时才保存, 需1.16.1以上版本, 默认:0
save-session-interval=30

## RPC相关设置 ##

# 启用RPC, 默认:false
enable-rpc=true
# 允许所有来源, 默认:false
rpc-allow-origin-all=true
# 允许非外部访问, 默认:false
rpc-listen-all=true
# 事件轮询方式, 取值:[epoll, kqueue, port, poll, select], 不同系统默认值不同
#event-poll=select
# RPC监听端口, 端口被占用时可以修改, 默认:6800
rpc-listen-port=6800
# 保存上传的种子文件
rpc-save-upload-metadata=false

## BT/PT下载相关 ##

# 当下载的是一个种子(以.torrent结尾)时, 自动开始BT任务, 默认:true
#follow-torrent=true
# BT监听端口, 当端口被屏蔽时使用, 默认:6881-6999
listen-port=51413
# 单个种子最大连接数, 默认:55
#bt-max-peers=55
# 打开DHT功能, PT需要禁用, 默认:true
enable-dht=true
# 打开IPv6 DHT功能, PT需要禁用
enable-dht6=false
# DHT网络监听端口, 默认:6881-6999
#dht-listen-port=6881-6999
# 本地节点查找, PT需要禁用, 默认:false
bt-enable-lpd=true
# 种子交换, PT需要禁用, 默认:true
enable-peer-exchange=true
# 每个种子限速, 对少种的PT很有用, 默认:50K
#bt-request-peer-speed-limit=50K
# 客户端伪装, PT需要
peer-id-prefix=-UT341-
user-agent=uTorrent/341(109279400)(30888)
# 当种子的分享率达到这个数时, 自动停止做种, 0为一直做种, 默认:1.0
seed-ratio=1.0
# 强制保存会话, 话即使任务已经完成, 默认:false
# 较新的版本开启后会在任务完成后依然保留.aria2文件
#force-save=false
# BT校验相关, 默认:true
#bt-hash-check-seed=true
# 继续之前的BT任务时, 无需再次校验, 默认:false
bt-seed-unverified=true
# 保存磁力链接元数据为种子文件(.torrent文件), 默认:false
#bt-save-metadata=false
#仅下载种子文件
bt-metadata-only=true
#通过网上的种子文件下载,种子保存在内存
follow-torrent=mem

step5: Set environment variables

Edit the ~/.bashrc file and add the following content

export PATH=/usr/local/src/aria2-1.33.0/build/src:$PATH

Execute the following command to make the environment variable setting take effect:

source ~/.bashrc

After completing this series of operations, if you enter aria and can complete it, it means that aria2 has been installed successfully!!!

3. Install the graphics card driver offline

  1. Check the graphics card model

lspci | grep -i nvidia
insert image description here
Enter 1b06 at the URL: http://pci-ids.ucw.cz/mods/PC/10de?action=help?help=pci, you can see that the graphics card model is GeForce GTX 1080 Ti
insert image description here

  1. Download the corresponding driver from NVIDIA official website (other download paths: https://downloadcenter.intel.com/zh-cn/download/15817?_ga=1.159975677.114505945.1484457019)
    insert image description here
  2. install driver.

Make the .run file executable before installing the script:

chmod u+x NVIDIA-Linux-x86_64-415.13.run

Execute the installation script:

./NVIDIA-Linux-x86_64-375.39.run --kernel-source-path=/usr/src/kernels/3.10.0-862.el7.x86_64

Change the above kernel version to your own system, and then install it according to the installation prompt.

chmod +x NVIDIA-Linux-x86_64-450.80.02.run
./NVIDIA-Linux-x86_64-450.80.02.run

Notice

  1. During the installation process, if the following interface appears:
    insert image description hereYou need to check in the log file, just follow the prompts to solve the problem. Generally, the problem is that you need to install the file, and you can install it according to the requirements.

  2. In order to confirm the installation is correct, please restart the machine.

  3. Input: nvidia-smi, if the following interface appears, the installation is successful.

References and Error Summary

Set dynamic IP
installation tutorial
Restart network card command
to install network card driver
Management does not run
gcc
./configuare
Install network card under Linux Execute make install failed
Install and configure aria2 under
linux View graphics card model
centos7 Install nvidia graphics driver
Centos8 Install Nvidia graphics driver and pass docker Deploy deep learning environment
external network access ip

Special Note

From the drive disk, to the installation to the configuration of the network card and graphics card, various problems will definitely occur when installing rocky linux 8. There is a high probability that this kind of problem can be solved by a blog I have read, but I just need to understand the meaning of the blog and pay attention to whether the installation commands appearing in the article carry the author's own things, and replace them with my own.

Guess you like

Origin blog.csdn.net/weixin_44077556/article/details/121410833