Introduction #

Liferay versions 5.2 and 6.0 include some sample data in the bundles to showcase Liferay Portal's capabilities. You will find several users, organization and web pages already created belonging to a fictitious company called 7Cogs.

If you play around with the default installation, you shouldn't delete the administrative user bruno, as his existence is used by the 7cogs plugin to check if it was already installed. If - on a new start of the browser - this plugin can't find bruno, it will happily recreate the initial demonstrative database and delete all your work.

This article helps getting rid of this behaviour and enables you to keep your data without the need for Bruno to stick around forever.

Starting in Liferay 6.0.5 and forward, Bruno is no longer used as the logic for deleting everything. Still, do remember to delete the 7Cogs hook before using any production installation environment.

Remove the sample data #

To remove the sample data that is included in the bundle follow these steps:

1. Go to the Control Panel > Plugin Installation, search for sevencogs-hook and remove it.

In case you can't find it there, remove the application from the server. (For example, if you are using tomcat, remove the folder 7cogs in webapps).

Important Note: some application servers may not support hot undeploy using this method. In those cases follow the instructions of your application server to undeploy sevencogs-hook.war

For example for Tomcat, if the above doesn't work, go to your file manager and navigate to liferay-portal-5.2.2\tomcat-5.5.27\webapps

2. Stop the Liferay Portal server

3. Delete the data in your database or point to a new database. The exact steps will depend on the database you are using. Here are the exact instructions for some common ones:

3.1 If you're using Hypersonic, which is the default db, this should work.

  1. Shut down the application server (For example, in Tomcat for windows double-click shutdown.bat.)
  2. Go to your file manager
  3. Navigate to liferay-portal-5.2.2\data\hsql
  4. Delete lportal.properties and lportal.script.
  5. Start up Liferay again using the startup.bat.

3.2 If you're using mysql it's console and delete the database and create it again executing the following SQL:

drop database lportal;
create database lportal character set utf8;

3.3 For other server based databases follow the same instructions as for MySQL but adapt the create SQL sentence to the specific db. Look the SQL script provided with Liferay for your specific database for further details.

4. Start the Liferay Portal server

5. Use a browser to access the server and login using the following credentials:

  • E-mail: test@liferay.com
  • Password: test

Install the sample data #

In order to install the sample data again, just access the Control Panel > Plugin Installation and install the plugin called 7 Cogs. (Only for versions above 5.2)

(Re-)Initialization of a(n existing) database#

Note: Be careful, as installing the 7cogs plugin will remove all data existing in your database
Careful: As said above: When this plugin is installed (as is the case in the default bundle download), deleting the user bruno will cause the plugin to re-initialize the database upon next start of the server. This applies to startups with the plugin being already installed, not just upon the act of installing it! You have been warned.

Liferay 5.2 Documentation Center

0 Anhänge
174363 Angesehen
Durchschnitt (4 Stimmen)
Die durchschnittliche Bewertung ist 3.25 von max. 5 Sternen.
Kommentare
Antworten im Thread Autor Datum
I can't seem to get this to work, when I click... Steven Mileham 4. Februar 2009 08:47
Yep, Even I couldn't find 7cogs-hook plugin...?? Shreekanth Vankamamidi 5. Februar 2009 02:25
I'm not an expert, but I believe this really... Ken Ebert 6. Februar 2009 12:11
Ken, your method worked. The bundled,... Keith Woods 10. Februar 2009 11:49
I am having a problem where I deleted the db... paul a adams 6. März 2009 00:17
Hi Paul, you might want to start with an empty... Olaf Kock 11. März 2009 14:49
Maybe it's not the app server but the liferay... Henning Sprang 28. April 2010 14:01
I am currently not able to edit the page,... Olaf Kock 12. März 2009 04:21
Hello, I'm fighting to get this 7 cogs thing... Witold Tomasz Petriczek 8. Juni 2009 05:26
Complete instruction how to remove 7cogs -... Michał Stefanów 25. Juni 2009 13:36
Thanks guys, I've added more detailed... Jorge Ferrer 13. Juli 2009 01:42
Sorry guys, I have followed this guide and now... Federico Pires 31. Juli 2009 13:43
Can this wiki be updated to include delete... Ryan T 9. August 2009 20:44
Im an idiot it says to do that, and I just... Ryan T 9. August 2009 20:45
Oops I have copied fresh intstallation files to... Rob Bill Sedge 5. November 2009 03:49
yep looks like it has deleted all my previous... Rob Bill Sedge 5. November 2009 03:51
in 6.0.1 it' defintely not possible anymore to... Henning Sprang 28. April 2010 13:57
Using Liferay 6.0.5, I deleted... Andrea Matsunaga 3. Dezember 2010 06:05
Using Liferay 6.0.5, I deleted... Andrea Matsunaga 3. Dezember 2010 06:36
Anyone manage to succefully remove the sample... Patrice Laramee 25. Januar 2011 10:47
Best way to install liferay without the sample... Patrice Laramee 25. Januar 2011 11:35
Hi guys, Im on Liferay 6.0.6. Manage to remove... Achmed Tyrannus Albab 14. November 2011 09:08

I can't seem to get this to work, when I click on the "Hooks" plugin page, I don't see a 7cogs-hook entry.
Gepostet am 04.02.09 08:47.
Shreekanth Vankamamidi
Yep, Even I couldn't find 7cogs-hook plugin...??
Gepostet am 05.02.09 02:25.
I'm not an expert, but I believe this really depends on the application server you're using.

Basically, according to note in the WIKI above: "Note: some application servers may not support hot undeploy using this method. In those cases follow the instructions of your application server to undeploy 7cogs-hook.war"

This forum thread may help guide you in getting
http://www.liferay.com/web/guest/community/forums/-/message_boards/message/52265­7

For me (running the tomcat6 bundle), deleting the webapps/sevencogs-hook/ directory worked.
Gepostet am 06.02.09 12:11 als Antwort auf Shreekanth Vankamamidi.
Ken, your method worked. The bundled, all-in-one download does not come with a 7cogs-hook.war file (that I could find anyway), nor a 7cogs-hook plugin.

Deleting those two directories you mentioned seems to do the trick.

Thanks!
Gepostet am 10.02.09 11:49 als Antwort auf Ken Ebert.
I am having a problem where I deleted the db files for 7cogs in two places, webapp and in catalina. The problem I get is that I cannot login with the test@liferay.com. The only way I can login is by creating a new account (non admin level) or by using the existing admin bruno and he cannot create new users. Any help would greatly be appreciated.
Gepostet am 06.03.09 00:17 als Antwort auf Keith Woods.
Hi Paul,
you might want to start with an empty database and portal-ext.properties as this one: http://www.liferay.com/web/guest/community/forums/-/message_boards/message/21275­77#_19_message_2451843 - this will create a new "minimal content" database with test@liferay.com as standard user.
Gepostet am 11.03.09 14:49 als Antwort auf paul a adams.
I am currently not able to edit the page, therefor I'll add an additional paragraph here, that was intended to be incorporated in the page (next to the bottom "Note: Be careful..."):

**Careful:** When this plugin is installed (as is the case in the default bundle download), [[http://www.liferay.com/web/guest/community/forums/-/message_boards/message/242­9268#_19_message_2460955|deleting the user bruno will cause the plugin to re-initialize the database]]
Gepostet am 12.03.09 04:21.
Hello, I'm fighting to get this 7 cogs thing removed and after following those 5 points my browser redirects me here:
someadress.something:8080/c/portal/layout

and the webpage is a null one... cannot login or do anything... are those 7cogs a need to have ;/
Gepostet am 08.06.09 05:26 als Antwort auf Olaf Kock.