<?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>MySQL Archives - LinuxTuto</title>
	<atom:link href="https://www.linuxtuto.com/tag/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.linuxtuto.com/tag/mysql/</link>
	<description>Linux Sysadmin and DevOps blog</description>
	<lastBuildDate>Mon, 28 Apr 2025 14:30:04 +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>MySQL Archives - LinuxTuto</title>
	<link>https://www.linuxtuto.com/tag/mysql/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">201456972</site>	<item>
		<title>How to Install MySQL 8.4 on Ubuntu 24.04</title>
		<link>https://www.linuxtuto.com/how-to-install-mysql-8-4-on-ubuntu-24-04/</link>
					<comments>https://www.linuxtuto.com/how-to-install-mysql-8-4-on-ubuntu-24-04/#respond</comments>
		
		<dc:creator><![CDATA[LinuxTuto]]></dc:creator>
		<pubDate>Mon, 28 Apr 2025 14:30:04 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[MySQL]]></category>
		<guid isPermaLink="false">https://www.linuxtuto.com/?p=1908</guid>

					<description><![CDATA[<p>MySQL is a fast, open-source relational database system used to store, manage, and retrieve structured data developed by Oracle. It stores data in tables organized by...</p>
<p>The post <a href="https://www.linuxtuto.com/how-to-install-mysql-8-4-on-ubuntu-24-04/">How to Install MySQL 8.4 on Ubuntu 24.04</a> appeared first on <a href="https://www.linuxtuto.com">LinuxTuto</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>MySQL is a fast, open-source relational database system used to store, manage, and retrieve structured data developed by Oracle. It stores data in tables organized by rows and columns and uses Structured Query Language (SQL) to manage and access that data.</p>
<p>MySQL is known for being fast, reliable, and easy to use, making it one of the most popular databases for web applications, mobile apps, and enterprise software. It supports a variety of storage engines, offers replication features for scaling and high availability, and ensures data integrity with ACID-compliant transactions.</p>
<p>In this tutorial, we will show you how to install MySQL 8.4 on a Ubuntu 24.04 OS.</p>
<h2><span class="has-inline-color has-vivid-purple-color">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 -y</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Add MySQL 8.4 Repository</span></h2>
<p>MySQL 8.0 is the currently available version on the default Ubuntu 24.04 repositories.</p>
<p>Go to the <a href="https://dev.mysql.com/downloads/repo/apt/">download page</a> for the MySQL 8.4 APT repository.</p>
<p>Also you can run the following command to download it to your Ubuntu 24.04 system:</p>
<pre><code># wget https://dev.mysql.com/get/mysql-apt-config_0.8.34-1_all.deb</code></pre>
<p>Now install the downloaded <strong>.deb</strong> package with the following command:</p>
<pre><code># dpkg -i mysql-apt-config_0.8.34-1_all.deb</code></pre>
<p>During the installation of the package, you will be asked to choose the versions of the MySQL server and other components that you want to install. Choose <strong><span class="guilabel">Ok</span></strong> to finish the configuration and installation of the release package.</p>
<h2><img fetchpriority="high" decoding="async" class="aligncenter size-full wp-image-1909" src="https://www.linuxtuto.com/wp-content/uploads/2025/04/MySQL_8.4.webp" alt="MySQL 8.4 APT" width="900" height="467" srcset="https://www.linuxtuto.com/wp-content/uploads/2025/04/MySQL_8.4.webp 900w, https://www.linuxtuto.com/wp-content/uploads/2025/04/MySQL_8.4-300x156.webp 300w, https://www.linuxtuto.com/wp-content/uploads/2025/04/MySQL_8.4-768x399.webp 768w, https://www.linuxtuto.com/wp-content/uploads/2025/04/MySQL_8.4-897x465.webp 897w, https://www.linuxtuto.com/wp-content/uploads/2025/04/MySQL_8.4-684x355.webp 684w" sizes="(max-width: 900px) 100vw, 900px" /></h2>
<p>Once you are done, update the repository with the following command:</p>
<pre><code># apt-get update</code></pre>
<p>To check if MySQL 8.4 repo has been successfully installed run the following command:</p>
<pre><code># apt-cache policy mysql-server</code></pre>
<p>Output:</p>
<pre><code>mysql-server:
  Installed: (none)
  Candidate: 8.4.5-1ubuntu24.04
  Version table:
     8.4.5-1ubuntu24.04 500
        500 http://repo.mysql.com/apt/ubuntu noble/mysql-8.4-lts amd64 Packages
     8.0.41-0ubuntu0.24.04.1 500
        500 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu noble-security/main amd64 Packages
     8.0.36-2ubuntu3 500
        500 http://archive.ubuntu.com/ubuntu noble/main amd64 Packages</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Install MySQL 8.4 on Ubuntu 24.04</span></h2>
<p>Now you are ready to install MySQL 8.4 with the following command:</p>
<pre><code># apt install mysql-server</code></pre>
<p>You will be asked to set root password, you may go ahead and set one.</p>
<p><img decoding="async" class="aligncenter size-large wp-image-1912" src="https://www.linuxtuto.com/wp-content/uploads/2025/04/MySQL_8.4_root_password-900x469.webp" alt="MySQL 8.4 root password" width="900" height="469" srcset="https://www.linuxtuto.com/wp-content/uploads/2025/04/MySQL_8.4_root_password-900x469.webp 900w, https://www.linuxtuto.com/wp-content/uploads/2025/04/MySQL_8.4_root_password-300x156.webp 300w, https://www.linuxtuto.com/wp-content/uploads/2025/04/MySQL_8.4_root_password-768x400.webp 768w, https://www.linuxtuto.com/wp-content/uploads/2025/04/MySQL_8.4_root_password-1536x801.webp 1536w, https://www.linuxtuto.com/wp-content/uploads/2025/04/MySQL_8.4_root_password-1222x637.webp 1222w, https://www.linuxtuto.com/wp-content/uploads/2025/04/MySQL_8.4_root_password-897x468.webp 897w, https://www.linuxtuto.com/wp-content/uploads/2025/04/MySQL_8.4_root_password-684x357.webp 684w, https://www.linuxtuto.com/wp-content/uploads/2025/04/MySQL_8.4_root_password.webp 1886w" sizes="(max-width: 900px) 100vw, 900px" /></p>
<p>Then you can verify the installed version of <code>MySQL</code> with the following command:</p>
<pre><code># mysql --version</code></pre>
<p>Output:</p>
<pre><code>mysql  Ver 8.4.5 for Linux on x86_64 (MySQL Community Server - GPL)</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>Check the status of the service:</p>
<pre><code># systemctl status mysql</code></pre>
<p>Example output:</p>
<pre><code> ● mysql.service - MySQL Community Server
     Loaded: loaded (/usr/lib/systemd/system/mysql.service; enabled; preset: enabled)
     Active: active (running)
       Docs: man:mysqld(8)
             http://dev.mysql.com/doc/refman/en/using-systemd.html
   Main PID: 5331 (mysqld)
     Status: "Server is operational"
      Tasks: 35 (limit: 2217)
     Memory: 433.7M (peak: 449.8M)
        CPU: 2.315s
     CGroup: /system.slice/mysql.service
             └─5331 /usr/sbin/mysqld
</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">MySQL Create Database</span></h2>
<p>We need to login to <code>MySQL</code> shell with the following command:</p>
<pre><code># mysql -u root -p</code></pre>
<p>To create a database in <code>MySQL</code> you need to run the following command:</p>
<pre><code>mysql&gt; CREATE DATABASE your_db;</code></pre>
<p>View the new database:</p>
<pre><code>SHOW DATABASES;</code></pre>
<p>To create a new <code>MySQL</code> user, run the following command:</p>
<pre><code>mysql&gt; CREATE USER 'your_user'@localhost IDENTIFIED BY 'password';</code></pre>
<p><strong>Note:</strong> You should replace <code>password</code> with a secure password.</p>
<p>Give the user full rights to the new database:</p>
<pre><code>GRANT ALL PRIVILEGES ON your_db.* TO 'your_user'@'localhost';</code></pre>
<p>Refresh privileges so they take effect:</p>
<pre><code>FLUSH PRIVILEGES;</code></pre>
<p>Exit the <code>MySQL</code> shell:</p>
<pre><code>mysql&gt; exit</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Comments and Conclusion</span></h2>
<p>That’s it. You have successfully installed <code>MySQL 8.4</code> on Ubuntu 24.04.</p>
<p>For additional help or useful information, we recommend you to check <a href="https://dev.mysql.com/doc/" target="_blank" rel="noopener">the official MySQL 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-mysql-8-4-on-ubuntu-24-04/">How to Install MySQL 8.4 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-mysql-8-4-on-ubuntu-24-04/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1908</post-id>	</item>
		<item>
		<title>How to Install Drupal on Ubuntu 24.04</title>
		<link>https://www.linuxtuto.com/how-to-install-drupal-on-ubuntu-24-04/</link>
					<comments>https://www.linuxtuto.com/how-to-install-drupal-on-ubuntu-24-04/#respond</comments>
		
		<dc:creator><![CDATA[LinuxTuto]]></dc:creator>
		<pubDate>Mon, 05 Aug 2024 13:30:01 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">https://www.linuxtuto.com/?p=1779</guid>

					<description><![CDATA[<p>Drupal is an open-source content management system (CMS) used for building and managing websites and web applications. It is highly flexible and customizable, making it...</p>
<p>The post <a href="https://www.linuxtuto.com/how-to-install-drupal-on-ubuntu-24-04/">How to Install Drupal on Ubuntu 24.04</a> appeared first on <a href="https://www.linuxtuto.com">LinuxTuto</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Drupal is an open-source content management system (CMS) used for building and managing websites and web applications. It is highly flexible and customizable, making it suitable for a wide range of web projects, from simple blogs to complex enterprise websites.</p>
<p>It is used by a wide range of organizations, including educational institutions, non-profits, businesses, and government agencies, to build websites that require robust content management, high security, and flexibility.</p>
<p>In this tutorial, we will show you how to install Drupal on your Ubuntu 24.04 OS.</p>
<h2><span class="has-inline-color has-vivid-purple-color">Step 1: Update Operating System</span></h2>
<p>Update your <strong>Ubuntu</strong> <strong>24.04</strong> operating system to make sure all existing packages are up to date:</p>
<pre><code># apt update &amp;&amp; apt upgrade -y</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 2: Install Nginx webserver</span></h2>
<p>You can install Nginx via <strong>apt</strong> package manager by executing the following command.</p>
<pre><code># apt install nginx</code></pre>
<p>You can start the Nginx service and configure it to run on startup by entering the following commands:</p>
<pre><code># systemctl start nginx
# systemctl enable nginx</code></pre>
<p>Verify the status of the Nginx service using <strong>systemctl status</strong> command:</p>
<pre><code># systemctl status nginx</code></pre>
<p>Output:</p>
<pre><code>● nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; preset: enabled)
     Active: active (running)
       Docs: man:nginx(8)
   Main PID: 10412 (nginx)
      Tasks: 2 (limit: 2218)
     Memory: 1.7M (peak: 1.9M)
        CPU: 23ms
     CGroup: /system.slice/nginx.service
             ├─10412 "nginx: master process /usr/sbin/nginx -g daemon on; master_process on;"
             └─10413 "nginx: worker process"</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 3: Install PHP and PHP extensions for Drupal</span></h2>
<p>By default, Ubuntu 24.04 comes with <a href="https://www.linuxtuto.com/how-to-install-php-8-3-on-ubuntu-22-04/">PHP version 8.3</a>.  You can install PHP and other supporting packages using the following command:</p>
<pre><code># apt install php php-{opcache,gd,curl,mysqlnd,intl,json,ldap,mbstring,mysqlnd,xml,zip}</code></pre>
<p>Verify if PHP is installed.</p>
<pre><code>php -v</code></pre>
<pre><code>Output:
PHP 8.3.6 (cli) (built: Jun 13 2024 15:23:20) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.6, Copyright (c) Zend Technologies
    with Zend OPcache v8.3.6, Copyright (c), by Zend Technologies</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>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>Verify the status of the MySQL service using <strong>systemctl status</strong> command:</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: 24565 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
   Main PID: 24574 (mysqld)
     Status: "Server is operational"
      Tasks: 38 (limit: 2218)
     Memory: 362.8M (peak: 379.1M)
        CPU: 1.160s
     CGroup: /system.slice/mysql.service
             └─24574 /usr/sbin/mysqld</code></pre>
<p>By default, MySQL is not hardened. You can secure MySQL using the <code class=" prettyprinted"><span class="pln">mysql_secure_installation</span></code> 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 you need to create a database for the Drupal installation:</p>
<pre><code>mysql&gt; CREATE DATABASE drupaldb;
mysql&gt; CREATE USER 'drupaluser'@'localhost' IDENTIFIED BY 'Str0ngP@ss';
mysql&gt; GRANT ALL PRIVILEGES ON drupaldb. * TO 'drupaluser'@'localhost';
mysql&gt; FLUSH PRIVILEGES;
mysql&gt; exit;</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 5: Download Drupal</span></h2>
<p>The latest version of Drupal is available to <a href="https://www.drupal.org/project/drupal/releases/11.0.0">download</a> from their website. You can download it with the following command:</p>
<pre><code># wget https://ftp.drupal.org/files/projects/drupal-11.0.0.zip</code></pre>
<p>Extract file into the folder <strong>/var/www/</strong> with the following command:</p>
<pre><code># unzip drupal-11.0.0.zip -d /var/www/</code></pre>
<p>Rename it to make it simpler:</p>
<pre><code># mv /var/www/drupal-11.0.0/ /var/www/drupal</code></pre>
<p>Enable permission for the Nginx webserver user to access the files:</p>
<pre><code># chown -R www-data:www-data /var/www/drupal/</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 6: Configure Nginx for Drupal</span></h2>
<p>Create a new Nginx virtual host configuration file:</p>
<pre><code># nano /etc/nginx/conf.d/drupal.conf</code></pre>
<p>Paste the content as shown below:</p>
<pre><code>server {
  listen 80;
  server_name your-domain.com www.your-domain.com;
  root /var/www/drupal;
  index index.php index.html;
  charset utf-8;
  location / {
    try_files $uri $uri/ /index.php?$args;
  }
  location ~ .php$ {
    fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
  }
}</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>To implement the changes, restart Nginx webserver:</p>
<pre><code># systemctl restart nginx</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 7: Access Drupal Web Interface</span></h2>
<p>Open your web browser and type the URL <strong><code>https://your-domain.com</code></strong>. You should see the Drupal installation page.</p>
<p><img decoding="async" class="aligncenter size-large wp-image-1781" src="https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_01-900x392.webp" alt="Drupal Choose Language" width="900" height="392" srcset="https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_01-900x392.webp 900w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_01-300x131.webp 300w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_01-768x334.webp 768w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_01-1536x668.webp 1536w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_01-1222x532.webp 1222w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_01-897x390.webp 897w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_01-684x298.webp 684w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_01.webp 1914w" sizes="(max-width: 900px) 100vw, 900px" /></p>
<p>Choose your preferred language and hit <strong>Save and continue.</strong> You will get the following screen:</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1783 size-large" src="https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_02-900x392.webp" alt="Drupal Choose profile" width="900" height="392" srcset="https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_02-900x392.webp 900w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_02-300x131.webp 300w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_02-768x334.webp 768w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_02-1536x669.webp 1536w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_02-1222x532.webp 1222w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_02-897x390.webp 897w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_02-684x298.webp 684w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_02.webp 1916w" sizes="auto, (max-width: 900px) 100vw, 900px" /></p>
<p>Choose <strong>Standard </strong>and hit<strong> Save and continue</strong>.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1784 size-large" src="https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_03-900x507.webp" alt="Set up database" width="900" height="507" srcset="https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_03-900x507.webp 900w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_03-300x169.webp 300w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_03-768x433.webp 768w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_03-1536x865.webp 1536w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_03-1222x688.webp 1222w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_03-897x505.webp 897w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_03-684x385.webp 684w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_03.webp 1916w" sizes="auto, (max-width: 900px) 100vw, 900px" /></p>
<p>Fill in your database settings and hit <strong>Save and continue</strong>.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1785 size-large" src="https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_04-900x391.webp" alt="Drupal Install site" width="900" height="391" srcset="https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_04-900x391.webp 900w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_04-300x130.webp 300w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_04-768x334.webp 768w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_04-1536x668.webp 1536w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_04-1222x532.webp 1222w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_04-897x390.webp 897w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_04-684x298.webp 684w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_04.webp 1915w" sizes="auto, (max-width: 900px) 100vw, 900px" /></p>
<p>Then fill in some basic information about your site and then hit <strong><code>Save and continue</code></strong>.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-1786" src="https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_05-900x514.webp" alt="" width="900" height="514" srcset="https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_05-900x514.webp 900w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_05-300x171.webp 300w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_05-768x438.webp 768w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_05-1536x877.webp 1536w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_05-1222x698.webp 1222w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_05-897x512.webp 897w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_05-684x390.webp 684w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_05.webp 1890w" sizes="auto, (max-width: 900px) 100vw, 900px" /></p>
<p>You will get the dashboard in the following screen:</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1787 size-large" src="https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_06-900x513.webp" alt="Drupal Dashboard" width="900" height="513" srcset="https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_06-900x513.webp 900w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_06-300x171.webp 300w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_06-768x438.webp 768w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_06-1536x876.webp 1536w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_06-1222x697.webp 1222w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_06-897x512.webp 897w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_06-684x390.webp 684w, https://www.linuxtuto.com/wp-content/uploads/2024/08/drupal11_06.webp 1892w" sizes="auto, (max-width: 900px) 100vw, 900px" /></p>
<p>Installation of Drupal has been completed. Now revert the permissions for the <strong>settings.php</strong> file:<span id="ezoic-pub-ad-placeholder-116" class="ezoic-adpicker-ad"></span></p>
<pre><code># chmod 644 /var/www/html/drupal/sites/default/settings.php</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Comments and Conclusion</span></h2>
<p>That’s it. You have successfully installed Drupal on Ubuntu 24.04 OS.</p>
<p>For additional help or useful information, we recommend you to check  <a href="https://www.drupal.org/documentation" target="_blank" rel="noopener">the official Drupal documentation.</a></p>
<p>If you have any questions please leave a comment below.</p>
<div id="bshare-social" class="baby-sideshare share-content after-content icon show">
<div class="share_hide_show content_hide_show"></div>
</div>
<p>The post <a href="https://www.linuxtuto.com/how-to-install-drupal-on-ubuntu-24-04/">How to Install Drupal 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-drupal-on-ubuntu-24-04/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1779</post-id>	</item>
		<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 loading="lazy" 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="auto, (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 loading="lazy" 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="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.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 CakePHP on Ubuntu 22.04</title>
		<link>https://www.linuxtuto.com/how-to-install-cakephp-on-ubuntu-22-04/</link>
					<comments>https://www.linuxtuto.com/how-to-install-cakephp-on-ubuntu-22-04/#respond</comments>
		
		<dc:creator><![CDATA[LinuxTuto]]></dc:creator>
		<pubDate>Mon, 29 May 2023 13:00:04 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Composer]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">https://www.linuxtuto.com/?p=1368</guid>

					<description><![CDATA[<p>CakePHP is an open-source web application framework written in PHP. It follows the Model-View-Controller (MVC) architectural pattern, which provides a structured approach to developing web...</p>
<p>The post <a href="https://www.linuxtuto.com/how-to-install-cakephp-on-ubuntu-22-04/">How to Install CakePHP on Ubuntu 22.04</a> appeared first on <a href="https://www.linuxtuto.com">LinuxTuto</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>CakePHP is an open-source web application framework written in PHP. It follows the Model-View-Controller (MVC) architectural pattern, which provides a structured approach to developing web applications. CakePHP aims to simplify and speed up the development process by offering a set of conventions and built-in features.</p>
<p>CakePHP has gained popularity for its simplicity, convention-driven approach, and robust feature set. It has been used to build a wide range of web applications, from small websites to large-scale enterprise systems.</p>
<p>In this tutorial, we will show you how to install CakePHP on Ubuntu 22.04 OS.</p>
<h2><span class="has-inline-color has-vivid-purple-color">Step 1: Update Operating System</span></h2>
<p>Update your <strong>Ubuntu</strong> <strong>22.04</strong> operating system to the latest version with the following command:</p>
<pre><code># apt update &amp;&amp; sudo apt upgrade</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 2: Install Apache webserver</span></h2>
<p>You can install it via <code>apt</code> package manager by executing the following command.</p>
<pre><code># apt install apache2</code></pre>
<p>Verify the status of the <code>Apache</code> service using <code>systemctl status</code> command:</p>
<pre><code># systemctl status apache2</code></pre>
<p>Output:</p>
<pre><code><span style="color: #00ff00;">●</span> apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: <span style="color: #00ff00;">active (running)</span>
       Docs: https://httpd.apache.org/docs/2.4/
   Main PID: 2773 (apache2)
      Tasks: 55 (limit: 2193)
     Memory: 4.8M
        CPU: 35ms
     CGroup: /system.slice/apache2.service
             ├─2773 /usr/sbin/apache2 -k start
             ├─2775 /usr/sbin/apache2 -k start
             └─2776 /usr/sbin/apache2 -k start
</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 3: </span><span class="has-inline-color has-vivid-purple-color">Install PHP and PHP extensions for CakePHP</span></h2>
<p>To install PHP and additional PHP extensions which are essential for create CakePHP project, run the following command:</p>
<pre><code># apt-get install php libapache2-mod-php php-{cli,common,curl,zip,gd,mysql,xml,mbstring,json,intl,bcmath,sqlite3}</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>
<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>Verify the status of the <code>MySQL</code> service using <code>systemctl status</code> command:</p>
<pre><code># systemctl status mysql</code></pre>
<p>Output:</p>
<pre><code><span style="color: #00ff00;">●</span> mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: <span style="color: #00ff00;">active (running)</span>
    Process: 806 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
   Main PID: 938 (mysqld)
     Status: "Server is operational"
      Tasks: 38 (limit: 2193)
     Memory: 421.3M
        CPU: 3.314s
     CGroup: /system.slice/mysql.service
             └─938 /usr/sbin/mysqld
</code></pre>
<p>By default, MySQL server is not hardened. You can secure MySQL using the <code class=" prettyprinted"><span class="pln">mysql_secure_installation</span></code> 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, 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 cakephp_db;
mysql&gt; CREATE USER 'cakephp_user'@'localhost' IDENTIFIED BY 'Str0Pa$$word';
mysql&gt; GRANT ALL ON cakephp_db.* TO 'cakephp_user'@'localhost';
mysql&gt; FLUSH PRIVILEGES;
mysql&gt; EXIT</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 5: Install Composer</span></h2>
<p>CakePHP’s official installation method is through <a href="https://getcomposer.org/" target="_blank" rel="noopener noreferrer">Composer</a>.</p>
<p>Run the following command to download the Composer installer using <code class=" prettyprinted"><span class="pln">curl</span></code> 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</code></pre>
<pre><code>Output:
Composer version 2.5.7 2023-05-24 15:00:39</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 6: Create CakePHP Project</span></h2>
<p>Now, using Composer it is quite simple to create CakePHP project. To do so, just run the following command:</p>
<pre><code># cd /var/www
# composer create-project --prefer-dist cakephp/app MyProject</code></pre>
<p>In the final part of the installation, you will be asked to change the permissions of the folders.</p>
<pre><code>Set Folder Permissions ? (Default to Y) [Y,n]? <span style="color: #ff0000;"><strong>Y</strong></span>
Permissions set on /var/www/MyProject/tmp/cache
Permissions set on /var/www/MyProject/tmp/cache/models
Permissions set on /var/www/MyProject/tmp/cache/persistent
Permissions set on /var/www/MyProject/tmp/cache/views
Permissions set on /var/www/MyProject/tmp/sessions
Permissions set on /var/www/MyProject/tmp/tests
Permissions set on /var/www/MyProject/tmp
Permissions set on /var/www/MyProject/logs
Updated Security.salt value in config/app_local.php</code></pre>
<p>Also, change the ownership of the <strong>MyProject</strong> directory with the following command:</p>
<pre><code># chown -R www-data:www-data /var/www/MyProject/</code></pre>
<p>Then edit <strong>MyProject/config/app_local.php</strong> configuration file and search for your database setting.</p>
<pre><code># nano /var/www/MyProject/config/app_local.php</code></pre>
<p>Make necessary changes as per below details:</p>
<pre><code>    'Datasources' =&gt; [
        'default' =&gt; [
            'host' =&gt; 'localhost',
            //'port' =&gt; 'non_standard_port_number',

            'username' =&gt; 'cakephp_user',
            'password' =&gt; 'Str0Pa$$word',

            'database' =&gt; 'cakephp_db',
</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 7: Deploy CakePHP (Development)</span></h2>
<p>To check that CakePHP is properly installed, simply run PHP’s built-in webserver to serve your project.</p>
<pre><code># bin/cake server</code></pre>
<p>By default, without any arguments provided, this will serve your application at <strong>http://localhost:8765/</strong>.</p>
<p>You can also specify your own host and port:</p>
<pre><code># bin/cake server -H 192.168.10.10 -p 4321</code></pre>
<p>This will serve your application at <strong>http://192.168.10.10:4321/</strong></p>
<p><span style="color: #ff0000;"><strong>Note:</strong></span> That this is done for development purposes and never for production.</p>
<h2><span class="has-inline-color has-vivid-purple-color">Step 8: Configure Apache for CakePHP (Production)</span></h2>
<p>To create a new VirtualHost file run the following commands:</p>
<pre><code># nano /etc/apache2/sites-available/cakephp.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/MyProject/
    
    ServerName your-domain.com
    ServerAlias www.your-domain.com

    &lt;Directory /var/www/MyProject/&gt; 
        AllowOverride All
        Require all granted
    &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>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>Then enable the <code>"rewrite"</code> module in Apache:</p>
<pre><code># a2enmod rewrite</code></pre>
<p>To enable this site run the command:</p>
<pre><code># a2ensite cakephp.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 CakePHP</span></h2>
<p>To access your CakePHP project, go to your browser and visit <code>http://your-domain.com</code>.</p>
<div class="google-auto-placed ap_container"><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-1372" src="https://www.linuxtuto.com/wp-content/uploads/2023/05/CakePHP_4-900x512.jpg" alt="CakePHP 4" width="900" height="512" srcset="https://www.linuxtuto.com/wp-content/uploads/2023/05/CakePHP_4-900x512.jpg 900w, https://www.linuxtuto.com/wp-content/uploads/2023/05/CakePHP_4-300x171.jpg 300w, https://www.linuxtuto.com/wp-content/uploads/2023/05/CakePHP_4-768x437.jpg 768w, https://www.linuxtuto.com/wp-content/uploads/2023/05/CakePHP_4-1536x875.jpg 1536w, https://www.linuxtuto.com/wp-content/uploads/2023/05/CakePHP_4-1222x696.jpg 1222w, https://www.linuxtuto.com/wp-content/uploads/2023/05/CakePHP_4-897x511.jpg 897w, https://www.linuxtuto.com/wp-content/uploads/2023/05/CakePHP_4-684x389.jpg 684w, https://www.linuxtuto.com/wp-content/uploads/2023/05/CakePHP_4.jpg 1895w" sizes="auto, (max-width: 900px) 100vw, 900px" /></div>
<div>You will see the database is connected properly.</div>
<h2><span class="has-inline-color has-vivid-purple-color">Comments and Conclusion</span></h2>
<p class="LC20lb MBeuO DKV0Md">That&#8217;s it. You can now create controllers, models and views to develop your project according to your requirements.</p>
<p>For additional help or useful information, we recommend you to check <a href="https://book.cakephp.org/4/en/contributing/documentation.html">the official CakePHP documentation</a>.</p>
<p>The post <a href="https://www.linuxtuto.com/how-to-install-cakephp-on-ubuntu-22-04/">How to Install CakePHP 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-cakephp-on-ubuntu-22-04/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1368</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 loading="lazy" 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="auto, (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 Django with Apache on Ubuntu 22.04</title>
		<link>https://www.linuxtuto.com/how-to-install-django-with-apache-on-ubuntu-22-04/</link>
					<comments>https://www.linuxtuto.com/how-to-install-django-with-apache-on-ubuntu-22-04/#comments</comments>
		
		<dc:creator><![CDATA[LinuxTuto]]></dc:creator>
		<pubDate>Mon, 03 Oct 2022 15:00:32 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[MySQL]]></category>
		<guid isPermaLink="false">https://www.linuxtuto.com/?p=757</guid>

					<description><![CDATA[<p>Django is a python based full stack framework. This framework works based on the model-template-view architectural patterns. Django is considered to be one of the...</p>
<p>The post <a href="https://www.linuxtuto.com/how-to-install-django-with-apache-on-ubuntu-22-04/">How to Install Django with Apache on Ubuntu 22.04</a> appeared first on <a href="https://www.linuxtuto.com">LinuxTuto</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Django is a python based full stack framework. This framework works based on the model-template-view architectural patterns. Django is considered to be one of the popular web based development frameworks for developing Python’s server applications.</p>
<p>The high profile websites that use Django are Disqus, Instagram, MacArthur Foundation, National Geographic channel, Knight Foundation, Pinterest, Open knowledge foundation, and open stack software.</p>
<p>We will be installing Django application in a Python virtual environment. It is very useful because it allows developers to run and develop an application with different python versions.</p>
<h2><span class="has-inline-color has-vivid-purple-color">Step 1: Update Operating System</span></h2>
<p>Update your <strong>Ubuntu</strong> <strong>22.04</strong> operating system to the latest version with the following command:</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 Apache with mod_wsgi Module</span></h2>
<p>To setup Django to production we will install Apache and the Apache <code>mod_wsgi</code> module.</p>
<p>You can install them via <code>apt</code> package manager by executing the following command:</p>
<pre><code># apt install apache2 libapache2-mod-wsgi-py3</code></pre>
<p>Once all the packages are installed, 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 <code>Apache</code> service using <code>systemctl status</code> command:</p>
<pre><code># systemctl status apache2</code></pre>
<p>Output:</p>
<pre><code>● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running)
       Docs: https://httpd.apache.org/docs/2.4/
   Main PID: 39757 (apache2)
      Tasks: 55 (limit: 2200)
     Memory: 15.2M
        CPU: 206ms
     CGroup: /system.slice/apache2.service
             ├─39757 /usr/sbin/apache2 -k start
             ├─39761 /usr/sbin/apache2 -k start
             └─39762 /usr/sbin/apache2 -k start
</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 3: Install MySQL and create a database</span></h2>
<p>You can install the MySQL server and <code>libmysqlclient-dev</code> (MySQL database development files) with the following command:</p>
<pre><code># apt install mysql-server libmysqlclient-dev</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>Verify the status of the <code>MySQL</code> service using <code>systemctl status</code> command:</p>
<pre><code># systemctl status mysql</code></pre>
<p>Output:</p>
<pre><code>● mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: active (running)
   Main PID: 41039 (mysqld)
     Status: "Server is operational"
      Tasks: 39 (limit: 2200)
     Memory: 358.9M
        CPU: 1.070s
     CGroup: /system.slice/mysql.service
             └─41039 /usr/sbin/mysqld
</code></pre>
<p>Once the database server is installed, log into the MySQL prompt:</p>
<pre><code>#  mysql -u root</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 django_db;
mysql&gt; CREATE USER 'django_user'@'localhost' IDENTIFIED BY 'Pa$$word';
mysql&gt; GRANT ALL ON django_db.* TO 'django_user'@'localhost';
mysql&gt; FLUSH PRIVILEGES;
mysql&gt; EXIT</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 4: Install Pip on Ubuntu 22.04</span></h2>
<p><a href="https://www.linuxtuto.com/how-to-install-python-3-10-on-ubuntu-20-04/"><strong>Python</strong></a> comes already installed by default on Ubuntu 22.04. You can verify it by checking its version:</p>
<pre><code># python3 -V</code></pre>
<pre><code>Output:
Python 3.10.6</code></pre>
<p>Use the following command to install <code>pip</code> and <code>venv</code> on Ubuntu 22.04:</p>
<pre><code># apt install python3-venv python3-pip</code></pre>
<p>Verify your Pip installation by checking its version:</p>
<pre><code># pip3 --version</code></pre>
<pre><code>Output:
pip 22.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10)
</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 5: Install Django Using Virtualenv</span></h2>
<p>First, create a directory and switch to it with the commands below:</p>
<pre><code># mkdir /var/www/django_project 
# cd /var/www/django_project</code></pre>
<p>Before you install Django, you first need to create a Python virtual environment.</p>
<pre><code># python3 -m venv django_env</code></pre>
<p>Next, activate the virtual environment with the following command:</p>
<pre><code># source django_env/bin/activate</code></pre>
<p>Next, install the latest  Django version using the following command:</p>
<pre><code>(django_env) # pip install django</code></pre>
<p>You will get the following output:</p>
<pre><code>Collecting django
  Downloading Django-4.1.1-py3-none-any.whl (8.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.1/8.1 MB 3.3 MB/s eta 0:00:00
Collecting asgiref&lt;4,&gt;=3.5.2
  Downloading asgiref-3.5.2-py3-none-any.whl (22 kB)
Collecting sqlparse&gt;=0.2.2
  Downloading sqlparse-0.4.3-py3-none-any.whl (42 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.8/42.8 kB 2.0 MB/s eta 0:00:00
Installing collected packages: sqlparse, asgiref, django
Successfully installed asgiref-3.5.2 django-4.1.1 sqlparse-0.4.3</code></pre>
<p>Verify the Django version with the following command:</p>
<pre><code>(django_env) # django-admin --version</code></pre>
<p>You will get the following output:</p>
<pre><code>4.1.1</code></pre>
<p>Since you are setting a production site ensure you&#8217;ve python <code>mysqlclient</code> installed:</p>
<pre><code>(django_env) # pip install mysqlclient</code></pre>
<p>You will get the following output:</p>
<pre><code>Collecting mysqlclient
  Downloading mysqlclient-2.1.1.tar.gz (88 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 88.1/88.1 KB 1.3 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for mysqlclient, since package 'wheel' is not installed.
Installing collected packages: mysqlclient
  Running setup.py install for mysqlclient ... done
Successfully installed mysqlclient-2.1.1
</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 6: Creating your Django project</span></h2>
<p>Now you need to create Django project in <code>django_project</code> directory.</p>
<pre><code>(django_env) # django-admin startproject django_app .</code></pre>
<p>Next, modify <code>settings.py</code> file:</p>
<pre><code>(django_env) # nano django_app/settings.py</code></pre>
<p>Add the URL in <code>ALLOWED_HOST</code> List which is above <code>INSTALLED_APPS</code>.</p>
<pre><code>ALLOWED_HOSTS = ['your_server_ip', 'your-domain.com']</code></pre>
<p>The default database set in Django is SQLite. Replace SQLite database backend:</p>
<pre><code>DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
    }
}</code></pre>
<p>with MySQL database engine backend :</p>
<pre><code>DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'django_db',
'USER': 'django_user',
'PASSWORD': 'Pa$$word',
'HOST': '127.0.0.1',
'PORT' : '3306',
}
}</code></pre>
<p>In order for our webserver to serve the static files add the following lines:</p>
<pre><code>import os

STATIC_URL='/static/'
STATIC_ROOT=os.path.join(BASE_DIR, 'static/') 

MEDIA_URL='/media/'
MEDIA_ROOT=os.path.join(BASE_DIR, 'media/')</code></pre>
<p>Once done, save the file and exit the text editor.</p>
<p>Now, You can migrate the initial database schema to our MySQL database using the management script:</p>
<pre><code>(django_env) # ./manage.py  makemigrations
(django_env) # ./manage.py  migrate</code></pre>
<p>Create an administrative user for the project by typing:</p>
<pre><code>(django_env) # ./manage.py createsuperuser</code></pre>
<p>You will have to provide a username, an email address, and choose and confirm a password.</p>
<pre><code>Username (leave blank to use 'root'): <strong>admin</strong>
Email address: <strong>admin@your-domain.com</strong>
Password:
Password (again):
Superuser created successfully.</code></pre>
<p>You can collect all of the static content into the directory location you configured by running the command:</p>
<pre><code>(django_env) # ./manage.py collectstatic</code></pre>
<p>This will collect all the project static files in static directory. It will give some output like this:</p>
<pre><code>130 static files copied to '/var/www/django_project/static'.</code></pre>
<p>To deactivate the virtual environment run the following command:</p>
<pre><code>(django_env) # deactivate</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 7: Configure Apache Web Server for Django</span></h2>
<p>Navigate to <code>/etc/apache2/sites-available</code> directory and run the following command to create a configuration file for your installation:</p>
<pre><code class="hljs shell"><span class="bash"># nano /etc/apache2/sites-available/django.conf</span></code></pre>
<p>Add the following content:</p>
<pre><code>&lt;VirtualHost *:80&gt;

        ServerAdmin admin@your-domain.com
        ServerName your-domain.com
        ServerAlias www.your-domain.com

        DocumentRoot /var/www/django_project/

        ErrorLog ${APACHE_LOG_DIR}/your-domain.com_error.log
        CustomLog ${APACHE_LOG_DIR}/your-domain.com_access.log combined

        Alias /static /var/www/django_project/static
        &lt;Directory /var/www/django_project/static&gt;
                Require all granted
        &lt;/Directory&gt;

        Alias /media /var/www/django_project/media
        &lt;Directory /var/www/django_project/media&gt;
                Require all granted
         &lt;/Directory&gt;

        &lt;Directory /var/www/django_project/django_app&gt;
                &lt;Files wsgi.py&gt;
                        Require all granted
                &lt;/Files&gt;
        &lt;/Directory&gt;

        WSGIDaemonProcess django_app python-path=/var/www/django_project python-home=/var/www/django_project/django_env
        WSGIProcessGroup django_app
        WSGIScriptAlias / /var/www/django_project/django_app/wsgi.py

&lt;/VirtualHost&gt;
</code></pre>
<p>Save the file and Exit.</p>
<p>Enable the Django virtual host:</p>
<pre><code># a2ensite django.conf</code></pre>
<p>Restart the Apache web server.</p>
<pre><code># systemctl restart apache2</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 8: Access Django Project</span></h2>
<p>That’s it the production site has been setup. You can now access your application with your domain at e.g <code>http://your-domain.com</code></p>
<p><img loading="lazy" decoding="async" class="size-large wp-image-774 aligncenter" src="https://www.linuxtuto.com/wp-content/uploads/2022/09/django_project-1024x486.jpg" alt="Django Project" width="1024" height="486" srcset="https://www.linuxtuto.com/wp-content/uploads/2022/09/django_project-1024x486.jpg 1024w, https://www.linuxtuto.com/wp-content/uploads/2022/09/django_project-300x142.jpg 300w, https://www.linuxtuto.com/wp-content/uploads/2022/09/django_project-768x365.jpg 768w, https://www.linuxtuto.com/wp-content/uploads/2022/09/django_project-1536x729.jpg 1536w, https://www.linuxtuto.com/wp-content/uploads/2022/09/django_project-1222x580.jpg 1222w, https://www.linuxtuto.com/wp-content/uploads/2022/09/django_project-897x426.jpg 897w, https://www.linuxtuto.com/wp-content/uploads/2022/09/django_project-684x325.jpg 684w, https://www.linuxtuto.com/wp-content/uploads/2022/09/django_project.jpg 1912w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></p>
<p>To access the admin dashboard, add <code>/admin/</code> to the end of your URL <code>http://your-domain.com/admin</code> This will take you to a log in screen:</p>
<p><img loading="lazy" decoding="async" class="size-large wp-image-775 aligncenter" src="https://www.linuxtuto.com/wp-content/uploads/2022/09/django_admin-1024x339.jpg" alt="Django Admin" width="1024" height="339" srcset="https://www.linuxtuto.com/wp-content/uploads/2022/09/django_admin-1024x339.jpg 1024w, https://www.linuxtuto.com/wp-content/uploads/2022/09/django_admin-300x99.jpg 300w, https://www.linuxtuto.com/wp-content/uploads/2022/09/django_admin-768x254.jpg 768w, https://www.linuxtuto.com/wp-content/uploads/2022/09/django_admin-1536x509.jpg 1536w, https://www.linuxtuto.com/wp-content/uploads/2022/09/django_admin-1222x405.jpg 1222w, https://www.linuxtuto.com/wp-content/uploads/2022/09/django_admin-897x297.jpg 897w, https://www.linuxtuto.com/wp-content/uploads/2022/09/django_admin-684x227.jpg 684w, https://www.linuxtuto.com/wp-content/uploads/2022/09/django_admin.jpg 1914w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></p>
<p>Enter your Django admin user, password and click on the<strong> Log in</strong>. You will get the Django administration dashboard in the following screen:</p>
<p><img loading="lazy" decoding="async" class="size-large wp-image-777 aligncenter" src="https://www.linuxtuto.com/wp-content/uploads/2022/09/django_dashboard-1024x344.jpg" alt="Django Dashboard" width="1024" height="344" srcset="https://www.linuxtuto.com/wp-content/uploads/2022/09/django_dashboard-1024x344.jpg 1024w, https://www.linuxtuto.com/wp-content/uploads/2022/09/django_dashboard-300x101.jpg 300w, https://www.linuxtuto.com/wp-content/uploads/2022/09/django_dashboard-768x258.jpg 768w, https://www.linuxtuto.com/wp-content/uploads/2022/09/django_dashboard-1536x515.jpg 1536w, https://www.linuxtuto.com/wp-content/uploads/2022/09/django_dashboard-1222x410.jpg 1222w, https://www.linuxtuto.com/wp-content/uploads/2022/09/django_dashboard-897x301.jpg 897w, https://www.linuxtuto.com/wp-content/uploads/2022/09/django_dashboard-684x230.jpg 684w, https://www.linuxtuto.com/wp-content/uploads/2022/09/django_dashboard.jpg 1913w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></p>
<h2><span class="has-inline-color has-vivid-purple-color">Comments and Conclusion</span></h2>
<p>That’s it. You have successfully installed Django on Ubuntu 22.04 with Apache and WSGI. For additional information, you can check <a href="https://docs.djangoproject.com/" target="_blank" rel="noopener">the official Django documentation</a>.</p>
<p>If you have any questions please leave a comment below.</p>
<p>&nbsp;</p>
<p>The post <a href="https://www.linuxtuto.com/how-to-install-django-with-apache-on-ubuntu-22-04/">How to Install Django with Apache 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-django-with-apache-on-ubuntu-22-04/feed/</wfw:commentRss>
			<slash:comments>12</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">757</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>
