<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Dimitris Damtsas on Medium]]></title>
        <description><![CDATA[Stories by Dimitris Damtsas on Medium]]></description>
        <link>https://medium.com/@odimitrisodamtsas?source=rss-fd136619c8c1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*6kuz1pI8eylTbdf3bjihpg.jpeg</url>
            <title>Stories by Dimitris Damtsas on Medium</title>
            <link>https://medium.com/@odimitrisodamtsas?source=rss-fd136619c8c1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 07:29:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@odimitrisodamtsas/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to Install LEMP stack in Manjaro Linux]]></title>
            <link>https://medium.com/@odimitrisodamtsas/how-to-install-lemp-stack-in-manjaro-linux-f0c120210288?source=rss-fd136619c8c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0c120210288</guid>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[how-to]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[mysql]]></category>
            <dc:creator><![CDATA[Dimitris Damtsas]]></dc:creator>
            <pubDate>Sun, 02 Dec 2018 15:18:23 GMT</pubDate>
            <atom:updated>2018-12-02T15:18:23.354Z</atom:updated>
            <content:encoded><![CDATA[<p>Manjaro Linux is one of the greatest Linux flavors out there. With tons of customization options and the power of bleeding edge AUR (Arch User Repository),this distro never seize to amaze Linux users, from beginners to pros . Although truth be told,beginners should be a little cautious regarding the AUR capabilities.</p><p>In this post we will install LEMP stack ,step by step. LEMP stands for Linux-NGINX-MySQL-PHP.</p><p><em>For more info regarding the capabilities of this stack and what is the difference between this and LAMP you can check </em><a href="https://lemp.io/"><em>this</em></a><em> out.</em></p><p>Prerequisites :</p><ol><li>Manjaro Linux installed on your pc</li><li>No LEMP nor LAMP installed on your pc</li><li>Basic understanding of linux commands</li><li>A cup of your favourite coffee</li></ol><p>First of all we must update our system,in case we missed an important package:</p><pre>sudo pacman -Syu</pre><p>Then we begin with the installation of every package needed.</p><ol><li>NGINX :</li></ol><pre>sudo pacman -S nginx</pre><pre>sudo systemctl start nginx.service</pre><pre>sudo systemctl enable nginx.service</pre><p>The above commands installed ,started and enabled Nginx to start on every boot,in that order.To check if everything works properly,reboot your pc and type:</p><pre>sudo systemctl status nginx.service</pre><p>and you should get this message on your terminal:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oNHXcJ_hgbcof5F2YpQ8HQ.png" /></figure><p>Open your favorite browser and type <a href="http://localhost/">http://localhost/</a>. You should see the welcome page from NGINX. Well done!</p><p>2.SQL Server</p><p>Next,we’ll install the SQL server. We will use MariaDB for this tutorial, an open-source relational database management system:</p><pre>sudo pacman -S mysql</pre><p>You&#39;ll then have the option to choose between two repositories that provide the requested package:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zYjVR2ne3uM_w0Is_R-3Mw.png" /></figure><p>Pressing enter and Y when requested will begin the installation of mariadb.Next,before starting and enabling the mariadb service,we must initialize and create the system tables:</p><pre>sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql</pre><p>Finally we will start and enable mariadb service:</p><pre>sudo systemctl start mysqld</pre><pre>sudo systemctl enable mysqld</pre><p>To check if everything working properly we can test it by typing:</p><pre>sudo systemctl status mysqld.service</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pPNugiFNQiuBnPPMp8WQLQ.png" /></figure><p>Before we continue to the third part,we must set our root pasword ,to sequre Mysql server . We simply type:</p><pre>mysql_secure_installation </pre><p>And we are greeted we the MariaDB Secure installation screen :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*08T7ZPxfZTcHtT-BqIIFCA.png" /></figure><p>We simply then type enter in the first prompt and in the second one we set our root password by typing Y. We then type y (which equals to yes,obviously) until we get a message saying “Thanks for using MariaDB!”</p><p>3. PHP &amp; PHP-FPM installation</p><p>PHP is a server-side scripting language as well as general-purpose programming language. It is currently in version 7.2.12 and is used by a lot of companies including Facebook.We will install it alongside with PHP-FPM a FastCGI Process Manager and php-gd extension:</p><pre>sudo pacman -Sy php php-fpm php-gd</pre><p>We then starting the php-fpm service by typing:</p><pre>sudo systemctl start php-fpm</pre><p>To run LEMP without warnings or problems we must make a few changes on the php cofnidguration file. So we type :</p><pre>sudo nano /etc/php/php.ini</pre><p>And we change the values by uncommenting :</p><pre>extension=gd<br><br>extension=pdo_mysql<br>extension=mysqli<br></pre><p>Next we will edit the nginx.conf,so it can serve our PHP files :</p><pre>sudo nano /etc/nginx/nginx.conf</pre><p>And we add these lines highlighted with bold letters:</p><pre>server_name localhost;<br><br>        location / {<br>            root   /usr/share/nginx/html;<br>            index  index.html index.htm <strong>index.php</strong>;<br>}</pre><pre><strong>location ~ \.php$ {<br>      fastcgi_pass   unix:/var/run/php-fpm/php-fpm.sock;<br>      fastcgi_index  index.php;<br>      root   /usr/share/nginx/html;<br>      include        fastcgi.conf;<br>}</strong></pre><p>To test if our server can actually serve php files we will create a a php file with the info of our currently installed php:</p><pre>sudo nano /usr/share/nginx/html/info.php</pre><pre>&lt;?php phpinfo(); ?&gt;</pre><p>We save it and we are restarting our Nginx and PHP-FPM service by typing:</p><pre>sudo systemctl restart nginx.service<br><br><br>sudo systemctl restart php-fpm</pre><p>Finally to see if everything is working we our pointing our web browser to <a href="http://localhost/info.php">http://localhost/info.php</a> :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MVLvnAEheUdt0Y9IV6ikBg.png" /></figure><p>4. phpMyAdmin installation</p><p>phpMyAdmin is a free software tool written in <a href="https://php.net/">PHP</a>, intended to handle the administration of <a href="https://www.mysql.com/">MySQL</a> over the Web. phpMyAdmin supports a wide range of operations on MySQL and MariaDB in our case.We will install it by typing:</p><pre>sudo pacman -S phpmyadmin</pre><p>We then must create a symlink so we can access phpMyadmin:</p><pre>sudo ln -s /usr/share/webapps/phpMyAdmin/ /usr/share/nginx/html/</pre><pre>sudo systemctl restart nginx.service</pre><pre>sudo systemctl restart php-fpm</pre><p>Then point your browser to <a href="http://localhost/phpMyAdmin/">http://localhost/phpMyAdmin/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CAbG9UshPA2NbjEPbRC_tg.png" /></figure><p>And that was it. You now have successfully installed LEMP and you are ready for awesome web development projects.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0c120210288" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>