<?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>Ghost Archives - LinuxTuto</title>
	<atom:link href="https://www.linuxtuto.com/tag/ghost/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.linuxtuto.com/tag/ghost/</link>
	<description>Linux Sysadmin and DevOps blog</description>
	<lastBuildDate>Tue, 29 Nov 2022 08:00:11 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.linuxtuto.com/wp-content/uploads/2022/01/cropped-LT_faveicon-32x32.png</url>
	<title>Ghost Archives - LinuxTuto</title>
	<link>https://www.linuxtuto.com/tag/ghost/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">201456972</site>	<item>
		<title>How to Install Ghost on Ubuntu 22.04</title>
		<link>https://www.linuxtuto.com/how-to-install-ghost-on-ubuntu-22-04/</link>
					<comments>https://www.linuxtuto.com/how-to-install-ghost-on-ubuntu-22-04/#respond</comments>
		
		<dc:creator><![CDATA[LinuxTuto]]></dc:creator>
		<pubDate>Mon, 28 Nov 2022 18:00:07 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ghost]]></category>
		<guid isPermaLink="false">https://www.linuxtuto.com/?p=896</guid>

					<description><![CDATA[<p>Ghost is an open-source powerful NodeJS-based Content Management System (CMS) for creating blog oriented websites. It has full support for Markdown and provides an easy-to-use...</p>
<p>The post <a href="https://www.linuxtuto.com/how-to-install-ghost-on-ubuntu-22-04/">How to Install Ghost on Ubuntu 22.04</a> appeared first on <a href="https://www.linuxtuto.com">LinuxTuto</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Ghost is an open-source powerful NodeJS-based Content Management System (CMS) for creating blog oriented websites. It has full support for Markdown and provides an easy-to-use web interface for administration purposes.</p>
<p>In this tutorial we will show you how to install Ghost CMS on a Ubuntu 22.04 OS.</p>
<h2><span class="has-inline-color has-vivid-purple-color">Step 1: Add a new user</span></h2>
<p>To install Ghost, we need to add normal user with root privileges.</p>
<pre><code># adduser linuxtuto</code></pre>
<p><span style="color: #ff0000;"><strong>Note:</strong></span> Do not use username as a <strong><code>ghost</code></strong> it gets cause conflicts with the Ghost-CLI.</p>
<p>To add the user to the sudo group, use the <strong><code>usermod</code></strong> command as follows:</p>
<pre><code># usermod -aG sudo linuxtuto</code></pre>
<p>Then log in as the new user:</p>
<pre><code># su - linuxtuto</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 2: Update Operating System</span></h2>
<p>Update your <strong>Ubuntu</strong> <strong>22.04</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 3: Install Nginx webserver</span></h2>
<p>You can install it via <code>apt</code> package manager by executing the following command:</p>
<pre><code>$ sudo apt install nginx</code></pre>
<p>Verify the status of the <code>Nginx</code> service using <code>systemctl status</code> command:</p>
<pre><code>$ sudo systemctl status nginx</code></pre>
<p>Output:</p>
<pre><code>● nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
     Active: active (running)
       Docs: man:nginx(8)
    Process: 66019 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
    Process: 66020 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
   Main PID: 66112 (nginx)
      Tasks: 2 (limit: 2196)
     Memory: 2.6M
        CPU: 148ms
     CGroup: /system.slice/nginx.service
             ├─66112 "nginx: master process /usr/sbin/nginx -g daemon on; master_process on;"
             └─66113 "nginx: worker process"</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 4: Install MySQL</span></h2>
<p>You can install the MySQL server 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>$ sudo systemctl start mysql
$ sudo systemctl enable mysql</code></pre>
<p>Verify the status of the <code>MySQL</code> service using <code>systemctl status</code> command:</p>
<pre><code>$ sudo 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: 1083 (mysqld)
     Status: "Server is operational"
      Tasks: 41 (limit: 2797)
     Memory: 434.0M
        CPU: 1min 57.932s
     CGroup: /system.slice/mysql.service
             └─1083 /usr/sbin/mysqld</code></pre>
<p>By default, MySQL is not hardened. You can secure MySQL using the <code>mysql_secure_installation</code> script.</p>
<pre><code>$ sudo 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>Run the command below to log in to the MySQL shell.</p>
<pre><code>$ sudo mysql -u root -p</code></pre>
<p>Once you are logged in to your database server you need to create a database:</p>
<pre><code>mysql&gt; CREATE DATABASE ghostdb;
mysql&gt; CREATE USER 'ghostuser'@'localhost' IDENTIFIED BY 'Str0ngPEd6';
mysql&gt; GRANT ALL PRIVILEGES ON ghostdb. * TO 'ghostuser'@'localhost';
mysql&gt; FLUSH PRIVILEGES;
mysql&gt; exit;</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 5: Install Node.js</span></h2>
<p>To install <code>Ghost</code> you need a <a href="https://ghost.org/faq/node-versions/">supported Node.js version</a>, so you can use the officially recommended Node.js v16.</p>
<p>First, add the Node.js repository running the following command:</p>
<pre><code>$ sudo curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash</code></pre>
<p>Once added, install the Node.js with the following command:</p>
<pre><code>$ sudo apt-get install nodejs</code></pre>
<p>Verify the installed version of Node.js running the following command:</p>
<pre><code>node --version</code></pre>
<p>You should see the following output:</p>
<pre><code>v16.18.1</code></pre>
<p>Run the following command to install <code>npm</code> latest version globally:</p>
<pre><code>$ sudo npm install npm@latest -g</code></pre>
<p><code>npm</code> is the <code>n</code>ode <code>p</code>ackage <code>m</code>anager used to install the Ghost-CLI on a system.</p>
<p>Verify the <code>npm</code> version with the following command:</p>
<pre><code>npm --version</code></pre>
<p>You should get the following output:</p>
<pre><code>9.1.2</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 6: Install Ghost-CLI on Ubuntu 22.04</span></h2>
<p>Ghost-CLI is a command-line tool to help you get Ghost installed and configured for use, quickly and easily.</p>
<p>Run the following command to install.</p>
<pre><code>$ sudo npm install -g ghost-cli@latest</code></pre>
<p>Checking Ghost-CLI version:</p>
<pre><code>$ ghost -v
Ghost-CLI version: 1.23.1</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 7: Install Ghost</span></h2>
<p>Once your server is setup and <code>ghost-cli</code> is installed you can install <code>Ghost</code>.</p>
<p>You can use the recommended location to install <code>Ghost</code> which is <code>/var/www/ghost</code></p>
<pre><code>$ sudo mkdir /var/www/ghost</code></pre>
<p>Set up correct permissions.</p>
<pre><code>$ sudo chown linuxtuto:linuxtuto /var/www/ghost
$ sudo chmod 775 /var/www/ghost</code></pre>
<p>Move inside the directory and install Ghost.</p>
<pre><code>$ cd /var/www/ghost/
$ ghost install</code></pre>
<p>You will see the output as follows.</p>
<pre><code><span style="color: #00ff00;">✔</span> Checking system Node.js version - found v16.18.1
<span style="color: #00ff00;">✔</span> Checking logged in user
<span style="color: #00ff00;">✔</span> Checking current folder permissions
<span style="color: #00ff00;">✔</span> Checking system compatibility
<span style="color: #00ff00;">✔</span> Checking for a MySQL installation
<span style="color: #00ff00;">✔</span> Checking memory availability
<span style="color: #00ff00;">✔</span> Checking free space
<span style="color: #00ff00;">✔</span> Checking for latest Ghost version
<span style="color: #00ff00;">✔</span> Setting up install directory
<span style="color: #00ff00;">✔</span> Downloading and installing Ghost v5.24.0
<span style="color: #00ff00;">✔</span> Finishing install process</code></pre>
<pre><code><span style="color: #00ff00;">?</span> Enter your blog URL: <span style="color: #00ccff;">http://your-domain.com</span>
<span style="color: #00ff00;">?</span> Enter your MySQL hostname: <span style="color: #00ccff;">localhost</span>
<span style="color: #00ff00;">?</span> Enter your MySQL username: <span style="color: #00ccff;">ghostuser</span>
<span style="color: #00ff00;">?</span> Enter your MySQL password: [hidden]
<span style="color: #00ff00;">?</span> Enter your Ghost database name: <span style="color: #00ccff;">ghostdb</span>
<span style="color: #00ff00;">✔</span> Configuring Ghost
<span style="color: #00ff00;">✔</span> Setting up instance
+ sudo useradd --system --user-group ghost
<span style="color: #00ff00;">?</span> Sudo Password [hidden]
+ sudo chown -R ghost:ghost /var/www/ghost/content
<span style="color: #00ff00;">✔</span> Setting up "ghost" system user
ℹ Setting up "ghost" mysql user [skipped]
<span style="color: #00ff00;">?</span> Do you wish to set up Nginx? <span style="color: #00ccff;">Yes</span>
+ sudo nginx -s reload
<span style="color: #00ff00;">✔</span> Setting up Nginx</code></pre>
<p>Now you have to open a web browser and log in with the address <code>https://your-domain.com/ghost</code> and you will be able to create the admin user.</p>
<p><img fetchpriority="high" decoding="async" class="size-large wp-image-917 aligncenter" src="https://www.linuxtuto.com/wp-content/uploads/2022/11/ghost_welcome-900x514.jpg" alt="Ghost Welcome Page" width="900" height="514" srcset="https://www.linuxtuto.com/wp-content/uploads/2022/11/ghost_welcome-900x514.jpg 900w, https://www.linuxtuto.com/wp-content/uploads/2022/11/ghost_welcome-300x171.jpg 300w, https://www.linuxtuto.com/wp-content/uploads/2022/11/ghost_welcome-768x439.jpg 768w, https://www.linuxtuto.com/wp-content/uploads/2022/11/ghost_welcome-1536x878.jpg 1536w, https://www.linuxtuto.com/wp-content/uploads/2022/11/ghost_welcome-1222x698.jpg 1222w, https://www.linuxtuto.com/wp-content/uploads/2022/11/ghost_welcome-897x513.jpg 897w, https://www.linuxtuto.com/wp-content/uploads/2022/11/ghost_welcome-684x391.jpg 684w, https://www.linuxtuto.com/wp-content/uploads/2022/11/ghost_welcome.jpg 1878w" sizes="(max-width: 900px) 100vw, 900px" /></p>
<p>Then you will see the control panel, and you will be able to use it.</p>
<p><img decoding="async" class="size-large wp-image-921 aligncenter" src="https://www.linuxtuto.com/wp-content/uploads/2022/11/ghost_dashboard-900x507.jpg" alt="Ghost Dashboard" width="900" height="507" srcset="https://www.linuxtuto.com/wp-content/uploads/2022/11/ghost_dashboard-900x507.jpg 900w, https://www.linuxtuto.com/wp-content/uploads/2022/11/ghost_dashboard-300x169.jpg 300w, https://www.linuxtuto.com/wp-content/uploads/2022/11/ghost_dashboard-768x432.jpg 768w, https://www.linuxtuto.com/wp-content/uploads/2022/11/ghost_dashboard-1536x865.jpg 1536w, https://www.linuxtuto.com/wp-content/uploads/2022/11/ghost_dashboard-1222x688.jpg 1222w, https://www.linuxtuto.com/wp-content/uploads/2022/11/ghost_dashboard-897x505.jpg 897w, https://www.linuxtuto.com/wp-content/uploads/2022/11/ghost_dashboard-684x385.jpg 684w, https://www.linuxtuto.com/wp-content/uploads/2022/11/ghost_dashboard.jpg 1913w" sizes="(max-width: 900px) 100vw, 900px" /></p>
<h2><span class="has-inline-color has-vivid-purple-color">Comments and Conclusion</span></h2>
<p>Congratulations! You have successfully installed <code>Ghost CMS</code> on Ubuntu 22.04.</p>
<p>You should now visit the <a href="https://help.ghost.org/" target="_blank" rel="noopener">Ghost Help</a> page and learn more about how to manage you Ghost installation.</p>
<p>Thanks for using this tutorial for installing the <code>Ghost CMS</code> on your Ubuntu 22.04 OS.</p>
<p>The post <a href="https://www.linuxtuto.com/how-to-install-ghost-on-ubuntu-22-04/">How to Install Ghost 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-ghost-on-ubuntu-22-04/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">896</post-id>	</item>
	</channel>
</rss>
