<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>LAMP Archives - LinuxTuto</title>
	<atom:link href="https://www.linuxtuto.com/tag/lamp/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.linuxtuto.com/tag/lamp/</link>
	<description>Linux Sysadmin and DevOps blog</description>
	<lastBuildDate>Thu, 13 Jan 2022 11:41:11 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://www.linuxtuto.com/wp-content/uploads/2022/01/cropped-LT_faveicon-32x32.png</url>
	<title>LAMP Archives - LinuxTuto</title>
	<link>https://www.linuxtuto.com/tag/lamp/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">201456972</site>	<item>
		<title>How to Install LAMP Stack on AlmaLinux 8.5</title>
		<link>https://www.linuxtuto.com/how-to-install-lamp-stack-on-almalinux-8-5/</link>
					<comments>https://www.linuxtuto.com/how-to-install-lamp-stack-on-almalinux-8-5/#comments</comments>
		
		<dc:creator><![CDATA[LinuxTuto]]></dc:creator>
		<pubDate>Wed, 12 Jan 2022 22:16:36 +0000</pubDate>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[AlmaLinux]]></category>
		<category><![CDATA[LAMP]]></category>
		<guid isPermaLink="false">https://www.linuxtuto.com/?p=142</guid>

					<description><![CDATA[<p>LAMP is a popular open-source software stack that is mostly used for testing and hosting web applications. It’s an acronym for Linux Apache MariaDB /...</p>
<p>The post <a href="https://www.linuxtuto.com/how-to-install-lamp-stack-on-almalinux-8-5/">How to Install LAMP Stack on AlmaLinux 8.5</a> appeared first on <a href="https://www.linuxtuto.com">LinuxTuto</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>LAMP </strong>is a popular open-source software stack that is mostly used for testing and hosting web applications. It’s an acronym for <strong>L</strong>inux <strong>A</strong>pache <strong>M</strong>ariaDB / MySQL and<strong> P</strong>HP.</p>
<p>Apache is a popular open-source and widely used web server. <strong>MariaDB</strong> is a free and open-source, commercially supported relational database management system, and <strong>PHP</strong> is a server-side scripting language used for developing dynamic web pages.</p>
<p>In this tutorial, we will show you how to install LAMP stack on AlmaLinux 8.</p>
<h2><span class="has-inline-color has-vivid-purple-color">Update Operating System</span></h2>
<p>Update your <strong>AlmaLinux 8</strong> operating system to make sure all existing packages are up to date:</p>
<pre><code>$ sudo dnf update</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Install Apache webserver</span></h2>
<p>Well, like most of the Linux operating systems, we don’t have to add any third-party Repos to install Apache- HTTPd server.</p>
<p>You can install Apache via <code>dnf</code> package manager by executing the following command.</p>
<pre><code>$ sudo dnf install httpd</code></pre>
<p>Apache does not start automatically when it is installed. You can start the Apache service and configure it to run on startup by entering the following commands:</p>
<pre><code>$ sudo systemctl start httpd
$ sudo systemctl enable httpd</code></pre>
<p>Verify the status of the <code>Apache</code> service using <code>systemctl status</code> command:</p>
<pre><code>$ sudo systemctl status httpd</code></pre>
<p>Output:</p>
<pre><code><span style="color: #00ff00;">●</span> httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/httpd.service.d
└─php-fpm.conf
Active: <span style="color: #00ff00;">active (running)</span>
Docs: man:httpd.service(8)
Main PID: 36360 (httpd)
Status: "Running, listening on: port 80"
Tasks: 213 (limit: 11221)
Memory: 38.6M
CGroup: /system.slice/httpd.service
├─36360 /usr/sbin/httpd -DFOREGROUND
├─36375 /usr/sbin/httpd -DFOREGROUND
├─36376 /usr/sbin/httpd -DFOREGROUND
├─36378 /usr/sbin/httpd -DFOREGROUND
└─36405 /usr/sbin/httpd -DFOREGROUND
</code></pre>
<p>If <code>firewalld</code> is enabled consider allowing <code>HTTP</code> and <code>HTTPS</code> services:</p>
<pre><code>$ sudo firewall-cmd --permanent --add-service={http,https}
$ sudo firewall-cmd --reload</code></pre>
<p>You can test to make sure everything is working correctly by navigating to:</p>
<pre><code>http://your-IP-address</code></pre>
<p>If everything is configured properly, you should be greeted by the default AlmaLinux Test Page, as seen below.</p>
<figure id="attachment_166" aria-describedby="caption-attachment-166" style="width: 1024px" class="wp-caption alignnone"><img fetchpriority="high" decoding="async" class="size-large wp-image-166" src="https://www.linuxtuto.com/wp-content/uploads/2022/01/Apache-1024x469.jpg" alt="AlmaLinux Test Page" width="1024" height="469" srcset="https://www.linuxtuto.com/wp-content/uploads/2022/01/Apache-1024x469.jpg 1024w, https://www.linuxtuto.com/wp-content/uploads/2022/01/Apache-300x137.jpg 300w, https://www.linuxtuto.com/wp-content/uploads/2022/01/Apache-768x352.jpg 768w, https://www.linuxtuto.com/wp-content/uploads/2022/01/Apache-1536x703.jpg 1536w, https://www.linuxtuto.com/wp-content/uploads/2022/01/Apache-1222x559.jpg 1222w, https://www.linuxtuto.com/wp-content/uploads/2022/01/Apache-897x411.jpg 897w, https://www.linuxtuto.com/wp-content/uploads/2022/01/Apache-684x313.jpg 684w, https://www.linuxtuto.com/wp-content/uploads/2022/01/Apache.jpg 1916w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption id="caption-attachment-166" class="wp-caption-text">AlmaLinux Test Page</figcaption></figure>
<h2><span class="has-inline-color has-vivid-purple-color">Install MariaDB 10.7</span></h2>
<p>MariaDB 10.7 is the latest release version for this relational database system. To be able to install MariaDB 10.7 on AlmaLinux 8 you need to add the <code>MariaDB YUM</code> repository:</p>
<pre><code>$ curl -LsS -O https://downloads.mariadb.com/MariaDB/mariadb_repo_setup
$ sudo bash mariadb_repo_setup --mariadb-server-version=<span class="has-inline-color has-vivid-purple-color">10.7</span></code></pre>
<p>Once the repository has been added to the system, installing MariaDB is an easy task that can be accomplished with the following command:</p>
<pre><code>$ sudo dnf install MariaDB-server MariaDB-client</code></pre>
<p>Once the installation is complete, verify the installed version of MariaDB.</p>
<pre><code>$ sudo dnf info MariaDB-server</code></pre>
<figure id="attachment_158" aria-describedby="caption-attachment-158" style="width: 900px" class="wp-caption alignnone"><img decoding="async" class="wp-image-158" src="https://www.linuxtuto.com/wp-content/uploads/2022/01/MariaDB.jpg" alt="MariaDB 10.7" width="900" height="313" srcset="https://www.linuxtuto.com/wp-content/uploads/2022/01/MariaDB.jpg 813w, https://www.linuxtuto.com/wp-content/uploads/2022/01/MariaDB-300x104.jpg 300w, https://www.linuxtuto.com/wp-content/uploads/2022/01/MariaDB-768x267.jpg 768w, https://www.linuxtuto.com/wp-content/uploads/2022/01/MariaDB-684x238.jpg 684w" sizes="(max-width: 900px) 100vw, 900px" /><figcaption id="caption-attachment-158" class="wp-caption-text">MariaDB 10.7 on AlmaLinux 8.5</figcaption></figure>
<p>Start the database server daemon, and also enable it to start automatically at the next boot with the following commands:</p>
<pre><code>$ systemctl start mariadb
$ systemctl enable mariadb</code></pre>
<p>Check the status of the service:</p>
<pre><code>$ systemctl status mariadb</code></pre>
<p>Example output:</p>
<pre><code>$ <span style="color: #00ff00;">●</span> mariadb.service - MariaDB 10.7.1 database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: <span style="color: #00ff00;">active (running)</span> 
Docs: man:mariadbd(8)
https://mariadb.com/kb/en/library/systemd/
Main PID: 35787 (mariadbd)
Status: "Taking your SQL requests now..."
Tasks: 13 (limit: 11221)
Memory: 68.0M
CGroup: /system.slice/mariadb.service
└─35787 /usr/sbin/mariadbd
</code></pre>
<h3><span class="has-inline-color has-vivid-purple-color">Secure MariaDB</span></h3>
<p>Run <code>mariadb-secure-installation</code> script which helps you secure your MariaDB database server:</p>
<pre class="wp-block-code"><code>$ sudo mariadb-secure-installation</code></pre>
<p>You can set a root password for MariaDB along with removing empty databases, restricting remote access except for localhost, removing anonymous users, and more:</p>
<pre><code>Set root password? [Y/n]<strong><span style="color: #ff0000;"> Y</span></strong>
Remove anonymous users? [Y/n] <strong><span style="color: #ff0000;">Y
</span></strong>Disallow root login remotely? [Y/n]<strong><span style="color: #ff0000;"> Y
</span></strong>Remove test database and access to it? [Y/n]<strong><span style="color: #ff0000;"> Y
</span></strong>Reload privilege tables now? [Y/n]<strong><span style="color: #ff0000;"> Y</span></strong></code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Install PHP 8.1</span></h2>
<p>Currently, PHP 8.1 is not featured in AlmaLinux’s AppStream. However, you can install PHP from (Remi) repository, a free-to-use third-party repository that deploys the latest PHP 8.1 builds.</p>
<p>To install EPEL, use the following <strong>(dnf)</strong> terminal command:</p>
<pre class="wp-block-code copy-the-code-target language-bash" tabindex="0"><code class=" language-bash" lang="bash"><span class="token function">$ sudo</span> dnf <span class="token function">install</span> epel-release</code></pre>
<p>Now that you have added the EPEL repository, enable<strong> (Remi repository) </strong>with the following command:</p>
<pre><code>$ sudo dnf install dnf-utils http://rpms.remirepo.net/enterprise/remi-release-8.rpm</code></pre>
<p>Use the <strong>(dnf)</strong> command to update your repository list:</p>
<pre><code>$ sudo dnf update</code></pre>
<p>Next, enable PHP 8.1 with the following command:</p>
<pre><code>$ sudo dnf module enable php:remi-8.1</code></pre>
<p>Now that you have added the Remi PHP repository and enabled PHP 8.1 to be the default version on your system, you can install PHP 8.1 with the following command:</p>
<pre><code>$ sudo dnf install php</code></pre>
<p>You can check your PHP version using the following command:</p>
<pre><code>$ php -v</code></pre>
<p>Example output:</p>
<pre><code>PHP 8.1.1 (cli) (built: Dec 15 2021 02:00:45) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.1.1, Copyright (c) Zend Technologies
with Zend OPcache v8.1.1, Copyright (c), by Zend Technologies</code></pre>
<p>If you would like to install the most commonly used extensions for PHP 8.1, use the following command:</p>
<pre><code>$ sudo dnf install php-cli php-fpm php-curl php-mysqlnd php-gd php-opcache php-zip php-intl php-common php-bcmath php-imap php-imagick php-xmlrpc php-json php-readline php-memcached php-redis php-mbstring php-apcu php-xml php-dom php-redis php-memcached php-memcache</code></pre>
<p>You can check your PHP modules using the following command:</p>
<pre><code>$ php -m</code></pre>
<p>Example output:</p>
<pre><code>[PHP Modules]
..............
igbinary
imagick
imap
intl
json
libxml
mbstring
memcache
memcached
msgpack
mysqli
mysqlnd
openssl
..............

[Zend Modules]
Zend OPcache</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Comments and Conclusion</span></h2>
<p>In the tutorial, you have learned how to install LAMP stack on AlmaLinux 8.</p>
<p>If you have any questions please leave a comment below.</p>
<p>The post <a href="https://www.linuxtuto.com/how-to-install-lamp-stack-on-almalinux-8-5/">How to Install LAMP Stack on AlmaLinux 8.5</a> appeared first on <a href="https://www.linuxtuto.com">LinuxTuto</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.linuxtuto.com/how-to-install-lamp-stack-on-almalinux-8-5/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">142</post-id>	</item>
	</channel>
</rss>
