How to Install Apostrophe CMS on Ubuntu Linux

|

,

|

ApostropheCMS is an open-source content management system, widely used for building great websites and content editing. Easy and fun to use, it eliminates the need for learning templating and HTML. This article provides a detailed tutorial on how to install ApostropheCMS and necessary packages like Ruby, Node.js, MongoDB, and ApostropheCMS on Ubuntu 16.04, 18.04, and…

This brief tutorial will show students and new users how to install ApostropheCMS on Ubuntu 16.04 | 18.04 and 18.10 systems.

ApostropheCMS is an open-source content management system (CMS) built on Node.js that is used worldwide by enterprises and individuals looking for a simple-to-use platform for building great websites. It brings joy and productivity to web developers and content editors.

ApostropheCMS is used for many websites, from small nonprofits to large enterprises.

Using ApostropheCMS to edit your content on the web should be easy and fun—no need to learn templating and HTML. ApostropheCMS hides most of that stuff and focuses on what matters most.….

For more about ApostropheCMS, check its homepage.

These are the packages we’re going to set up.

  • Ruby version 2.5.3
  • MongoDB

Install Ruby

You’ll need to install some dependencies to install Ruby and Rails on Ubuntu. To make that happen, install Node.js and Yarn repositories. This will make installing the dependencies easier.

First, install these curl and git packages.

sudo apt update
sudo apt install curl git

Then, run the commands below to add Node.js and Yarn repositories and keys to your system. Then, install some core packages to get your environment going.

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

sudo apt-get update
sudo apt-get install nodejs yarn zlib1g-dev build-essential libpq-dev libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev

When you’re done, Continue below:

After adding the repositories and installing the necessary packages above, install Ruby with your local profile settings using rbenv. You’ll then use rbenv to install ruby-build.

cd ~/
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL

git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL

After setting up your local profile, run the commands below to install Ruby version 2.5.3. If a newer version is available, replace the version number with that. Then, visit this site to find out about Ruby’s latest versions.

rbenv install 2.5.3
rbenv global 2.5.3

To verify that Ruby is installed, run the commands below:

ruby -v

You should see similar lines below:

ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]

Install Node.js

Now that the Ruby environment is set up run the commands below to install Node.js. First, run the commands below to install the Node.js repository, then install the Node.js package.

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs

Now that Node.js is installed run the commands below to install ApostropheCMS.

Install MongoDB

MongoDB is the database that Apostrophe uses. So install MongoDB and ImageMagick before continuing with setting up your website projects.

sudo apt install mongodb
npm install mongodb --save

After installing the MongoDB server, open a new terminal window and try. It should start an interactive Mongo prompt. ctrl+c to exit.

Install ApostropheCMS

Now that your environment is ready run the commands below to install ApostropheCMS and build your first site. Next, run the commands below.

npm install imagemagick
sudo npm install apostrophe-cli -g
apostrophe create-project apostrophecms

Next, change it into the ApostropheCMS folder and install it there.

cd ~/apostrophecms

Then, run the commands to install ApostropheCMS and configure the server. Next, add an admin user to the admin group; prompts for a password.

npm install
node app.js apostrophe-users:add admin admin
node app.js

After a while, necessary packages should be installed and configured, ready to use.

Now open your browser and browse to the hostname followed by port # 3000

http://localhost:3000

You should see the ApostropheCMS home page.

Next, log on to the backend and begin creating content.

Use the credential you created for admin above.

Now, you can start building your great content!

Congratulation! You have successfully installed the Apostrophe CMS platform on Ubuntu 16.04 | 18.04 | 18.10

You may also like the post below:

Like this:



Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.