This post is about How to install NestaCMS on Ubuntu or Debian Server
NestaCMS is an open-source, markdown content management system. It’s developed on Ruby and based on Sinatra Web Framework. It makes easier to develop static design websites. It does not require a database every content is stored in text files. The posts are or content is processed and converted into static HTML Files.
Requirements :
- 1GB or more RAM (Depending upon the usage)
- 1-2vCore CPU (The more the better)
- 5GB of Disk Space
- Ubuntu 16.04 or greater or Debian 9 or greater
Step 1 : Updating your server
First step is to update your server and look for any newer packages and security releases for your distribution
apt-get update -y
apt-get upgrade -y
Step 2 : Installing Yarn & Ruby
NestaCMS is based on Ruby so we will first install it using rbenv. Run the following commands to install Ruby and Yarn :
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
Now update the server and install some required dependencies :
apt-get update
apt-get install 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
Run the following commands to configure rbenv through which we will be using it to install Ruby :
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
Run the following command to install the latest version of Ruby (By now its 3.1.1) Check this website to check the latest version
rbenv install --verbose 3.1.1 rbenv global 3.1.1
Check the installed version of ruby to make sure its fully installed:
ruby -v
You should get the following output :
Step 3 : Installing NodeJS
Ruby is now fully installed, Now its time to install NodeJS on our server. First we will need its repository key!
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash –
apt-get install nodejs
Step 4 : Install NestaCMS
Now we can continue installing the CMS. Run the following commands to install
gem install nesta
gem install bundler
nesta new nestacms
cd ~/nestacms
bundle install nesta demo:content bundle exec mr-sparkle config.ru
You will see the following output :
That means your NestaCMS is fully working and ready for use at port 8080
Access it at http://localhost:8080
Conclusion:
You have installed NestaCMS on your Ubuntu/Debian Server. This tutorial assumes that you are root!