[STEP] Red Hat Satellite client register

Step One: Add domain name resolution into /etc/hosts

# vim /etc/hosts

Add the following:

......
<Redhat Satellite IP address> <Redhat Satellite Server FQDN>

Step Two: Install katello-ca-consumer-latest.noarch.rpm

2.1 Download katello-ca-consumer-latest.noarch.rpm

# curl --insecure --output katello-ca-consumer-latest.noarch.rpm https://<Redhat Satellite Server FQDN>/pub/katello-ca-consumer-latest.noarch.rpm

2.2 Install katello-ca-consumer-latest.noarch.rpm

# yum -y localinstall katello-ca-consumer-latest.noarch.rpm

Step Three: Register to Red Hat Satellite Server

# subscription-manager register --org="<organization>" --activationkey="<activation key>"

Step Four: Install katello-host-tools, katello-host-tools-tracer and katello-agent

4.1 Enable rhel-*-satellite-tools-*-rpms repo or satellite-tools-*-rhel-*-rpms

RHEL 7:

# subscription-manager repos --enable=rhel-\*-satellite-tools-\*-rpms

RHEL 8:

# subscription-manager repos --enable=satellite-tools-\*-rhel-\*-rpms
# subscription-manager repos --disable=satellite-tools-\*-rhel-\*-eus-rpms

4.2 Install katello-host-tools, katello-host-tools-tracer and katello-agent

# yum -y install katello-host-tools; yum -y install katello-host-tools-tracer; yum -y install katello-agent

Step Five: Check

5.1 Check registration information

# subscription-manager identity

5.2 Check license

# subscription-manager list --consumed

[CONTENT] Linux Variable Default Value

中文

Content One: Set Default Values for Variables on Command Line

1.1 Assign Values to Ordinary Variables

# a=1
# b=

(Add: let a be 1 and B be null as an example)

1.2 Set Default Values for Variables on Command Line

# var1=${a:-no}
# var2=${b:-no}


Add:
If a is null, var1 is no, otherwise var1 is equal to a
If B is null, var2 is no, otherwise var2 is equal to B

1.3 View Variable Results

# echo $var1
1
# echo $var2
no


Add:
The value of a is 1, so var1 is 1
The B is null, so var2 is no

Content Two:Set Variable Defaults in Script

2.1 Setting Variable Defaults in Script

# vim var_default.sh
Create the following:
#!/bin/bash
var_default="${1:-no}"
echo $var_default

(Add:If the variable of $1 is null, then var_default is no, otherwise var_default is equal to $1, and print it out as an example)

2.2 Test Variable Defaults in Script

# bash var_default.sh
no
# bash var_default.sh 1
1
# bash var_default.sh 2
2
# bash var_default.sh 3
3

[CONTENT] Linux Partition Advice

中文

Content One: BIOS Partition Advice

1.1 Partition Planning

/boot    >= 5G
/var/tmp >= 10G
/tmp     >= 10G
swap     >= 2G
/        all remaining space

1.2 Standard Partition and Logical Partition

/boot    Use standard partition
/var/tmp Use logical partition
/tmp     Use logical partition
swap     Use logical partition
/        Use logical partition

1.3 Format

/boot    xfs
/var/tmp xfs
/tmp     xfs
swap     swap
/        xfs

1.4 Mount Parameter

/boot    defaults
/var/tmp rw,nosuid,nodev,noexec,relatime,strictatime
/tmp     rw,nosuid,nodev,noexec,relatime,strictatime
swap     defaults
/        defaults

Content Two:EFI Partition Advice

2.1 Partition Planning

/boot/efi >= 5G
/var/tmp  >= 10G
/tmp      >= 10G
swap      >= 2G
/         all remaining space

2.2 Standard Partition and Logical Partition

/boot/efi Use standard partition
/var/tmp  Use logical partition
/tmp      Use logical partition
swap      Use logical partition
/         Use logical partition

2.3 Format

/boot/efi vfat
/var/tmp  xfs
/tmp      xfs
swap      swap
/         xfs

2.4 Mount Parameter

/boot/efi defaults
/var/tmp  rw,nosuid,nodev,noexec,relatime,strictatime
/tmp      rw,nosuid,nodev,noexec,relatime,strictatime
swap      defaults
/         defaults