{"_id":"577126fc4607a30e001ded3a","category":{"_id":"577126fc4607a30e001ded35","version":"577126fc4607a30e001ded34","project":"560415f00c78b00d0039b118","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-09-24T15:25:37.418Z","from_sync":false,"order":0,"slug":"installation","title":"Installation"},"__v":0,"parentDoc":null,"githubsync":"","project":"560415f00c78b00d0039b118","version":{"_id":"577126fc4607a30e001ded34","__v":1,"project":"560415f00c78b00d0039b118","createdAt":"2016-06-27T13:15:40.398Z","releaseDate":"2016-06-27T13:15:40.398Z","categories":["577126fc4607a30e001ded35","577126fc4607a30e001ded36","577126fc4607a30e001ded37","577126fc4607a30e001ded38"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.1.0","version":"1.1.0"},"user":"560415d590ee490d004404eb","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-09-24T15:43:21.811Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"Wealthbot.io is a sophisticated financial framework, therefore initial set-up requires some system administration skills and a good idea of how frameworks and database-driven web applications behave and work in general. You should be aimed with some preliminary knowledge of how to properly setup a fully-functional LAMMP stack (and what that “really” means and entails).\n\n* Linux\n* Apache\n* MySQL and MongoDB\n* PHP (Symfony 2)\n\n## Linux\n\nNowadays it’s easy and inexpensive to get your own dedicated linux server. There are many cloud providers, such as Amazon Web Services, Linode, PagodaBox or Digital Ocean to name a few.\nWebo team recommends using AWS as they are very robust, offer a multitude of services (besides just a basic web server) and overall when you need to scale your application to service thousands of clients, you won’t have to move wealthbot.io to a new hosting provider. \n\nDo NOT install Webo on a shared host or a cheap hosting provider. Wealthbot.io can probably work on such platforms, but you may run into issues with security and inability to configure certain apache or PHP modules. \n\nIf you simply wish to play around with the features, please use the provided vagrant box, which will serve as your own fully-functional development server. If so, and you simply want to demo the vagrant box sandbox…  you may run wealthbo.io perfectly well on any modern laptop. This guide is for those, who really want to install webo as a production-ready instance. \n\nWe recommend using Ubuntu or Debian, however wealthbot.io can run on any OS (including windows). As long as your OS can run PHP and allow connections to databases, you should be fine. \n\nThe LAMP stack installation is quite easy on Ubuntu:\nhttps://help.ubuntu.com/community/ApacheMySQLPHP\n\nHowever we’ll got into some details below to make sure your system has all the necessary tools and prerequisites. \n\n## Apache\n\nYou’ll need to know how to install apache and setup a virtual host. \n\nOn most ubuntu systems all you’d need to do is run:\n`sudo apt-get install apache2`\n\nAnd point your virtual host to the webroot directory of the project. \n\nAs an example, if you cloned your wealthbot.io installation into \n`/srv/www/wealthbot`\n\nYou would point your apache virtual host to:\n`/sr/www/wealthbot/web` \n\nHere’s an example file:\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<VirtualHost *:80>\\n ServerName test.wealthbot.io\\n  DocumentRoot /srv/www/wealthbot/web\\n    <Directory /srv/www/wealthbot/web>\\n        Options Indexes FollowSymLinks MultiViews\\n        AllowOverride None\\n        Order allow,deny\\n        allow from all\\n        <IfModule mod_rewrite.c>\\n            RewriteEngine On\\n            RewriteCond %{REQUEST_FILENAME} !-f\\n            RewriteRule ^(.*)$ /app_dev.php [QSA,L]\\n        </IfModule>\\n    </Directory>\\n</VirtualHost>\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nIf you are just trying things out locally you may edit your /etc/hosts file, or similar one on your system, to someting like 120.0.0.1 local.weathbot.io. \nYou should take care to make sure your ServerName matches the name you provide in your hosts file (or DNS in production).\n\nNote the line:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"RewriteRule ^(.*)$ /app_dev.php [QSA,L]\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n \nThis is a Symfony 2 setup to run in “development” mode, hence the app_dev.php. In production you’d use app.php.For more details on symfony setup, see here:\nhttp://symfony.com/doc/current/quick_tour/the_big_picture.html\n(This is for reference only, you do not need to follow the steps provided at the above link).\n\nPlease ensure that you have “mod_rewrite” enabled in your apache2 modules\n`sudo as2enmod rewrite`\n\nYou may also use Nginx as your server, the setup should be similar to the virtual host above. You need to ensure that webroot is pointed to the right directly and your nginx can serve PHP files and properly forward requests from app.php or app_dev.php\n\n## Databases (MySQL / MongoDB)\n\nSetting up databases for webo is easy. The only thing you need to take care of is to make sure you have both databases installed. And you MUST install the php-mongo driver:\nhttps://github.com/mongodb/mongo-php-driver\n\nIn most cases to install the MySQL DB is as easy as to run the following commands:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"sudo apt-get install mysql-client-core-5.5 \\nsudo apt-get install mysql-server-core-5.5\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nMongo installation is a little more involved:\nhttps://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/\n\nAnd for this reason we recommend going with a provider like mongolabs who take care of the all hard work for you. They have some reasonably priced and free starter plans. \n\n## PHP\n\nWe recommend using the latest PHP 5.6.x version (at the time of writing). \n\nA few PHP modules will need to be installed for wealthbot to be fully functional.\n\n* PHP mongo driver v1.6 or higher\n* ImageMagick library\n* PHP-apc\n\nNote, if you are encountering strange errors after installation, we recommend that you create an info.php file with simple <?php echo php_info(); ?> (or use php -i and grep).\nThis way you can easily see which modules are available and enabled as well as their corresponding settings. \n\n## Symfony 2 and Wealthbot.io\n\nWealthbot.io is written on top of a very flexible and sophistacted PHP MVC frmework -- Symfony 2.\n\nAfter setting up your LAMMP stack and cloning the wealthbot.io repository you will need to run a few commands to finalize the setup of the Webo application. At this point we will leverage a toolset from Symfony2 as well as composer to perform final installation tasks. \n\nComposer is a popular dependency and package manager for PHP projects, it’s very easy to setup and install. Just follow the two-command example here:\n\nhttps://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx\n\nAt this point your web server, databases, necessary php modules and composer are all installed and functional. You have cloned the wealthbot.io repository to your server and now we are ready to populate our databases with some seed data (to login and play around wtih features). \n\nTo get started with the actual wealthbot application, let’s run the following commands\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"cd /srv/wealthbot\\ncomposer clear-cache\\ncomposer install --prefer-source\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n\nThis will use composer to pull down the necessary set of packages and PHP libraries to bring the application to life. \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"app/console doctrine:database:create\\napp/console doctrine:schema:create\\napp/console doctrine:fixtures:load\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nThe above commands will setup database structure, create the schema and load the necessary seed data to start playing with some features of the wealthbo.io platfom.\n\n### The end. \n\nNow you should have a fully functional wealthbot.io installation running on top of LAMMP stack.\n\n### Next steps.\n\nWe recommend that you ensure the following security protocols.\n\n  * Make sure all systems tests are passing\n  * Ensure SSL encryption in your web site testing\n  * If possible, secure backend portion of the welathbot.io behind a VPC/VPN\n  * Enlist a 3rd party verification service anyone from mcafee to fair isaaks to kpmg to do a security audit of your system. As any ethical and financially responsible business, this is common practice. It also very common place in healthcare and ecommerce industries. Although wealthbo.io does not perform any financial transactions, a lot of sensitive personal data, such as social security numers are stored in the webo database, therefore extra caution is urged when protecting this data\n  * Use a Load Balancer. Although you can comfortoably run wealthbo.io on a single server, when in production it is always a good idea to have at least two web servers for failover purposes. It is worth $100/month (based on average pricing nowadays) to ensure your systems do not go down if one server fails for whatever reason.\n  * Likewise when using databases it is highly recommended not only to take extra steps in securing them, but also to use failover and replica capabilities of both MySQL and MongoDB to to ensure system stability","excerpt":"Caution: sysadmin and programming skills required.","slug":"production-install","type":"basic","title":"Production Install"}

Production Install

Caution: sysadmin and programming skills required.

Wealthbot.io is a sophisticated financial framework, therefore initial set-up requires some system administration skills and a good idea of how frameworks and database-driven web applications behave and work in general. You should be aimed with some preliminary knowledge of how to properly setup a fully-functional LAMMP stack (and what that “really” means and entails). * Linux * Apache * MySQL and MongoDB * PHP (Symfony 2) ## Linux Nowadays it’s easy and inexpensive to get your own dedicated linux server. There are many cloud providers, such as Amazon Web Services, Linode, PagodaBox or Digital Ocean to name a few. Webo team recommends using AWS as they are very robust, offer a multitude of services (besides just a basic web server) and overall when you need to scale your application to service thousands of clients, you won’t have to move wealthbot.io to a new hosting provider. Do NOT install Webo on a shared host or a cheap hosting provider. Wealthbot.io can probably work on such platforms, but you may run into issues with security and inability to configure certain apache or PHP modules. If you simply wish to play around with the features, please use the provided vagrant box, which will serve as your own fully-functional development server. If so, and you simply want to demo the vagrant box sandbox… you may run wealthbo.io perfectly well on any modern laptop. This guide is for those, who really want to install webo as a production-ready instance. We recommend using Ubuntu or Debian, however wealthbot.io can run on any OS (including windows). As long as your OS can run PHP and allow connections to databases, you should be fine. The LAMP stack installation is quite easy on Ubuntu: https://help.ubuntu.com/community/ApacheMySQLPHP However we’ll got into some details below to make sure your system has all the necessary tools and prerequisites. ## Apache You’ll need to know how to install apache and setup a virtual host. On most ubuntu systems all you’d need to do is run: `sudo apt-get install apache2` And point your virtual host to the webroot directory of the project. As an example, if you cloned your wealthbot.io installation into `/srv/www/wealthbot` You would point your apache virtual host to: `/sr/www/wealthbot/web` Here’s an example file: [block:code] { "codes": [ { "code": "<VirtualHost *:80>\n ServerName test.wealthbot.io\n DocumentRoot /srv/www/wealthbot/web\n <Directory /srv/www/wealthbot/web>\n Options Indexes FollowSymLinks MultiViews\n AllowOverride None\n Order allow,deny\n allow from all\n <IfModule mod_rewrite.c>\n RewriteEngine On\n RewriteCond %{REQUEST_FILENAME} !-f\n RewriteRule ^(.*)$ /app_dev.php [QSA,L]\n </IfModule>\n </Directory>\n</VirtualHost>", "language": "text" } ] } [/block] If you are just trying things out locally you may edit your /etc/hosts file, or similar one on your system, to someting like 120.0.0.1 local.weathbot.io. You should take care to make sure your ServerName matches the name you provide in your hosts file (or DNS in production). Note the line: [block:code] { "codes": [ { "code": "RewriteRule ^(.*)$ /app_dev.php [QSA,L]", "language": "text" } ] } [/block] This is a Symfony 2 setup to run in “development” mode, hence the app_dev.php. In production you’d use app.php.For more details on symfony setup, see here: http://symfony.com/doc/current/quick_tour/the_big_picture.html (This is for reference only, you do not need to follow the steps provided at the above link). Please ensure that you have “mod_rewrite” enabled in your apache2 modules `sudo as2enmod rewrite` You may also use Nginx as your server, the setup should be similar to the virtual host above. You need to ensure that webroot is pointed to the right directly and your nginx can serve PHP files and properly forward requests from app.php or app_dev.php ## Databases (MySQL / MongoDB) Setting up databases for webo is easy. The only thing you need to take care of is to make sure you have both databases installed. And you MUST install the php-mongo driver: https://github.com/mongodb/mongo-php-driver In most cases to install the MySQL DB is as easy as to run the following commands: [block:code] { "codes": [ { "code": "sudo apt-get install mysql-client-core-5.5 \nsudo apt-get install mysql-server-core-5.5", "language": "text" } ] } [/block] Mongo installation is a little more involved: https://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/ And for this reason we recommend going with a provider like mongolabs who take care of the all hard work for you. They have some reasonably priced and free starter plans. ## PHP We recommend using the latest PHP 5.6.x version (at the time of writing). A few PHP modules will need to be installed for wealthbot to be fully functional. * PHP mongo driver v1.6 or higher * ImageMagick library * PHP-apc Note, if you are encountering strange errors after installation, we recommend that you create an info.php file with simple <?php echo php_info(); ?> (or use php -i and grep). This way you can easily see which modules are available and enabled as well as their corresponding settings. ## Symfony 2 and Wealthbot.io Wealthbot.io is written on top of a very flexible and sophistacted PHP MVC frmework -- Symfony 2. After setting up your LAMMP stack and cloning the wealthbot.io repository you will need to run a few commands to finalize the setup of the Webo application. At this point we will leverage a toolset from Symfony2 as well as composer to perform final installation tasks. Composer is a popular dependency and package manager for PHP projects, it’s very easy to setup and install. Just follow the two-command example here: https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx At this point your web server, databases, necessary php modules and composer are all installed and functional. You have cloned the wealthbot.io repository to your server and now we are ready to populate our databases with some seed data (to login and play around wtih features). To get started with the actual wealthbot application, let’s run the following commands [block:code] { "codes": [ { "code": "cd /srv/wealthbot\ncomposer clear-cache\ncomposer install --prefer-source", "language": "text" } ] } [/block] This will use composer to pull down the necessary set of packages and PHP libraries to bring the application to life. [block:code] { "codes": [ { "code": "app/console doctrine:database:create\napp/console doctrine:schema:create\napp/console doctrine:fixtures:load", "language": "text" } ] } [/block] The above commands will setup database structure, create the schema and load the necessary seed data to start playing with some features of the wealthbo.io platfom. ### The end. Now you should have a fully functional wealthbot.io installation running on top of LAMMP stack. ### Next steps. We recommend that you ensure the following security protocols. * Make sure all systems tests are passing * Ensure SSL encryption in your web site testing * If possible, secure backend portion of the welathbot.io behind a VPC/VPN * Enlist a 3rd party verification service anyone from mcafee to fair isaaks to kpmg to do a security audit of your system. As any ethical and financially responsible business, this is common practice. It also very common place in healthcare and ecommerce industries. Although wealthbo.io does not perform any financial transactions, a lot of sensitive personal data, such as social security numers are stored in the webo database, therefore extra caution is urged when protecting this data * Use a Load Balancer. Although you can comfortoably run wealthbo.io on a single server, when in production it is always a good idea to have at least two web servers for failover purposes. It is worth $100/month (based on average pricing nowadays) to ensure your systems do not go down if one server fails for whatever reason. * Likewise when using databases it is highly recommended not only to take extra steps in securing them, but also to use failover and replica capabilities of both MySQL and MongoDB to to ensure system stability