PageRenderTime 53ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/INSTALL.txt

https://bitbucket.org/eduardo_lago_aguilar/ittaxcodevalidator
Plain Text | 275 lines | 200 code | 75 blank | 0 comment | 0 complexity | 2e416df1ef811b14749b8364b94c53cf MD5 | raw file
Possible License(s): GPL-3.0
  1. ITTAXCODEVALIDATOR INSTALLATION GUIDE:
  2. This is the installation guide for project ittaxcodevalidator hosted at https://bitbucket.org/eduardo_lago_aguilar/ittaxcodevalidator
  3. STEPS FOR UBUNTU / DEBIAN
  4. Step #1: Install the requirements via apt-get/apt-get package manager:
  5. 1.a) Install apache2 web server:
  6. $ sudo apt-get install apache2
  7. 1.b) Enable Apache module mod_rewrite:
  8. $ sudo a2enmod rewrite
  9. $ sudo service apache2 restart
  10. or
  11. $ sudo /etc/init.d/apache2 restart
  12. 1.c) Install php and familiy:
  13. $ sudo apt-get install php5 php5-cli php5-xsl php-apc php5-xdebug php-pear php5-gd php5-mysql mysql-client
  14. 1.d) Install mysql-server
  15. $ sudo apt-get install mysql-server
  16. Step #2: Obtaining the application:
  17. 2.a) Install Mercurial Version Control System:
  18. $ sudo apt-get install mercurial
  19. 2.b) Clone the repository from bitbucket.org via mercurial,
  20. $ mkdir -p ~/www
  21. $ cd ~/www
  22. $ hg clone http://bitbucket.org/eduardo_lago_aguilar/ittaxcodevalidator
  23. the resulting structure must look like:
  24. ~/www/
  25. ittaxcodevalidator/
  26. apps/
  27. cache/
  28. config/
  29. data/
  30. extras/
  31. lib/
  32. log/
  33. plugins/
  34. test/
  35. web/
  36. INSTALL.txt
  37. README
  38. symfony
  39. behind a proxy?
  40. $ export http_proxy=http://myproxy:myport
  41. $ hg clone http://bitbucket.org/eduardo_lago_aguilar/ittaxcodevalidator
  42. Step #3: Obtaining and installing Symfony PHP Web Framework:
  43. 3.a) Download Symfony 1.4.8 from http://www.symfony-project.org/get/symfony-1.4.8.tgz and unpack it into lib/vendor/symfony:
  44. $ cd ~/www/ittaxcodevalidator
  45. $ mkdir -p lib/vendor
  46. $ cp ~/Downloads/symfony-1.4.8.tgz lib/vendor
  47. $ cd lib/vendor
  48. $ tar zxpf symfony-1.4.8.tgz
  49. $ mv symfony-1.4.8 symfony
  50. $ rm symfony-1.4.8.tgz
  51. the resulting structure must look like:
  52. ~/www/
  53. ittaxcodevalidator/
  54. apps/
  55. cache/
  56. config/
  57. data/
  58. extras/
  59. lib/
  60. vendor/symfony/
  61. data
  62. lib
  63. licenses
  64. test
  65. CHANGELOG
  66. COPYRIGHT
  67. LICENSE
  68. package.xml.tmpl
  69. README
  70. log/
  71. plugins/
  72. test/
  73. web/
  74. INSTALL.txt
  75. README
  76. symfony
  77. Step #4: Obtaining and installing PHPExcel:
  78. 4.a) Download PHPExcel 1.7.4 from http://phpexcel.codeplex.com/ and unpack it into lib/PHPExcel:
  79. $ cd ~/www/ittaxcodevalidator
  80. $ mkdir -p lib
  81. $ cp ~/Downloads/phpexcel-1.7.4.zip lib/
  82. $ cd lib
  83. $ unzip phpexcel-1.7.4.zip Classes/*
  84. $ mv Classes PHPExcel
  85. $ rm phpexcel-1.7.4.zip
  86. the resulting structure must look like:
  87. ~/www/
  88. ittaxcodevalidator/
  89. apps/
  90. cache/
  91. config/
  92. data/
  93. extras/
  94. lib/
  95. PHPExcel/
  96. PHPExcel/
  97. ...
  98. PHPExcel.php
  99. log/
  100. plugins/
  101. test/
  102. web/
  103. INSTALL.txt
  104. README
  105. symfony
  106. Step #5: Obtaining and installing Symfony's sfPhpExcelPlugin plugin:
  107. 5.a) Install the plugin via Symfony's scaffolding:
  108. $ cd ~/www/ittaxcodevalidator
  109. $ chmod +x symfony # execution permission for Symfony's scaffolding tool
  110. $ ./symfony plugin-install http://plugins.symfony-project.com/sfPhpExcelPlugin
  111. Or download the PEAR package from http://plugins.symfony-project.org/get/sfPhpExcelPlugin/sfPhpExcelPlugin-1.0.3.tgz, and install it locally:
  112. $ cd ~/www/ittaxcodevalidator
  113. $ chmod +x symfony # execution permission for Symfony's scaffolding tool
  114. $ ./symfony plugin:install ~/Downloads/sfPhpExcelPlugin-1.0.3.tgz # see http://www.symfony-project.org/plugins/sfPhpExcelPlugin for more details
  115. If you are behind a proxy and the following error is presented:
  116. Unable to register channel "pear.symfony-project.com"
  117. then config the http-proxy for pear and register the channel (See http://stackoverflow.com/questions/2266491/how-to-use-pear-behind-proxy):
  118. $ sudo pear config-set http_proxy http://username:password@yourproxy:yourport
  119. $ sudo pear channel-discover pear.symfony-project.com
  120. Step #6: Prepare and load database
  121. 6.a) Via Symfony's scaffolding (takes more time):
  122. $ cd ~/www/ittaxcodevalidator
  123. $ ./symfony doctrine:build-db
  124. If the following error message is presented:
  125. >> doctrine Creating "dev" environment "doctrine" database
  126. >> doctrine PDO Connection Error: SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO)
  127. then verify the database settings used by doctrine in the archive ~/www/ittaxcodevalidator/config/databases.yml
  128. all:
  129. doctrine:
  130. class: sfDoctrineDatabase
  131. param:
  132. dsn: 'mysql:host=localhost;dbname=ittaxcodevalidator'
  133. username: root
  134. password: null
  135. $ ./symfony doctrine:build-sql
  136. $ ./symfony doctrine:insert-sql
  137. $ ./symfony doctrine:data-load
  138. NOTE: Database settings can be found in ~/www/ittaxcodevalidator/config/databases.yml
  139. 6.b) Or via mysqldump script (takes short time):
  140. $ cd ~/www/ittaxcodevalidator
  141. $ mysqladmin -u root create ittaxcodevalidator
  142. $ mysql -u root ittaxcodevalidator < data/ittaxcodevalidator.sql
  143. Step #7: Creating and configuring an Apache site:
  144. 7.a) Set appropiated level of permissions for Apache Web Server:
  145. $ sudo chmod -R a-rwx ~/www/ittaxcodevalidator
  146. $ sudo chown -R www-data:www-data ~/www/ittaxcodevalidator
  147. $ sudo chmod -R a+rX ~/www/ittaxcodevalidator
  148. $ cd ~/www/ittaxcodevalidator
  149. $ sudo chmod -R u+w cache/ log/ web/uploads/ # writing permission for cahing, logging and uploading spreadsheets
  150. 7.b) Create the site for Apache, edit the file /etc/apache2/sites-available/ittaxcodevalidator, replace USER by some valid user name and append this content into the file:
  151. <VirtualHost *:80>
  152. ServerName www.ittaxcodevalidator.dev
  153. DocumentRoot "/home/USER/www/ittaxcodevalidator/web"
  154. DirectoryIndex index.php
  155. <Directory "/home/USER/ittaxcodevalidator/web">
  156. AllowOverride All
  157. Allow from All
  158. </Directory>
  159. Alias /sf /home/USER/ittaxcodevalidator/lib/vendor/symfony/data/web/sf
  160. <Directory "/home/USER/ittaxcodevalidator/lib/vendor/symfony/data/web/sf">
  161. AllowOverride All
  162. Allow from All
  163. </Directory>
  164. </VirtualHost>
  165. 7.c) Enable the Apache site:
  166. $ sudo a2ensite ittaxcodevalidator
  167. $ sudo service apache2 restart
  168. 7.d) Optionally register the address in your DNS server or /etc/hosts:
  169. 127.0.0.1 www.ittaxcodevalidator.dev
  170. Now you should be able to browse the application in http://www.ittaxcodevalidator.dev/frontend_dev.php or http://www.ittaxcodevalidator.dev
  171. ADMINISTRATION SETTINGS
  172. Tune up the application modifiying the php.ini configuration file and application custom files:
  173. File /etc/php/apache2/php.ini
  174. ; Maximum size of POST data that PHP will accept.
  175. ; http://php.net/post-max-size
  176. ; post_max_size = 8M
  177. post_max_size = 40M
  178. ; Maximum allowed size for uploaded files.
  179. ; http://php.net/upload-max-filesize
  180. ; upload_max_filesize = 2M
  181. upload_max_filesize = 10M
  182. ; Maximum execution time of each script, in seconds
  183. ; http://php.net/max-execution-time
  184. ; Note: This directive is hardcoded to 0 for the CLI SAPI
  185. ;max_execution_time = 30
  186. max_execution_time = 40000
  187. ; Maximum amount of memory a script may consume (128MB)
  188. ; http://php.net/memory-limit
  189. ;memory_limit = 128M
  190. memory_limit = 2048M
  191. File ~/www/ittaxcodevalidator/apps/frontend/config/app.yml
  192. all:
  193. # The maximum file size in bytes (cannot exceed upload_max_filesize in php.ini)
  194. max_spreadsheet_size: 10485760
  195. MORE
  196. - Project hosting: https://bitbucket.org/eduardo_lago_aguilar/ittaxcodevalidator
  197. - See: http://eduardo-lago.blogspot.com/2011/07/easy-one-with-symfony-mysql-doctrine.html for a complete explanation.
  198. - See: INSTALL.txt for the installation guide.
  199. AUTHOR
  200. Written by Eduardo Lago Aguilar, <eduardo.lago.aguilar@gmail.com>, http://eduardo-lago.blogspot.com/