Home / Archive for Albert / Page 15

Author: Albert

NFS server configuration file in AlmaLinux 8, CentOS 8

The new configuration file for NFS server setup in AlmaLinux 8 is /etc/nfs.conf. /etc/sysconfig/nfs is deprecated and replaced by /etc/nfs.conf. # cat /etc/nfs.conf## This is a general configuration for the# NFS daemons and tools#[general]# pipefs-directory=/var/lib/nfs/rpc_pipefs#[exportfs]# debug=0#[gssd]# use-memcache=0# use-machine-creds=1use-gss-proxy = yes# avoid-dns=1# limit-to-legacy-enctypes=0# context-timeout=0# rpc-timeout=5# keytab-file=/etc/krb5.keytab# cred-cache-directory=# preferred-realm=#[lockd]# port=0# udp-port=0#[mountd]# debug=0# manage_gids=n# descriptors=0# port=0# threads=1# reverse-lookup=n# …

Read more

How to set default Java version with alternatives tool in AlmaLinux

When different Java versions are installed on a Linux server, use the alternatives tool to set the default Java version as follows: alternatives --config java There are 2 program that provides 'java'. Selection Command ----------------------------------------------- *+ 1 java-1.9.0-openjdk.x86_64 (/usr/lib/jvm/java-1.9.0-openjdk-1.9.0.292.b10-1.el8_4.x86_64/jre/bin/java) 2 java-12-openjdk.x86_64 (/usr/lib/jvm/java-12-openjdk-11.0.11.0.9-2.el8_4.x86_64/bin/java) Enter to keep the current selection[+], or type selection number: 2 Type 1 …

Read more

Drop in GPU usage for GPU intensive application

To resolve this issue, replace DPMS with HardDPMS in the “OutputClass” section of Xorg configuration file [/etc/X11/xorg.conf.d/] as shown below: option "DPMS" "false" Change above to: Option "HardDPMS" "flase" If no DPMS options are set in [/etc/X11/xorg.conf.d/] file than append this option as follows: Section "OutputClass"Identifier "nvidia"MatchDriver "nvidia-drm"Driver "nvidia"Option "AllowEmptyInitialConfiguration"Option "PrimaryGPU" "yes"Option "SLI" "Auto"Option "BaseMosaic" …

Read more

GPU devices have wrong SELinux context after reboot server in CentOS and AlmaLinux

GPU devices show the wrong SELinux context after the server restarts and cannot be used without restoring the context with restorecon. ls -Z /dev/nvi*crw-rw-rw-. root root system_u:object_r:xserver_misc_device_t:s0 /dev/nvidia0crw-rw-rw-. root root system_u:object_r:xserver_misc_device_t:s0 /dev/nvidia1crw-rw-rw-. root root system_u:object_r:device_t:s0 /dev/nvidia2crw-rw-rw-. root root system_u:object_r:device_t:s0 /dev/nvidia3crw-rw-rw-. root root system_u:object_r:device_t:s0 /dev/nvidia4crw-rw-rw-. root root system_u:object_r:device_t:s0 /dev/nvidia5crw-rw-rw-. root root system_u:object_r:device_t:s0 /dev/nvidia6crw-rw-rw-. root root system_u:object_r:device_t:s0 …

Read more

How to install the NVIDIA proprietary driver on AlmaLinux and CentOS

Download the latest GPU driver from the NVIDIA driver download page. Make the driver file that you have just downloaded executable by entering the following command. chmod +x /root/NVIDIA-${version}.sh Disable the nouveau module; echo 'blacklist nouveau' >> /etc/modprobe.d/blacklist.conf Install dependencies by replacing the server with GUI to the workstation. dnf groupinstall "Server with GUI" "base-x" …

Read more

How to install Nvidia CUDA on AlmaLinux 8 and CentOS

Remove the currently installed driver from your AlmaLinux server if installed using CUDA toolkit runfile. /usr/local/cuda-X.Y/bin/cuda-uninstall If you have used the NVIDIA driver runfile for installation, use the following command for uninstallation. /usr/bin/nvidia-uninstall Add EPEL repository, dnf install epel-release Run the update command to let the system rebuild the repository cache. After updating, you will …

Read more

How to restart network in AlmaLinux and CentOS 8

You can restart the network in AlmaLinux 8 by using two methods. The preferred one using nmcli is given below. nmcli networking off && nmcli networking on The second method is to install legacy network services as below. yum install network-scriptsservice network restart Using the second method, you will get the following warning messages in …

Read more

How Nullify a log file in Linux

At this point, you already have the file which is causing the problem and you want to nullify it so just do as; #cat <logfile.Name> | gzip -v9 > (logfile).(date-time) # cat lastlog | gzip -v9 > lastlog.300721-0648 #cat /dev/null > lastlog or # cp /var/adm/syslog/syslog.log /var/adm/syslog/syslog.log.bak # gzip /var/adm/syslog/syslog.log.bak # cp /dev/null /var/adm/syslog/syslog.log #cat …

Read more