Liferayは6年連続でGartner Magic Quadrantのリーダーに。 詳細はこちら

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 添付ファイル
153185 参照数
平均 (4 投票)
平均評価は3.25星中の5です。
コメント
コメント 作成者 日時
I can't seem to get this to work, when I click... Steven Mileham 2009/02/04 8:47
Yep, Even I couldn't find 7cogs-hook plugin...?? Shreekanth Vankamamidi 2009/02/05 2:25
I'm not an expert, but I believe this really... Ken Ebert 2009/02/06 12:11
Ken, your method worked. The bundled,... Keith Woods 2009/02/10 11:49
I am having a problem where I deleted the db... paul a adams 2009/03/06 0:17
Hi Paul, you might want to start with an empty... Olaf Kock 2009/03/11 14:49
Maybe it's not the app server but the liferay... Henning Sprang 2010/04/28 14:01
I am currently not able to edit the page,... Olaf Kock 2009/03/12 4:21
Hello, I'm fighting to get this 7 cogs thing... Witold Tomasz Petriczek 2009/06/08 5:26
Complete instruction how to remove 7cogs -... Michał Stefanów 2009/06/25 13:36
Thanks guys, I've added more detailed... Jorge Ferrer 2009/07/13 1:42
Sorry guys, I have followed this guide and now... Federico Pires 2009/07/31 13:43
Can this wiki be updated to include delete... Ryan T 2009/08/09 20:44
Im an idiot it says to do that, and I just... Ryan T 2009/08/09 20:45
Oops I have copied fresh intstallation files to... Rob Bill Sedge 2009/11/05 3:49
yep looks like it has deleted all my previous... Rob Bill Sedge 2009/11/05 3:51
in 6.0.1 it' defintely not possible anymore to... Henning Sprang 2010/04/28 13:57
Using Liferay 6.0.5, I deleted... Andrea Matsunaga 2010/12/03 6:05
Using Liferay 6.0.5, I deleted... Andrea Matsunaga 2010/12/03 6:36
Anyone manage to succefully remove the sample... Patrice Laramee 2011/01/25 10:47
Best way to install liferay without the sample... Patrice Laramee 2011/01/25 11:35
Hi guys, Im on Liferay 6.0.6. Manage to remove... Achmed Tyrannus Albab 2011/11/14 9: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.
投稿日時:09/02/04 8:47
Shreekanth Vankamamidi
Yep, Even I couldn't find 7cogs-hook plugin...??
投稿日時:09/02/05 2: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.
Shreekanth Vankamamidiへのコメント。投稿日時:09/02/06 12:11
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!
Ken Ebertへのコメント。投稿日時:09/02/10 11:49
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.
Keith Woodsへのコメント。投稿日時:09/03/06 0:17
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.
paul a adamsへのコメント。投稿日時:09/03/11 14:49
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]]
投稿日時:09/03/12 4: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 ;/
Olaf Kockへのコメント。投稿日時:09/06/08 5:26
Complete instruction how to remove 7cogs - http://www.liferay.com/web/guest/community/forums/-/message_boards/message/28084­01
Witold Tomasz Petriczekへのコメント。投稿日時:09/06/25 13:36
Thanks guys,

I've added more detailed instructions to the wiki article based on the comments from those forum posts.
Michał Stefanówへのコメント。投稿日時:09/07/13 1:42
Sorry guys, I have followed this guide and now I cannot access with the "test" admin user... I did this on the first start, would that be the problem? How can I fix this or add a new user admin ? Thanks
Jorge Ferrerへのコメント。投稿日時:09/07/31 13:43
Can this wiki be updated to include delete EVERYTHING under the data/hsql folder, not just the .script file? I spent about an hour figuring this out until I saw another post =)

They also suggested deleting the them, and wol and I am not sure if this needs to be done, I just did it along with everything else
Jorge Ferrerへのコメント。投稿日時:09/08/09 20:44
Im an idiot it says to do that, and I just wasnt... man o man
Ryan Terwedoへのコメント。投稿日時:09/08/09 20:45
Oops I have copied fresh intstallation files to point to my existing database but then forgot about the 7 cogs examples ! .. it installed them !

Did I lose my previous data, Ive undeployed but of course all pages are still there !
Easy but costly mistake ?

emoticon ? or emoticon ??emoticon
投稿日時:09/11/05 3:49
yep looks like it has deleted all my previous pages and setup ! Knightmare 7 cogs data lol:S
Rob Bill Sedgeへのコメント。投稿日時:09/11/05 3:51
in 6.0.1 it' defintely not possible anymore to remove the sample data via the web control panel "plugins installation" interface - you must delete the database and the sevencogs web apps in the file system!
投稿日時:10/04/28 13:57
Maybe it's not the app server but the liferay version where it does not work anymore via web interface?

for which appserver does it work from the web console?

If nobody seems to be able to remove the sevencogs stuff via the web, confusion should be avoided by removing this part of the text as many people seem to waste time trying to do this...
Ken Ebertへのコメント。投稿日時:10/04/28 14:01
Using Liferay 6.0.5, I deleted webapps/sevencogs-hook/ directory as well as the lportal.properties and lportal.script files under data/hsql. The webserver (tomcat6) starts fine, however, I cannot access liferay, which is failing with an exception that a company does not exist:
ERROR [CompanyThreadLocal:54] com.liferay.portal.NoSuchCompanyException: No Company exists with the primary key 1

So, I rolled back the old lportal.* files. Any ideas of how to delete only the 7cogs entries from the db?
投稿日時:10/12/03 6:05
Using Liferay 6.0.5, I deleted webapps/sevencogs-hook/ directory as well as the lportal.properties and lportal.script files under data/hsql. The webserver (tomcat6) starts fine, however, I cannot access liferay, which is failing with an exception that a company does not exist:
ERROR [CompanyThreadLocal:54] com.liferay.portal.NoSuchCompanyException: No Company exists with the primary key 1

So, I rolled back the old lportal.* files. Any ideas of how to delete only the 7cogs entries from the db?
投稿日時:10/12/03 6:36
Anyone manage to succefully remove the sample data from liferay version 6.0.X+ ?

This procedure does not work. After removing hsql data files. The server will do infinite loops.
Andrea Matsunagaへのコメント。投稿日時:11/01/25 10:47
Best way to install liferay without the sample data, here's the procedure:

1- Start from scratch, unzip the zip file.
2- Remove tomcat-X.X.X/webapps/sevencogs-hook
3- Start tomcat and voila!

If you start tomcat without deleting tomcat-X.X.X/webapps/sevencogs-hook, this webapp will fill your database with the sample data.

Now to login with the admin account you will need to use: test@liferay.com / test

Have fun!
Patrice Larameeへのコメント。投稿日時:11/01/25 11:35
Hi guys,

Im on Liferay 6.0.6.
Manage to remove the 7cogs as usual.
But just wondering how do i delete the default (required) liferay.com community?
Or if not delete, edit the name to lets say LRRocks.com. i couldn't seem to find where can i do this.

Thanks.
投稿日時:11/11/14 9:08