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