Civitas Digitalis Platform: Installation & Configruation
A platform for crowd-based ideation, exploration and development of services in a smart city context
Installing MySQL for Liferay
In order to run the Civitas Digitalis Platform locally, you will need to setup a local MySQL server:
- Go to https://dev.mysql.com/downloads/mysql/ and download the latest version
- .Net 4.5 or above should be installed. Usually if it is missing, the MySQL installer would fetch and install it automatically, but in some isolated incidents, it would fail to do so.
If it fails, download .Net 4.5 or above from Microsoft's website and install it manually.
- Visual C++ redistributable should be installed. Same goes for this too. In case the installer is unable to install it automatically, download it and install manually.
- Once the aforementioned packages are installed, retry the MySQL installer.
- During the setup of MySQL, you will be asked to setup the User Name and Password. These should be noted down, as they will be required in the next step.
- Now use CREATE DATABASE lportal character set utf8 collate utf8_general_ci; to setup the database (for example in the MySQL workbench).
Setup Liferay with MySQL and Eclispe
- Download Eclipse IDE for Java EE Developers available at http://www.eclipse.org/downloads/eclipse-packages/.
- Download Liferay Portal 7.0 GA4 Bundled with Tomcat available at https://www.liferay.com/de/downloads.
- Check out platform repository in your preffered location (e.g. the Eclipse workspace).
Installing Liferay in Eclipse
- Open Eclipse IDE and click on Help -> Install New Software.
- Click "Add..." button to open Add Site dialog.
- Name : "Liferay IDE" and Location – http://releases.liferay.com/tools/ide/latest/stable/.
- Select OK and Select the Liferay IDE site from the combo selection box.
- When the table refreshes you should see the Liferay tooling category and three entries for the Liferay IDE feature, select the checkboxes to install the feature.
Integrating Liferay Server in Eclipse
- In Eclipse IDE, under Preference, look for Server and then Runtime Environment.
- Look for Liferay 7.x, select it and click Next
- Point the Liferay Portal Bundle Directory to the location of your Liferay server (downloaded in step 2).
- Runtime JRE should be configured with the java version installed in the system (should point to a JDK).
Start Liferay 7.x
- The server will start on localhost:8080
- The server can now be found under Servers
Liferay Server Configuration
- When the server starts, a configuration screen will show up on localhost:8080
- We are using a MySQL database so you have to change the databases configuration (click on "change" under Database).
- Select "MySQL" as the Database Type.
- Change the field JDBC URL to
- Now set User Name and Password according to your MySQL installation.
- If everything was configured correctly, you will be redirected to the Liferay landing page.
- Liferay requires JDK 1.8 and wouldn't work if JRE1.8 is setup as Java_Path in environment variable.
- Always install the same bit version (32/64) of Java and eclipse. A wrong combination may lead to startup failure in Eclipse in some systems.
- Always make sure that the userName and pwd provided for db during the setup of Liferay is correct.
The database settings can later be found in, portal folder in the portal-setup-wizard.properties file.
- If you can't depoly any portlet directly throguh Eclipse, make sure that liferay.workspace.home.dir in gradle.properties is set to the location of your Liferay server.
- To improve the startup time of the server you may set the Custom Launch Settings within the server configuration (in Eclipse) to "-XX:MaxPermSize=2048m -XX:PermSize=2048m -Xms2048m -Xmx2048m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:SurvivorRatio=20 -XX:ParallelGCThreads=4".
- If you are new to Liferay developement go through the tutorial at https://dev.liferay.com/de/develop/tutorials/-/knowledge_base/7-0/developing-a-web-application.
- You can ask Liferay related questions on their forum at https://web.liferay.com/de/community/forums/-/message_boards/category/239390.
- Use "git update-index --skip-worktree gradle.properties" to prevent the gradle.properties file from being overriden.