<?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>Linux | TekCookie</title>
	<atom:link href="https://tekcookie.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>https://tekcookie.com</link>
	<description>Everything about IT</description>
	<lastBuildDate>Thu, 25 Nov 2021 07:22:53 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://i0.wp.com/tekcookie.com/wp-content/uploads/2021/06/cropped-TekCookie-211.png?fit=32%2C17&#038;ssl=1</url>
	<title>Linux | TekCookie</title>
	<link>https://tekcookie.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">174510684</site>	<item>
		<title>WordPress website using Docker</title>
		<link>https://tekcookie.com/wordpress-website-using-docker/</link>
					<comments>https://tekcookie.com/wordpress-website-using-docker/#respond</comments>
		
		<dc:creator><![CDATA[jeffythampi]]></dc:creator>
		<pubDate>Thu, 25 Nov 2021 07:22:48 +0000</pubDate>
				<category><![CDATA[Containers]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<guid isPermaLink="false">https://tekcookie.com/?p=4897</guid>

					<description><![CDATA[Introduction In this article, we will see how to setup a WordPress website using Docker. Containerization has changed the face of how the applications are packaged and deployed. WordPress hosting using docker containers makes it easy to host and manage the hosting. For setting up the website, a WordPress container and a SQL database container [&#8230;]]]></description>
										<content:encoded><![CDATA[				<div class="wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-832561c7     "
					data-scroll= "1"
					data-offset= "30"
					style=""
				>
				<div class="uagb-toc__wrap">
						<div class="uagb-toc__title">
							Table Of Contents						</div>
																<div class="uagb-toc__list-wrap">
						<ol class="uagb-toc__list"><li class="uagb-toc__list"><a href="#introduction" class="uagb-toc-link__trigger">Introduction</a><li class="uagb-toc__list"><a href="#prerequisites" class="uagb-toc-link__trigger">Prerequisites</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#docker-engine-installation" class="uagb-toc-link__trigger">Docker engine installation</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#docker-compose-installation" class="uagb-toc-link__trigger">Docker-Compose installation</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#docker-network-configuration" class="uagb-toc-link__trigger">Docker network configuration</a></li></ul></li><li class="uagb-toc__list"><a href="#wordpress-and-mariadb-installation" class="uagb-toc-link__trigger">WordPress and MariaDB Installation</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#create-necessary-folders" class="uagb-toc-link__trigger">Create necessary folders</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#wordpress-docker-compose-yaml" class="uagb-toc-link__trigger">WordPress Docker Compose YAML</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#powering-up-the-docker-containers" class="uagb-toc-link__trigger">Powering UP the docker containers</a></li></ul></li></ul></li><li class="uagb-toc__list"><a href="#summary" class="uagb-toc-link__trigger">Summary</a></ul></ul></ol>					</div>
									</div>
				</div>
			


<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Introduction</h2>



<p>In this article, we will see how to setup a WordPress website using Docker. Containerization has changed the face of how the applications are packaged and deployed. WordPress hosting using docker containers makes it easy to host and manage the hosting.</p>



<p>For setting up the website, a WordPress container and a SQL database container are required. As we are using the containers, configurations can be fed into the containers during the creation by defining them in the Docker compose file.</p>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Prerequisites</h2>



<p>A host with docker engine and docker-compose installed.</p>



<p>Here we are using Ubuntu 20.04 as the host. Docker and Docker-compose packages are installed using the below code.</p>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">Docker engine installation</h3>



<p>The latest stable version of the docker can be installed by executing just 2 lines of code in your Linux shell. Detailed documentation is available at&nbsp;<a href="https://docs.docker.com/engine/install/ubuntu/" target="_blank" rel="noreferrer noopener">https://docs.docker.com/engine/install/ubuntu/</a></p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh</code></pre>



<p>Add the current user (user ubuntu in my case) to the docker group</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo usermod -aG docker ubuntu</code></pre>



<p>Close the session and re-login for the user to update the permission</p>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">Docker-Compose installation</h3>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo apt install docker-compose -y</code></pre>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">Docker network configuration</h3>



<p>Two networks are defined for separating the web traffic and database connection.</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo docker network create --subnet 10.10.10.0/24 data_default
sudo docker network create --subnet 10.10.11.0/24 proxy_default</code></pre>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">WordPress and MariaDB Installation</h2>



<p>As Docker loses its knowledge of data on reboot, the WordPress and the DB data has to be stored in a persistent storage (i.e. in a storage).</p>



<p></p>



<p>Following are the configuration details:</p>



<p><strong>WordPress</strong>:</p>



<ul class="wp-block-list"><li>Container name &#8211; testweb_wp</li><li>local data folder &#8216;/opt/data/wp_testweb/html&#8217; mapped to the wordpress container instance at &#8216;/var/www/html&#8217;</li><li>container port 80 is mapped to host port 8089</li><li>The container runs with the user account ubuntu with pid 1001(check your account puid and pgid and provide the number accordingly)</li><li>WordPress container connects to 2 bridge networks proxy_nw &gt;&gt; proxy_default and hosts_nw &gt;. data_default</li><li>and the configurations to connect to the database</li></ul>



<p><strong>MariaDB</strong>:</p>



<ul class="wp-block-list"><li>Container name &#8211; testweb_db_host</li><li>There is no port mapping to the host machine as the it communicates internally to the wordpress container</li><li>local data folder &#8216;/opt/data/wp_test/db&#8217; mapped to database container instance at &#8216;/config&#8217;</li></ul>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">Create necessary folders</h3>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo mkdir /opt/data/ /opt/data/wp_testweb/ /opt/data/wp_testweb/html/ /opt/data/wp_testweb/db/</code></pre>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">WordPress Docker Compose YAML</h3>



<p>Create yaml file</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">cd /opt/data/wp_testweb/
sudo touch docker-compose.yaml</code></pre>



<p>Use any text editor and add the following yaml code to the docker-compose file</p>



<pre class="wp-block-code"><code lang="yaml" class="language-yaml">version: '2'
services:
  testweb_db_host:
    image: linuxserver/mariadb:latest
    networks:
      - hosts_nw
    volumes:
      - /opt/data/wp_testweb/db:/config
    environment:
      - PUID=1001
      - PGID=1001
      - MYSQL_USER=wp_user
      - MYSQL_DATABASE=testweb_db
      - MYSQL_PASSWORD=Sup35ComplexPass
      - MYSQL_ROOT_PASSWORD=^3ryComplexPass
    restart: unless-stopped
  testweb_wp:
    image: wordpress:latest
    networks:
      - proxy_nw
      - hosts_nw
    ports:
      - 8089:80
    volumes:
      - '/opt/data/wp_testweb/html:/var/www/html'
    depends_on:
      - testweb_db
    environment:
      - PUID=1001
      - PGID=1001
      - WORDPRESS_DB_HOST=testweb_db_host
      - WORDPRESS_DB_USER=wp_user
      - WORDPRESS_DB_NAME=testweb_db
      - WORDPRESS_DB_PASSWORD=Sup35ComplexPass
    restart: unless-stopped

networks:
  proxy_nw:
    external: true
    name: proxy_default
  hosts_nw:
    external: true
    name: data_default</code></pre>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">Powering UP the docker containers</h3>



<p>The above configuration is to be saved as docker-compose.yaml and run following command from the saved folder.</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">docker-compose up -d</code></pre>



<p>If your docker-compose fails with the following error,</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">ERROR: The Compose file './docker-compose.yaml' is invalid because:
networks.hosts_nw value Additional properties are not allowed ('name' was unexpected)
networks.proxy_nw value Additional properties are not allowed ('name' was unexpected)</code></pre>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<p>The docker-compose has to be upgraded to the latest version. The latest stable version is now v2.1.1</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo curl -L https://github.com/docker/compose/releases/download/v2.1.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose</code></pre>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<p>Reboot the server for the changes to take effect and install the package  gnome-keyring </p>



<pre class="wp-block-code"><code lang="bash" class="language-bash"># To reboot the server
sudo reboot</code></pre>



<pre class="wp-block-code"><code lang="bash" class="language-bash"># Install gnome-keyring package
sudo apt install gnome-keyring</code></pre>



<p>Now execute the command again &#8220;docker-compose up -d&#8221;</p>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Summary</h2>



<p>Now the containers are up and running. Verify with the command &#8221; docker ps&#8221;</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">ubuntu@dockhost:/opt/data/wp_testweb$ docker ps
CONTAINER ID   IMAGE                        COMMAND                  CREATED          STATUS          PORTS                                   NAMES
46ae07cacda9   linuxserver/mariadb:latest   "/init"                  21 seconds ago   Up 17 seconds   3306/tcp                                wp_testweb-testweb_db_host-1
15c2f3ac5099   wordpress:latest             "docker-entrypoint.s…"   23 seconds ago   Up 16 seconds   0.0.0.0:8089->80/tcp, :::8089->80/tcp   wp_testweb-testweb_wp-1</code></pre>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<p>Open any web browser and access the URL http://&lt;ipaddress>:8089/</p>



<figure class="wp-block-image size-full is-resized"><img fetchpriority="high" decoding="async" src="//i2.wp.com/tekcookie.com/wp-content/uploads/2021/11/image-2.png" alt="" class="wp-image-4960" width="368" height="410" srcset="https://i0.wp.com/tekcookie.com/wp-content/uploads/2021/11/image-2.png?w=728&amp;ssl=1 728w, https://i0.wp.com/tekcookie.com/wp-content/uploads/2021/11/image-2.png?resize=269%2C300&amp;ssl=1 269w" sizes="(max-width: 368px) 100vw, 368px" /></figure>



<p>Well, you have your wordpress running !</p>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>Hope you like this article and thank you for reading.</p></blockquote>
]]></content:encoded>
					
					<wfw:commentRss>https://tekcookie.com/wordpress-website-using-docker/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4897</post-id>	</item>
		<item>
		<title>Self Host BookStack using Docker</title>
		<link>https://tekcookie.com/self-host-bookstack-using-docker/</link>
					<comments>https://tekcookie.com/self-host-bookstack-using-docker/#comments</comments>
		
		<dc:creator><![CDATA[jeffythampi]]></dc:creator>
		<pubDate>Sun, 14 Nov 2021 11:17:21 +0000</pubDate>
				<category><![CDATA[Containers]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<guid isPermaLink="false">https://tekcookie.com/?p=4862</guid>

					<description><![CDATA[For any industry, IT or non-IT, Information or data is the key. There are various ways by which the information can be stored. Financial or structured data usually takes a table form and resides in a database. In the case of the non-structured generic data such as project documentation, knowledge base or personal documentation can [&#8230;]]]></description>
										<content:encoded><![CDATA[				<div class="wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-63d8b968     "
					data-scroll= "1"
					data-offset= "30"
					style=""
				>
				<div class="uagb-toc__wrap">
						<div class="uagb-toc__title">
							Table Of Contents						</div>
																<div class="uagb-toc__list-wrap">
						<ol class="uagb-toc__list"><li class="uagb-toc__list"><a href="#introduction" class="uagb-toc-link__trigger">Introduction</a><li class="uagb-toc__list"><a href="#prerequisites" class="uagb-toc-link__trigger">Prerequisites</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#linux-server" class="uagb-toc-link__trigger">Linux Server</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#docker-engine-installation" class="uagb-toc-link__trigger">Docker Engine Installation</a></li></ul></li><li class="uagb-toc__list"><a href="#bookstack-installation" class="uagb-toc-link__trigger">Bookstack Installation</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#docker-network-configuration" class="uagb-toc-link__trigger">Docker Network configuration</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#database-installation" class="uagb-toc-link__trigger">Database Installation</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#bookstack-installation" class="uagb-toc-link__trigger">BookStack Installation</a></li></ul></li></ul></li><li class="uagb-toc__list"><a href="#final-steps" class="uagb-toc-link__trigger">Final Steps</a></ul></ul></ol>					</div>
									</div>
				</div>
			


<p>For any industry, IT or non-IT, Information or data is the key. There are various ways by which the information can be stored. Financial or structured data usually takes a table form and resides in a database. In the case of the non-structured generic data such as project documentation, knowledge base or personal documentation can be maintained well using a documentation platform rather than keeping it in files.</p>



<p>By keeping these informations in a platform, it is very easy to manage, edit, search the content as compared to the handling of files.</p>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Introduction</h2>



<p>There are many such platforms out in the market which we can use. Confluence by Atlassian is one such feature-rich platform. It also does provide a free edition with 2GB storage. If you like to keep all your data with you, self hosting will be best option.</p>



<p>Of all the products, <a href="https://www.bookstackapp.com/" target="_blank" rel="noreferrer noopener">BookStack</a> is the one which I like the most. Bookstack is free and open source and the page editor has a simple WYSIWYG interface. BookStack has a very simple interface and all content can be broken down into Shelf, Books, Chapters, and Pages. It has built-in diagrams.net for easy creation of diagrams and many more.</p>



<p>In this article, we will discuss how to self-host BookStack in docker.</p>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Prerequisites</h2>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">Linux Server</h3>



<p>The prerequisite is to have a Linux OS either in a public cloud or in your home server. Here I am using Ubuntu 20.04.</p>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">Docker Engine Installation</h3>



<p>The latest stable version of the docker can be installed by executing just 2 lines of code in your Linux shell. Detailed documentation is available at <a href="https://docs.docker.com/engine/install/ubuntu/" target="_blank" rel="noreferrer noopener"><span style="text-decoration: underline;">https://docs.docker.com/engine/install/ubuntu/</span></a></p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh</code></pre>



<p>Add the current user (user ubuntu in my case) to the docker group</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo usermod -aG docker ubuntu</code></pre>



<p>Close the session and re-login for the user to update the permission</p>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Bookstack Installation</h2>



<p>Bookstack uses a SQL database to store the data. We use MariaDB as our database. Both the BookStack and MariaDB docker container images are from <a href="https://www.linuxserver.io/" target="_blank" rel="noreferrer noopener"><span style="text-decoration: underline;">https://www.linuxserver.io/</span></a></p>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">Docker Network configuration</h3>



<p>Let&#8217;s create a network the containers</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo docker network create --subnet 10.10.10.0/24 data_default</code></pre>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">Database Installation</h3>



<p>Execute the below docker command to install the DB container.</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">docker run -d \
--name=bookstackdb \
-e PUID=1001 \
-e PGID=1001 \
-e MYSQL_ROOT_PASSWORD=pass123456 \
-e MYSQL_DATABASE=bookstackapp \
-e MYSQL_USER=bookstackuser \
-e MYSQL_PASSWORD=pass123456997 \
-v /opt/data/bookstack/db:/config \
--restart unless-stopped \
--network=data_default \
linuxserver/mariadb</code></pre>



<p>Running the above command will download the MariaDB image and create a container from the repository and run it with the specified configuration as mentioned in the environment variables. The container will be attached to the data_default network with the name bookstackdb.</p>



<p>The data folder will be created  &#8220;/opt/data/bookstack/db&#8221; if not already exist.</p>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">BookStack Installation</h3>



<p> Execute the below docker command to install the BookStack container</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">docker run -d \
--name=bookstack \
-e PUID=1001 \
-e PGID=1001 \
-e DB_HOST=bookstackdb \
-e DB_USER=bookstackuser \
-e DB_PASS=pass123456997  \
-e DB_DATABASE=bookstackapp \
-e APP_URL=http://wiki.yourdomain.com:5865 \
-p 5865:80 \
-v /opt/data/bookstack/config:/config \
--restart unless-stopped \
--network=data_default \
linuxserver/bookstack</code></pre>



<p>Make sure to properly configure the environment variables such as &#8211; database user and password, URL, port, etc.</p>



<p>To check the container status, run &#8220;docker ps&#8221; and it should show the below result. Book stack is listening at port 5865.</p>



<pre class="wp-block-code"><code class="">ubuntu@webserver:/opt/data/bookstack$ docker ps
CONTAINER ID   IMAGE                   COMMAND   CREATED          STATUS          PORTS                                            NAMES
33effffbf170   linuxserver/bookstack   "/init"   3 minutes ago    Up 2 minutes    443/tcp, 0.0.0.0:5865-&gt;80/tcp, :::5865-&gt;80/tcp   bookstack
b7540622f83b   linuxserver/mariadb     "/init"   25 minutes ago   Up 25 minutes   3306/tcp                                         bookstackdb
</code></pre>



<p>Make necessary DNS entry to point the domain wiki.domain.com to the virtual machine IP and all set. BookStack is ready for use.</p>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Final Steps</h2>



<p>Open any web browser and type in the URL http://wiki.yourdomain.com:5865 to access your wiki site.</p>



<p>This should take us to the BookStack login </p>



<figure class="wp-block-image size-full"><img decoding="async" width="885" height="613" src="//i1.wp.com/tekcookie.com/wp-content/uploads/2021/11/image-1.png" alt="" class="wp-image-4869" srcset="https://i0.wp.com/tekcookie.com/wp-content/uploads/2021/11/image-1.png?w=885&amp;ssl=1 885w, https://i0.wp.com/tekcookie.com/wp-content/uploads/2021/11/image-1.png?resize=300%2C208&amp;ssl=1 300w, https://i0.wp.com/tekcookie.com/wp-content/uploads/2021/11/image-1.png?resize=768%2C532&amp;ssl=1 768w" sizes="(max-width: 885px) 100vw, 885px" /></figure>



<p>The default admin login of BookStack is <strong>admin@admin.com</strong> with the password <strong>password</strong></p>



<p>Ensure to change the login email and the password after you login. Refer to the BookStack documentation <a href="https://www.bookstackapp.com/docs/admin/security/" target="_blank" rel="noreferrer noopener"><span style="text-decoration: underline;">https://www.bookstackapp.com/docs/admin/security/</span></a> for further configuration</p>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p></p><cite>Hope you liked this article and thank you for reading</cite></blockquote>
]]></content:encoded>
					
					<wfw:commentRss>https://tekcookie.com/self-host-bookstack-using-docker/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4862</post-id>	</item>
		<item>
		<title>Free SSL Certificate for your Website</title>
		<link>https://tekcookie.com/free-ssl-certificate-for-your-website/</link>
					<comments>https://tekcookie.com/free-ssl-certificate-for-your-website/#respond</comments>
		
		<dc:creator><![CDATA[jeffythampi]]></dc:creator>
		<pubDate>Sat, 09 May 2020 21:56:26 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[FREE SSL certificate for your website]]></category>
		<guid isPermaLink="false">https://tekcookie.com/?p=1214</guid>

					<description><![CDATA[SSL certificate in your website (the lock icon) proves the authenticity of your business or personal website. This also makes the website ready for the future as the browsers move towards blocking non-https websites. https://www.engadget.com/2019-10-04-chrome-security-block-http-content.html Let’s Encrypt is one of the CA who provide free SSL certificate for the websites. The free certificate is having [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>SSL certificate in your website (the lock icon) proves the authenticity of your business or personal website. This also makes the website ready for the future as the browsers move towards blocking non-https websites. <a href="https://www.engadget.com/2019-10-04-chrome-security-block-http-content.html" target="_blank" rel="noopener">https://www.engadget.com/2019-10-04-chrome-security-block-http-content.html</a></p>



<p><strong><a rel="noreferrer noopener" href="https://letsencrypt.org/" target="_blank">Let’s Encrypt</a></strong> is one of the CA who provide free SSL certificate for the websites. The free certificate is having 90 days validity.</p>



<p>In this article, we will see how to get <strong>FREE SSL certificate</strong> for the website.</p>



<p>In the previous post, we saw how to publish WordPress website in Ubuntu Linux. Using the free SSL, we will secure the website.</p>



<figure class="wp-block-embed is-type-wp-embed is-provider-tekcookie wp-block-embed-tekcookie"><div class="wp-block-embed__wrapper">
<blockquote class="wp-embedded-content" data-secret="MtDNZ1qPtc"><a href="https://tekcookie.com/install-wordpress-on-ubuntu/">Install WordPress on Ubuntu</a></blockquote><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  title="&#8220;Install WordPress on Ubuntu&#8221; &#8212; TekCookie" src="https://tekcookie.com/install-wordpress-on-ubuntu/embed/#?secret=MtDNZ1qPtc" data-secret="MtDNZ1qPtc" width="600" height="338" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
</div></figure>



<h2 class="wp-block-heading">Step-1 : Setting Domain Name</h2>



<p>To setup SSL for the website, the site need to have a domain name with A record pointing to the website IP address. The domain here is moneyworkforme.in and the dns is having A record pointing to wesite IP address and www as cname record referring to the domain name.</p>



<p>The DNS setting can be changed in the doman registrar website or in the third party DNS provider console if custom name server is configured.</p>



<figure class="wp-block-image size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/domain-dns-setting-1.jpg?w=1080&#038;ssl=1" alt="" class="wp-image-1218"/></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-2 : Setup WordPress URL</h2>



<p>Browser and login to the WordPress website admin portal. http://&lt;ip-address&gt;/wp-admin</p>



<p>Change the WordPress Address URL and Site Address URL to the domain name &#8211; www.moneyworkforme.in</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/wp-rename-site-address.jpg?resize=786%2C535&#038;ssl=1" alt="" class="wp-image-1225" width="786" height="535"/></figure>



<p>After the settings are saved, the browser refresh to the wp-admin page with the domain name as suffix instead of the IP address.</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/wp-login-page-with-domain-name-1.jpg?resize=780%2C494&#038;ssl=1" alt="" class="wp-image-1227" width="780" height="494"/></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-3 : Installing Certbot</h2>



<p>We need to install certbot package to get certificate from the CA and python3-certbot-apache plugin which integrates Certbot with Apache to automate certificate renewal and https configuration in the web server.</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo apt install certbot 
sudo apt install python3-certbot-apache</code></pre>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-4 : Apache Virtual Host Configuration</h2>



<p>To obtain SSL certificate for the web server, Certbot needs to find the website domain name and the alias name within the Apache configuration files. This information will be retrieved from the ServerName and ServerAlias fields defined in the configuration file.</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo nano /etc/apache2/sites-available/000-default.conf</code></pre>



<p>In the configuration file, add the following entries &#8211;</p>



<pre class="wp-block-preformatted">ServerName moneyworkforme.in
ServerAlias www.moneyworkforme.in</pre>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/ubuntu-apache2-config-hostname.jpg?resize=753%2C167&#038;ssl=1" alt="" class="wp-image-1222" width="753" height="167"/></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-5 : Allow HTTPS Port</h2>



<p>Enable the tcp port 443 to accept https traffic</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 443 -j ACCEPT</code></pre>



<p>Make the firewall changes permanent</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo netfilter-persistent save</code></pre>



<figure class="wp-block-image size-large is-resized"><img decoding="async" src="https://i1.wp.com/www.tekcookie.com/wp-content/uploads/2020/05/ubuntu-firewall-changes.jpg?fit=640%2C56&amp;ssl=1" alt="" class="wp-image-1220" width="754" height="66"/></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-6 : Install Let&#8217;s Encrypt Certificate</h2>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo certbot --apache --agree-tos --email info@tekcookie.com --redirect -d moneyworkforme.in -d www.moneyworkforme.in</code></pre>



<pre class="wp-block-preformatted">Parameters:
–apache: Use Apache2 Let’s Encrypt installer.
–agree-tos: Agree to Let’s Encrypt terms of service.
–redirect: Adds 301 redirect.
–email: Contact email address.
–d: add the domain name and alias name.</pre>



<figure class="wp-block-image size-large is-resized"><img decoding="async" src="https://i2.wp.com/www.tekcookie.com/wp-content/uploads/2020/05/installed-ssl.jpg?fit=640%2C453&amp;ssl=1" alt="" class="wp-image-1223" width="764" height="541"/></figure>



<p>The &#8220;IMPORTANT NOTES&#8221; section shows the path where the certificate is downloaded.</p>



<p>Lets verify the same, list the items under /etc/letsencrypt/live/moneyworkforme.in to view the certificate files.</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/ssl-path.jpg?resize=765%2C37&#038;ssl=1" alt="" class="wp-image-1224" width="765" height="37"/></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-7 : Setup Certificate Auto-Renewal</h2>



<p>Automating the certificate makes the administration job easier as the certificate validity is only 90 days. Test the status of Certbot before adding the same to crontab</p>



<p>Check the status of the Certbot</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo systemctl status certbot.timer</code></pre>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/certbot-status.jpg?resize=729%2C133&#038;ssl=1" alt="" class="wp-image-1228" width="729" height="133"/></figure>



<p>Testing the renewal process by dry run with certbot</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo certbot renew --dry-run</code></pre>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/certbot-renewal.jpg?resize=724%2C647&#038;ssl=1" alt="" class="wp-image-1229" width="724" height="647"/></figure>



<p>Configuring Crontab for scheduling certificate auto renewal.</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo crontab -e</code></pre>



<p>Select the appropriate text editor when prompted and add the below statement.</p>



<pre class="wp-block-preformatted">0 1 * * * /usr/bin/certbot renew &amp; &gt; /dev/null</pre>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/cron-job.jpg?resize=540%2C188&#038;ssl=1" alt="" width="540" height="188"/></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-8 : Fix HTTPS Redirection</h2>



<p>When the SSL certificate is installed, the Certbot auto configures Apache2 with http to https redirection. But the auto configured redirection only works with URL having domain name (I.e http://moneyworkforme.in to https://moneyworkforme.in) but not for the IP address. To redirect http traffic with IP address in the URL to domain name, modify Apache Virtual Host Configuration.</p>



<p>Replace the following snippet as shown below under VirtualHost tag</p>



<p><em>Auto configured settings</em></p>



<pre class="wp-block-preformatted">RewriteEngine on
RewriteCond %{SERVER_NAME} =www.moneyworkforme.in [OR]
RewriteCond %{SERVER_NAME} =moneyworkforme.in
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]</pre>



<p>Replace the above with</p>



<pre class="wp-block-preformatted">RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/(.*) https://www.moneyworkforme.in/$1 [R,L]</pre>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/http-https-rewrite.jpg?resize=561%2C103&#038;ssl=1" alt="" class="wp-image-1230" width="561" height="103"/></figure>



<p>And the WordPress site is now secured with Let&#8217;s Encrypt SSL Certificate.</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/final-site-ssl.jpg?resize=715%2C632&#038;ssl=1" alt="" width="715" height="632"/></figure>



<div style="height:70px" aria-hidden="true" class="wp-block-spacer"></div>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>Hope this article is informative to you. Thank you for reading my post.</p></blockquote>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://tekcookie.com/free-ssl-certificate-for-your-website/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1214</post-id>	</item>
		<item>
		<title>Install WordPress on Ubuntu</title>
		<link>https://tekcookie.com/install-wordpress-on-ubuntu/</link>
					<comments>https://tekcookie.com/install-wordpress-on-ubuntu/#respond</comments>
		
		<dc:creator><![CDATA[jeffythampi]]></dc:creator>
		<pubDate>Fri, 08 May 2020 06:20:27 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Install WordPress on Ubuntu]]></category>
		<guid isPermaLink="false">https://tekcookie.com/?p=925</guid>

					<description><![CDATA[There are many cloud hosting providers out there who publish WordPress website and most of them charges around $3 &#8211; $4 or more per month. Stay tuned for the upcoming post where I will show you how to host WordPress for FREE !!! This article describes about how to install WordPress on Ubuntu. WordPress is [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>There are many cloud hosting providers out there who publish WordPress website and most of them charges around $3 &#8211; $4 or more per month. Stay tuned for the upcoming post where I will show you how to host WordPress for FREE !!!</p>



<p>This article describes about how to install WordPress on Ubuntu.</p>



<p>WordPress is a Free and Open-Source content management system developed in php with MySQL as back-end with the capability to extent or implement functionality by using plugins and UI modifications via Themes.</p>



<p>Here, we will Install WordPress in a very small Instance of Linux VM. The installation is done through shell.</p>



<pre class="wp-block-preformatted"><strong><span style="text-decoration: underline;">System Specs:</span></strong>
Processor - 1 vCPU
Memory - 1 Gb
OS Version - Ubuntu 20.04</pre>



<p>Note: This is not an ideal specs for installing WordPress, but works fine for blogs and personal websites.</p>



<p>After the installation of Ubuntu, update and upgrade the OS</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo apt-get update &amp;&amp; sudo apt-get upgrade -y</code></pre>



<p>Once the operating system is updated, follow below steps for installing WordPress</p>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-1 : Install Apache Web Server</h2>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo apt install apache2 -y</code></pre>



<p>Once the installation is completed, check the apache service status</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">systemctl status apache2</code></pre>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/Apache_Status.jpg?resize=636%2C236&#038;ssl=1" alt="" class="wp-image-1157" width="636" height="236"/></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-2 : Enable Firewall settings to allow http traffic</h2>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 80 -j ACCEPT</code></pre>



<p>To make the changes permanent even after server restart, run the following command</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo netfilter-persistent save</code></pre>



<figure class="wp-block-image size-large"><img decoding="async" src="https://i1.wp.com/www.tekcookie.com/wp-content/uploads/2020/05/fireweallRule.jpg?fit=640%2C56&amp;ssl=1" alt="" class="wp-image-1159"/></figure>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>Test the above by typing the server ip address in the web browser, we will be able to see the apache default page in the web browser.</p></blockquote>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/ApacheDefPage.jpg?resize=647%2C474&#038;ssl=1" alt="" class="wp-image-1160" width="647" height="474"/></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-3 : Install php package</h2>



<p>Run below command to install the latest version of php and associated package</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo apt install php libapache2-mod-php php-common php-mbstring php-xmlrpc php-soap php-gd php-xml php-intl php-mysql php-cli php php-ldap php-zip php-curl -y</code></pre>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-4 : Test php Installation</h2>



<p>Create a test php file and browse the page in web browser</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo vi /var/www/html/testpage.php</code></pre>



<p>in the <strong>nano </strong>editor, add below snippet and save</p>



<pre class="wp-block-preformatted">&lt;?php
echo "The website is working !!!";
?&gt;</pre>



<p>Open web browser and browse http://&lt;ip-address&gt;/testpage.php</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/php_page_test-1.jpg?resize=631%2C191&#038;ssl=1" alt="" class="wp-image-1163" width="631" height="191"/></figure>



<h2 class="wp-block-heading">Step-5 : Install Database &#8211; MariaDB</h2>



<p>Execute the below command to install Maria DB</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo apt install mariadb-server -y</code></pre>



<p>Note: This installation will take some time to finish.</p>



<p>Once the installation is completed, execute below command to do the initial config.</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo mysql_secure_installation</code></pre>



<p>The shell will prompt for input when the above command is executed. Follow the input given in the screenshot to complete the setup.</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/MariaDB_Config-1.jpg?resize=587%2C983&#038;ssl=1" alt="" width="587" height="983"/></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-6 : Configure Database</h2>



<p>Login to mysql as root and create the database for wordpress</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo mysql -u root</code></pre>



<p>Create database and assign permission using below snippet</p>



<pre class="wp-block-preformatted">CREATE DATABASE wordpress;
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER ON wordpress.* TO 'wpuser'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
exit</pre>



<figure class="wp-block-image size-large is-resized"><img decoding="async" src="https://i2.wp.com/www.tekcookie.com/wp-content/uploads/2020/05/DB-Config.jpg?fit=640%2C195&amp;ssl=1" alt="" class="wp-image-1167" width="821" height="250"/><figcaption>DB Creation and DB Permission</figcaption></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-7 : Download and Install WordPress</h2>



<p>Navigate to home directory and download WordPress package</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">cd /home/ubuntu
wget https://wordpress.org/latest.tar.gz</code></pre>



<p>Extract the package and copy to the root web folder</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">tar xf latest.tar.gz
sudo mv wordpress/ /var/www/html/</code></pre>



<p>Modify WordPress folder permission and ownership</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo chown -R www-data:www-data /var/www/html/wordpress/
sudo chmod 755 -R /var/www/html/wordpress/</code></pre>



<p>Create Upload folder and change ownership</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo mkdir /var/www/html/wordpress/wp-content/uploads
sudo chown -R www-data:www-data /var/www/html/wordpress/wp-content/uploads/</code></pre>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-8 : Make WordPress folder as default web path</h2>



<p>Edit apache config file and add the following config details under the tag &lt;VirtualHost *:80&gt;</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo vi /etc/apache2/sites-available/000-default.conf</code></pre>



<pre class="wp-block-preformatted">&lt;VirtualHost *:80&gt;
   DocumentRoot /var/www/html/wordpress
   <code>&lt;Directory /var/www/html/wordpress/&gt; </code>
      <code>Options FollowSymLinks </code>
      <code>AllowOverride Limit Options FileInfo </code>
      <code>DirectoryIndex index.php </code>
      <code>Order allow,deny </code>
      <code>Allow from all </code>
   <code>&lt;/Directory&gt; </code>
   <code>&lt;Directory /var/www/html/wordpress/wp-content&gt; </code>
      <code>Options FollowSymLinks </code>
      <code>Order allow,deny </code>
      <code>Allow from all </code>
   <code>&lt;/Directory&gt;</code>
&lt;/VirtualHost&gt;</pre>



<p>Restart apache service</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo systemctl restart apache2</code></pre>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-9 : Final Settings in Linux</h2>



<p>Enable url rewrite feature and restart apache</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo a2enmod rewrite
sudo systemctl restart apache2</code></pre>



<p>Finally, the linux side configuration is completed.</p>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Step-10 : WordPress Configuration</h2>



<p>Let&#8217;s go to web browser to configure the rest in WordPress. Open web browser and browse the server IP address</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/WP_1.png?resize=600%2C539&#038;ssl=1" alt="" class="wp-image-1177" width="600" height="539"/></figure>



<p>Select language and click on Continue</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/WP_2-1.jpg?resize=601%2C453&#038;ssl=1" alt="" width="601" height="453"/></figure>



<p>Click on &#8220;Let&#8217;s go!&#8221; button to configure the database details to complete WordPress configuration</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/WP_3-1.jpg?resize=595%2C420&#038;ssl=1" alt="" class="wp-image-1180" width="595" height="420"/></figure>



<p>Enter the database details as per we have configured in<strong> Step-6</strong></p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/WP_4.jpg?resize=599%2C209&#038;ssl=1" alt="" width="599" height="209"/></figure>



<p>WordPress will proceed to the above page if the DB information entered is correct. Click on &#8220;Run the installation&#8221;</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/WP_5.jpg?resize=596%2C669&#038;ssl=1" alt="" class="wp-image-1183" width="596" height="669"/></figure>



<p>Enter the required login information in WordPress and click &#8220;Install WordPress&#8221;</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/WP_6.jpg?resize=596%2C332&#038;ssl=1" alt="" class="wp-image-1184" width="596" height="332"/></figure>



<p>Finally, the installation is completed and WordPress website is ready !!!</p>



<p>To view the website, navigate to http://&lt;ip-address&gt;</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/WP_9.jpg?resize=590%2C403&#038;ssl=1" alt="" class="wp-image-1185" width="590" height="403"/></figure>



<p>To view website admin portal, navigate to http://&lt;ip-address&gt;/wp-admin</p>



<figure class="wp-block-image size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/WP_7.jpg?w=1080&#038;ssl=1" alt="" class="wp-image-1186"/></figure>



<p>Enter the login credential which was set during the installation process and click on &#8220;Log In&#8221;</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/WP_8.jpg?resize=592%2C402&#038;ssl=1" alt="" width="592" height="402"/></figure>



<p>Now, its all your. This completes the installation of WordPress in Ubuntu.</p>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Testing the site performance</h2>



<p>Browse to url &#8220;<a href="https://developers.google.com/speed/pagespeed/insights/" target="_blank" rel="noopener">https://developers.google.com/speed/pagespeed/insights/</a>&#8221; and paste the website url. Click on &#8220;Analyze&#8221; button to get the results</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/05/wp-test-2-2.jpg?resize=602%2C713&#038;ssl=1" alt="" width="602" height="713"/></figure>



<p>The results are excellent, but this is just a plain website. Once we add more contents, plugins and themes. The analysis rating may go down.</p>



<p>After all, its just 1 CPU and 1GB RAM. Good for blogging and personal websites. As your traffic increases, you can find alternatives which gives more processing power.</p>



<div style="height:70px" aria-hidden="true" class="wp-block-spacer"></div>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>Hope you liked the article. Thank you for reading.</p></blockquote>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://tekcookie.com/install-wordpress-on-ubuntu/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">925</post-id>	</item>
		<item>
		<title>How to check SWAP memory in Linux</title>
		<link>https://tekcookie.com/check-swap-memory-in-linux/</link>
					<comments>https://tekcookie.com/check-swap-memory-in-linux/#respond</comments>
		
		<dc:creator><![CDATA[jeffythampi]]></dc:creator>
		<pubDate>Fri, 17 Apr 2020 06:51:29 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[check SWAP memory]]></category>
		<category><![CDATA[check SWAP memory in Linux]]></category>
		<category><![CDATA[SWAP memory]]></category>
		<category><![CDATA[SWAP memory in Linux]]></category>
		<guid isPermaLink="false">https://tekcookie.com/?p=931</guid>

					<description><![CDATA[Swap memory is a portion of the hard disk (HDD or SSD) space which is reserved and made available for use by the operating system when the main memory (RAM) utilization reaches high. When memory demand increases and the available memory is less, inactive pages in the RAM is moved to swap space and thereby [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Swap memory is a portion of the hard disk (HDD or SSD) space which is reserved and made available for use by the operating system when the main memory (RAM) utilization reaches high.</p>



<p>When memory demand increases and the available memory is less, inactive pages in the RAM is moved to swap space and thereby releasing resource in the main memory. Though hard disk supports RAM for immediate memory demand, it cannot be considered as an alternative to RAM because of the slow input output operation capability in hard disk.</p>



<p>This article describes about how to check the utilization of swap memory space in our system.</p>



<p><strong>OS Information</strong> : Debian GNU/Linux 9</p>



<div style="height:43px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">The FREE command</h4>



<p>Free command is used to display memory free and used memory.</p>



<p>Parameter &#8220;-h&#8221; displays size in nearest possible 3 digit format.</p>



<p>Command:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">free -h</code></pre>



<p>Output:</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/04/free.jpg?resize=648%2C65&#038;ssl=1" alt="" class="wp-image-937" width="648" height="65"/></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">The TOP command</h4>



<p>This command is used to view the running processes in the system. </p>



<p>The header section displays the swap memory utilization</p>



<p><span class="has-inline-color has-very-dark-gray-color">Command:</span></p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">top</code></pre>



<p>Output:</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/04/top-1.jpg?resize=635%2C160&#038;ssl=1" alt="" class="wp-image-933" width="635" height="160"/></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">The VMSTAT command</h4>



<p>This command shows information about virtual memory statistics</p>



<p>Command:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">vmstat</code></pre>



<p>Output:</p>



<figure class="wp-block-image size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/04/vmstat.jpg?w=1080&#038;ssl=1" alt="" class="wp-image-936"/></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">/proc/swaps file</h4>



<p>This command shows swap file and device name</p>



<p>Command:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">cat /proc/swaps</code></pre>



<p>Output:</p>



<figure class="wp-block-image size-large is-resized"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/tekcookie.com/wp-content/uploads/2020/04/proc.jpg?resize=637%2C59&#038;ssl=1" alt="" class="wp-image-938" width="637" height="59"/></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<p>This commands helps the administrators monitor the swap memory utilization.</p>



<div style="height:70px" aria-hidden="true" class="wp-block-spacer"></div>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>Thank you for reading the article. Hope this is helpful to you.</p></blockquote>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://tekcookie.com/check-swap-memory-in-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">931</post-id>	</item>
	</channel>
</rss>
