This tutorial will be guiding through the installation procedure of CampaignChain. Campaign chain is an open source campaign management and marketing integration solution. With campaign chain, marketers can plan, execute, monitor and optimize campaigns in a holistic overview. In addition, developers can integrate communication tools, channels and devices with this open source platform. This tutorial will be guiding you through the simple installation of Campaign chain on a VPS server loaded with Ubuntu 16.04. This tutorial will not be explaining the configuration of Campaigns which you need to do yourself after installing the campaign chain on the server.
This tutorial includes the following steps
sudo apt-get install php (Installs PHP on your server) sudo apt-get install php-json php-curl php-pdo php-gd php-intl (Installs PHP JSON, Curl, PDO, GD and INTL modules) sudo apt-get install mysql-server (Installs MySQL server)The following lines of code will add the java pack into the repository and install it on the server.
sudo add-apt-repository -y ppa:webupd8team/java sudo apt-get update sudo apt-get -y install oracle-java8-installerTo verify the java installation, just run the following command which will list the version of java running on the server.
sudo apt-get install nodejsSubsequently, put the following command to install npm on the server
sudo apt-get install npmThe following command will be used to install bower on the server
sudo npm install -g bowerAdditionally, please install git on the server if you haven't done it earlier on your server. Just use the following command to install git on server
sudo apt-get install gitPlease use the following command to link nodejs with node. If the node directory is not available, campaign chain will throw an exception during installation.
sudo ln -s /usr/bin/nodejs /usr/bin/node
mysql -u root -pUse the following command to create a new database. Replace the "ccdatabase" with any name that you wish to use for campaign chain database
CREATE DATABASE ccdatabase;In the next step, we will create a database user. To create a database user, run the following command. Please don't forget to replace "ccuser" with the database user name of your wish and "StrongPassword@1" with a strong password of your choice.
CREATE USER 'ccuser'@'localhost' IDENTIFIED BY 'StrongPassword@1';The following command will gran full access to the created database for the user created in the above step. As usual, Please replace the database name and user name with one created above.
GRANT ALL ON ccdatabase.* TO 'ccuser'@'localhost';Release the following command to flush the privileges table
FLUSH PRIVILEGES;The below command will take you out of database command prompt
sudo curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
cd /var/www/ mkdir campaignchainPlease note that you can create a directory in any path and can use any name. Now navigate to new directory before proceeding to next step
cd campaignchainNow you are ready to install the campaign chain base system on the server. Just use the following command to install the base system.
composer create-project --stability=dev campaignchain/campaignchain campaignchain dev-masterYou can replace the bolded campaignchain with any name you wish. The usage of above command will create a new directory named campaignchain inside our already created directory campaignchain. That is the files will be now available in the path /var/www/campaignchain/campaignchain
cd campaignchainNow use the following commands one by one. The first command will clear the cache and the second one will the dump assets
sudo php app/console cache:clear --env=prod --no-debug sudo php app/console assetic:dump --env=prod --no-debug
stat --format '%a' app (replace app with the folder or file name)
crontab -e -u samadReplace samad with your username It will open the editor. Please add the following line to the file opened. Please replace /var/www/campaignchain/campaignchain with the path to your campaign chain installation folder
*/1 * * * * cd /var/www/campaignchain/campaignchain && php app/console campaignchain:scheduler --env=prod 1>/dev/null 2>/dev/nullNow Press Ctrl+O to save and hit enter when it asks for the file name confirmation. Then Ctrl+X to exit the editor
sudo php app/console server:start 18.104.22.168
http://22.214.171.124:8000/The installation windows will be loaded on the browser. There will be a possible error message that will be thrown by the installation if you haven't edited the php.ini file to set timezone. If you get the error, edit the php.ini file to set timezone using the following command
sudo vi /etc/php/7.0/cli/php.inisearch for date.timezone by using /date.timezone and replace the entire line with date.timezone = Asia/Kolkata You can change Asia/Kolkata with any other timezone. Save the configuration and restart apache using the following command
sudo systemctl restart apache2Reload the installation page and if you see the error message again after the modification, restart the PHP server using the following command. As usual, change the IP address with your IP address
sudo php app/console server:stop 126.96.36.199 sudo php app/console server:start 188.8.131.52Reload the page again to restart the installation Click on Next Step button Simply click on the "Next Step" button to install system modules and proceed to the next step In this step, Global secret key will be generated In this step, you need to input bit.ly access token. Just open https://bitly.com/a/oauth_apps to create an access token In the final step, configure the admin details for the login. Once you finish this step, the installation will take you into the login screen Login to the admin panel using the credentials used in the final step of configuration You will be taken to the campaign chain dashboard after successfully logged in to the system Hope this tutorial helped you to install campaign chain on your server. Share your experience of installing campaign chain