| 1 | *********************************** |
| 2 | * Install all needed dependancies * |
| 3 | *********************************** |
| 4 | sudo apt-get install nodejs gettext postgresql-client postgresql openjdk-6-jdk openjdk-6-doc openjdk-6-source lighttpd qt4-dev-tools xsel rlwrap build-essential visitors libpg-java |
| 5 | |
| 6 | ************************************ |
| 7 | * Install and configure lighttpd * |
| 8 | ************************************ |
| 9 | Install lighttpd: |
| 10 | apt-get install lighttpd |
| 11 | |
| 12 | Create a symbolic link of '.../deployment/files/fastcgi.conf' in '/etc/lighttpd/conf-enabled/': |
| 13 | cd /etc/lighttpd/conf-enabled/ |
| 14 | ln -s /home/fred/bloatit/deployment/files/fastcgi.conf |
| 15 | |
| 16 | Create a symbolic link of '.../deployment/files/rewrite.lighttpd.conf' in '/etc/lighttpd/conf-enabled/': |
| 17 | cd /etc/lighttpd/conf-enabled/ |
| 18 | ln -s /home/fred/bloatit/deployment/files/rewrite.lighttpd.conf |
| 19 | |
| 20 | ======================== |
| 21 | = MODIFY lighttpd.conf = |
| 22 | ======================== |
| 23 | In '/etc/lighttpd/lighttpd.conf' : |
| 24 | |
| 25 | -> Modify the filed 'server.document-root' to 'www' folder in bloatit. |
| 26 | -> Example: |
| 27 | server.document-root = "/home/fred/projets/bloatit/www" |
| 28 | |
| 29 | Uncomment or add '"mod-accesslog"' in 'server.modules' |
| 30 | Uncomment or add '"mod_expire"' in 'server.modules' |
| 31 | # Note : if mod_rewrite is activated, remove or comment it |
| 32 | |
| 33 | -> Add line : |
| 34 | server.error-handler-404 = "/en/dopagenotfound" |
| 35 | |
| 36 | -> Add the following lines : |
| 37 | |
| 38 | # make an external redirect |
| 39 | # from any www.host (with www.) to the host (without www.) |
| 40 | $HTTP["host"] =~ "^www\.(.*)$" { |
| 41 | url.redirect = ( "^/(.*)" => "http://%1/$1" ) |
| 42 | } |
| 43 | |
| 44 | # Access logs |
| 45 | accesslog.filename = "/var/log/lighttpd/access.log" |
| 46 | |
| 47 | #30Mb in Kb |
| 48 | server.max-request-size= 30000 |
| 49 | |
| 50 | ====================== |
| 51 | = Restart lighttpd = |
| 52 | ====================== |
| 53 | Restart lighttpd config: |
| 54 | service lighttpd restart |
| 55 | |
| 56 | Verify the loading in logs:hibernate.cfg.xml not found |
| 57 | cat /var/log/lighttpd/error.log |
| 58 | |
| 59 | ********************** |
| 60 | * Install postgresql * |
| 61 | ********************** |
| 62 | # Install the postgresql package |
| 63 | sudo apt-get install postgresql |
| 64 | sudo apt-get install postgresql-client |
| 65 | |
| 66 | # Use the postgres User to create a new DB and a new User |
| 67 | sudo su postgres |
| 68 | psql |
| 69 | #> CREATE USER bloatit; |
| 70 | #> ALTER ROLE bloatit WITH createdb; |
| 71 | #> CREATE DATABASE bloatit OWNER bloatit; |
| 72 | #> CREATE DATABASE bloatit_test OWNER bloatit; |
| 73 | #> ALTER USER bloatit WITH ENCRYPTED PASSWORD 'passe' ; |
| 74 | #>\q |
| 75 | |
| 76 | # change the authentification method |
| 77 | vim /etc/postgresql/8.4/main/pg_hba.conf |
| 78 | # Go to the end of the file. |
| 79 | # change ident to md5 [EXCEPT FOR THE USER "postgres"] |
| 80 | |
| 81 | #leave the postgres session |
| 82 | exit |
| 83 | |
| 84 | # restart the server |
| 85 | sudo service postgresql restartliquibase-launcher.sh |
| 86 | |
| 87 | # Initialize the database |
| 88 | # go to <Project Home>/main/liquibase |
| 89 | # execute liquibase-launcher.sh update |
| 90 | cd main/liquibase |
| 91 | ./liquibase-launcher.sh update |
| 92 | |
| 93 | ************************************ |
| 94 | * Install gettext * |
| 95 | ************************************ |
| 96 | sudo apt-get install gettext |
| 97 | |
| 98 | ************************************ |
| 99 | * Configure the java server * |
| 100 | ************************************ |
| 101 | copy the files/folders from etc/ to ~/.config/bloatit/ |
| 102 | # There are value to configure, see the comments in the files. |
| 103 | |
| 104 | copy the files/folders from share/ to ~/.local/share/bloatit/ |
| 105 | |
| 106 | ************************************ |
| 107 | * Get a fake connection with bank * |
| 108 | ************************************ |
| 109 | copy pathfile file to your config path |
| 110 | cp ~/elveos/dev/etc/pathfile ~/.config/bloatit/pathfile |
| 111 | |
| 112 | edit pathfile to point to the correct URI : |
| 113 | vim ~/.config/bloatit/pathfile |
| 114 | Modify : |
| 115 | - F_DEFAULT!/home/yoann/elveos/dev/share/mercanet/parmcom.mercanet! |
| 116 | - F_PARAM!/home/yoann/elveos/dev/share/mercanet/parmcom! |
| 117 | - F_CERTIFICATE!/home/yoann/elveos/dev/share/mercanet/certif! |
| 118 | |
| 119 | where /home/yoann/elveos/dev is the root to your development folder |
| 120 | |
| 121 | ************************************ |
| 122 | * Configure access right * |
| 123 | ************************************ |
| 124 | The lighttpd process will need to read in ~/.local/share (depending of java |
| 125 | process user). You may need to run the java process with the lighttp |
| 126 | d user or |
| 127 | change the right: |
| 128 | |
| 129 | chmod 777 ~/.local |
| 130 | chmod 777 ~/.local/share |
| 131 | |
| 132 | Create directory /var/local/lucene/indexes and give write right to it. |
| 133 | sudo mkdir -p /var/local/lucene/indexes |
| 134 | sudo chmod 777 /var/local/lucene/indexes |
| 135 | |
| 136 | ************************************ |
| 137 | * Install and run * |
| 138 | ************************************ |
| 139 | mvn clean install -Dmaven.test.skip=true |
| 140 | cd main |
| 141 | mvn exec:java |
| 142 | |