<?xml version="1.0"?>
<rss version="2.0"><channel><title>RHEL/Centos El7/El8/El9 Latest Topics</title><link>https://www.alphagnu.com/forum/11-rhelcentos-el7el8el9/</link><description>RHEL/Centos El7/El8/El9 Latest Topics</description><language>en</language><item><title>How to add DNSSEC Records in Bind/Named DNS server</title><link>https://www.alphagnu.com/topic/30-how-to-add-dnssec-records-in-bindnamed-dns-server/</link><description><![CDATA[<p>
	In this tutorial I’m going to instruct you how you can generate and enable DNSSEC security for DNS. This is most requested instruction by the visitors.
</p>

<p>
	DNSSEC creates a secure domain name system by adding cryptographic signatures to existing DNS records. These digital signatures are stored in DNS name servers alongside common record types like A, AAAA, MX, CNAME, etc. By checking its associated signature, you can verify that a requested DNS record comes from its authoritative name server and wasn’t altered en-route, opposed to a fake record injected in a man-in-the-middle attack.
</p>

<p>
	<strong>First install haveged to generate keys :</strong>
</p>

<p>
	EL/centos/redhat
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">yum install -y haveged
systemctl enable haveged</span></pre>

<p>
	<br />
	In below command examples replace “domain.tld” with your domain name
</p>

<p>
	<strong>Second Change the Directory to /var/named :</strong>
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">cd /var/named/</span></pre>

<p>
	<br />
	<strong>Third generate ZSK Key :</strong>
</p>

<pre class="ipsCode">dnssec-keygen -L 3600 -a RSASHA256 -b 2048 -r /dev/urandom domain.tld</pre>

<p>
	<br />
	<strong>Fourth generate KSK key</strong>
</p>

<pre class="ipsCode">dnssec-keygen -L 3600 -r /dev/urandom -f KSK -a RSASHA256 -b 4096 domain.tld</pre>

<p>
	<br />
	<strong>Fifth adding keys to domain zone file</strong>
</p>

<pre class="ipsCode">cat /var/named/Kdomain.tld.+008+*.key &gt;&gt; /var/named/domain.tld.db</pre>

<p>
	<br />
	<strong>Sixth sign the zone file :</strong>
</p>

<pre class="ipsCode">dnssec-signzone -A -3 $(head -c 1000 /dev/urandom | sha1sum | cut -b 1-16) -N INCREMENT -o domain.tld -t domain.tld.db</pre>

<p>
	<br />
	<strong>Seventh only for el7/centos 7 edit named configuration file /etc/named.conf and add this line (don't add this line on el8/centos 8 stream/almalinux 8 and above as this will not work):</strong>
</p>

<pre class="ipsCode">dnssec-lookaside auto;</pre>

<p>
	<br />
	** find this lines dnssec-enable yes; dnssec-validation yes; add dnssec-lookaside auto; after it
</p>

<p>
	Now you need to edit domain zone file config in /etc/named.conf and rename the zone file to signed :
</p>

<pre class="ipsCode">// zone domain.tld
zone "domain.tld" {type master; file "/var/named/domain.tld.db";};
// zone_end domain.tld</pre>

<p>
	<br />
	to
</p>

<pre class="ipsCode">// zone domain.tld
zone "domain.tld" {type master; file "/var/named/domain.tld.db.signed";};
// zone_end domain.tld</pre>

<p>
	<br />
	Centos/el/RHEL Reload/Restart the named service :
</p>

<pre class="ipsCode">service named reload
or
systemctl reload named</pre>

<p>
	<br />
	and you’re done.
</p>
]]></description><guid isPermaLink="false">30</guid><pubDate>Sat, 03 Jun 2023 17:23:44 +0000</pubDate></item><item><title>Brotli and nginx 1.26.2 Issues.</title><link>https://www.alphagnu.com/topic/587-brotli-and-nginx-1262-issues/</link><description><![CDATA[<p>I upgraded nginx to version: nginx/1.26.2 using the guide here.</p><p>version 1016000 instead of 1026002 in /etc/nginx/nginx.conf:1</p><p>There is an error in mismatch in the objects buildID’s</p><p>How can I resolve it? </p><p>Thanks for any insight you can share. </p><div class="ipsEmbeddedOther" data-og-user_text="https://www.alphagnu.com/topic/55-how-to-install-latest-stablemainline-nginx-in-cwp-centos-89-stream-almalinux-89-rockylinux-89/"><iframe src="https://www.alphagnu.com/topic/55-how-to-install-latest-stablemainline-nginx-in-cwp-centos-89-stream-almalinux-89-rockylinux-89/?do=embed" data-embedcontent="" data-internalembed="" data-controller="core.front.core.autosizeiframe" data-embedauthorid="1" data-ipsembed-contentapp="forums" data-ipsembed-contentclass="forums_Topic" data-ipsembed-contentid="55" data-ipsembed-timestamp="1738655066" allowfullscreen="" data-og-user_text="https://www.alphagnu.com/topic/55-how-to-install-latest-stablemainline-nginx-in-cwp-centos-89-stream-almalinux-89-rockylinux-89/" loading="lazy"></iframe></div><p></p><pre spellcheck="" class="ipsCode language-plaintext" data-language="Plain Text"><code>Feb  3 23:27:32 net systemd[1]: Starting nginx - high performance web server...
Feb  3 23:27:32 net nginx[2242722]: nginx: [emerg] module "/etc/nginx/modules/ngx_http_brotli_filter_module.so" version 1016000 instead of 1026002 in /etc/nginx/nginx.conf:1
Feb  3 23:27:32 net systemd[1]: nginx.service: Control process exited, code=exited status=1
Feb  3 23:27:32 net systemd[1]: nginx.service: Failed with result 'exit-code'.
Feb  3 23:27:33 net systemd[1]: Failed to start nginx - high performance web server.</code></pre>]]></description><guid isPermaLink="false">587</guid><pubDate>Tue, 04 Feb 2025 08:26:43 +0000</pubDate></item><item><title>Update/Install Latest Curl 8.3.0 on RHEL 8/RHEL 7/CentOS stream 8/9 CentOS 7 &#x2013; CWP/Cpanel/Plesk</title><link>https://www.alphagnu.com/topic/8-updateinstall-latest-curl-830-on-rhel-8rhel-7centos-stream-89-centos-7-%E2%80%93-cwpcpanelplesk/</link><description><![CDATA[<p>
	Upgrade/update/install latest curl version on EL OS platform (redhat/centos). You can also rely on the current OS curl version as it is updated regularly basis with security patches only, if you’re still not satisfied and want the latest features and updates just follow this guide to update curl to latest version.
</p>

<p>
	Short Description on curl :
</p>

<p>
	curl is a command line tool and library for transferring data with URL syntax, supporting HTTP, HTTPS, FTP, FTPS, GOPHER, TFTP, SCP, SFTP, SMB, TELNET, DICT, LDAP, LDAPS, FILE, IMAP, SMTP, POP3, RTSP and RTMP. libcurl offers a myriad of powerful features. curl is used in command lines or scripts to transfer data. It is also used in cars, television sets, routers, printers, audio equipment, mobile phones, tablets, settop boxes, media players and is the internet transfer backbone for thousands of software applications affecting billions of humans daily.
</p>

<p>
	Let’s get started with the upgrade process :
</p>

<p>
	To update to the latest version of CURL running CWP7 server you need to follow below steps.
</p>

<p>
	<strong>Cityfan Curl remove : If you previously installed cityfan curl you need to remove it :</strong>
</p>

<pre class="ipsCode">rpm -e city-fan.org-release
rm -rf /etc/yum.repos.d/city-fan.repo
rpm -e --nodeps curl libcurl libcurl-devel
rm -rf /usr/local/lib/libssh2.so.1
yum clean all
yum install libcurl libcurl-devel curl</pre>

<p>
	<strong>Important ! </strong>Stop the future updates via yum/dnf package manager, if you skip this step then after each update of curl from base repo you need to rebuild curl
</p>

<p>
	<strong>Centos 7 /EL7 :</strong>
</p>

<pre class="ipsCode">cat /etc/yum.conf |grep "^exclude=curl*"|grep kernel 1&gt; /dev/null 2&gt; /dev/null || echo 'exclude=curl* libcurl*' &gt;&gt; /etc/yum.conf</pre>

<p>
	<br />
	<strong>Centos 8/9 stream /EL8/EL9 :</strong>
</p>

<pre class="ipsCode">cat /etc/dnf.conf |grep "^exclude=curl*"|grep kernel 1&gt; /dev/null 2&gt; /dev/null || echo 'exclude=curl* libcurl*' &gt;&gt; /etc/dnf.conf</pre>

<p>
	<br />
	<strong>Now you need install dependencies to build curl and libcurl:</strong>
</p>

<p>
	<strong>Centos 7 /EL7 :</strong>
</p>

<pre class="ipsCode">yum install libssh libssh-devel libnghttp2-devel libnghttp2 libgsasl libgsasl-devel zstd libzstd-devel libzstd brotli brotli-devel libbrotli </pre>

<p>
	<strong>Centos 8/9 stream /EL8/EL9 :</strong>
</p>

<pre class="ipsCode">dnf install libssh libssh-devel libnghttp2-devel libnghttp2 libgsasl libgsasl-devel zstd libzstd-devel libzstd brotli brotli-devel libbrotli </pre>

<p>
	<br />
	<strong>After you've installed the dependencies build CURL from source Centos 7 /EL7 Centos 8/9 stream /EL8/EL9 <span>:</span><span> </span></strong>
</p>

<pre class="ipsCode">cd /usr/local/src
rm -rf curl*
wget https://curl.se/download/curl-8.3.0.zip
unzip curl-8.3.0.zip
cd curl-8.*/
./configure --with-ssl --with-zlib --with-gssapi --enable-ldap --enable-ldaps --with-libssh --with-nghttp2
make
make install</pre>

<p>
	<strong>then follow this steps to activate curl systemwide Centos 7 /EL7 Centos 8/9 stream /EL8/EL9 <span>:</span><span> </span></strong>
</p>

<pre class="ipsCode">rm -rf /usr/bin/curl.bak
mv /usr/bin/curl /usr/bin/curl.bak
ln -s /usr/local/bin/curl /usr/bin/curl</pre>

<p>
	<strong>After the successful built check the cURL version :</strong>
</p>

<pre class="ipsCode">curl -V</pre>

<pre class="ipsCode">curl 8.3.0 (x86_64-pc-linux-gnu) libcurl/8.3.0 OpenSSL/1.0.2k-fips zlib/1.2.7 brotli/1.0.9 zstd/1.5.5 libssh/0.7.1/openssl/zlib nghttp2/1.33.0 libgsasl/1.8.0 OpenLDAP/2.4.44
Release-Date: 2023-09-13
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli gsasl GSS-API HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz NTLM NTLM_WB SPNEGO SSL UnixSockets zstd</pre>

<p>
	 
</p>
]]></description><guid isPermaLink="false">8</guid><pubDate>Thu, 01 Jun 2023 04:35:07 +0000</pubDate></item><item><title>How to install latest Stable/mainline Nginx in CWP, Centos 8/9 stream, AlmaLinux 8/9, RockyLinux 8/9</title><link>https://www.alphagnu.com/topic/55-how-to-install-latest-stablemainline-nginx-in-cwp-centos-89-stream-almalinux-89-rockylinux-89/</link><description><![CDATA[<p>
	In this tutorial we'll learn how we can enable and install Latest stable version of nginx in centos Stream , almalinux and rockylinux. By default This OS have old version of nginx installed from nginx stream module. 
</p>

<p>
	To install latest version of nginx stable or mainline do the steps <span>: </span>
</p>

<p>
	Step 1 <span>: </span>
</p>

<p>
	<span>Disable nginx module <span>: </span></span>
</p>

<pre class="ipsCode">dnf module disable nginx -y</pre>

<p>
	Step 2 <span>: </span>
</p>

<p>
	<span>Add Official repository for nginx <span>:</span></span>
</p>

<p>
	<span><span><strong>Create repository <span>:</span></strong></span></span>
</p>

<pre class="ipsCode">&gt; /etc/yum.repos.d/nginx.repo
nano /etc/yum.repos.d/nginx.repo
</pre>

<p>
	<strong>For stable Nginx </strong> and add this line <span>:</span>
</p>

<pre class="ipsCode">[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true</pre>

<p>
	<strong>For mainline Nginx  </strong>and add this line <span><span>:</span></span>
</p>

<pre class="ipsCode">[nginx-mainline]
name=nginx mainline repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true</pre>

<p>
	Step 3 <span>: </span>
</p>

<p>
	<span><strong>Remove any nginx version installed <span>:</span></strong></span>
</p>

<pre class="ipsCode">dnf remove nginx -y</pre>

<p>
	Step 4 <span>:</span>
</p>

<p>
	<span><strong>Install the latest version of nginx <span>:</span></strong></span>
</p>

<pre class="ipsCode">dnf install nginx -y
systemctl enable nginx
systemctl restart nginx</pre>

<p>
	That's it you can now check the nginx version via this command : 
</p>

<pre class="ipsCode">nginx -V</pre>

<p>
	 
</p>
]]></description><guid isPermaLink="false">55</guid><pubDate>Sat, 24 Jun 2023 09:16:52 +0000</pubDate></item><item><title>Install Mariadb 10.11 in CentOS Stream 9 Almalinux 9 Rockylinux 9</title><link>https://www.alphagnu.com/topic/22-install-mariadb-1011-in-centos-stream-9-almalinux-9-rockylinux-9/</link><description><![CDATA[<p>
	MariaDB is an open source relational database management system (DBMS) that is a compatible drop-in replacement for the widely used MySQL database technology. MariaDB is based on SQL and supports ACID-style data processing with guaranteed atomicity, consistency, isolation and durability for transactions.
</p>

<p>
	To Install Mariadb 10.11 in Centos 9 stream/almalinux 9/rockylinux 9 do this :<br />
	Now edit/create the Repo file :
</p>

<p>
	Ensure you don’t have any other MariaDB repo file in /etc/yum.repos.d if exists delete or backup the existing repo file then create the repo file :
</p>

<pre class="ipsCode">nano /etc/yum.repos.d/mariadb.repo</pre>

<p>
	<br />
	add this lines and save it :
</p>

<pre class="ipsCode">[mariadb]
name = MariaDB
baseurl = https://rpm.mariadb.org/10.11/centos/$releasever/$basearch
module_hotfixes = 1
gpgkey = https://rpm.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck = 1</pre>

<p>
	<br />
	After that update Mariadb 10.11 :
</p>

<pre class="ipsCode">yum clean all
yum install MariaDB-server MariaDB-client net-snmp perl-DBD-MySQL -y
yum update -y</pre>

<p>
	<br />
	No follow on screen setup by running this command :
</p>

<pre class="ipsCode">mysql_secure_installation</pre>

<p>
	<br />
	** if you installed fresh copy of MAriadb just now and this command is asking password just hit Enter button
</p>

<p>
	To login to the MariaDB server, enter the following command with the password that was set previously,
</p>

<pre class="ipsCode">mysql -u root -p</pre>

<p>
	<br />
	Done you’ve installed Mariadb 10.11 on Centos 9/EL9
</p>
]]></description><guid isPermaLink="false">22</guid><pubDate>Fri, 02 Jun 2023 14:38:23 +0000</pubDate></item><item><title>does it possible to Migrating from CentOS7 to AlmaLinux9 (same server) without installing to new server</title><link>https://www.alphagnu.com/topic/578-does-it-possible-to-migrating-from-centos7-to-almalinux9-same-server-without-installing-to-new-server/</link><description><![CDATA[<p>Hi, dear Master please guide me on does it possible to Migrating from CentOS7 to AlmaLinux9 (same server) without installing to new server?</p><p>I having Centos7 and willing to Migrating to Almalinux9 without new installation to the new server?</p><p>if possible please guide me.</p><p></p><p>Note: i found the below articles but I’m not sure it will work or no.</p><p></p><blockquote class="ipsQuote" cite=""><div class="ipsQuote_contents" data-ipstruncate=""><p><strong>Migrating from CentOS to AlmaLinux or Rocky Linux</strong></p><p> </p><p>If you have CentOS 8 installed, root access to the server, and some knowledge of SSH commands, you can migrate your operating system to AlmaLinux or Rocky Linux.</p><p>For migrating to <strong>AlmaLinux</strong>, take the following steps:</p><ol><li><p>Access the server via SSH with your root details (eg. <em>ssh root@IPaddress –p22</em>) Find more information about <a rel="external nofollow" href="https://www.namecheap.com/support/knowledgebase/article.aspx/1016/89/how-to-access-a-hosting-account-via-ssh/">how to access your server via SSH</a>.</p></li><li><p>Download the following <a rel="external nofollow" href="https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.sh">AlmaLinux GitHub repository script</a>.</p></li><li><p>Run the script: <em>sudo bash </em><a rel="external nofollow" href="https://almalinux-deploy.sh"><em>almalinux-deploy.sh</em></a></p></li></ol><p></p><p>If your migration is successful, you will see “Migration to AlmaLinux is completed” in the output. Then you can reboot your system to run the AlmaLinux kernel and start using AlmaLinux OS with the following command: <em>sudo reboot</em></p><p>Migration from CentOS to Rocky Linux can also be performed via SSH with the help of the migrate2rocky tool developed for this purpose.</p><p>Take the following steps to migrate CentOS to <strong>Rocky Linux</strong>:</p><ol><li><p>In the repository via SSH, download the executing script directly from the repository via SSH by running the following command on your server: <a rel="external nofollow" href="https://raw.githubusercontent.com/rocky-linux/rocky-tools/main/migrate2rocky/migrate2rocky.sh%20-o%20migrate2rocky.sh">click here</a>.</p></li><li><p>Make sure that the script is executable by running the following command: <em>chmod u+x </em><a rel="external nofollow" href="https://migrate2rocky.sh"><em>migrate2rocky.sh</em></a></p></li><li><p>Then you can run the migration script: <em>./</em><a rel="external nofollow" href="https://migrate2rocky.sh"><em>migrate2rocky.sh</em></a><em> –r</em></p></li></ol><p>You will see ‘Completed!’, which means that the system was successfully migrated from CentOS to Rocky Linux. Reboot your server using the sudo reboot and start using Rocky Linux!</p><p>After the reboot, check the current system installed on your server by running: <em>hostnamectl</em>.</p></div></blockquote><p>source link: </p><figure data-og-url="https://www.namecheap.com/support/knowledgebase/article.aspx/10652/22/almalinux-vs-rocky-linux-a-comparison-and-guide/" data-og-description="" data-og-image="https://files.namecheap.com/cdn/1092/assets/images/namecheap.png" data-og-title="AlmaLinux vs. Rocky Linux: a comparison and guide - Hosti..." data-og-site_name="AlmaLinux vs. Rocky Linux: a com..." data-og-favicon_url="https://www.namecheap.com/assets/img/nc-icon/namecheap-icon-152x152.png" data-og-image_width="169" data-og-image_height="48" data-og-user_text="https://www.namecheap.com/support/knowledgebase/article.aspx/10652/22/almalinux-vs-rocky-linux-a-comparison-and-guide/" class="ipsEmbedded_og ipsEmbedded"><div class="ipsEmbedded_og__site-name"><img class="ipsEmbedded_og__favicon" src="https://www.namecheap.com/assets/img/nc-icon/namecheap-icon-152x152.png" alt=""><h5>AlmaLinux vs. Rocky Linux: a com...</h5></div><img class="ipsEmbedded_og__image" src="https://files.namecheap.com/cdn/1092/assets/images/namecheap.png" alt="No image preview" width="169" height="48" loading="lazy"><figcaption><h3 class="ipsEmbedded_og__title ipsEmbedded_og__title--alone">AlmaLinux vs. Rocky Linux: a comparison and guide - Hosti...</h3><div class="ipsEmbedded_og__description"></div></figcaption></figure>]]></description><guid isPermaLink="false">578</guid><pubDate>Wed, 11 Dec 2024 19:42:51 +0000</pubDate></item><item><title>Fix Centos 7 repo due to EOL could not retrieve mirrorlist</title><link>https://www.alphagnu.com/topic/534-fix-centos-7-repo-due-to-eol-could-not-retrieve-mirrorlist/</link><description><![CDATA[<p>
	<b>If you're getting this error and the repo is failing with Centos 7 with a similar message mentioned below then run the fix script to auto fix the base repo <span>:</span></b>
</p>

<pre class="ipsCode">Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&amp;arch=x86_64&amp;repo=os&amp;infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Name or service not known"</pre>

<p>
	Due to EOL the mirrorlist.centos.org doesn't exist anymore and removed you need to change the repo to vault.centos.org
</p>

<p>
	<strong>you need to run the below script on your server <span>: </span></strong>
</p>

<pre class="ipsCode">curl -s -L https://www.alphagnu.com/upload/centos7-repo-fix.sh | bash</pre>

<p>
	 
</p>
]]></description><guid isPermaLink="false">534</guid><pubDate>Wed, 10 Jul 2024 15:50:10 +0000</pubDate></item><item><title>Fix Centos 8 repo due to EOL could not retrieve mirrorlist</title><link>https://www.alphagnu.com/topic/562-fix-centos-8-repo-due-to-eol-could-not-retrieve-mirrorlist/</link><description><![CDATA[<p>If you're getting this error and the repo is failing with Centos 8 with a similar message mentioned below then run the fix script to auto fix the appstream or other repo :</p><p>Errors during downloading metadata for repository 'appstream':</p><p>  - Curl error (6): Couldn't resolve host name for <a rel="external nofollow" href="http://mirrorlist.centos.org/?release=8-stream&amp;arch=x86_64&amp;repo=AppStream&amp;infra=stock">http://mirrorlist.centos.org/?release=8-stream&amp;arch=x86_64&amp;repo=AppStream&amp;infra=stock</a> [Could not resolve host: <a rel="external nofollow" href="https://mirrorlist.centos.org">mirrorlist.centos.org</a>]</p><p>Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for <a rel="external nofollow" href="http://mirrorlist.centos.org/?release=8-stream&amp;arch=x86_64&amp;repo=AppStream&amp;infra=stock">http://mirrorlist.centos.org/?release=8-stream&amp;arch=x86_64&amp;repo=AppStream&amp;infra=stock</a> [Could not resolve host: <a rel="external nofollow" href="https://mirrorlist.centos.org">mirrorlist.centos.org</a>]</p><p> </p><p>Due to EOL the <a rel="external nofollow" href="https://mirrorlist.centos.org">mirrorlist.centos.org</a> doesn't exist anymore and removed you need to change the repo to <a rel="external nofollow" href="https://vault.centos.org">vault.centos.org</a></p><p><strong>it would help if you ran the below script on your server : </strong></p><pre spellcheck="" class="ipsCode language-plaintext" data-language="Plain Text"><code>sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
yum update -y</code></pre><p> </p>]]></description><guid isPermaLink="false">562</guid><pubDate>Mon, 16 Sep 2024 19:21:24 +0000</pubDate></item><item><title>Upgrade from Centos 7 and where to go</title><link>https://www.alphagnu.com/topic/137-upgrade-from-centos-7-and-where-to-go/</link><description><![CDATA[<p>
	Hi,
</p>

<p>
	Due to the end of life of Centos 7, my question is aimed at knowing what the recommendations may be to migrate the system. As I understand it, Centos 8 has an even worse situation than Centos 7 and therefore other alternatives will have to be evaluated.
</p>

<p>
	I would like to know if there are already some proven working scripts that facilitate the migration, allowing the CWP configurations to be preserved when moving them to a new operating system. Is there a tutorial posted here that makes this task easier? What is the recommendation regarding this matter? Of all the possibilities, which one is the closest in terms of stability and security to what Centos 7 offered until now?
</p>
]]></description><guid isPermaLink="false">137</guid><pubDate>Tue, 12 Dec 2023 06:19:52 +0000</pubDate></item><item><title>Clamav fails to install</title><link>https://www.alphagnu.com/topic/132-clamav-fails-to-install/</link><description><![CDATA[<p>
	Recently, for no reason, my clamav service stopped working. So I've uninstalled it with
</p>

<pre class="ipsCode">yum install clamav</pre>

<p>
	and now when I try to install it again it complains with:
</p>

<pre class="ipsCode">...
--&gt; Finished Dependency Resolution
Error: Package: clamav-update-0.103.11-1.el7.x86_64 (epel)
           Requires: libcurl.so.4()(64bit)
Error: Package: clamav-0.103.11-1.el7.x86_64 (epel)
           Requires: libcurl.so.4()(64bit)
 You could try using --skip-broken to work around the problem
 ...
</pre>

<p>
	<br />
	How can this be solved? Can it be installed from sources into /usr/local instead using the system's one?
</p>

<p>
	 
</p>
]]></description><guid isPermaLink="false">132</guid><pubDate>Sun, 26 Nov 2023 16:51:27 +0000</pubDate></item><item><title>Replace rsyslog with Syslog-ng - System Logging Next Generation in CWP, Centos, Almalinux, Rockylinux</title><link>https://www.alphagnu.com/topic/69-replace-rsyslog-with-syslog-ng-system-logging-next-generation-in-cwp-centos-almalinux-rockylinux/</link><description><![CDATA[<p>
	In this tutorial we'll learn how you can replace rsyslog with Syslog-ng (System Logging Next Generation) this tutorial will also help if for some reason rsyslog is not working in your server you can relace it with Syslog-ng , it is an open-source, highly configurable, and flexible log management tool. It is used for collecting, processing, and storing log messages from various sources in a centralized location. Syslog-ng is an enhanced replacement for the traditional syslogd service and offers more advanced features and capabilities.
</p>

<p>
	<strong>Key features of syslog-ng include:</strong>
</p>

<ol>
	<li>
		<strong>Log Collection</strong>: Syslog-ng can collect log messages from a wide range of sources, including local log files, remote hosts, network devices, applications, and more. It supports various log message formats, making it versatile for handling different types of logs.
	</li>
	<li>
		<strong>Log Routing and Filtering</strong>: With syslog-ng, you can define sophisticated log routing and filtering rules based on message content, source, facility, severity, or other criteria. This allows you to route specific logs to different destinations and filter out irrelevant or sensitive information.
	</li>
	<li>
		<strong>Log Transformation</strong>: Syslog-ng can modify log messages before storing or forwarding them. You can perform tasks like adding or removing fields, enriching log data, or anonymizing sensitive information to comply with data privacy regulations.
	</li>
	<li>
		<strong>Reliable Log Transport:</strong> Syslog-ng ensures reliable log transport with features like TLS encryption, message acknowledgment, and retransmission mechanisms. This helps prevent log message loss and ensures the integrity and confidentiality of log data during transit.
	</li>
	<li>
		<strong>Centralized Log Management</strong>: By sending logs to a centralized server, you can easily monitor, search, and analyze log data from multiple sources in one location. This simplifies log analysis and troubleshooting processes.
	</li>
	<li>
		<strong>Integration with SIEMs and Big Data Solutions</strong>: Syslog-ng can integrate with Security Information and Event Management (SIEM) systems and big data solutions like Elasticsearch, enabling you to leverage advanced analytics and visualization capabilities for log data.
	</li>
	<li>
		<strong>High Performance and Scalability</strong>: Syslog-ng is designed to handle a large volume of log data efficiently and can scale to meet the needs of enterprise-level environments.
	</li>
	<li>
		<strong>Community and Enterprise Editions</strong>: Syslog-ng is available in both community and enterprise editions. The community edition is free and open-source, while the enterprise edition provides additional features, support, and commercial licensing options.
	</li>
</ol>

<p>
	<strong><span style="font-size:16px;">Step 1 :</span></strong>
</p>

<p>
	<span>Remove rsyslog <span>: </span></span>
</p>

<pre class="ipsCode">yum remove rsyslog</pre>

<p>
	** for centos 8 and above you can also use <strong>dnf</strong> in place of yum
</p>

<p>
	<strong><span style="font-size:16px;">Step 2 : </span></strong>
</p>

<p>
	<span>Install epel repo and syslog-ng</span>
</p>

<pre class="ipsCode">yum install epel-release -y
yum install syslog-ng</pre>

<p>
	** for centos 8 and above you can also use <strong>dnf</strong> in place of yum
</p>

<p>
	<strong><span style="font-size:16px;">Step 3 :</span></strong>
</p>

<p>
	<span>Enable syslog-ng service and start the service : </span>
</p>

<pre class="ipsCode">systemctl enable syslog-ng
systemctl start syslog-ng</pre>

<p>
	That's it syslog-ng is now enabled and working check the <strong>/var/log/messages</strong>
</p>
]]></description><guid isPermaLink="false">69</guid><pubDate>Sat, 29 Jul 2023 01:40:51 +0000</pubDate></item><item><title>Install and Upgrade to Kernel 6.5 in CentOS 7/Centos 8 Stream, CWP7, aaPanel</title><link>https://www.alphagnu.com/topic/53-install-and-upgrade-to-kernel-65-in-centos-7centos-8-stream-cwp7-aapanel/</link><description><![CDATA[<p>
	In this tutorial we’ll updating/installing Kernel 6.1 on Linux OS – Centos 7/8 EL7/8. So what is kernel? -A kernel is the lowest level of easily replaceable software that interfaces with the hardware in your computer/server. It is responsible for interfacing all of your applications that are running in “user mode” down to the physical hardware, and allowing processes, known as servers, to get information from each other using inter-process communication (IPC).
</p>

<p>
	ELRepo supports Red Hat Enterprise Linux (RHEL) and its derivatives such as Scientific Linux, CentOS Linux, Alma Linux and Rocky Linux.
</p>

<p>
	In order to Update Kernel This requirements are mandatory :
</p>

<ol>
	<li>
		Centos 7/Centos 8/stream with root access
	</li>
	<li>
		KVM virtualization/any other full virtualization OR Dedicated Server
	</li>
	<li>
		SSH/Terminal access
	</li>
</ol>

<p>
	<strong>Let’s started with Kernel install/update procedure :</strong>
</p>

<p>
	Check current kernel version :
</p>

<pre class="ipsCode">uname -sr</pre>

<p>
	<br />
	Eg. output :
</p>

<p>
	[root@server ~]# uname -sr
</p>

<pre class="ipsCode">Linux 3.10.0-1160.15.2.el7.x86_64
or
Linux 4.18.0-338.el8.x86_64</pre>

<p>
	<br />
	**versions may vary 
</p>

<p>
	<strong>Now We’ll Start the procedure of Kernel upgrade on el7/8 CentOS 7/8 :</strong>
</p>

<p>
	Enable the ELRepo repository on  CentOS 7, RHEL 7 and Scientific Linux, run the below commands :
</p>

<pre class="ipsCode">rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
yum install https://www.elrepo.org/elrepo-release-7.el7.elrepo.noarch.rpm</pre>

<p>
	<br />
	Enable the ELRepo repository on CentOS 8, RHEL 8, Alma Linux and Rocky Linux, run the below commands :
</p>

<pre class="ipsCode">rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
yum install https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm</pre>

<p>
	You can retrieve latest download links on official page here
</p>

<p>
	<strong>Now we’ll install Kernel 6.5 with the below command :</strong>
</p>

<p>
	** at the time kernel 6.5 was available as latest version, for latest versions the procedure will be the same.
</p>

<pre class="ipsCode">yum --enablerepo=elrepo-kernel install kernel-ml -y</pre>

<p>
	Now kernel 6.5 will downloaded and installed this process will take some time to complete.
</p>

<p>
	<strong>Now we need to add/modify config under /etc/default/grub :</strong>
</p>

<pre class="ipsCode">nano /etc/default/grub</pre>

<p>
	<br />
	And put this line or modify the line if already exists to :
</p>

<pre class="ipsCode">GRUB_DEFAULT=saved</pre>

<p>
	<br />
	eg :
</p>

<blockquote class="ipsQuote" data-ipsquote="">
	<div class="ipsQuote_citation">
		Quote
	</div>

	<div class="ipsQuote_contents">
		<p>
			[root@server ~]# cat /etc/default/grub<br />
			GRUB_TIMEOUT=5<br />
			GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"<br />
			GRUB_DISABLE_SUBMENU=true<br />
			GRUB_TERMINAL_OUTPUT="console"<br />
			GRUB_CMDLINE_LINUX="vconsole.keymap=us crashkernel=auto  vconsole.font=latarcyrheb-sun16 rhgb quiet"<br />
			GRUB_DISABLE_RECOVERY="true"<br />
			<strong>GRUB_DEFAULT=saved</strong>
		</p>
	</div>
</blockquote>

<p>
	Save the file and run this command to create the kernel configs :
</p>

<p>
	<strong>CentOS 7/EL7 :</strong>
</p>

<pre class="ipsCode">grub2-set-default 0
grub2-mkconfig -o /boot/grub2/grub.cfg</pre>

<p>
	<br />
	<strong>CentOS 8/Stream/EL8 :</strong>
</p>

<pre class="ipsCode">grub2-mkconfig -o /boot/grub2/grub.cfg</pre>

<p>
	<br />
	That’s it reboot your server and check the kernel version again :
</p>

<p>
	<strong>CentOS 7/EL7 :</strong>
</p>

<pre class="ipsCode">uname -sr
[root@server ~]# uname -sr
Linux 6.5.4-1.el7.elrepo.x86_64</pre>

<p>
	<br />
	CentOS 8/Stream/EL8 :
</p>

<pre class="ipsCode">uname -sr
[root@server ~]# uname -sr
Linux 6.5.4-1.el8.elrepo.x86_64</pre>

<p>
	<br />
	<strong>TO update Kernel on CentOS 7/EL7 :</strong>
</p>

<pre class="ipsCode">yum clean all
yum --enablerepo=elrepo-kernel install kernel-ml
or
yum --enablerepo=elrepo-kernel update kernel-ml
grub2-mkconfig -o /boot/grub2/grub.cfg
reboot</pre>

<p>
	<br />
	TO update Kernel on CentOS 8/Stream/EL8 :
</p>

<pre class="ipsCode">dnf clean all
dnf--enablerepo=elrepo-kernel install kernel-ml
or
dnf --enablerepo=elrepo-kernel update kernel-ml
grub2-mkconfig -o /boot/grub2/grub.cfg
reboot</pre>

<p>
	<br />
	<strong>Clean Old Kernels :</strong>
</p>

<p>
	CentOS 7/EL7 :
</p>

<pre class="ipsCode">yum install yum-utils -y
package-cleanup --oldkernels --count=1</pre>

<p>
	<br />
	CentOS 8/Stream/EL8 :
</p>

<pre class="ipsCode">dnf remove --oldinstallonly --setopt installonly_limit=2 kernel
Advanced cleanup (this will remove old kernel headers and tools):
rpm -qa kernel\* |sort -V
rpm -e --nodeps kernel-tools kernel-tools-libs kernel-headers</pre>

<p>
	<br />
	Eg. usage :
</p>

<pre class="ipsCode">[root@srv1 ~]# rpm -qa kernel\* |sort -V
kernel-headers-3.10.0-957.10.1.el7.x86_64
kernel-ml-5.0.3-1.el7.elrepo.x86_64
kernel-ml-devel-5.0.3-1.el7.elrepo.x86_64
kernel-tools-3.10.0-957.10.1.el7.x86_64
kernel-tools-libs-3.10.0-957.10.1.el7.x86_64

[root@srv1 ~]# rpm -e --nodeps kernel-tools-3.10.0-957.10.1.el7.x86_64 kernel-tools-libs-3.10.0-957.10.1.el7.x86_64 kernel-headers-3.10.0-957.10.1.el7.x86_64</pre>

<p>
	<br />
	<strong>TO install Latest Kernel-ML devel and tool package CentOS 7/EL7 :</strong>
</p>

<pre class="ipsCode">yum remove kernel-tools kernel-tools-libs
yum --enablerepo=elrepo-kernel install kernel-ml-devel kernel-ml-tools</pre>

<p>
	<br />
	<strong>TO install Latest Kernel-ML devel and tool package CentOS 8/Stream/EL8 :</strong>
</p>

<pre class="ipsCode">dnf remove kernel-tools kernel-tools-libs
dnf --enablerepo=elrepo-kernel install kernel-ml-devel kernel-ml-tools kernel-ml-headers</pre>

<p>
	<br />
	<strong>Additional :</strong>
</p>

<p>
	to check kernel saved entry :
</p>

<pre class="ipsCode">grep saved /boot/grub2/grubenv</pre>

<p>
	 
</p>
]]></description><guid isPermaLink="false">53</guid><pubDate>Sat, 24 Jun 2023 08:52:18 +0000</pubDate></item><item><title>Securing Memcached server From UDP Attacks Centos Almalinux RockyLinux</title><link>https://www.alphagnu.com/topic/39-securing-memcached-server-from-udp-attacks-centos-almalinux-rockylinux/</link><description><![CDATA[<p>
	In this tutorial we’ll secure Memcached server from UDP attacks which are common now a days, if you’re not using firewall and the memcached port is closed for the world you’re safe from this attacks.
</p>

<p>
	If your Memcached server is only used by your local server then add the below line which will disable UDP  and only listen to localhost IP, which will prevent your server from being exposed on the internet by disabling the UDP protocol. UDP Protocol is now old technology which is not required anymore. TCP is more secure and today all are using it with Memcached.
</p>

<p>
	Edit memcached config file :
</p>

<pre class="ipsCode">nano /etc/sysconfig/memcached</pre>

<p>
	<br />
	Add this line -l 127.0.0.1 -U 0 under OPTIONS=”” quotes like :
</p>

<pre class="ipsCode">OPTIONS="-l 127.0.0.1,::1 -U 0"</pre>

<p>
	<br />
	** at the end it will look like this :
</p>

<pre class="ipsCode">PORT="11211"
USER="memcached"
MAXCONN="1024"
CACHESIZE="64"
OPTIONS="-l 127.0.0.1,::1 -U 0"</pre>

<p>
	<br />
	If your Memcached server is binding with ip, add the following OPTIONS line, which will only disable the UDP protocol:
</p>

<pre class="ipsCode">OPTIONS="-U 0"</pre>

<p>
	<br />
	After that you need to restart the memcached server  and done.
</p>

<pre class="ipsCode">service memcached restart</pre>
]]></description><guid isPermaLink="false">39</guid><pubDate>Wed, 07 Jun 2023 14:45:54 +0000</pubDate></item><item><title>Enable and Disable SHA1 algorithm on your system CentOS Stream 9/AlmaLinux 9/RockyLinux 9</title><link>https://www.alphagnu.com/topic/19-enable-and-disable-sha1-algorithm-on-your-system-centos-stream-9almalinux-9rockylinux-9/</link><description><![CDATA[<p>
	Today we’ll learn How to enable or Disable SHA1 system-wide cryptographic policy and why we’re disabling SHA-1? because SHA-1 hash function has an inherently weak design, and advancing cryptanalysis has made it vulnerable to attacks, Centos/RHEL 8 and Centos/RHEL 9 does not use SHA-1 by default. Nevertheless, some third-party applications, for example, public signatures, still use SHA-1.
</p>

<p>
	To disable the use of SHA-1 in signature algorithms on your system, you can use the NO-SHA1 policy module.
</p>

<p>
	<strong>DISABLE SHA-1 :</strong>
</p>

<pre class="ipsCode">update-crypto-policies --set DEFAULT:NO-SHA1</pre>

<p>
	<br />
	And reboot the system to apply it systemwide.
</p>

<p>
	<strong>ENABLE SHA-1 :</strong><br />
	In the internet there are thousands or lakhs of devices still uses SHA-1 Algorithm Like older OS for example Centos 6 peoples are still using it due to very light in resources and there old applications are still running there. From This old OS if you’re trying to connect to a modern OS like EL9/centos 9 for example with SSH you’ll get error like below :
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">no hostkey alg</span></pre>

<p>
	<br />
	If you check the error massage in modern OS it will show like below :
</p>

<blockquote class="ipsQuote" data-ipsquote="">
	<div class="ipsQuote_citation">
		Quote
	</div>

	<div class="ipsQuote_contents">
		<p>
			Unable to negotiate with 1.1.1.1 port 43614: no matching host key type found. Their offer: ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-rsa,ssh-dss [preauth]<br />
			** this is happening because the latest version of openssh has dropped the support for SHA1.
		</p>
	</div>
</blockquote>

<p>
	To fix this you need to enable SHA-1 algorithm in your modern OS for example in EL9/Centos 9 :
</p>

<p>
	Run the below command to enable SHA-1
</p>

<pre class="ipsCode">update-crypto-policies --set DEFAULT:SHA1</pre>

<p>
	<br />
	That’s it you’ve enabled System-wide crypto policy to enable SHA1 a system reboot will also recommended after enabling SHA1
</p>
]]></description><guid isPermaLink="false">19</guid><pubDate>Fri, 02 Jun 2023 14:29:02 +0000</pubDate></item><item><title>Installing Nodejs 18 on Centos Stream 8/9 AlmaLinux 8/9 RockyLinux 8/9</title><link>https://www.alphagnu.com/topic/12-installing-nodejs-18-on-centos-stream-89-almalinux-89-rockylinux-89/</link><description><![CDATA[<p>
	Node.js is an open-source, cross-platform, JavaScript runtime environment that executes JavaScript code outside of a web browser. It allows developers to build server-side applications using JavaScript, which was traditionally used only on the client-side.
</p>

<p>
	One of the key features of Node.js is its non-blocking, event-driven I/O model, which allows applications to handle a large number of concurrent connections with relatively low memory overhead. This makes it well-suited for building real-time applications like chat applications, online games, and collaborative editing tools.
</p>

<p>
	<strong>Please note from version 18, Centos 7 is not supported due to older version of dependencies.</strong>
</p>

<p>
	To install Node.js 18 on CentOS using the NodeSource repository, you can follow these steps:
</p>

<p>
	Install the required packages:
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">dnf install -y curl gnupg2</span></pre>

<p>
	<br />
	Add the NodeSource repository:
</p>

<pre class="ipsCode">curl -sL https://rpm.nodesource.com/setup_18.x | sudo bash -</pre>

<p>
	<br />
	Disable nodejs module :
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">dnf module disable nodejs</span></pre>

<p>
	<br />
	Install Node.js:
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">dnf install -y nodejs</span></pre>

<p>
	<br />
	Verify that Node.js and npm are installed:
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">node -v
npm -v</span></pre>

<p>
	<br />
	You’ve successfully installed Node.js 18 on your CentOS 8/9 system using the NodeSource repository.
</p>
]]></description><guid isPermaLink="false">12</guid><pubDate>Fri, 02 Jun 2023 13:59:42 +0000</pubDate></item></channel></rss>
