<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Centos on Kenno&#39;s Open Note</title>
    <link>https://blog.khmersite.net/tags/centos/</link>
    <description>Recent content in Centos on Kenno&#39;s Open Note</description>
    <image>
      <title>Kenno&#39;s Open Note</title>
      <url>https://blog.khmersite.net/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</url>
      <link>https://blog.khmersite.net/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</link>
    </image>
    <generator>Hugo -- 0.154.0</generator>
    <language>en</language>
    <lastBuildDate>Tue, 31 Jan 2023 12:02:59 +1100</lastBuildDate>
    <atom:link href="https://blog.khmersite.net/tags/centos/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>How to Install AWS CLI on RockyLinux</title>
      <link>https://blog.khmersite.net/p/how-to-install-awscli-on-rockylinux/</link>
      <pubDate>Tue, 31 Jan 2023 12:02:59 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-install-awscli-on-rockylinux/</guid>
      <description>&lt;p&gt;The &lt;code&gt;awscli&lt;/code&gt; package is available from the EPEL repository, which is not enabled by default on RockyLinux.&lt;/p&gt;
&lt;p&gt;Enable the EPEL repo by installing &lt;code&gt;epel-release&lt;/code&gt; pacakge.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ sudo dnf install epel-release
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Once the EPEL repo is successfully enabled, we can install &lt;code&gt;awscli&lt;/code&gt; package.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ sudo dnf install awscli
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Enable and verify that the &lt;code&gt;awscli&lt;/code&gt; is installed on the system.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ aws --version
aws-cli/1.18.156 Python/3.6.8 Linux/4.18.0-425.10.1.el8_7.x86_64 botocore/1.18.15
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;As a bonus, here is how to configure the AWS credential.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Unable to Use tar to Decompress tar.bz2 File</title>
      <link>https://blog.khmersite.net/p/unable-to-use-tar-to-decompress-tar-bzip2/</link>
      <pubDate>Sun, 25 Jul 2021 17:18:43 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/unable-to-use-tar-to-decompress-tar-bzip2/</guid>
      <description>&lt;p&gt;I just setup a new server with a minimal installation of AlmaLinux 8. AlmaLinux is a variant of free Red Hat Enterprise Linux 8. It&amp;rsquo;s like a CentOS 8, but will have a full support until the end of RHEL 8 life cycle.&lt;/p&gt;
&lt;p&gt;This server is to serve as a new proxy for all VMs inside my home lab. I want to use &lt;code&gt;tinyproxy&lt;/code&gt; which is need to be compiled from source as the RPM package is not available as of the time writing. After downloading the source code, and try to decompress it, I was presented with the following error message:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Systemd List Failed Units and Services</title>
      <link>https://blog.khmersite.net/p/systemd-list-failed-units-and-services/</link>
      <pubDate>Tue, 15 Dec 2020 16:49:08 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/systemd-list-failed-units-and-services/</guid>
      <description>&lt;p&gt;This is a quick note to list failed services on systemd system.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@zilla ~]# systemctl status
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;● zilla
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    State: degraded
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     Jobs: 0 queued
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   Failed: 1 units
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    Since: Fri 2020-09-04 02:20:47 AEST; 3 months 11 days ago
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   CGroup: /
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;           ├─1 /usr/lib/systemd/systemd --system --deserialize 22
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;           └─system.slice
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;             ├─httpd.service
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;             │ ├─21860 /usr/sbin/httpd -DFOREGROUND
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;             │ ├─21861 /usr/sbin/httpd -DFOREGROUND
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;             │ ├─21862 /usr/sbin/httpd -DFOREGROUND
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;             │ ├─21863 /usr/sbin/httpd -DFOREGROUND
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;             │ ├─21864 /usr/sbin/httpd -DFOREGROUND
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;             │ └─21865 /usr/sbin/httpd -DFOREGROUND
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@zilla ~]# systemctl list-units --failed
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  UNIT         LOAD   ACTIVE SUB    DESCRIPTION
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;● ipmi.service loaded failed failed IPMI Driver
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;LOAD   = Reflects whether the unit definition was properly loaded.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;SUB    = The low-level unit activation state, values depend on unit type.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;1 loaded units listed. Pass --all to see loaded but inactive units, too.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;To show all installed unit files use &amp;#39;systemctl list-unit-files&amp;#39;.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Or&lt;/p&gt;</description>
    </item>
    <item>
      <title>Configure iSCSI Target on CentOS 8</title>
      <link>https://blog.khmersite.net/p/configure-iscsi-target-on-centos8/</link>
      <pubDate>Wed, 25 Nov 2020 19:04:38 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/configure-iscsi-target-on-centos8/</guid>
      <description>&lt;p&gt;I need to have an iSCSI storage to be used by my oVirt lab. The last time I had to create an iSCSI target was during the preparation of the RHCE 7 exam. Therefore, I think this is an opportunity to practice doing this again.&lt;/p&gt;
&lt;p&gt;First, install the required package. Then enable the &lt;strong&gt;target&lt;/strong&gt; service, otherwise the target won&amp;rsquo;t work on the next reboot.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@utility ~]# dnf install targetcli -y
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@utility ~]# systemctl enable target
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Run the &lt;strong&gt;targetcli&lt;/strong&gt; command to create an iSCSI target/storage using the storage block (&lt;strong&gt;/dev/mapper/data_iscsi&lt;/strong&gt; LVM volume).&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Enable Persistent Logging for Systemd Journal</title>
      <link>https://blog.khmersite.net/p/how-to-enable-persistent-logging-for-systemd-journal/</link>
      <pubDate>Sat, 29 Aug 2020 11:01:31 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-enable-persistent-logging-for-systemd-journal/</guid>
      <description>&lt;p&gt;On RHEL 7/8, CentOS 7/8 and even Ubuntu (??), by default the journal log data is stored only in memory (&lt;code&gt;/run/log/journal/&lt;/code&gt; directory).&lt;/p&gt;
&lt;p&gt;There are 2 ways to retain the journal log messages. The first one is to set the variable &lt;code&gt;Storage&lt;/code&gt; to &lt;code&gt;persistent&lt;/code&gt; in the &lt;code&gt;/etc/systemd/journald.conf&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[Journal]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Storage=persistent
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then restart the &lt;code&gt;systemd-journald&lt;/code&gt; service.&lt;/p&gt;
&lt;p&gt;Another solution is simpler and it looks like it&amp;rsquo;s the recommended way of achieving this. All we have to do is to create a directory, &lt;code&gt;/var/log/journal&lt;/code&gt; (with correct ownership and permission), and &lt;code&gt;journald&lt;/code&gt; will automatically store the log messages there.&lt;/p&gt;</description>
    </item>
    <item>
      <title>SELinux Error ValueError: Port already Defined</title>
      <link>https://blog.khmersite.net/p/selinux-error-valueerror-port-already-defined/</link>
      <pubDate>Mon, 27 Jul 2020 14:44:53 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/selinux-error-valueerror-port-already-defined/</guid>
      <description>&lt;p&gt;Today, I want to run the &lt;code&gt;httpd&lt;/code&gt; server on a custom port, 8002 on a CentOS 7 server. Of course, all my system has SELinux in enforcing mode.&lt;/p&gt;
&lt;p&gt;In order for the &lt;code&gt;httpd&lt;/code&gt; to bind on port &lt;code&gt;8002&lt;/code&gt;, we need to add this port to the &lt;code&gt;httpd_port_t&lt;/code&gt; port type list.&lt;/p&gt;
&lt;p&gt;First let&amp;rsquo;s confirm that port 8002 is not yet in the &lt;code&gt;http_port_t&lt;/code&gt; list:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@servera ~]# semanage port -l | grep ^http
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;http_cache_port_t              tcp      8080, 8118, 8123, 10001-10010
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;http_cache_port_t              udp      3130
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;http_port_t                    tcp      80, 81, 443, 488, 8008, 8009, 8443, 9000
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We know from the manual &lt;code&gt;semanage-port(8)&lt;/code&gt;, to add a port to an SELinux port type list, we run the following command:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Install Ansible on Centos 8</title>
      <link>https://blog.khmersite.net/p/how-to-install-ansible-on-centos8/</link>
      <pubDate>Sat, 09 Nov 2019 10:06:03 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-install-ansible-on-centos8/</guid>
      <description>&lt;p&gt;On most Linux distribution, Ansible can be installed either using &lt;code&gt;python3-pip&lt;/code&gt; or &lt;code&gt;ansible&lt;/code&gt; package.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to show how to get Ansible installed using the second method on CentOS 8.&lt;/p&gt;
&lt;p&gt;First add the EPEL repository to the CentOS 8 server.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# yum localinstall https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Next, install &lt;code&gt;ansible&lt;/code&gt; package:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# yum install ansible
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Last metadata expiration check: 0:00:49 ago on Sun 10 Nov 2019 09:33:22 PM AEDT.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Dependencies resolved.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;=======================================================================================================================
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; Package                           Arch                  Version                        Repository                Size
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;=======================================================================================================================
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Installing:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; ansible                           noarch                2.8.5-2.el8                    epel                      15 M
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Installing dependencies:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; python3-babel                     noarch                2.5.1-3.el8                    AppStream                4.8 M
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; python3-jinja2                    noarch                2.10.1-2.el8_0                 AppStream                538 k
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; python3-jmespath                  noarch                0.9.0-11.el8                   AppStream                 45 k
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; python3-markupsafe                x86_64                0.23-19.el8                    AppStream                 39 k
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; python3-pyasn1                    noarch                0.3.7-6.el8                    AppStream                126 k
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; libsodium                         x86_64                1.0.18-2.el8                   epel                     162 k
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; python3-bcrypt                    x86_64                3.1.6-2.el8.1                  epel                      44 k
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; python3-pynacl                    x86_64                1.3.0-5.el8                    epel                     100 k
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; sshpass                           x86_64                1.06-9.el8                     epel                      27 k
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Installing weak dependencies:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; python3-paramiko                  noarch                2.4.3-1.el8                    epel                     289 k
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Transaction Summary
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;=======================================================================================================================
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Install  11 Packages
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Total download size: 21 M
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Installed size: 104 M
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Is this ok [y/N]: 
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Let&amp;rsquo;s confirm that the installation went ok by checking the version of &lt;code&gt;ansible&lt;/code&gt;:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Connect to a WPA2-Enterprise Connection Using nmcli</title>
      <link>https://blog.khmersite.net/p/connect-to-a-wpa2-enterprise-connection-using-nmcli/</link>
      <pubDate>Mon, 27 Aug 2018 14:11:38 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/connect-to-a-wpa2-enterprise-connection-using-nmcli/</guid>
      <description>&lt;p&gt;This is like a re-post of a question from &lt;a href=&#34;https://askubuntu.com/questions/262491/connect-to-a-wpa2-enterprise-connection-via-cli-no-desktop&#34;&gt;askubuntu.com&lt;/a&gt;. To get to that post, I usually had to google it. So, I’ll post it here so I know where to look for when I need it again.&lt;/p&gt;
&lt;p&gt;At work, we use WPA2-Enterprise for wireless connection. To create a new connection on my laptop with &lt;code&gt;wlp3s0&lt;/code&gt; as Wifi device, follow this step:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# nmcli con add type wifi ifname wlp3s0 con-name work-wifi ssid work-ssid

# nmcli con edit id work-wifi
nmcli&amp;gt; set ipv4.method auto
nmcli&amp;gt; set 802-1x.eap peap
nmcli&amp;gt; set 802-1x.phase2-auth mschapv2
nmcli&amp;gt; set 802-1x.identity myusername
nmcli&amp;gt; set 802-1x.password mypassword
nmcli&amp;gt; set wifi-sec.key-mgmt wpa-eap
nmcli&amp;gt; save
nmcli&amp;gt; activate
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;That’s it if you know how to do it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Generate SELinux Policy Manual Page</title>
      <link>https://blog.khmersite.net/p/how-to-generate-selinux-policy-manual-page/</link>
      <pubDate>Sun, 26 Aug 2018 23:21:33 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-generate-selinux-policy-manual-page/</guid>
      <description>&lt;p&gt;It seems that by default, SELinux policy manpage is not available. Here’s how to make it available.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;First install &lt;code&gt;selinux-policy-devel&lt;/code&gt; package&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Then generate the man page by running:&lt;br&gt;
&lt;code&gt;# sepolicy manpage -a -p /usr/share/man/man8&amp;lt;br/&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;code&gt;-a&lt;/code&gt;  : all domains&lt;br&gt;
&lt;code&gt;-p&lt;/code&gt; : path to store the manpage (by default it’s /tmp)&lt;br&gt;
&lt;code&gt;/usr/share/man/man8&lt;/code&gt; – section 8 of manpage is for system admin command&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create or update manual page index caches&lt;br&gt;
&lt;code&gt;# mandb&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Benefit&lt;br&gt;
&lt;code&gt;# man -k _selinux&lt;/code&gt; (or e.g. ”&lt;code&gt;man httpd_selinux&lt;/code&gt;“)&lt;/p&gt;</description>
    </item>
    <item>
      <title>RHEL Recovering the Root Password</title>
      <link>https://blog.khmersite.net/p/rhel-recovering-the-root-password/</link>
      <pubDate>Sun, 12 Aug 2018 14:24:05 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/rhel-recovering-the-root-password/</guid>
      <description>&lt;p&gt;Early last year I started a blog &lt;a href=&#34;https://blog.khmersite.net/2017/02/rhcsas-prep/&#34;&gt;post&lt;/a&gt; about the preparation for Red Hat Certified System Administrator (RHCSA) exam. My intention back then was to have more posts follow suit about the exam topics. Like many things in life, things don&amp;rsquo;t always go according to plan. That was the only post, but I passed the RHCSA exam.&lt;/p&gt;
&lt;p&gt;Today, I&amp;rsquo;m going to start another new post about the preparation for the Red Hat Certified System Engineer (RHCSE) exam. I already booked an exam which is taking place on September 12. The exam is 3.5 hours long and cover a broader range than before.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Install MATE Desktop on CentOS 7</title>
      <link>https://blog.khmersite.net/p/install-mate-desktop-on-centos-7/</link>
      <pubDate>Wed, 13 Jun 2018 01:26:00 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/install-mate-desktop-on-centos-7/</guid>
      <description>&lt;p&gt;Tonight I started to review the learning material for Red Hat System Administration III to prepare for RHCSE exam. I need a machine with GUI, and all my CentOS 7 VMs are headless. So let’s install the GUI on it, shall I?&lt;/p&gt;
&lt;p&gt;First install &lt;code&gt;epel&lt;/code&gt; repo, if it’s not yet installed:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# yum install epel-release -y
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Then install the 2 groups:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# yum groupinstall &amp;#34;X Window system&amp;#34; -y
# yum groupinstall &amp;#34;MATE Desktop&amp;#34; -y
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Tip, if “I” can’t remember the names of the groups, I can run this command to list all available groups:&lt;/p&gt;</description>
    </item>
    <item>
      <title>grep: error while loading shared libraries: libpcre.so.0</title>
      <link>https://blog.khmersite.net/p/grep-error-while-loading-shared-libraries-libpcre-so-0/</link>
      <pubDate>Fri, 01 Jul 2016 14:14:13 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/grep-error-while-loading-shared-libraries-libpcre-so-0/</guid>
      <description>&lt;p&gt;I have a server running CentOS 6 successfully upgraded to CentOS 7.&lt;/p&gt;
&lt;p&gt;The only problem I encountered so far is that ‘grep’ doesn’t work.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[root@zilla ~]# grep
grep: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[root@zilla ~]# ldd /usr/bin/grep
        linux-vdso.so.1 =&amp;gt;  (0x00007ffc0b639000)
        libpcre.so.0 =&amp;gt; not found
        libc.so.6 =&amp;gt; /lib64/libc.so.6 (0x00007f6be1c6c000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f6be2038000)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;First thing I tried was to reinstall &lt;code&gt;pcre&lt;/code&gt; package which provides libpcre.so*. It still didn’t work. Fortunately, &lt;a href=&#34;http://sempike.blogspot.com.au/2016/02/update-to-centos-7-libpcreso0-no-such.html&#34;&gt;someone&lt;/a&gt; has posted a solution as the following:&lt;/p&gt;</description>
    </item>
    <item>
      <title>ISC Dhcpd Duplicate UID Lease</title>
      <link>https://blog.khmersite.net/p/isc-dhcpd-duplicate-uid-lease/</link>
      <pubDate>Thu, 25 Jun 2015 14:10:51 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/isc-dhcpd-duplicate-uid-lease/</guid>
      <description>&lt;p&gt;Someone asked this question in &lt;a href=&#34;http://www.culmination.org/2008/10/isc-dhcpd-duplicate-uid-lease/&#34;&gt;one&lt;/a&gt; of his blog posts:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Ever see this?

dhcpd: uid lease 192.168.1.150 for client xx:xx:xx:xx:xx:xx is duplicate on 192.168.1/24
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Yes, I’m seeing something like that now in the my dhdcp logs. Here is the actual message:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;DHCPREQUEST for 192.168.1.109 from 08:00:27:6e:61:b8 via eth0
DHCPACK on 192.168.1.109 to 08:00:27:6e:61:b8 via eth0
DHCPINFORM from 192.168.1.109 via eth0
DHCPACK to 192.168.1.109 (08:00:27:6e:61:b8) via eth0
uid lease 192.168.1.224 for client 08:00:27:6e:61:b8 is duplicate on 192.168.1.0/24
DHCPREQUEST for 192.168.1.109 from 08:00:27:6e:61:b8 via eth0
DHCPACK on 192.168.1.109 to 08:00:27:6e:61:b8 via eth0
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I think I know why this happened. Basically, the machine with MAC address of ’08:00:27:6e:61:b8′ used to have grab an IP address&lt;/p&gt;</description>
    </item>
    <item>
      <title>YUM what provides this file, huh?</title>
      <link>https://blog.khmersite.net/p/yum-what-provides-this-file-huh/</link>
      <pubDate>Wed, 24 Jun 2015 17:08:20 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/yum-what-provides-this-file-huh/</guid>
      <description>&lt;p&gt;This post is primarily written to remind myself, an Ubuntu user, to figure out how to find what RPM package provides a file — for example a header file.&lt;/p&gt;
&lt;p&gt;Today, I’m trying to compile and install R 3.1.3 on CentOS 6 from source code. This R installation is one of the requirements to install Tessera stack. The instruction from the &lt;a href=&#34;http://tessera.io/docs-install-cluster/#installation&#34;&gt;installation&lt;/a&gt; page is:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;sudo yum install blas blas-devel lapack lapack-devel
wget http://cran.r-project.org/src/base/R-3/R-3.1.3.tar.gz
tar zxvf R-3.1.3.tar.gz
cd R-3.1.3
./configure --with-blas --with-lapack --with-x --enable-R-shlib
make
sudo make install
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Unfortunately, the process failed with &lt;code&gt;./configure&lt;/code&gt; with the complain about missing readline library. To fix it, I had to install readline-devel package.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Good permission for /tmp</title>
      <link>https://blog.khmersite.net/p/good-permission-for-tmp/</link>
      <pubDate>Mon, 16 Feb 2015 12:44:18 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/good-permission-for-tmp/</guid>
      <description>&lt;p&gt;I have been having issues getting X2Go running on a CentOS 6.5 box. It took me a while to figure out that the problem laid with the permission of /tmp directory. I’ll write how to solve the X2Go problem in another post.&lt;/p&gt;
&lt;p&gt;The recommended permission for /tmp is 1777. Notice that the forwarding ‘1’ is the sticky bit which only allows the owner of the file within /tmp (or the root user) to delete/rename the file.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Can&#39;t find the &#39;libpq-fe.h header</title>
      <link>https://blog.khmersite.net/p/cant-find-the-libpq-fe-h-header/</link>
      <pubDate>Mon, 03 Feb 2014 12:59:10 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/cant-find-the-libpq-fe-h-header/</guid>
      <description>&lt;p&gt;I need to install pg 0.17.1 gem on a server running CentOS. This is the error message I saw:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# gem install pg -v &amp;#39;0.17.1&amp;#39;
Building native extensions.  This could take a while...
ERROR:  Error installing pg:
        ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
 --with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can&amp;#39;t find the &amp;#39;libpq-fe.h header
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.
...
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;First thing came to my mind was I must have forgotten to install the -dev package.&lt;/p&gt;</description>
    </item>
    <item>
      <title>ZFS on CentOS</title>
      <link>https://blog.khmersite.net/p/zfs-on-centos/</link>
      <pubDate>Tue, 08 Oct 2013 07:55:46 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/zfs-on-centos/</guid>
      <description>&lt;p&gt;First we need to add the ZFS on Linux repository to our system by installing a zfs-release package as shown below:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ sudo yum localinstall --nogpgcheck http://archive.zfsonlinux.org/epel/zfs-release-1-3.el6.noarch.rpm
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ sudo yum install zfs 
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Once, zfs has been installed, we can create a storage pool. There’re many RAID configuration to choose from, and I’m not going to get into it. However, if you want to learn more, you can read this &lt;a href=&#34;https://pthree.org/2012/12/05/zfs-administration-part-ii-raidz/&#34;&gt;ZFS Administration&lt;/a&gt; article which explains in great detail about ZFS RAID(Z).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Install crontab on CentOS 6</title>
      <link>https://blog.khmersite.net/p/install-crontab-on-centos-6/</link>
      <pubDate>Mon, 27 May 2013 14:33:26 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/install-crontab-on-centos-6/</guid>
      <description>&lt;p&gt;When you install CentOS 6 using minimal CD, a lot of packages aren’t installed by default; &lt;strong&gt;cron&lt;/strong&gt; included. To install it,&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# yum install cronie
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After the installation, you can verify that crond is running:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# chkconfig --list crond
crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off
&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>CentOS: lsb_release: command not found</title>
      <link>https://blog.khmersite.net/p/centos-lsb_release-command-not-found/</link>
      <pubDate>Sun, 21 Oct 2012 22:53:07 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/centos-lsb_release-command-not-found/</guid>
      <description>&lt;p&gt;First let me declare that I’m new to CentOS. The folowing is a note to self which demonstrates how we search for a package that provides some commands and intall it using yum on CentOS.&lt;/p&gt;
&lt;p&gt;When I ran ‘lsb_release -a’, the following message is returned:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;-bash: lbs_release: command not found
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To fix it, we need to install the package which provides lsb_release command.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# yum provides */lsb_release
...
redhat-lsb-4.0-3.el6.centos.i686 : LSB base libraries support for CentOS
Repo        : base
Matched from:
Filename    : /usr/bin/lsb_release

redhat-lsb-4.0-3.el6.centos.x86_64 : LSB base libraries support for CentOS
Repo        : base
Matched from:
Filename    : /usr/bin/lsb_release

dkms-2.2.0.3-2.el6.noarch : Dynamic Kernel Module Support Framework
Repo        : epel
Matched from:
Filename    : /usr/lib/dkms/lsb_release
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;So, let’s install redhat-lsb package:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
