{"id":17534,"date":"2015-08-24T15:57:54","date_gmt":"2015-08-24T20:57:54","guid":{"rendered":"https:\/\/secure.rosehosting.com\/blog\/?p=17534"},"modified":"2022-06-03T03:44:14","modified_gmt":"2022-06-03T08:44:14","slug":"install-anchor-cms-on-a-debian-8-vps","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/install-anchor-cms-on-a-debian-8-vps\/","title":{"rendered":"Install Anchor CMS on a Debian 8 VPS"},"content":{"rendered":"
In this tutorial, we will explain how to install Anchor CMS on a Debian 8 VPS with MariaDB, PHP-FPM and Nginx. Anchor CMS is a modern lightweight open source CMS built on PHP. This guide should work on other Linux VPS<\/a> systems as well but was tested and written for an Debian 8 VPS<\/a>. To install the latest MariaDB 10 version, run the following commands:<\/p>\n When the installation is complete, run the following command to secure your installation:<\/p>\n Next, we need to create a database for our Anchor installation.<\/p>\n 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 To install the latest stable version of PHP version 5.6 and all nessesary modules, run:<\/p>\n Create a root directory<\/p>\n Download the latest version of Anchor<\/p>\n Unzip the Anchor archive<\/p>\n Create a new PHP-FPM pool for your user:<\/p>\n Change the upload filesize limit:<\/p>\n Restart PHP-FPM:<\/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 Open your web browser, navigate to create an administrator account and click on the “Complete” button.<\/p>\n That\u2019s it. You have successfully installed Anchor on your Debian 8 VPS<\/a>. For more information about how to manage your Anchor installation, please refer to the Anchor<\/a> 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 tutorial, we will explain how to install Anchor CMS on a Debian 8 VPS with MariaDB, PHP-FPM and … <\/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 wget software-properties-common<\/pre>\n
Install MariaDB 10.0<\/h4>\n
[user]$ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db\r\n[user]$ sudo add-apt-repository 'deb http:\/\/mirror.jmu.edu\/pub\/mariadb\/repo\/10.0\/debian jessie main'\r\n[user]$ sudo apt-get update\r\n[user]$ sudo apt-get install -y mariadb-server<\/pre>\n
[user]$ mysql_secure_installation<\/pre>\n
[user]$ mysql -uroot -p\r\nMariaDB [(none)]> CREATE DATABASE anchor;\r\nMariaDB [(none)]> GRANT ALL PRIVILEGES ON anchor.* TO 'anchoruser'@'localhost' IDENTIFIED BY 'anchoruserpasswd';\r\nMariaDB [(none)]> FLUSH PRIVILEGES;\r\nMariaDB [(none)]> \\q<\/pre>\n
Install 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
Install PHP and required PHP modules<\/h4>\n
[user]$ sudo apt-get -y install php5-fpm php5-cli php5-gd php5-mysqlnd php5-curl php5-mcrypt<\/pre>\n
Download Anchor<\/h4>\n
[user]$ mkdir -p ~\/myAnchor.com\/public_html<\/pre>\n
[user]$ wget -O \/tmp\/anchorcms.zip http:\/\/anchorcms.com\/download<\/pre>\n
[user]$ unzip \/tmp\/anchorcms.zip -d \/tmp\r\n[user]$ mv \/tmp\/anchor-cms-*\/* ~\/myAnchor.com\/public_html\/<\/pre>\n
PHP-FPM configuration<\/h4>\n
[user]$ sudo tee -a \/etc\/php5\/fpm\/pool.d\/$(whoami).conf << EOF\r\n[$(whoami)]\r\nuser = $(whoami) \r\ngroup = $(whoami) \r\nlisten = \/var\/run\/php5-fpm-$(whoami).sock \r\nlisten.owner = $(whoami)\r\nlisten.group = $(whoami) \r\nlisten.mode = 0666 \r\npm = ondemand \r\npm.max_children = 5 \r\npm.process_idle_timeout = 10s; \r\npm.max_requests = 200 \r\nchdir = \/\r\nEOF<\/pre>\n
[user]$ sudo cp \/etc\/php5\/fpm\/php.ini{,.backup} \r\n[user]$ sudo sed -i \"s\/^upload_max_filesize = .*\/upload_max_filesize = 64M\/\" \/etc\/php5\/fpm\/php.ini<\/pre>\n
[user]$ sudo service php5-fpm restart<\/pre>\n
Nginx configuration<\/h4>\n
[user]$ sudo tee -a \/etc\/nginx\/sites-available\/myAnchor.com << EOF\r\nserver {\r\n server_name myAnchor.com;\r\n listen 80;\r\n root $HOME\/myAnchor.com\/public_html;\r\n index index.html index.php;\r\n\r\n access_log \/var\/log\/nginx\/myAnchor.com-access.log;\r\n error_log \/var\/log\/nginx\/myAnchor.com-error.log;\r\n\r\n location \/ {\r\n try_files \\$uri \\$uri\/ \/index.php;\r\n }\r\n\r\n location ~* \\.(jpg|jpeg|gif|css|png|js|ico|html)$ {\r\n access_log off;\r\n expires max;\r\n }\r\n\r\n location ~ \\.php\\$ {\r\n fastcgi_pass unix:\/var\/run\/php5-fpm-$(whoami).sock;\r\n fastcgi_split_path_info ^(.+\\.php)(\/.*)\\$;\r\n include fastcgi_params;\r\n fastcgi_param SCRIPT_FILENAME \\$document_root\\$fastcgi_script_name;\r\n fastcgi_intercept_errors off;\r\n fastcgi_buffer_size 16k;\r\n fastcgi_buffers 4 16k;\r\n fastcgi_index index.php;\r\n }\r\n\r\n location ~ \/\\.ht {\r\n deny all;\r\n } \r\n}\r\nEOF<\/pre>\n
[user]$ sudo ln -s \/etc\/nginx\/sites-available\/myAnchor.com \/etc\/nginx\/sites-enabled\/myAnchor.com<\/pre>\n
[user]$ sudo nginx -t\r\n[user]$ sudo service nginx restart<\/pre>\n
Install Anchor<\/h4>\n
http:\/\/myAnchor.com\/install<\/code> enter the following information:<\/p>\n
\n
\n