{"id":17453,"date":"2015-08-10T16:46:37","date_gmt":"2015-08-10T21:46:37","guid":{"rendered":"https:\/\/secure.rosehosting.com\/blog\/?p=17453"},"modified":"2022-12-16T04:19:47","modified_gmt":"2022-12-16T10:19:47","slug":"install-pencilblue-on-a-debian-8-vps","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/install-pencilblue-on-a-debian-8-vps\/","title":{"rendered":"Install PencilBlue on Debian 8"},"content":{"rendered":"
In this blog post we will show you how to install PencilBlue CMS on a Debian 8 VPS with the latest version of Nginx. PencilBlue is an open source content management system built on Node.js. This guide should work on other Linux VPS<\/a> systems as well but was tested and written for Debian 8 VPS<\/a>. We will install the latest nodejs package from the NodeSource repository:<\/p>\n Install the latest Redis and MongoDB packages from the official Debian repository:<\/p>\n Clone the PencilBlue git repository from github using the following command:<\/p>\n Pull all dependencies:<\/p>\n Create a custom configuration file:<\/p>\n Open the The latest version of Nginx, version 1.8 is not available via the default Debian repositories, so we will add the Dotdeb repository. Open the \/etc\/apt\/sources.list file and append the following lines:<\/p>\n Fetch and install the GnuPG key:<\/p>\n Update the system and install Nginx:<\/p>\n Create a new Nginx server block with the following content<\/p>\n Activate the server block by creating a symbolic link :<\/p>\n Test the Nginx configuration and restart nginx:<\/p>\n Enable and start your PencilBlue instance with:<\/p>\n That’s it. Now open your browser, type the address of your website and register the site’s first admin account.<\/p>\n For more information about how manage your PencilBlue CMS, please refer to the PencilBlue website.<\/p>\n Of course you don\u2019t have to do any of this if you use one of our Linux VPS Hosting<\/a> services, in which case you can simply ask our expert Linux admins to setup this for you. They are available 24×7 and will take care of your request immediately.<\/p>\n PS<\/span><\/strong>. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":" In this blog post we will show you how to install PencilBlue CMS on a Debian 8 VPS with the … <\/p>\n
\n<\/p>\nLogin to your VPS via SSH<\/h4>\n
ssh user@vps<\/pre>\n
Update the system and install necessary packages.<\/h4>\n
[user]$ sudo apt-get update && sudo apt-get -y upgrade\r\n[user]$ sudo apt-get install curl git<\/pre>\n
Install Node.js<\/h4>\n
[user]$ curl --silent --location https:\/\/deb.nodesource.com\/setup_0.12 | sudo bash -\r\n[user]$ sudo apt-get install nodejs<\/pre>\n
Install Redis and MongoDB<\/h4>\n
[user]$ sudo apt-get install mongodb redis-server<\/pre>\n
Install PencilBlue<\/h4>\n
[user]$ git clone https:\/\/github.com\/pencilblue\/pencilblue.git ~\/pencilblue<\/pre>\n
[user]$ cd ~\/pencilblue\r\n[user]$ npm install<\/pre>\n
cp sample.config.js config.js<\/pre>\n
config.js<\/code> file and edit to your liking.<\/p>\n
Install and Configure Nginx<\/h4>\n
[user]$ sudo vim \/etc\/apt\/sources.list<\/pre>\n
deb http:\/\/packages.dotdeb.org jessie all\r\ndeb-src http:\/\/packages.dotdeb.org jessie all<\/pre>\n
[user]$ curl -sS http:\/\/www.dotdeb.org\/dotdeb.gpg | sudo apt-key add -<\/pre>\n
[user]$ sudo apt-get update\r\n[user]$ sudo apt-get -y install nginx<\/pre>\n
[user]$ sudo vim \/etc\/nginx\/sites-available\/my_pencilblue.com<\/pre>\n
server {\r\n server_name my_pencilblue.com;\r\n listen 80;\r\n\r\n access_log \/var\/log\/nginx\/my_pencilblue-access.log;\r\n error_log \/var\/log\/nginx\/my_pencilblue-error.log;\r\n\r\n location \/ {\r\n proxy_set_header X-Real-IP $remote_addr;\r\n proxy_set_header Host $http_host;\r\n proxy_pass http:\/\/127.0.0.1:8080;\r\n }\r\n \r\n}\r\n<\/pre>\n
[user]$ sudo ln -s \/etc\/nginx\/sites-available\/my_pencilblue.com \/etc\/nginx\/sites-enabled\/my_pencilblue.com<\/pre>\n
[user]$ sudo nginx -t\r\n[user]$ sudo service nginx restart<\/pre>\n
Create an systemd script<\/h4>\n
[user]$ sudo nano \/etc\/systemd\/system\/pencilblue.service<\/pre>\n
[Unit]\r\nDescription=pencilblue\r\nAfter=network.target\r\n\r\n[Service]\r\nExecStart=\/usr\/bin\/node \/home\/your_username\/pencilblue\/pencilblue.js\r\nRestart=always\r\nStandardOutput=syslog\r\nStandardError=syslog\r\nSyslogIdentifier=pencilblue\r\nEnvironment=NODE_ENV=production\r\nUser=your_username\r\nGroup=your_username\r\n\r\n[Install]\r\nWantedBy=multi-user.target<\/pre>\n
[user]$ sudo systemctl enable pencilblue\r\n[user]$ sudo systemctl start pencilblue\r\n<\/pre>\n
\n