Wiki source code of Alfresco Community 5.x Install Cookbook
Last modified by Normann P. Nielsen on 2016/12/07 21:31
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{success}}Review the upgrades: | ||
| 2 | |||
| 3 | [[Upgrade 5.0.0 to 5.0.d>>Main.information-technology.alfresco.alfresco-community-5-x-install-cookbook.upgrade-5-0-0-to-5-0-d]] and [[Upgrade 5.0.d to 5.1>>Main.information-technology.alfresco.alfresco-community-5-x-install-cookbook.upgrade-5-0-d-to-5-1]] and [[Upgrade 5.1 to 201605>>Main.information-technology.alfresco.alfresco-community-5-x-install-cookbook.upgrade-5-1-to-201605]] | ||
| 4 | |||
| 5 | Or the newer [[Alfresco Community 5.x Install Cookbook (Ubuntu 16.04)>>Main.information-technology.alfresco.alfresco-community-5-x-install-cookbook-ubuntu-16-04]]{{/success}} | ||
| 6 | |||
| 7 | |||
| 8 | |||
| 9 | {{toc/}} | ||
| 10 | |||
| 11 | [[http://docs.alfresco.com/community/concepts/welcome-infocenter_community.html]] | ||
| 12 | |||
| 13 | {{error}}Alfresco comes with Postgres by default, but I prefer MySQL - hence this guide is for MySQL{{/error}} | ||
| 14 | |||
| 15 | |||
| 16 | |||
| 17 | = Requirements = | ||
| 18 | |||
| 19 | === Alfreco === | ||
| 20 | See link for newest requirements | ||
| 21 | |||
| 22 | === OS and Hardware Settings === | ||
| 23 | **Virtual: **Why not - the benefist are huge | ||
| 24 | |||
| 25 | **Preferred OS:** Ubuntu LTS 64-bit (this is for a 14.04) | ||
| 26 | |||
| 27 | **Hardware:** At least 2 CPU's and at least 4 GB Ram | ||
| 28 | |||
| 29 | |||
| 30 | |||
| 31 | === Libs === | ||
| 32 | Different Libs for image support (ImageMagick), SWFTools (Flash), etc | ||
| 33 | |||
| 34 | |||
| 35 | {{code}} | ||
| 36 | sudo apt-get install mysql-server ImageMagick GhostScript smbclient libjpeg62 libgif4 | ||
| 37 | sudo add-apt-repository ppa:jon-severinsson/ffmpeg | ||
| 38 | sudo apt-get update | ||
| 39 | sudo apt-get install ffmpeg | ||
| 40 | |||
| 41 | sudo apt-get install libart-2.0-2 | ||
| 42 | wget http://archive.canonical.com/ubuntu/pool/partner/s/swftools/swftools_0.9.0-0ubuntu2_amd64.deb | ||
| 43 | chmod a+x swftools_0.9.0-0ubuntu2_amd64.deb | ||
| 44 | sudo dpkg -i swftools_0.9.0-0ubuntu2_amd64.deb | ||
| 45 | sudo rm swftools_0.9.0-0ubuntu2_amd64.deb | ||
| 46 | {{/code}} | ||
| 47 | |||
| 48 | === LibreOffice === | ||
| 49 | |||
| 50 | {{code}} | ||
| 51 | sudo apt-get install libreoffice | ||
| 52 | sudo apt-get install ttf-mscorefonts-installer fonts-droid | ||
| 53 | {{/code}} | ||
| 54 | |||
| 55 | |||
| 56 | |||
| 57 | === Mail === | ||
| 58 | SMTP Access for sending mail | ||
| 59 | |||
| 60 | IMAP Access for picking up mail | ||
| 61 | |||
| 62 | |||
| 63 | |||
| 64 | = Installation = | ||
| 65 | |||
| 66 | === Prepare database === | ||
| 67 | Create the Database | ||
| 68 | |||
| 69 | |||
| 70 | {{code}} | ||
| 71 | mysql> CREATE DATABASE alfresco CHARACTER SET utf8 COLLATE utf8_bin; | ||
| 72 | Query OK, 1 row affected (0.00 sec) | ||
| 73 | mysql> GRANT ALL on alfresco .* to alfresco@localhost identified by '******'; | ||
| 74 | Query OK, 0 rows affected (0.00 sec) | ||
| 75 | mysql> | ||
| 76 | {{/code}} | ||
| 77 | |||
| 78 | === Install binaries === | ||
| 79 | Download Alfreco from [[http://www.alfresco.com/products/community]] | ||
| 80 | |||
| 81 | For the binary installer, JAVA is integrated. | ||
| 82 | |||
| 83 | MySQL Driver is at [[http://dev.mysql.com/downloads/connector/j/]] | ||
| 84 | |||
| 85 | |||
| 86 | {{code}} | ||
| 87 | chmod +x alfresco-community-5.0.c-installer-linux-x64.bin | ||
| 88 | ./alfresco-community-5.0.c-installer-linux-x64.bin | ||
| 89 | |||
| 90 | Language Selection | ||
| 91 | Please select the installation language | ||
| 92 | [1] English - English | ||
| 93 | [2] French - Français | ||
| 94 | [3] Spanish - Español | ||
| 95 | [4] Italian - Italiano | ||
| 96 | [5] German - Deutsch | ||
| 97 | [6] Japanese - ??? | ||
| 98 | [7] Dutch - Nederlands | ||
| 99 | [8] Russian - ??????? | ||
| 100 | [9] Simplified Chinese - ???? | ||
| 101 | [10] Norwegian - Norsk bokmål | ||
| 102 | [11] Brazilian Portuguese - Português Brasileiro | ||
| 103 | Please choose an option [1] : 1 | ||
| 104 | ---------------------------------------------------------------------------- | ||
| 105 | Welcome to the Alfresco Community Setup Wizard. | ||
| 106 | ---------------------------------------------------------------------------- | ||
| 107 | Installation Type | ||
| 108 | [1] Easy - Installs servers with the default configuration | ||
| 109 | [2] Advanced - Configures server ports and service properties.: Also choose optional components to install. | ||
| 110 | Please choose an option [1] : 2 | ||
| 111 | ---------------------------------------------------------------------------- | ||
| 112 | Select the components you want to install; clear the components you do not want | ||
| 113 | to install. Click Next when you are ready to continue. | ||
| 114 | Java [Y/n] : | ||
| 115 | PostgreSQL [Y/n] :n | ||
| 116 | Alfresco : Y (Cannot be edited) | ||
| 117 | Solr1 [y/N] : | ||
| 118 | Solr4 [Y/n] : | ||
| 119 | SharePoint [Y/n] : | ||
| 120 | Web Quick Start [y/N] : | ||
| 121 | Google Docs Integration [Y/n] : | ||
| 122 | LibreOffice [Y/n] : | ||
| 123 | Is the selection above correct? [Y/n]: | ||
| 124 | |||
| 125 | ---------------------------------------------------------------------------- | ||
| 126 | Installation Folder | ||
| 127 | Please choose a folder to install Alfresco Community | ||
| 128 | Select a folder [/opt/alfresco-5.0.c]: /opt/alfresco | ||
| 129 | ---------------------------------------------------------------------------- | ||
| 130 | Database Configuration | ||
| 131 | JDBC URL: [jdbc:postgresql://localhost/alfresco]: jdbc:mysql://localhost/alfresco | ||
| 132 | JDBC Driver: [org.postgresql.Driver]: com.mysql.jdbc.Driver | ||
| 133 | Database name: [alfresco]: | ||
| 134 | Username: []: alfresco | ||
| 135 | Password: : | ||
| 136 | Verify: : | ||
| 137 | ---------------------------------------------------------------------------- | ||
| 138 | Tomcat Port Configuration | ||
| 139 | Please enter the Tomcat configuration parameters you wish to use. | ||
| 140 | Web Server domain: [127.0.0.1]: | ||
| 141 | Tomcat Server Port: [8080]: | ||
| 142 | Tomcat Shutdown Port: [8005]: | ||
| 143 | Tomcat SSL Port [8443]: | ||
| 144 | Tomcat AJP Port: [8009]: | ||
| 145 | ---------------------------------------------------------------------------- | ||
| 146 | Alfresco FTP Port | ||
| 147 | Please choose a port number to use for the integrated Alfresco FTP server. | ||
| 148 | Port: [21]: | ||
| 149 | ---------------------------------------------------------------------------- | ||
| 150 | Alfresco RMI Port | ||
| 151 | Please choose a port number for Alfresco to use to execute remote commands. | ||
| 152 | Port: [50500]: | ||
| 153 | ---------------------------------------------------------------------------- | ||
| 154 | Admin Password | ||
| 155 | Please give a password to use for the Alfresco administrator account. | ||
| 156 | Admin Password: : | ||
| 157 | Repeat Password: : | ||
| 158 | ---------------------------------------------------------------------------- | ||
| 159 | Alfresco SharePoint Port | ||
| 160 | Please choose a port number for the SharePoint protocol. | ||
| 161 | Port: [7070]: | ||
| 162 | ---------------------------------------------------------------------------- | ||
| 163 | Install as a service | ||
| 164 | You can optionally register Alfresco Community as a service. This way it will | ||
| 165 | automatically be started every time the machine is started. | ||
| 166 | Install Alfresco Community as a service? [Y/n]: | ||
| 167 | |||
| 168 | ---------------------------------------------------------------------------- | ||
| 169 | LibreOffice Server Port | ||
| 170 | Please enter the port that the Libreoffice Server will listen to by default. | ||
| 171 | LibreOffice Server Port [8100]: | ||
| 172 | ---------------------------------------------------------------------------- | ||
| 173 | Warning! | ||
| 174 | This environment is not configured optimally for Alfresco - please carefully | ||
| 175 | review this list before continuing. | ||
| 176 | While these issues will not prevent Alfresco from functioning, some product | ||
| 177 | features may be unavailable, or the system may not perform optimally. | ||
| 178 | Insufficient system RAM (4.0GB+): 3.86GB | ||
| 179 | Press [Enter] to continue: | ||
| 180 | ---------------------------------------------------------------------------- | ||
| 181 | Setup is now ready to begin installing Alfresco Community on your computer. | ||
| 182 | Do you want to continue? [Y/n]: | ||
| 183 | ---------------------------------------------------------------------------- | ||
| 184 | Please wait while Setup installs Alfresco Community on your computer. | ||
| 185 | Installing | ||
| 186 | 0% ______________ 50% ______________ 100% | ||
| 187 | Installing | ||
| 188 | 0% ______________ 50% ______________ 100% | ||
| 189 | ######################################### | ||
| 190 | ---------------------------------------------------------------------------- | ||
| 191 | Setup has finished installing Alfresco Community on your computer. | ||
| 192 | View Readme File [Y/n]: n | ||
| 193 | Launch Alfresco Community Share [Y/n]: n | ||
| 194 | root@afserver:~# | ||
| 195 | |||
| 196 | {{/code}} | ||
| 197 | |||
| 198 | |||
| 199 | |||
| 200 | If You use MySQL, we need to copy in the driver (get it [[here>>http://dev.mysql.com/downloads/connector/j/]]) first to /opt/alfresco/tomcat/lib: | ||
| 201 | |||
| 202 | |||
| 203 | {{code}} | ||
| 204 | sudo cp mysql-connector-java-5.1.34-bin.jar /opt/alfresco/tomcat/lib | ||
| 205 | {{/code}} | ||
| 206 | |||
| 207 | Then start alfresco: | ||
| 208 | |||
| 209 | |||
| 210 | {{code}} | ||
| 211 | sudo /etc/init.d/alfresco start | ||
| 212 | |||
| 213 | Using CATALINA_BASE: /opt/alfresco/tomcat | ||
| 214 | Using CATALINA_HOME: /opt/alfresco/tomcat | ||
| 215 | Using CATALINA_TMPDIR: /opt/alfresco/tomcat/temp | ||
| 216 | Using JRE_HOME: /opt/alfresco/java | ||
| 217 | Using CLASSPATH: /opt/alfresco/tomcat/bin/bootstrap.jar:/opt/alfresco/tomcat/bin/tomcat-juli.jar | ||
| 218 | Using CATALINA_PID: /opt/alfresco/tomcat/temp/catalina.pid | ||
| 219 | Tomcat started. | ||
| 220 | /opt/alfresco/tomcat/scripts/ctl.sh : tomcat started | ||
| 221 | root@myserver:~# | ||
| 222 | {{/code}} | ||
| 223 | |||
| 224 | See everything is ok: | ||
| 225 | |||
| 226 | |||
| 227 | {{code}} | ||
| 228 | root@myserver:~# tail -f /opt/alfresco/tomcat/logs/catalina.out | ||
| 229 | {{/code}} | ||
| 230 | |||
| 231 | If the database bootstrap fails due to Driver failure, Yo will see: | ||
| 232 | |||
| 233 | |||
| 234 | {{code language="FadeToGrey"}} | ||
| 235 | Caused by: java.lang.RuntimeException: Database connection failed: Cannot create JDBC driver of class 'com.mysql.jdbc.Driver' for connect URL 'jdbc:mysql:localhost/alfresco' | ||
| 236 | {{/code}} | ||
| 237 | |||
| 238 | === Restart install === | ||
| 239 | Easiest way to restart setup is to kill the java process and remove the install dir: | ||
| 240 | |||
| 241 | |||
| 242 | {{code}} | ||
| 243 | killall -9 java | ||
| 244 | rm -rf /opt/alfresco | ||
| 245 | {{/code}} | ||
| 246 | |||
| 247 | |||
| 248 | |||
| 249 | = Postinstall = | ||
| 250 | |||
| 251 | Also review [[http://docs.alfresco.com/community/concepts/prereq-opt-install.html]] | ||
| 252 | |||
| 253 | === **Move data** === | ||
| 254 | You can move the data dir /opt/alfresco/alf_data to another location (Renaming is not recommeded, the "alf_data" name is in several config files allover) | ||
| 255 | |||
| 256 | |||
| 257 | {{code}} | ||
| 258 | /etc/init.d/alfresco stop | ||
| 259 | cd /opt/alfresco/ | ||
| 260 | mv alf_data /data/ | ||
| 261 | ln -s /data/alf_data . | ||
| 262 | /etc/init.d/alfresco start | ||
| 263 | {{/code}} | ||
| 264 | |||
| 265 | === **Correct Paths** === | ||
| 266 | Edit the /opt/alfresco/shared/classes/alfresco-global.properties and check paths | ||
| 267 | |||
| 268 | === Enable CIFS === | ||
| 269 | Edit the /opt/alfresco/shared/classes/alfresco-global.properties | ||
| 270 | |||
| 271 | |||
| 272 | {{code}} | ||
| 273 | ## CIFS ## | ||
| 274 | cifs.disableNativeCode=false | ||
| 275 | cifs.enabled=true | ||
| 276 | cifs.serverName=alfresco.myserver.dk | ||
| 277 | cifs.domain=MYSERVER | ||
| 278 | cifs.hostannounce=true | ||
| 279 | cifs.sessionTimeout=500 | ||
| 280 | cifs.ipv6.enabled=false | ||
| 281 | cifs.tcpipSMB.port=445 | ||
| 282 | cifs.netBIOSSMB.namePort=137 | ||
| 283 | cifs.netBIOSSMB.datagramPort=138 | ||
| 284 | cifs.netBIOSSMB.sessionPort=139 | ||
| 285 | cifs.WINS.autoDetectEnabled=true | ||
| 286 | {{/code}} | ||
| 287 | |||
| 288 | === Test CIFS === | ||
| 289 | With the SMB Client You can test and browse: | ||
| 290 | |||
| 291 | |||
| 292 | {{code}} | ||
| 293 | root@myserver: smbclient -U admin \\\\127.0.0.1\\alfresco | ||
| 294 | Enter admin's password: | ||
| 295 | Domain=[MOS-EISLEY] OS=[Java] Server=[Alfresco CIFS Server 6.0.0] | ||
| 296 | smb: \> ls | ||
| 297 | . D 0 Tue Feb 26 18:39:48 2013 | ||
| 298 | .. D 0 Tue Feb 26 18:39:48 2013 | ||
| 299 | __ShowDetails.exe 393216 Tue Feb 26 18:00:58 2013 | ||
| 300 | __CheckInOut.exe 393216 Tue Feb 26 18:00:58 2013 | ||
| 301 | __Alfresco.url 131 Tue Feb 26 18:00:58 2013 | ||
| 302 | Data Dictionary D 0 Tue Feb 26 08:10:23 2013 | ||
| 303 | Guest Home D 0 Tue Feb 26 08:10:10 2013 | ||
| 304 | User Homes D 0 Tue Feb 26 13:28:42 2013 | ||
| 305 | Imap Attachments D 0 Tue Feb 26 08:10:44 2013 | ||
| 306 | Sites D 0 Tue Feb 26 18:40:03 2013 | ||
| 307 | 65535 blocks of size 33553920. 32767 blocks available | ||
| 308 | smb: \> | ||
| 309 | |||
| 310 | |||
| 311 | |||
| 312 | |||
| 313 | {{/code}} | ||
| 314 | |||
| 315 | |||
| 316 | |||
| 317 | === Enable FTP === | ||
| 318 | Edit the /opt/alfresco/tomcat/shared/classes/alfresco-global.properties (see [[http://docs.alfresco.com/4.1/concepts/fileserv-ftp-props.html]]) | ||
| 319 | |||
| 320 | |||
| 321 | {{code}} | ||
| 322 | ### FTP Server Configuration ### | ||
| 323 | ftp.enabled=true | ||
| 324 | ftp.port=21 | ||
| 325 | ftp.ipv6.enabled=false | ||
| 326 | {{/code}} | ||
| 327 | |||
| 328 | |||
| 329 | |||
| 330 | = Other = | ||
| 331 | |||
| 332 | === Proxy passing === | ||
| 333 | There are good reasons for using an Apache or Traffic Manager in front of the Alfresco Installation, some are: | ||
| 334 | |||
| 335 | * No port changing (non-root users can assign to ports below 1024) | ||
| 336 | * Use of URL Rewrite | ||
| 337 | * Use of URL Blocking | ||
| 338 | * Use of Allow/Denial | ||
| 339 | * SSL offloading/handling outside the Confluence | ||
| 340 | Se my example in [[Apache2 Proxy Passing>>Main.information-technology.apache2-webserver.apache2-proxy-passing]] | ||
| 341 | |||
| 342 | === Trashcan tweaking === | ||
| 343 | Instead of having Alfreso putting deleted files into the contentstore.deleted directory, which has to be cleaned manually, read [[http://blyx.com/2014/08/18/understanding-alfresco-content-deletion/]] and add the amp [[https://code.google.com/p/alfresco-trashcan-cleaner/]] into /op/alfresco/amps/ | ||
| 344 | |||
| 345 | Edit the /opt/alfresco/tomcat/shared/classes/alfresco-global.properties | ||
| 346 | |||
| 347 | |||
| 348 | {{code}} | ||
| 349 | system.content.eagerOrphanCleanup=true | ||
| 350 | trashcan.cron=0 30 * * * ? | ||
| 351 | trashcan.daysToKeep=1 | ||
| 352 | trashcan.deleteBatchCount=1000 | ||
| 353 | {{/code}} | ||
| 354 | |||
| 355 | |||
| 356 | |||
| 357 | = Batch upload = | ||
| 358 | |||
| 359 | |||
| 360 | |||
| 361 | [[Batch upload to Alfresco sites via CIFS>>Main.information-technology.alfresco.batch-upload-to-alfresco-sites-via-cifs]] | ||
| 362 | |||
| 363 | = Logfiles = | ||
| 364 | |||
| 365 | === Logrotate === | ||
| 366 | Set up logrotate to avoid ever growing catalina.out log file. Here JIRA_Home is /opt/jira, logs are rotated daily and kept for 7 days: | ||
| 367 | |||
| 368 | |||
| 369 | {{code language="/etc/logrotate.d/confluence"}} | ||
| 370 | /opt/alfresco/tomcat/logs/catalina.out { | ||
| 371 | daily | ||
| 372 | rotate 7 | ||
| 373 | compress | ||
| 374 | copytruncate | ||
| 375 | delaycompress | ||
| 376 | missingok | ||
| 377 | size 10M | ||
| 378 | notifempty | ||
| 379 | } | ||
| 380 | {{/code}} |