<?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>Elasticsearch Archives - LinuxTuto</title>
	<atom:link href="https://www.linuxtuto.com/tag/elasticsearch/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.linuxtuto.com/tag/elasticsearch/</link>
	<description>Linux Sysadmin and DevOps blog</description>
	<lastBuildDate>Sat, 11 May 2024 16:13:00 +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>Elasticsearch Archives - LinuxTuto</title>
	<link>https://www.linuxtuto.com/tag/elasticsearch/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">201456972</site>	<item>
		<title>How to Install Magento 2.4.7 on Ubuntu 24.04</title>
		<link>https://www.linuxtuto.com/how-to-install-magento-2-4-7-on-ubuntu-24-04/</link>
					<comments>https://www.linuxtuto.com/how-to-install-magento-2-4-7-on-ubuntu-24-04/#comments</comments>
		
		<dc:creator><![CDATA[LinuxTuto]]></dc:creator>
		<pubDate>Tue, 09 Apr 2024 15:30:03 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Composer]]></category>
		<category><![CDATA[Elasticsearch]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">https://www.linuxtuto.com/?p=1738</guid>

					<description><![CDATA[<p>Magento is an open-source e-commerce platform that provides online merchants with a flexible shopping cart system, as well as control over the look, content, and...</p>
<p>The post <a href="https://www.linuxtuto.com/how-to-install-magento-2-4-7-on-ubuntu-24-04/">How to Install Magento 2.4.7 on Ubuntu 24.04</a> appeared first on <a href="https://www.linuxtuto.com">LinuxTuto</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Magento is an open-source e-commerce platform that provides online merchants with a flexible shopping cart system, as well as control over the look, content, and functionality of their online stores. It also has a large community of developers and users who contribute to its ongoing development and provide support through forums, documentation, and other resources.</p>
<p>Magento comes in two main editions: Magento Open Source (formerly known as Magento Community Edition) and Magento Commerce (formerly known as Magento Enterprise Edition). The Open Source edition is free to use and provides basic e-commerce functionality, while the Commerce edition is a paid version that includes more advanced features such as customer segmentation, targeted promotions, and advanced marketing tools.</p>
<p>In this tutorial we will show you how to install the Open Source version of <strong>Magento 2.4.7</strong> on Ubuntu 24.04 OS.</p>
<p>Before starting the installation, you can check <a href="https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/system-requirements.html">the system requirement</a> for installing Magento 2.4.7.</p>
<p><img fetchpriority="high" decoding="async" class="aligncenter size-large wp-image-1751" src="https://www.linuxtuto.com/wp-content/uploads/2024/04/magento_2.4.7_requirements-823x900.webp" alt="Magento 2.4.7 requirements" width="823" height="900" srcset="https://www.linuxtuto.com/wp-content/uploads/2024/04/magento_2.4.7_requirements-823x900.webp 823w, https://www.linuxtuto.com/wp-content/uploads/2024/04/magento_2.4.7_requirements-274x300.webp 274w, https://www.linuxtuto.com/wp-content/uploads/2024/04/magento_2.4.7_requirements-768x840.webp 768w, https://www.linuxtuto.com/wp-content/uploads/2024/04/magento_2.4.7_requirements-897x981.webp 897w, https://www.linuxtuto.com/wp-content/uploads/2024/04/magento_2.4.7_requirements-684x748.webp 684w, https://www.linuxtuto.com/wp-content/uploads/2024/04/magento_2.4.7_requirements.webp 932w" sizes="(max-width: 823px) 100vw, 823px" /></p>
<h2><span class="has-inline-color has-vivid-purple-color">S</span><span class="has-inline-color has-vivid-purple-color">tep 1: Update Operating System</span></h2>
<p>Update your <strong>Ubuntu 24.04</strong> operating system to make sure all existing packages are up to date:</p>
<pre><code># apt update &amp;&amp; apt upgrade</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 2: Install Apache web server</span></h2>
<p>To install Apache web server, run the following command:</p>
<pre class="wp-block-preformatted"><code># apt install apache2</code></pre>
<p>You can start the Apache service and configure it to run on startup by entering the following commands:</p>
<pre><code># systemctl start apache2
# systemctl enable apache2</code></pre>
<p>Verify the status of the Apache service using <strong>systemctl status</strong> command:</p>
<pre><code># systemctl status apache2</code></pre>
<p>Output:</p>
<pre><code>● apache2.service - The Apache HTTP Server
     Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled; preset: enabled)
     Active: active (running)
       Docs: https://httpd.apache.org/docs/2.4/
   Main PID: 22413 (apache2)
      Tasks: 6 (limit: 2130)
     Memory: 16.8M (peak: 17.0M)
        CPU: 658ms
     CGroup: /system.slice/apache2.service
             ├─22413 /usr/sbin/apache2 -k start
             ├─22468 /usr/sbin/apache2 -k start
             ├─22469 /usr/sbin/apache2 -k start
             ├─22470 /usr/sbin/apache2 -k start
</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 3: Install PHP and PHP extensions</span></h2>
<p>Magento 2.4.7 comes with support for the latest PHP 8.3, while PHP 8.2 remains fully supported. By default, PHP 8.3 is included in the Ubuntu 24.04 default repository.</p>
<p>You can install PHP 8.3 and required PHP extensions using the following command:</p>
<pre><code># apt install php php-exif php-bz2 php-bcmath php-intl php-soap php-zip php-curl php-mbstring php-mysql php-gd php-xml</code></pre>
<p>Verify if PHP is installed.</p>
<pre><code>php -v</code></pre>
<pre><code>Output:
PHP 8.3.0-1ubuntu1 (cli) (built: Jan 19 2024 14:00:34) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.0, Copyright (c) Zend Technologies
    with Zend OPcache v8.3.0-1ubuntu1, Copyright (c), by Zend Technologies
</code></pre>
<h3><span class="has-inline-color has-vivid-purple-color">Update php.ini file</span></h3>
<p>Now it’s time to increase values in the php.ini file.</p>
<p>Open <code>php.ini</code> file:</p>
<pre><code># nano /etc/php/8.3/apache2/php.ini
</code></pre>
<p>Change the following data:</p>
<pre><code>short_open_tag = On
memory_limit = 512M
upload_max_filesize = 128M
max_execution_time = 3600
</code></pre>
<p>Then save this <code>php.ini</code> file.</p>
<p>After that, you should restart the Apache web server for the configuration to take effect:</p>
<pre class="highlight"><code># systemctl restart apache2
</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 4: Install MySQL and create a database</span></h2>
<p>You can install the MySQL server with the following command:</p>
<pre><code># apt install mysql-server</code></pre>
<p><span style="font-size: 16px;">Verify the status of the MySQL service using </span><strong>systemctl status</strong><span style="font-size: 16px;"> command:</span></p>
<pre><code># systemctl status mysql</code></pre>
<p>Output:</p>
<pre><code>● mysql.service - MySQL Community Server
     Loaded: loaded (/usr/lib/systemd/system/mysql.service; enabled; preset: enabled)
     Active: active (running)
    Process: 2907 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
   Main PID: 2919 (mysqld)
     Status: "Server is operational"
      Tasks: 37 (limit: 2130)
     Memory: 362.8M (peak: 379.2M)
        CPU: 1.737s
     CGroup: /system.slice/mysql.service
             └─2919 /usr/sbin/mysqld
</code></pre>
<p>By default, MySQL is not hardened. You can secure MySQL using the <strong>mysql_secure_installation</strong> script:</p>
<pre><code># mysql_secure_installation</code></pre>
<p>Configure it like this:</p>
<pre><code>- Set root password? [Y/n] <strong>Y</strong>
- Remove anonymous users? [Y/n] <strong>Y</strong>
- Disallow root login remotely? [Y/n] <strong>Y</strong>
- Remove test database and access to it? [Y/n] <strong>Y</strong>
- Reload privilege tables now? [Y/n] <strong>Y</strong></code></pre>
<p>Now run the command below to log in to the MySQL shell.</p>
<pre><code># mysql -u root -p</code></pre>
<p>Once you are logged in to your database server to create a database, database user, and grant all privileges to the database user run the following commands:</p>
<pre><code>mysql&gt; CREATE DATABASE magentodb;
mysql&gt; CREATE USER 'magentouser'@'localhost' IDENTIFIED BY 'Str0ngPa$$w0rd';
mysql&gt; GRANT ALL ON magentodb.* TO 'magentouser'@'localhost';
mysql&gt; FLUSH PRIVILEGES;
mysql&gt; EXIT</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 5: Installing Elasticsearch</span></h2>
<p>Starting Magento 2.4, all installations must be configured to use <a href="https://www.linuxtuto.com/how-to-install-elasticsearch-8-on-debian-11/" target="_blank" rel="noopener">Elasticsearch</a> as the catalog search engine.</p>
<p>Import the Elasticsearch GPG key:</p>
<pre><code># wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg</code></pre>
<p>Add the Elasticsearch repository:</p>
<pre><code># echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-8.x.list</code></pre>
<p>Update the <code>apt</code> package manager and install Elasticsearch:</p>
<pre><code># apt update &amp;&amp; apt install elasticsearch</code></pre>
<p>Then start and enable the service:</p>
<pre><code># systemctl start elasticsearch
# systemctl enable elasticsearch</code></pre>
<p>Open the <strong>elasticsearch.yml</strong> file:</p>
<pre><code># nano  /etc/elasticsearch/elasticsearch.yml</code></pre>
<p>Then uncomment the lines and update the values:</p>
<pre><code>node.name: "ubuntu"
cluster.name: magento 2.4.7
network.host: 127.0.0.1
http.port: 9200
xpack.security.enabled: false</code></pre>
<p>After that, you should restart elasticsearch service for the configuration to take effect:</p>
<pre class="highlight"><code># systemctl restart elasticsearch</code></pre>
<p>To verify that Elasticsearch is running correctly, you will use the <strong>curl</strong> command:</p>
<pre><code># curl -X GET "localhost:9200/"</code></pre>
<p>If Elasticsearch is working properly, the result should be like this:</p>
<pre><code>{
  "name" : "ubuntu",
  "cluster_name" : "magento 2.4.7",
  "cluster_uuid" : "nKzTibHRT_ahq6lCsWk6Ew",
  "version" : {
    "number" : "8.13.1",
    "build_flavor" : "default",
    "build_type" : "deb",
    "build_hash" : "9287f29bba5e270bd51d557b8daccb7d118ba247",
    "build_date" : "2024-03-29T10:05:29.787251984Z",
    "build_snapshot" : false,
    "lucene_version" : "9.10.0",
    "minimum_wire_compatibility_version" : "7.17.0",
    "minimum_index_compatibility_version" : "7.0.0"
  },
  "tagline" : "You Know, for Search"
}</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 6: Install Composer</span></h2>
<p>To download Composer, run the following command:</p>
<pre><code># curl -sS https://getcomposer.org/installer | php</code></pre>
<p>Next, move the composer file to the <strong>/usr/local/bin</strong> path:</p>
<pre><code># mv composer.phar  /usr/local/bin/composer
# chmod +x   /usr/local/bin/composer</code></pre>
<p>Verify the Composer version installed:</p>
<pre><code># composer --version

Output:
Composer version 2.7.2 2024-03-11 17:12:18
</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 7: Install Magento 2.4.7</span></h2>
<p>For most situation it is recommended to install Magento using the <strong>Marketplace</strong> by creating access key.</p>
<p>To get the access keys, you should create an account in the <a href="https://marketplace.magento.com/customer/accessKeys/">Magento marketplace.</a></p>
<p>Then for generating access keys go to:</p>
<p><strong>My profile &gt; Marketplace &gt; My products &gt; Access Keys</strong></p>
<p>Once access keys are generated run the following  command to download Magento 2.4.7:</p>
<pre><code># composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition=2.4.7 /var/www/magento2</code></pre>
<p>Username : <strong>Your</strong> <strong>Public Key</strong><br />
Password : <strong>Your</strong> <strong>Private Key</strong></p>
<p>Navigate to the <code>Magento</code> directory:</p>
<pre><code># cd /var/www/magento2</code></pre>
<p>Chmod cache and static content folder:</p>
<pre><code># find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +</code></pre>
<p>Change the ownership of the magento2 directory to the webserver user and also the permissions:</p>
<pre><code># chown -R www-data:www-data /var/www/magento2
# chmod -R 755 /var/www/magento2</code></pre>
<p>Now, install Magento using the composer command, type:</p>
<pre class="wp-block-preformatted"><code># bin/magento setup:install \
--base-url=http://your-domain.com \
--db-host=localhost \
--db-name=magentodb \
--db-user=magentouser \
--db-password='Str0ngPa$$w0rd' \
--admin-firstname=Admin \
--admin-lastname=User \
--admin-email=admin@your-domain.com \
--admin-user=admin \
--admin-password=admin123 \
--language=en_US \
--currency=USD \
--timezone=America/Chicago \
--use-rewrites=1</code></pre>
<p>After the installation process you will see the admin link for your Magento site.</p>
<pre><code>[SUCCESS]: Magento installation complete.
[SUCCESS]: Magento Admin URI: /admin_nuqh2y
Nothing to import.</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 8: Configure Apache for Magento 2.4.7</span></h2>
<p>Run the command below to create a new VirtualHost file in the <strong>/etc/apache2/sites-available/</strong> directory:</p>
<pre><code># nano /etc/apache2/sites-available/<span class="pln">magento2</span>.conf</code></pre>
<p>Paste the content as shown below:</p>
<pre><code> &lt;VirtualHost *:80&gt;
    ServerAdmin admin@your-domain.com
    DocumentRoot /var/www/<span class="pln">magento2/pub</span>
    
    ServerName your-domain.com
    ServerAlias www.your-domain.com

    &lt;Directory /var/www/magento2/&gt; 
        AllowOverride All
    &lt;/Directory&gt; 

    ErrorLog /var/log/apache2/your-domain.com-error_log
    CustomLog /var/log/apache2/your-domain.com-access_log common

 &lt;/VirtualHost&gt;</code></pre>
<p>Remember to replace <strong><code>your-domain.com</code></strong> with the domain name of your server.</p>
<p>Save and exit the configuration file.</p>
<p>Next run the following command to enable <strong>rewrite</strong> module:</p>
<pre><code># a2enmod rewrite</code></pre>
<p>To enable this site run the command:</p>
<pre><code># a2ensite <span class="pln">magento2</span>.conf</code></pre>
<p>To implement the changes, restart Apache webserver:</p>
<pre><code># systemctl restart apache2</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 9: Access your Magento 2.4.7 Application</span></h2>
<p>Open your browser and type your domain <code>http://your-domain.com</code></p>
<p><img decoding="async" class="aligncenter size-large wp-image-1743" src="https://www.linuxtuto.com/wp-content/uploads/2024/04/magento2.4.7_home-900x507.webp" alt="Magento 2.4.7 Home Page" width="900" height="507" srcset="https://www.linuxtuto.com/wp-content/uploads/2024/04/magento2.4.7_home-900x507.webp 900w, https://www.linuxtuto.com/wp-content/uploads/2024/04/magento2.4.7_home-300x169.webp 300w, https://www.linuxtuto.com/wp-content/uploads/2024/04/magento2.4.7_home-768x433.webp 768w, https://www.linuxtuto.com/wp-content/uploads/2024/04/magento2.4.7_home-1536x865.webp 1536w, https://www.linuxtuto.com/wp-content/uploads/2024/04/magento2.4.7_home-1222x688.webp 1222w, https://www.linuxtuto.com/wp-content/uploads/2024/04/magento2.4.7_home-897x505.webp 897w, https://www.linuxtuto.com/wp-content/uploads/2024/04/magento2.4.7_home-684x385.webp 684w, https://www.linuxtuto.com/wp-content/uploads/2024/04/magento2.4.7_home.webp 1916w" sizes="(max-width: 900px) 100vw, 900px" /></p>
<h2><span class="has-inline-color has-vivid-purple-color">Comments and Conclusion</span></h2>
<p>That’s it. You have successfully installed Open Source version of Magento 2.4.7 on Ubuntu 24.04.</p>
<p>For additional help or useful information, we recommend you to check  <a href="https://developer.adobe.com/commerce/docs/" target="_blank" rel="noopener">the official Magento documentation.</a></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-magento-2-4-7-on-ubuntu-24-04/">How to Install Magento 2.4.7 on Ubuntu 24.04</a> appeared first on <a href="https://www.linuxtuto.com">LinuxTuto</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.linuxtuto.com/how-to-install-magento-2-4-7-on-ubuntu-24-04/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1738</post-id>	</item>
		<item>
		<title>How to Install Elasticsearch 8 on Debian 11</title>
		<link>https://www.linuxtuto.com/how-to-install-elasticsearch-8-on-debian-11/</link>
					<comments>https://www.linuxtuto.com/how-to-install-elasticsearch-8-on-debian-11/#respond</comments>
		
		<dc:creator><![CDATA[LinuxTuto]]></dc:creator>
		<pubDate>Tue, 18 Apr 2023 16:00:03 +0000</pubDate>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Elasticsearch]]></category>
		<guid isPermaLink="false">https://www.linuxtuto.com/?p=1263</guid>

					<description><![CDATA[<p>Elasticsearch is a highly scalable and distributed open-source full-text search and analytics engine tool. It is designed to store, search, and analyze large volumes of...</p>
<p>The post <a href="https://www.linuxtuto.com/how-to-install-elasticsearch-8-on-debian-11/">How to Install Elasticsearch 8 on Debian 11</a> appeared first on <a href="https://www.linuxtuto.com">LinuxTuto</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Elasticsearch is a highly scalable and distributed open-source full-text search and analytics engine tool. It is designed to store, search, and analyze large volumes of data in real-time, making it a popular tool for a variety of use cases such as log analytics, e-commerce product search, and security analytics.</p>
<p>Elasticsearch uses a document-oriented data model, which means that it stores data in JSON documents that can be easily searched and analyzed. It also provides a powerful query language called Elasticsearch Query DSL, which allows users to perform complex queries on the data stored in the engine.</p>
<p>In this tutorial, we will show you how to install <code>Elasticsearch</code> on Debian 11.</p>
<h2><span class="has-inline-color has-vivid-purple-color">Step 1: Update Operating System</span></h2>
<p>Update your <strong>Debian 11</strong> operating system to make sure all existing packages are up to date:</p>
<pre><code># apt update &amp;&amp; apt upgrade</code></pre>
<p>Also, install:</p>
<pre><code># apt install curl wget gnupg apt-transport-https</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 2: Add Elasticsearch Repository</span></h2>
<p>By default, <code>Elasticsearch</code> is not included in the Debian 11 default repository. So you will need to add the <code>Elasticsearch</code> repository to APT.</p>
<p>First, import the <code>Elasticsearch</code> GPG key.</p>
<pre><code># wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg</code></pre>
<p>Then add the <code>Elasticsearch</code> repository.</p>
<pre><code># echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-8.x.list</code></pre>
<p>Once you are done, update the repository with the following command:</p>
<pre><code># apt update</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 3: Install and Configure Elasticsearch</span></h2>
<p>Now, you can install the <code>Elasticsearch</code> using the following command:</p>
<pre><code># apt install elasticsearch</code></pre>
<p>After installation is completed, edit <code>Elasticsearch</code> configuration file “<code>/etc/elasticsearch/elasticsearch.yml</code>”:</p>
<pre><code># nano /etc/elasticsearch/elasticsearch.yml</code></pre>
<p>Add the following content:</p>
<pre><code>cluster.name: LinuxTuto
node.name: Debian 11
path.data: /var/lib/elasticsearch
network.host: 127.0.0.1 
xpack.security.enabled: false
</code></pre>
<p>Then start and enable the service.</p>
<pre><code># systemctl start elasticsearch</code></pre>
<pre><code># systemctl enable elasticsearch</code></pre>
<p>To confirm the status of the service of <code>Elasticsearch</code>, run the command:</p>
<pre><code>$ sudo systemctl status elasticsearch.service</code></pre>
<pre><code><span style="color: #00ff00;">●</span> elasticsearch.service - Elasticsearch
Loaded: loaded (/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
Active: <span style="color: #00ff00;">active (running)</span>
Docs: https://www.elastic.co
Main PID: 73979 (java)
Tasks: 100 (limit: 2301)
Memory: 1.3G
CPU: 53.939s
CGroup: /system.slice/elasticsearch.service
├─73979 /usr/share/elasticsearch/jdk/bin/java -Xms4m -Xmx64m -XX:+UseSerialGC -Dcli.name=server -Dcli.script=/usr/share/elasticsearch/bin/elast&gt;
├─74040 /usr/share/elasticsearch/jdk/bin/java -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -Djava.security.manage&gt;
└─74063 /usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/bin/controller</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 4: Test Elasticsearch</span></h2>
<p>To verify that <code>Elasticsearch</code> is running correctly, you can use the <strong>curl</strong> command:</p>
<pre><code># curl -X GET "localhost:9200/"</code></pre>
<p>If <code>Elasticsearch</code> is working properly, the result should be like this:</p>
<pre><code>{
  "name" : "Debian 11",
  "cluster_name" : "LinuxTuto",
  "cluster_uuid" : "ezWPhn_fQLS5dcSiexroQA",
  "version" : {
    "number" : "8.7.0",
    "build_flavor" : "default",
    "build_type" : "deb",
    "build_hash" : "09520b59b6bc1057340b55750186466ea715e30e",
    "build_date" : "2023-03-27T16:31:09.816451435Z",
    "build_snapshot" : false,
    "lucene_version" : "9.5.0",
    "minimum_wire_compatibility_version" : "7.17.0",
    "minimum_index_compatibility_version" : "7.0.0"
  },
  "tagline" : "You Know, for Search"
}</code></pre>
<p>This means that <code>Elasticsearch</code> is active and running on your server.</p>
<h2><span class="has-inline-color has-vivid-purple-color">Step 5: Uninstall Elasticsearch</span></h2>
<p>Run the following script to remove Elasticsearch from your system.</p>
<pre><code># apt remove elasticsearch</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Comments and Conclusion</span></h2>
<p>In this tutorial we have installed the free version which is released under the Elastic license. You can check the <a href="https://www.elastic.co/subscriptions" target="_blank" rel="noreferrer noopener">Subscriptions</a> page for more information about Elastic license levels.</p>
<p>For additional help or useful information, you can check <a href="https://www.elastic.co/guide/index.html" target="_blank" rel="noopener">the official Elasticsearch Documentation</a>.</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-elasticsearch-8-on-debian-11/">How to Install Elasticsearch 8 on Debian 11</a> appeared first on <a href="https://www.linuxtuto.com">LinuxTuto</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.linuxtuto.com/how-to-install-elasticsearch-8-on-debian-11/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1263</post-id>	</item>
		<item>
		<title>How to Install Magento 2.4.6 on Ubuntu 22.04</title>
		<link>https://www.linuxtuto.com/how-to-install-magento-2-4-6-on-ubuntu-22-04/</link>
					<comments>https://www.linuxtuto.com/how-to-install-magento-2-4-6-on-ubuntu-22-04/#comments</comments>
		
		<dc:creator><![CDATA[LinuxTuto]]></dc:creator>
		<pubDate>Tue, 14 Mar 2023 19:00:52 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Composer]]></category>
		<category><![CDATA[Elasticsearch]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">https://www.linuxtuto.com/?p=744</guid>

					<description><![CDATA[<p>Magento is an open-source e-commerce platform that allows businesses to create and manage their online stores. It was first released in 2008 and has since...</p>
<p>The post <a href="https://www.linuxtuto.com/how-to-install-magento-2-4-6-on-ubuntu-22-04/">How to Install Magento 2.4.6 on Ubuntu 22.04</a> appeared first on <a href="https://www.linuxtuto.com">LinuxTuto</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Magento is an open-source e-commerce platform that allows businesses to create and manage their online stores. It was first released in 2008 and has since become one of the most popular e-commerce platforms in the world.</p>
<p>Magento provides a range of features and tools that help businesses to customize their online store and manage their products, customers, and orders.</p>
<p>Some of the key features of Magento include a robust shopping cart system, customizable product pages, flexible pricing rules, integrated payment and shipping options, and a wide range of extensions and plugins that can be used to enhance the functionality of the platform.</p>
<p>Magento is also known for its scalability, which means it can be used by businesses of all sizes, from small startups to large enterprises.</p>
<p>In this tutorial we will show you how to install the Open Source version of <strong>Magento 2.4.6</strong> on Ubuntu 22.04 OS.</p>
<p>Before starting the installation, you can check the system <a href="https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/system-requirements.html">requirement for installing Magento2</a>:</p>
<p><img decoding="async" class="size-large wp-image-1205 aligncenter" src="https://www.linuxtuto.com/wp-content/uploads/2023/03/magento_2.4.6_requirments-900x684.jpg" alt="Magento 2.4.6 Requirements" width="900" height="684" srcset="https://www.linuxtuto.com/wp-content/uploads/2023/03/magento_2.4.6_requirments-900x684.jpg 900w, https://www.linuxtuto.com/wp-content/uploads/2023/03/magento_2.4.6_requirments-300x228.jpg 300w, https://www.linuxtuto.com/wp-content/uploads/2023/03/magento_2.4.6_requirments-768x583.jpg 768w, https://www.linuxtuto.com/wp-content/uploads/2023/03/magento_2.4.6_requirments-897x681.jpg 897w, https://www.linuxtuto.com/wp-content/uploads/2023/03/magento_2.4.6_requirments-684x519.jpg 684w, https://www.linuxtuto.com/wp-content/uploads/2023/03/magento_2.4.6_requirments.jpg 1110w" sizes="(max-width: 900px) 100vw, 900px" /></p>
<h2><span class="has-inline-color has-vivid-purple-color">S</span><span class="has-inline-color has-vivid-purple-color">tep 1: Update Operating System</span></h2>
<p>Update your <strong>Ubuntu 22.04</strong> operating system to make sure all existing packages are up to date:</p>
<pre><code># apt update &amp;&amp; sudo apt upgrade -y</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 2: Install Nginx web server</span></h2>
<p>To install Nginx web server, run the following command:</p>
<pre class="wp-block-preformatted"><code># apt install nginx</code></pre>
<p>Once installed, Nginx should be running. If it&#8217;s not, for whatever reason, start it:</p>
<pre class="wp-block-preformatted"><code># systemctl start nginx</code></pre>
<p>Then enable it to start on boot time.</p>
<pre><code># systemctl enable nginx</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 3: Install PHP and PHP extensions</span></h2>
<p>Magento 2.4.6 comes with support for the latest PHP 8.2, while PHP 8.1 remains fully supported. By default, PHP 8.1 is included in the Ubuntu 22.04 default repository.</p>
<p>You can install PHP 8.1 using the following command:</p>
<pre><code># apt-get install php php-dev php-fpm php-bcmath php-intl php-soap php-zip php-curl php-mbstring php-mysql php-gd php-xml</code></pre>
<p>Verify if PHP is installed.</p>
<pre><code>php -v</code></pre>
<pre><code>Output:
PHP 8.1.2-1ubuntu2.11 (cli) (built: Feb 22 2023 22:56:18) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.2-1ubuntu2.11, Copyright (c), by Zend Technologies
</code></pre>
<h3><span class="has-inline-color has-vivid-purple-color">Update php.ini file</span></h3>
<p>Now it’s time to increase values in the php.ini file.</p>
<p>To locate the PHP configuration file run the following command:</p>
<pre><code># php --ini | grep "Loaded Configuration File"

<strong>Output:</strong>
Loaded Configuration File:         /etc/php/8.1/cli/php.ini</code></pre>
<p>Open <code>php.ini</code> file:</p>
<pre><code># nano /etc/php/8.1/cli/php.ini
</code></pre>
<p>Change the following data:</p>
<pre><code>file_uploads = On
allow_url_fopen = On
short_open_tag = On
memory_limit = 512M
upload_max_filesize = 128M
max_execution_time = 3600
</code></pre>
<p>Then save this <code>php.ini</code> file.</p>
<p>After that, you should restart nginx for the configuration to take effect:</p>
<pre class="highlight"><code># systemctl restart nginx
</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 4: Install MySQL 8 and create a database</span></h2>
<p>You can install MySQL with the following command:</p>
<pre><code># apt install mysql-server</code></pre>
<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 mysql
# systemctl enable mysql</code></pre>
<p>Once the database server is installed, log into the MySQL prompt:</p>
<pre><code>#  mysql -u root -p</code></pre>
<p>To create a database, database user, and grant all privileges to the database user run the following commands:</p>
<pre><code>mysql&gt; CREATE DATABASE magentodb;
mysql&gt; CREATE USER 'magentouser'@'localhost' IDENTIFIED BY 'MyPassword';
mysql&gt; GRANT ALL ON magentodb.* TO 'magentouser'@'localhost';
mysql&gt; FLUSH PRIVILEGES;
mysql&gt; EXIT</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 5: Installing Elasticsearch</span></h2>
<p>Starting Magento 2.4, all installations must be configured to use <a href="https://www.elastic.co/" target="_blank" rel="noopener">Elasticsearch</a> as the catalog search engine.</p>
<p>Import the Elasticsearch GPG key.</p>
<pre><code># wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg</code></pre>
<p>Add the Elasticsearch repository.</p>
<pre><code># echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-8.x.list</code></pre>
<p>Update the <code>apt</code> package manager and install Elasticsearch:</p>
<pre><code># apt update &amp;&amp; apt install elasticsearch</code></pre>
<p>Then start and enable the service.</p>
<pre><code># systemctl start elasticsearch</code></pre>
<pre><code># systemctl enable elasticsearch</code></pre>
<p>Now open the elasticsearch.yml file</p>
<pre><code>sudo nano  /etc/elasticsearch/elasticsearch.yml</code></pre>
<p>and replace this setting with <code>false</code>:</p>
<pre><code># Enable security features
xpack.security.enabled: false</code></pre>
<p>After that, you should restart elasticsearch service for the configuration to take effect:</p>
<pre class="highlight"><code># systemctl restart elasticsearch.service</code></pre>
<p>To verify that Elasticsearch is running correctly, you will use the <strong>curl</strong> command:</p>
<pre><code># curl -X GET "localhost:9200/"</code></pre>
<p>If Elasticsearch is working properly, the result should be like this:</p>
<pre><code>{
  "name" : "ubuntu",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "KPbFKCVLT9uu-RFxzxH_Bw",
  "version" : {
    "number" : "8.6.2",
    "build_flavor" : "default",
    "build_type" : "deb",
    "build_hash" : "2d58d0f136141f03239816a4e360a8d17b6d8f29",
    "build_date" : "2023-02-13T09:35:20.314882762Z",
    "build_snapshot" : false,
    "lucene_version" : "9.4.2",
    "minimum_wire_compatibility_version" : "7.17.0",
    "minimum_index_compatibility_version" : "7.0.0"
  },
  "tagline" : "You Know, for Search"
}</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 6: Install Composer</span></h2>
<p>To download Composer, run the following command:</p>
<pre><code># curl -sS https://getcomposer.org/installer | php</code></pre>
<p>Next, move the composer file to the<code> /usr/local/bin</code> path.</p>
<pre><code># mv composer.phar  /usr/local/bin/composer</code></pre>
<p>Assign execute permission:</p>
<pre><code># chmod +x   /usr/local/bin/composer</code></pre>
<p>Verify the Composer version installed:</p>
<pre><code># composer --version

Output:
Composer version 2.5.4 2023-02-15 13:10:06
</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 7: Install Magento 2.4.6</span></h2>
<p>For most situation it is recommended to install Magento using the <a href="https://marketplace.magento.com/" target="_blank" rel="noreferrer noopener">Marketplace</a> by creating access key.<br />
For generating Access keys go to:</p>
<p><strong>My profile &gt; Marketplace &gt; My products &gt; Access Keys</strong></p>
<p>Run the following  command to download <code>Magento 2.4.6</code> data:</p>
<pre><code># composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition=2.4.6 /var/www/magento2</code></pre>
<p>Username : <strong>Your</strong> <strong>Public Key</strong><br />
Password : <strong>Your</strong> <strong>Private Key</strong></p>
<p>Navigate to the <code>Magento</code> directory:</p>
<pre><code># cd /var/www/magento2</code></pre>
<p>Chmod cache and static content folder</p>
<pre><code>find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +</code></pre>
<p>Change the ownership of the Magento directory to the webserver user and also the permissions:</p>
<pre><code># chown -R www-data:www-data /var/www/magento2
# chmod -R 755 /var/www/magento2</code></pre>
<p>Now, install Magento using the composer command, type:</p>
<pre class="wp-block-preformatted"><code># bin/magento setup:install \
--base-url=http://your-domain.com \
--db-host=localhost \
--db-name=magentodb \
--db-user=magentouser \
--db-password=MyPassword \
--admin-firstname=Admin \
--admin-lastname=User \
--admin-email=admin@your-domain.com \
--admin-user=admin \
--admin-password=admin123 \
--language=en_US \
--currency=USD \
--timezone=America/Chicago \
--use-rewrites=1</code></pre>
<p>After the installation process you will see the admin link for your Magento site.</p>
<pre><span style="color: #08c418;"><code>[SUCCESS]: Magento installation complete.
[SUCCESS]: Magento Admin URI: /admin_o07lew
Nothing to import.</code></span></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 8: Configure Nginx Web Server for Magento 2.4.6</span></h2>
<p>Navigate to <code>/etc/nginx/conf.d</code> directory and run the following command to create a configuration file for your Magento installation:</p>
<pre><code class="hljs shell"><span class="bash"># nano /etc/nginx/conf.d/magento2.conf</span></code></pre>
<p>Add the following content:</p>
<pre><code>upstream fastcgi_backend {
  server  unix:/run/php/php8.1-fpm.sock;
}

server {

  listen 80;
  server_name your-domain.com www.your-domain.com;
  set $MAGE_ROOT /var/www/magento2;
  include /var/www/magento2/nginx.conf.sample;
}
</code></pre>
<p>Save the file and Exit.</p>
<p>Restart the Nginx web server.</p>
<pre><code># systemctl restart nginx</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 9: Access your Magento 2.4.6 Application</span></h2>
<p>Open your browser and type your domain e.g <code>http://your-domain.com</code></p>
<p><img loading="lazy" decoding="async" class="size-large wp-image-1207 aligncenter" src="https://www.linuxtuto.com/wp-content/uploads/2023/03/Magento2.4.6_home_page-900x507.jpg" alt="Magento 2.4.6 Home Page" width="900" height="507" srcset="https://www.linuxtuto.com/wp-content/uploads/2023/03/Magento2.4.6_home_page-900x507.jpg 900w, https://www.linuxtuto.com/wp-content/uploads/2023/03/Magento2.4.6_home_page-300x169.jpg 300w, https://www.linuxtuto.com/wp-content/uploads/2023/03/Magento2.4.6_home_page-768x433.jpg 768w, https://www.linuxtuto.com/wp-content/uploads/2023/03/Magento2.4.6_home_page-1536x866.jpg 1536w, https://www.linuxtuto.com/wp-content/uploads/2023/03/Magento2.4.6_home_page-1222x689.jpg 1222w, https://www.linuxtuto.com/wp-content/uploads/2023/03/Magento2.4.6_home_page-897x506.jpg 897w, https://www.linuxtuto.com/wp-content/uploads/2023/03/Magento2.4.6_home_page-684x386.jpg 684w, https://www.linuxtuto.com/wp-content/uploads/2023/03/Magento2.4.6_home_page.jpg 1916w" sizes="auto, (max-width: 900px) 100vw, 900px" /></p>
<h2><span class="has-inline-color has-vivid-purple-color">Comments and Conclusion</span></h2>
<p>That’s it. You have successfully installed Open Source version of Magento 2.4.6 on Ubuntu 22.04.</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-magento-2-4-6-on-ubuntu-22-04/">How to Install Magento 2.4.6 on Ubuntu 22.04</a> appeared first on <a href="https://www.linuxtuto.com">LinuxTuto</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.linuxtuto.com/how-to-install-magento-2-4-6-on-ubuntu-22-04/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">744</post-id>	</item>
		<item>
		<title>How to Install Magento 2.4.4 on Debian 11</title>
		<link>https://www.linuxtuto.com/how-to-install-magento-2-4-4-on-debian-11/</link>
					<comments>https://www.linuxtuto.com/how-to-install-magento-2-4-4-on-debian-11/#respond</comments>
		
		<dc:creator><![CDATA[LinuxTuto]]></dc:creator>
		<pubDate>Fri, 15 Apr 2022 21:11:41 +0000</pubDate>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Composer]]></category>
		<category><![CDATA[Elasticsearch]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">https://www.linuxtuto.com/?p=284</guid>

					<description><![CDATA[<p>Magento is a open source e-commerce platform written in PHP and uses the Zend Framework. It is highly popular ecommerce platform and it is owned...</p>
<p>The post <a href="https://www.linuxtuto.com/how-to-install-magento-2-4-4-on-debian-11/">How to Install Magento 2.4.4 on Debian 11</a> appeared first on <a href="https://www.linuxtuto.com">LinuxTuto</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Magento is a open source e-commerce platform written in PHP and uses the Zend Framework. It is highly popular ecommerce platform and it is owned and managed by Adobe Inc. The platform is flexible and has a large variety of features to build an online store.</p>
<p>In this tutorial we will show you how to install the Open Source version of <strong>Magento 2.4.4</strong> on Debian 11.</p>
<p>Before starting the installation, you can check the system requirement for installing Magento2 <a href="https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements.html">here</a>:</p>
<p><img loading="lazy" decoding="async" class="size-full wp-image-343 aligncenter" src="https://www.linuxtuto.com/wp-content/uploads/2022/04/Magento_2.4.4.jpg" alt="Magento 2.4.4" width="900" height="584" srcset="https://www.linuxtuto.com/wp-content/uploads/2022/04/Magento_2.4.4.jpg 900w, https://www.linuxtuto.com/wp-content/uploads/2022/04/Magento_2.4.4-300x195.jpg 300w, https://www.linuxtuto.com/wp-content/uploads/2022/04/Magento_2.4.4-768x498.jpg 768w, https://www.linuxtuto.com/wp-content/uploads/2022/04/Magento_2.4.4-897x582.jpg 897w, https://www.linuxtuto.com/wp-content/uploads/2022/04/Magento_2.4.4-684x444.jpg 684w" sizes="auto, (max-width: 900px) 100vw, 900px" /></p>
<h2><span class="has-inline-color has-vivid-purple-color">System prerequisites</span></h2>
<p>Your system will need to satisfy the requirements below before proceeding.</p>
<ul>
<li>Apache Web server</li>
<li>MySQL 8.0</li>
<li>PHP 8.1</li>
<li>Composer – an application-level package manager for the PHP</li>
</ul>
<h2><span class="has-inline-color has-vivid-purple-color">Step 1: Update Operating System</span></h2>
<p>Update your <strong>Debian 11</strong> operating system to make sure all existing packages are up to date:</p>
<pre><code>$ sudo apt update &amp;&amp; sudo apt upgrade -y</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 2: Install Apache web server</span></h2>
<p>To install Apache web server, run the following command:</p>
<pre class="wp-block-preformatted"><code>$ sudo apt install apache2</code></pre>
<p>Once installed, Apache should be running. If it&#8217;s not, for whatever reason, start it:</p>
<pre class="wp-block-preformatted"><code>$ sudo systemctl start apache2</code></pre>
<p>Then enable it to start on boot time.</p>
<pre><code>$ sudo systemctl enable apache2</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 3: Install PHP and PHP extensions for Magento 2.4.4</span></h2>
<p>Magento 2.4.4 <a href="https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements.html" target="_blank" rel="noopener noreferrer">require PHP 8.1</a>, so we will install <a href="https://www.linuxtuto.com/how-to-install-php-8-1-on-debian-11/">PHP 8.1</a> in this tutorial.</p>
<p>By default, PHP 8.1 is not included in the Debian 11 default repository. So you will need to add the <a href="https://deb.sury.org/" target="_blank" rel="noreferrer noopener">DEB.SURY.ORG</a> repository to APT.</p>
<p>First, install the required packages using the following command:</p>
<pre><code>$ sudo apt-get install ca-certificates apt-transport-https software-properties-common -y</code></pre>
<p>Once all the packages are installed, add a Sury repository to APT using the following command:</p>
<pre><code>$ sudo echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/sury-php.list</code></pre>
<p>Next, download and add the GPG key with the following command:</p>
<pre><code>$ sudo wget -qO - https://packages.sury.org/php/apt.gpg | apt-key add -</code></pre>
<p>Once you are done, update the repository with the following command:</p>
<pre><code>$ sudo apt-get update -y</code></pre>
<p>Now, you can install the PHP 8.1 using the following command:</p>
<pre><code>$ sudo apt-get install php8.1 libapache2-mod-php php8.1-dev php8.1-bcmath php8.1-intl php8.1-soap php8.1-zip php8.1-curl php8.1-mbstring php8.1-mysql php8.1-gd php8.1-xml</code></pre>
<p>Verify if PHP is installed.</p>
<pre><code>php -v</code></pre>
<pre><code>Output:
PHP 8.1.4 (cli) (built: Mar 20 2022 16:52:39) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.4, Copyright (c) Zend Technologies
with Zend OPcache v8.1.4, Copyright (c), by Zend Technologies
</code></pre>
<h3><span class="has-inline-color has-vivid-purple-color">Update php.ini file</span></h3>
<p>Now it’s time to increase values in the php.ini file. Open <code class="language-plaintext highlighter-rouge">php.ini</code> file:</p>
<div class="language-plaintext highlighter-rouge">
<div class="highlight">
<pre class="highlight"><code>$ sudo nano /etc/php/8.1/apache2/php.ini
</code></pre>
</div>
</div>
<p>Change the following data:</p>
<div class="language-plaintext highlighter-rouge">
<div class="highlight">
<pre class="highlight"><code>file_uploads = On
allow_url_fopen = On
short_open_tag = On
memory_limit = 512M
upload_max_filesize = 128M
max_execution_time = 3600
</code></pre>
</div>
</div>
<p>Then save this <code class="language-plaintext highlighter-rouge">php.ini</code> file.</p>
<p>After that, you should restart apache2 for the configuration to take effect:</p>
<pre class="highlight"><code>$ sudo systemctl restart apache2.service
</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 4: Install MySQL 8 and create a database</span></h2>
<p>To add the MySQL APT repository to your system run the following command:</p>
<pre><code>$ sudo wget https://dev.mysql.com/get/mysql-apt-config_0.8.22-1_all.deb</code></pre>
<p>Install the release package.</p>
<pre><code>$ sudo apt install ./mysql-apt-config_0.8.22-1_all.deb</code></pre>
<p>You can install MySQL with the following command:</p>
<pre><code>$ sudo apt install mysql-server</code></pre>
<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 mysql
$ systemctl enable mysql</code></pre>
<p>Once the database server is installed, log into the MySQL prompt:</p>
<pre><code>$ sudo  mysql -u root -p</code></pre>
<p>To create a database, database user, and grant all privileges to the database user run the following commands:</p>
<pre><code>mysql&gt; CREATE DATABASE magento_db;
mysql&gt; CREATE USER 'magento_user'@'localhost' IDENTIFIED BY 'Password';
mysql&gt; GRANT ALL ON magento_db.* TO 'magento_user'@'localhost';
mysql&gt; FLUSH PRIVILEGES;
mysql&gt; EXIT</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 5: Installing Elasticsearch</span></h2>
<p>Starting Magento 2.4, all installations must be configured to use <a href="https://www.elastic.co/" target="_blank" rel="noopener">Elasticsearch</a> as the catalog search engine.</p>
<p>Elasticserach uses a secure HTTPS transaction for its repositories. Before we proceed with the installation we need to install the required dependencies:</p>
<pre><code>$ sudo apt install apt-transport-https ca-certificates gnupg2</code></pre>
<p>Import the Elasticsearch GPG key.</p>
<pre><code>$ sudo wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -</code></pre>
<p>Add the Elasticsearch repository.</p>
<pre><code>$ sudo sh -c 'echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" &gt; /etc/apt/sources.list.d/elastic-7.x.list'</code></pre>
<p>Update the <code class="sc-fFeiMQ sc-bQFuvY dnebSm dxfXLo">apt</code> package manager and <a href="https://www.linuxtuto.com/how-to-install-elasticsearch-8-on-debian-11/">install Elasticsearch</a>:</p>
<pre><code>$ sudo apt update &amp;&amp; apt install elasticsearch</code></pre>
<p>Then start and enable the service.</p>
<pre><code>$ sudo systemctl start elasticsearch.service</code></pre>
<pre><code>$ sudo systemctl enable elasticsearch.service</code></pre>
<p>To verify that Elasticsearch is running correctly, you will use the <strong>curl</strong> command:</p>
<pre><code>$ curl -X GET "localhost:9200/"</code></pre>
<p>If Elasticsearch is working properly, the result should be like this:</p>
<pre><code>{
"name" : "debian",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "_95g0f6tQpOQZMR7ySyQQw",
"version" : {
"number" : "7.17.2",
"build_flavor" : "default",
"build_type" : "deb",
"build_hash" : "de7261de50d90919ae53b0eff9413fd7e5307301",
"build_date" : "2022-03-28T15:12:21.446567561Z",
"build_snapshot" : false,
"lucene_version" : "8.11.1",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 6: Install Composer</span></h2>
<p>To download Composer, run the following command:</p>
<pre><code>$ sudo curl -sS https://getcomposer.org/installer | php</code></pre>
<p>Next, move the composer file to the<code> /usr/local/bin</code> path.</p>
<pre><code>$ sudo mv composer.phar  /usr/local/bin/composer</code></pre>
<p>Assign execute permission:</p>
<pre><code>$ sudo chmod +x   /usr/local/bin/composer</code></pre>
<p>Verify the Composer version installed:</p>
<pre><code>$ sudo composer --version

Output:
Composer version 2.2.6 2022-02-04 17:00:38</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 7: Install Magento 2.4.4</span></h2>
<p>For most situation it is recommended to install Magento using the <a href="https://marketplace.magento.com/" target="_blank" rel="noreferrer noopener">Marketplace</a> by creating access key.</p>
<div>For generating Access keys go to:</div>
<div></div>
<div><strong>My profile &gt; Marketplace &gt; My products &gt; Access Keys</strong></div>
<p>Run the following  command to download <code>Magento 2.4.4</code> data:</p>
<pre><code>$ composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition=2.4.4 /var/www/magento2</code></pre>
<div>Username : <strong>Your</strong> <strong>Public Key</strong></div>
<div>Password : <strong>Your</strong> <strong>Private Key</strong></div>
<p>Navigate to the <code>Magento</code> directory:</p>
<pre class="wp-block-preformatted"><code>$ cd /var/www/magento2</code></pre>
<p>Chmod cache and static content folder</p>
<pre><code>$ find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +</code></pre>
<p>Change the ownership of the Magento directory to the webserver user and also the permissions:</p>
<pre><code>$ sudo chown -R www-data:www-data /var/www/magento2
$ sudo chmod -R 755 /var/www/magento2</code></pre>
<p>Now, install Magento using the composer command, type:</p>
<pre class="wp-block-preformatted"><code>$ sudo bin/magento setup:install \
--base-url=http://your-domain.com \
--db-host=localhost \
--db-name=magento_db \
--db-user=magento_user \
--db-password=Password \
--admin-firstname=Admin \
--admin-lastname=User \
--admin-email=admin@your-domain.com \
--admin-user=admin \
--admin-password=admin123 \
--language=en_US \
--currency=USD \
--timezone=America/Chicago \
--use-rewrites=1 </code></pre>
<p>After the installation process you will see the admin link for your Magento site.</p>
<pre><code>[SUCCESS]: Magento installation complete.
[SUCCESS]: Magento Admin URI: /admin_1od1xl
Nothing to import.</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 8: Configure Apache Web Server for Magento 2.4.4</span></h2>
<p>Navigate to <code>/etc/apache2/sites-available</code> directory and run the following command to create a configuration file for your Magento installation:</p>
<pre><code class="hljs shell"><span class="hljs-meta">$</span><span class="bash"> sudo nano /etc/apache2/sites-available/magento.conf</span></code></pre>
<p>Add the following content:</p>
<pre><code>&lt;VirtualHost *:80&gt;

ServerAdmin webmaster@your-domain.com

ServerName your-domain.com
ServerAlias www.your-domain.com
DocumentRoot /var/www/magento2/pub

&lt;Directory /var/www/magento2/&gt;
        AllowOverride All
&lt;/Directory&gt;

ErrorLog ${APACHE_LOG_DIR}/your-domain.com_error.log
CustomLog ${APACHE_LOG_DIR}/your-domain.com_access.log combined

&lt;/VirtualHost&gt;
</code></pre>
<p>Save the file and Exit.</p>
<p>Enable the Magento virtual host and make sure you enable rewrite mod to use site friendly URLs:</p>
<pre><code>$ sudo a2ensite magento.conf
$ sudo a2enmod rewrite</code></pre>
<p>Restart the Apache web server.</p>
<pre><code>$ sudo systemctl restart apache2</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 9: Access your Magento 2.4.4 Application</span></h2>
<p>Open your browser and type your domain e.g <code>http://your-domain.com</code></p>
<p><img loading="lazy" decoding="async" class="size-full wp-image-355 aligncenter" src="https://www.linuxtuto.com/wp-content/uploads/2022/04/Magento_2.4.4_homepage.jpg" alt="Magento 2.4.4 Home Page" width="900" height="507" srcset="https://www.linuxtuto.com/wp-content/uploads/2022/04/Magento_2.4.4_homepage.jpg 900w, https://www.linuxtuto.com/wp-content/uploads/2022/04/Magento_2.4.4_homepage-300x169.jpg 300w, https://www.linuxtuto.com/wp-content/uploads/2022/04/Magento_2.4.4_homepage-768x433.jpg 768w, https://www.linuxtuto.com/wp-content/uploads/2022/04/Magento_2.4.4_homepage-897x505.jpg 897w, https://www.linuxtuto.com/wp-content/uploads/2022/04/Magento_2.4.4_homepage-684x385.jpg 684w" sizes="auto, (max-width: 900px) 100vw, 900px" /></p>
<h2><span class="has-inline-color has-vivid-purple-color">Comments and Conclusion</span></h2>
<p>That’s it. You have successfully installed Open Source version of Magento 2.4.4 on Debian 11.</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-magento-2-4-4-on-debian-11/">How to Install Magento 2.4.4 on Debian 11</a> appeared first on <a href="https://www.linuxtuto.com">LinuxTuto</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.linuxtuto.com/how-to-install-magento-2-4-4-on-debian-11/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">284</post-id>	</item>
	</channel>
</rss>
