/INSTALL.txt
Plain Text | 275 lines | 200 code | 75 blank | 0 comment | 0 complexity | 2e416df1ef811b14749b8364b94c53cf MD5 | raw file
Possible License(s): GPL-3.0
- ITTAXCODEVALIDATOR INSTALLATION GUIDE:
- This is the installation guide for project ittaxcodevalidator hosted at https://bitbucket.org/eduardo_lago_aguilar/ittaxcodevalidator
- STEPS FOR UBUNTU / DEBIAN
- Step #1: Install the requirements via apt-get/apt-get package manager:
-
- 1.a) Install apache2 web server:
-
- $ sudo apt-get install apache2
-
- 1.b) Enable Apache module mod_rewrite:
-
- $ sudo a2enmod rewrite
- $ sudo service apache2 restart
- or
- $ sudo /etc/init.d/apache2 restart
-
- 1.c) Install php and familiy:
-
- $ sudo apt-get install php5 php5-cli php5-xsl php-apc php5-xdebug php-pear php5-gd php5-mysql mysql-client
-
- 1.d) Install mysql-server
-
- $ sudo apt-get install mysql-server
- Step #2: Obtaining the application:
- 2.a) Install Mercurial Version Control System:
- $ sudo apt-get install mercurial
- 2.b) Clone the repository from bitbucket.org via mercurial,
- $ mkdir -p ~/www
- $ cd ~/www
- $ hg clone http://bitbucket.org/eduardo_lago_aguilar/ittaxcodevalidator
- the resulting structure must look like:
- ~/www/
- ittaxcodevalidator/
- apps/
- cache/
- config/
- data/
- extras/
- lib/
- log/
- plugins/
- test/
- web/
- INSTALL.txt
- README
- symfony
- behind a proxy?
- $ export http_proxy=http://myproxy:myport
- $ hg clone http://bitbucket.org/eduardo_lago_aguilar/ittaxcodevalidator
-
- Step #3: Obtaining and installing Symfony PHP Web Framework:
- 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:
- $ cd ~/www/ittaxcodevalidator
- $ mkdir -p lib/vendor
- $ cp ~/Downloads/symfony-1.4.8.tgz lib/vendor
- $ cd lib/vendor
- $ tar zxpf symfony-1.4.8.tgz
- $ mv symfony-1.4.8 symfony
- $ rm symfony-1.4.8.tgz
- the resulting structure must look like:
- ~/www/
- ittaxcodevalidator/
- apps/
- cache/
- config/
- data/
- extras/
- lib/
- vendor/symfony/
- data
- lib
- licenses
- test
- CHANGELOG
- COPYRIGHT
- LICENSE
- package.xml.tmpl
- README
- log/
- plugins/
- test/
- web/
- INSTALL.txt
- README
- symfony
-
- Step #4: Obtaining and installing PHPExcel:
- 4.a) Download PHPExcel 1.7.4 from http://phpexcel.codeplex.com/ and unpack it into lib/PHPExcel:
- $ cd ~/www/ittaxcodevalidator
- $ mkdir -p lib
- $ cp ~/Downloads/phpexcel-1.7.4.zip lib/
- $ cd lib
- $ unzip phpexcel-1.7.4.zip Classes/*
- $ mv Classes PHPExcel
- $ rm phpexcel-1.7.4.zip
- the resulting structure must look like:
- ~/www/
- ittaxcodevalidator/
- apps/
- cache/
- config/
- data/
- extras/
- lib/
- PHPExcel/
- PHPExcel/
- ...
- PHPExcel.php
- log/
- plugins/
- test/
- web/
- INSTALL.txt
- README
- symfony
-
- Step #5: Obtaining and installing Symfony's sfPhpExcelPlugin plugin:
- 5.a) Install the plugin via Symfony's scaffolding:
- $ cd ~/www/ittaxcodevalidator
- $ chmod +x symfony # execution permission for Symfony's scaffolding tool
- $ ./symfony plugin-install http://plugins.symfony-project.com/sfPhpExcelPlugin
- Or download the PEAR package from http://plugins.symfony-project.org/get/sfPhpExcelPlugin/sfPhpExcelPlugin-1.0.3.tgz, and install it locally:
-
- $ cd ~/www/ittaxcodevalidator
- $ chmod +x symfony # execution permission for Symfony's scaffolding tool
- $ ./symfony plugin:install ~/Downloads/sfPhpExcelPlugin-1.0.3.tgz # see http://www.symfony-project.org/plugins/sfPhpExcelPlugin for more details
- If you are behind a proxy and the following error is presented:
- Unable to register channel "pear.symfony-project.com"
- then config the http-proxy for pear and register the channel (See http://stackoverflow.com/questions/2266491/how-to-use-pear-behind-proxy):
- $ sudo pear config-set http_proxy http://username:password@yourproxy:yourport
- $ sudo pear channel-discover pear.symfony-project.com
-
- Step #6: Prepare and load database
- 6.a) Via Symfony's scaffolding (takes more time):
-
- $ cd ~/www/ittaxcodevalidator
- $ ./symfony doctrine:build-db
- If the following error message is presented:
- >> doctrine Creating "dev" environment "doctrine" database
- >> doctrine PDO Connection Error: SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO)
- then verify the database settings used by doctrine in the archive ~/www/ittaxcodevalidator/config/databases.yml
- all:
- doctrine:
- class: sfDoctrineDatabase
- param:
- dsn: 'mysql:host=localhost;dbname=ittaxcodevalidator'
- username: root
- password: null
-
- $ ./symfony doctrine:build-sql
- $ ./symfony doctrine:insert-sql
- $ ./symfony doctrine:data-load
- NOTE: Database settings can be found in ~/www/ittaxcodevalidator/config/databases.yml
- 6.b) Or via mysqldump script (takes short time):
- $ cd ~/www/ittaxcodevalidator
- $ mysqladmin -u root create ittaxcodevalidator
- $ mysql -u root ittaxcodevalidator < data/ittaxcodevalidator.sql
- Step #7: Creating and configuring an Apache site:
- 7.a) Set appropiated level of permissions for Apache Web Server:
- $ sudo chmod -R a-rwx ~/www/ittaxcodevalidator
- $ sudo chown -R www-data:www-data ~/www/ittaxcodevalidator
- $ sudo chmod -R a+rX ~/www/ittaxcodevalidator
- $ cd ~/www/ittaxcodevalidator
- $ sudo chmod -R u+w cache/ log/ web/uploads/ # writing permission for cahing, logging and uploading spreadsheets
- 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:
- <VirtualHost *:80>
- ServerName www.ittaxcodevalidator.dev
- DocumentRoot "/home/USER/www/ittaxcodevalidator/web"
- DirectoryIndex index.php
- <Directory "/home/USER/ittaxcodevalidator/web">
- AllowOverride All
- Allow from All
- </Directory>
- Alias /sf /home/USER/ittaxcodevalidator/lib/vendor/symfony/data/web/sf
- <Directory "/home/USER/ittaxcodevalidator/lib/vendor/symfony/data/web/sf">
- AllowOverride All
- Allow from All
- </Directory>
- </VirtualHost>
- 7.c) Enable the Apache site:
- $ sudo a2ensite ittaxcodevalidator
- $ sudo service apache2 restart
- 7.d) Optionally register the address in your DNS server or /etc/hosts:
- 127.0.0.1 www.ittaxcodevalidator.dev
- Now you should be able to browse the application in http://www.ittaxcodevalidator.dev/frontend_dev.php or http://www.ittaxcodevalidator.dev
- ADMINISTRATION SETTINGS
- Tune up the application modifiying the php.ini configuration file and application custom files:
- File /etc/php/apache2/php.ini
- ; Maximum size of POST data that PHP will accept.
- ; http://php.net/post-max-size
- ; post_max_size = 8M
- post_max_size = 40M
- ; Maximum allowed size for uploaded files.
- ; http://php.net/upload-max-filesize
- ; upload_max_filesize = 2M
- upload_max_filesize = 10M
- ; Maximum execution time of each script, in seconds
- ; http://php.net/max-execution-time
- ; Note: This directive is hardcoded to 0 for the CLI SAPI
- ;max_execution_time = 30
- max_execution_time = 40000
- ; Maximum amount of memory a script may consume (128MB)
- ; http://php.net/memory-limit
- ;memory_limit = 128M
- memory_limit = 2048M
- File ~/www/ittaxcodevalidator/apps/frontend/config/app.yml
- all:
- # The maximum file size in bytes (cannot exceed upload_max_filesize in php.ini)
- max_spreadsheet_size: 10485760
- MORE
- - Project hosting: https://bitbucket.org/eduardo_lago_aguilar/ittaxcodevalidator
- - See: http://eduardo-lago.blogspot.com/2011/07/easy-one-with-symfony-mysql-doctrine.html for a complete explanation.
- - See: INSTALL.txt for the installation guide.
- AUTHOR
- Written by Eduardo Lago Aguilar, <eduardo.lago.aguilar@gmail.com>, http://eduardo-lago.blogspot.com/