{"id":17926,"date":"2015-11-18T14:48:41","date_gmt":"2015-11-18T20:48:41","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=17926"},"modified":"2022-12-15T07:09:52","modified_gmt":"2022-12-15T13:09:52","slug":"install-candycane-on-an-ubuntu-14-04-vps","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/install-candycane-on-an-ubuntu-14-04-vps\/","title":{"rendered":"Install CandyCane on an Ubuntu 14.04 VPS"},"content":{"rendered":"
In this guide, we will explain how to install CandyCane on an Ubuntu 14.04 VPS with MariaDB, PHP-FPM and Nginx. CandyCane a flexible open source bug tracking system powered by CakePHP MVC framework. This guide should work on other Linux VPS<\/a> systems as well but was tested and written for an Ubuntu 14.04 VPS<\/a>.<\/p>\n <\/p>\n <\/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 CandyCane installation.<\/p>\n Ubuntu 14.04 comes with nginx version 1.4, to install the latest stable version of Nginx version 1.8, run:<\/p>\n To install the latest stable version of PHP version 5.6 and all nessesary modules, run:<\/p>\n Composer is a dependency manager for PHP with which you can install packages. Composer will pull in all the required libraries and dependencies you need for your project.<\/p>\n Create a root directory for your CandyCane installation script using the following command:<\/p>\n Clone the project repository from GitHub:<\/p>\n Change to the directory and install composer packages:<\/p>\n Create a new PHP-FPM pool for your user:<\/p>\n Do not forget to change your_user with your username.<\/p>\n Restart PHP-FPM:<\/p>\n Create a new Nginx server block with the following content:<\/p>\n Do not forget to change your_user with your username.<\/p>\n Activate the server block by creating a symbolic link :<\/p>\n Test the Nginx configuration and restart nginx:<\/p>\n Open That\u2019s it. You have successfully installed CandyCane on your Ubuntu 14.04 VPS. For more information about how to manage your CandyCane installation, please refer to the official CandyCane documentation.<\/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<\/strong><\/span>. 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 guide, we will explain how to install CandyCane on an Ubuntu 14.04 VPS with MariaDB, PHP-FPM and Nginx. … <\/p>\nLogin to your VPS via SSH<\/h4>\n
ssh user@vps\r\n<\/code><\/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 software-properties-common unzip git curl\r\n<\/code><\/pre>\n
<\/h4>\n
Install MariaDB 10.0<\/h4>\n
[user]$ sudo apt-key adv --recv-keys --keyserver hkp:\/\/keyserver.ubuntu.com:80 0xcbcb082a1bb943db\r\n[user]$ sudo add-apt-repository 'deb http:\/\/ftp.osuosl.org\/pub\/mariadb\/repo\/10.0\/ubuntu trusty main'\r\n[user]$ sudo apt-get update\r\n[user]$ sudo apt-get install -y mariadb-server\r\n<\/code><\/pre>\n
[user]$ mysql_secure_installation\r\n<\/code><\/pre>\n
[user]$ mysql -uroot -p\r\n\r\nMariaDB [(none)]> CREATE DATABASE cc;\r\nMariaDB [(none)]> GRANT ALL PRIVILEGES ON cc.* TO 'ccuser'@'localhost' IDENTIFIED BY 'ccuser_passwd';\r\nMariaDB [(none)]> FLUSH PRIVILEGES;\r\nMariaDB [(none)]> \\q\r\n<\/code><\/pre>\n
<\/h4>\n
Install Nginx<\/h4>\n
[user]$ sudo add-apt-repository -y ppa:nginx\/stable\r\n[user]$ sudo apt-get update\r\n[user]$ sudo apt-get -y install nginx\r\n<\/code><\/pre>\n
<\/h4>\n
Install PHP, composer and required PHP modules<\/h4>\n
[user]$ sudo add-apt-repository -y ppa:ondrej\/php5-5.6\r\n[user]$ sudo apt-get update\r\n[user]$ sudo apt-get -y install php5-fpm php5-cli php5-imagick php5-mysqlnd php5-mcrypt php-pear php5-curl\r\n<\/code><\/pre>\n
[user]$ curl -sS https:\/\/getcomposer.org\/installer | php\r\n[user]$ sudo mv composer.phar \/usr\/local\/bin\/composer\r\n<\/code><\/pre>\n
<\/h4>\n
Install CandyCane<\/h4>\n
[user]$ mkdir -p ~\/myCandyCane.com\/{public_html,logs}\r\n<\/code><\/pre>\n
[user]$ git clone https:\/\/github.com\/yandod\/candycane.git ~\/myCandyCane.com\/public_html\r\n<\/code><\/pre>\n
[user]$ cd ~\/myCandyCane.com\/public_html\r\n[user]$ composer install\r\n<\/code><\/pre>\n
<\/h4>\n
PHP-FPM configuration<\/h4>\n
[user]$ sudo vim \/etc\/php5\/fpm\/pool.d\/your_user.conf\r\n\r\n[your_user]\r\nuser = your_user \r\ngroup = your_user \r\nlisten = \/var\/run\/php5-fpm-your_user.sock \r\nlisten.owner = your_user\r\nlisten.group = your_user \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\n<\/code><\/pre>\n
[user]$ sudo service php5-fpm restart\r\n<\/code><\/pre>\n
<\/h4>\n
Nginx configuration<\/h4>\n
[user]$ sudo vim \/etc\/nginx\/sites-available\/myCandyCane.com\r\n\r\nserver {\r\n server_name myCandyCane.com;\r\n listen 80;\r\n root \/home\/your_user\/myCandyCane.com\/public_html\/app\/webroot;\r\n\r\n access_log \/home\/your_user\/myCandyCane.com\/logs\/access.log;\r\n error_log \/home\/your_user\/myCandyCane.com\/logs\/error.log;\r\n\r\n index index.php;\r\n\r\n location \/ {\r\n try_files $uri $uri\/ \/index.php?$query_string;\r\n }\r\n\r\n sendfile off;\r\n\r\n location ~ \\.php$ {\r\n fastcgi_split_path_info ^(.+\\.php)(\/.+)$;\r\n fastcgi_pass unix:\/var\/run\/php5-fpm-your_user.sock;\r\n fastcgi_index index.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 }\r\n\r\n location ~ \/\\.ht {\r\n deny all;\r\n } \r\n}\r\n<\/code><\/pre>\n
[user]$ sudo ln -s \/etc\/nginx\/sites-available\/myCandyCane.com \/etc\/nginx\/sites-enabled\/myCandyCane.com\r\n<\/code><\/pre>\n
[user]$ sudo nginx -t\r\n[user]$ sudo service nginx restart\r\n<\/code><\/pre>\n
<\/h4>\n
Final steps<\/h4>\n
http:\/\/myCandyCane.com<\/code> in your favorite web browser and you should see the CandyCane install screen. Provide the database information and follow the installation wizard instructions.<\/p>\n
\n