Você está na página 1de 21

ADOBE CONTENT SERVER 4

Quick Start Guide

Adobe Systems Incorporated

Version 1.3
October 7, 2009

Adobe Confidential Page 1 of 21


© 2009 Adobe Systems Incorporated. All Rights Reserved.

Adobe® Content Server 4 Quick Start Guide


If this guide is distributed with software that includes an end user agreement, this guide, as well as the software described in it, is furnished under license and
may be used or copied only in accordance with the terms of such license. Except as permitted by any such license, no part of this guide may be reproduced,
stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, recording, or otherwise, without the prior written
permission of Adobe Systems Incorporated. Please note that the content in this guide is protected under copyright law even if it is not distributed with
software that includes an end user license agreement.
The content of this guide is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by
Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or inaccuracies that may appear in the
informational content contained in this guide.
Please remember that existing artwork or images that you may want to include in your project may be protected under copyright law. The unauthorized
incorporation of such material into your new work could be a violation of the rights of the copyright owner. Please be sure to obtain any permission
required from the copyright owner.
Any references to company names in sample templates are for demonstration purposes only and are not intended to refer to any actual organization.
Adobe, the Adobe logo, Adobe Content Server and Adobe Digital Editions are either registered trademarks or trademarks of Adobe Systems Incorporated in
the United States and/or other countries. Java is a trademark or registered trademark of Sun Microsystems, Inc. in the United States and other countries.
Linux is the registered trademark of Linus Torvalds in the U.S. and other countries. Microsoft and Windows are either registered trademarks or trademarks of
Microsoft Corporation in the United States and/or other countries. All other trademarks are the property of their respective owners.
This product contains either BSAFE and/or TIPEM software by RSA Security Inc.
Adobe Systems Incorporated, 345 Park Avenue, San Jose, California 95110, USA. Notice to U.S. Government End Users. The Software and Documentation
are “Commercial Items,” as that term is defined at 48 C.F.R. §2.101, consisting of “Commercial Computer Software” and “Commercial Computer Software
Documentation,” as such terms are used in 48 C.F.R. §12.212 or 48 C.F.R. §227.7202, as applicable. Consistent with 48 C.F.R. §12.212 or 48 C.F.R.
§§227.7202-1 through 227.7202-4, as applicable, the Commercial Computer Software and Commercial Computer Software Documentation are being
licensed to U.S. Government end users (a) only as Commercial Items and (b) with only those rights as are granted to all other end users pursuant to the
terms and conditions herein. Unpublished-rights reserved under the copyright laws of the United States. Adobe Systems Incorporated, 345 Park Avenue, San
Jose, CA 95110-2704, USA. For U.S. Government End Users, Adobe agrees to comply with all applicable equal opportunity laws including, if appropriate, the
provisions of Executive Order 11246, as amended, Section 402 of the Vietnam Era Veterans Readjustment Assistance Act of 1974 (38 USC 4212), and
Section 503 of the Rehabilitation Act of 1973, as amended, and the regulations at 41 CFR Parts 60-1 through 60-60, 60-250, and 60-741. The affirmative
action clause and regulations contained in the preceding sentence shall be incorporated by reference.

Adobe Confidential Page 2 of 21


Table of Contents
Introduction ..................................................................................................................................................................................................................4
Getting Started: Installing the System Applications ...................................................................................................................................5
Installing the Adobe Content Server .................................................................................................................................................................7
Setting up the Database ....................................................................................................................................................................................7
Unpacking the Distribution ..............................................................................................................................................................................7
Getting the P12 File .............................................................................................................................................................................................8
Setting Up the Content Server Configuration Files ............................................................................................................................ 10
Admin Console Service Configuration ............................................................................................................................................... 10
Fulfillment Service Configuration ......................................................................................................................................................... 12
Packaging Service Configuration .......................................................................................................................................................... 13
Admin Console ........................................................................................................................................................................................................ 16
The Sample Store .................................................................................................................................................................................................... 19
And Finally… ............................................................................................................................................................................................................. 21

Adobe Confidential Page 3 of 21


Introduction
The Adobe Content Server product consists of three web services that run under the control of the ACS operator.
These services are:
• Packaging service
• Fulfillment service
• Admin console service
This document describes how to set up these three services, as well as how to set up the system applications
necessary to run them. In addition, a small demonstration example of an online eBook store is also included for
illustration purposes.
The Content Server services in turn interact with other web services. The Content Server services interact with the
Adobe Content Server infrastructure to access the Signing and Activation and Authentication services provided by
Adobe. Other services provided by others are usually customized for a complete eBook delivery solution. These
services may include Media server delivery services, eCommerce services, and end user interaction web pages
and services such as online stores or libraries and shopping carts. These other services are not described in this
document in detail, as they are typically customized by the publisher, the ACS operator, and others for specific
solutions (though the included sample online store is discussed as a simple example).
This document is intended to get you going with Content Server relatively quickly, walking you through setting up
the system. At the end of the process you should have a working Content Server system and some familiarity
with the various pieces. It is not, however, a deep dive into the system or its technical details. For that
information, please see the Content Server User Guide and Content Server Technical Reference.
This guide is written for a single server running Microsoft Windows® and MySQL. However, the same general
approach will work for other combinations (e.g. MS Windows plus MS SQL Server, Linux plus Oracle, etc.). For
more details see the User Guide. But in this guide we’ll keep it simple. We are also installing everything on a
single machine. Normally, you may wish to have packaging on a different machine and the store is normally
elsewhere as well, but this guide does it all in one place, just for brevity.

Adobe Confidential Page 4 of 21


Getting Started: Installing the System Applications
To run the Content Server, you need to have the following system applications (or equivalents) installed and
running:
• Java 1.5 or above, 32 bit version (Note that Sun now refers to 1.5 as version 5 and 1.6 as version 6)
• Apache Tomcat servlet container, version 6 or higher, 32 bit version
• MySQL database, version 5 or higher
In addition, to run the Sample Store (a demonstration implementation of a fictional store supplied with the ACS
distribution – highly recommended), you will also need:
• Apache HTTP Server – Version 2.x of the web server, 32 bit version, is recommended
• PHP 5 or above scripting language

Note: If you have one or more of these applications already installed then you may have to change some of the
examples shown below to match your existing configuration.

To install the system applications, follow these steps:


1. Install Java first, as Tomcat needs to know where it is installed. You don’t need to install the Java
Development Kit (JDK) only the Java Runtime Environment (JRE). It will offer to install in your Program
Files folder. That’s fine.
2. If you’re planning on testing out the Sample Store (as this guide does), you need to install the Apache
web server as well. So go ahead and install. Accept all the defaults.
3. Then install the Tomcat servlet container. It too will offer to install in Program Files, which is fine. It
should prompt you to indicate where the JRE is located, but should find it on its own. You will also need
to specify which port to use. By default (since Apache HTTP Server is already installed and using port 80)
it will offer to use port 8080. That’s fine. You will also be prompted to enter a password for the admin
account. Be sure to remember this password!
Remember your Tomcat Password!

Be sure to configure Tomcat so that it has enough memory. The default install doesn’t ask you about
memory allocations, but you can bring up the Tomcat configuration tool after it is installed. Navigate to
the “Java” tab and set the initial memory size to 256 and the maximum memory size to 1600 (the
maximum allowed on 32 bit Windows systems). This is enough to package almost any ebook.

Note: Some versions of Tomcat require the Microsoft DLL msvcr71.dll, but they don’t include it in the
install. You can get it here.

4. Now install the MySQL database. It will ask you if you want to install “Typical” or “Complete”. Either one
is OK. When it has finished, it will offer to run its configuration utility. Accept that and let it run. First
question is whether you want “Detailed Configuration”. Accept that. Next it will ask you if you are
running on “Developer Machine” or “Server Machine” or a “Dedicated Server”. Answer as appropriate.
Next it will ask you what type of database you want. Be SURE to answer “Transactional Only”. This is very
important. It will then ask you what drive it should install on. Answer as appropriate. MySQL will then
ask whether to enable TCP/IP connections and strict protocols. Answer yes to both. The next question is

Adobe Confidential Page 5 of 21


about which character set to use: Multilingual is best. It will then offer to install as a service, answer “yes”
and then answer “no” when it asks about putting the bin folder on the path.
It will then ask you to set the password for the “root” account. The current “root” password will be blank.
Tab into the next field and enter some other password and confirm. This is the “root” password for the
database system.
Remember your Database Root Password!

Finally, it will offer to perform the configuration. Press the “Execute” button. And then when it is done,
press “Finish”.
Note that the database is installed on your local machine, so can be addressed via “localhost” (IP
address 127.0.0.1 on port 3306 - unless you chose some other port).
5. Now, install the PHP scripting language, if you are planning on testing out the Sample Store (in which case
you must have installed Apache HTTP web server earlier). PHP will offer to install in Program Files. That’s
fine. It will then ask to set up with which web-server. Check the button next to Apache 2.2.x module. It
will then prompt you for the Apache configuration folder. Assuming you let Apache install in the defaults,
the config folder is
C:\Program Files\Apache Software Foundation\Apache2.2\conf\
PHP will then prompt you about what it should install. Accept the defaults. Press Install to let it finish.
6. Last but not least, you need to install the JDBC driver for MySQL to use. You can download the driver,
mysql-connector-java-5.1.7.tar.gz from here. This file needs to have the jar file it contains
unpacked and be copied to the lib folder of your Tomcat installation, e.g.
C:\Program Files\Apache Software Foundation\Tomcat 6\lib
Why there? Because the packaging service of ACS4 is a servlet and it needs to talk to the MySQL
database to package books. So it needs Tomcat (which loads the servlet) to load that driver. And that
folder is where Tomcat looks first for the driver.
That’s it for the system application installs! Now we’re ready to set up the Content Server itself.

Adobe Confidential Page 6 of 21


Installing the Adobe Content Server
The Adobe Content Server is composed of three services: a Packaging (encryption) service, a Fulfillment service,
and an Admin Console service. These services run in a servlet container (Tomcat in this example installation) and
they also require a database (MySQL in this example installation).

Setting up the Database


Before we go any further, we need to create a database for the Content Server to use. If you already have a
database and just want Content Server to use that, then you obviously don’t need to create a database, so you
can skip the next paragraph.
To create a database is easy. Simply start the MySQL command line console that was installed as part of MySQL.
It will prompt you to log in as root using the root password that you specified earlier. Then enter the command:
CREATE DATABASE adept;

Note the semicolon at the end; this is required to ensure the command is executed.
Once you have a database, you need to create a user account to use for ACS administration and assign the proper
privileges. The easiest way to do this is to use the MySQL Administrator, the GUI client. You need to create the
ACS administration user. Then you need to assign all SQL operations to that user. Finally, you need to set the
permitted operations per hour. We suggest setting this quite high (e.g. 10,000 operations per hour).
For this example case, we created the user klaatu and the password is nikto. Of course, you should pick your
own username and password.
Remember your ACS Administrator Database User Name and Password!

Unpacking the Distribution


The first step is to get the zipfile that is in the distribution and unpack it. You will need to move some pieces
around, so start by unpacking it in some location, for example, C:\ACS4. You should see the following set of files:

ACS3toACS4convert_4_0_18.zip
admin-conf.txt
admin.war
ContentServer_Release_Notes.pdf
ContentServer_Technical_Reference.pdf
ContentServer_UserManual.pdf
fulfillment.war
fulfillment-conf.txt
operatorClient.jar
packaging-conf.txt
packaging.war
sample_books.zip
sample_store-20080908.zip
UploadTest-1_1.jar
UploadTest-1_1.zip

Note: UploadTest-1_1.jar and the configuration files were not in the original release but are in subsequent
releases.

First step is to “deploy” the WAR files. This is just a fancy way of saying copy them to where the servlet container
(Tomcat) can find them. On a full-scale production server, “moving” files is a complex process so “deploy” makes
sense, but in this case we can just copy them to the webapps folder of Tomcat, i.e., to:
C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps
Note that the WAR files are just a special kind of zip file that Tomcat knows to look inside of to find what it needs.
Adobe Confidential Page 7 of 21
Getting the P12 File
Next thing to do is get your Operator/Fulfillment server URL certificate set up. The Operator/Fulfillment server
URL is the URL for the fulfillment server. To set up the Operator URL, you’ll need to have OpenSSL. On Linux® and
Mac OSX it comes pre-installed. On Windows, however, it doesn’t. So you need to install it. Oddly, the easiest
way to do this is to install a UNIX emulator called Cygwin that will install it for you. You can download Cygwin
here. Cygwin’s installer is a little odd, but there is a simple walkthrough of how to install it here. One tip, be sure
to select both OpenSSL and the OpenSSL runtime. Also, be sure to add Cygwin’s bin folder to the Windows PATH
variable or you’ll have to use the Cygwin shell rather than Window’s DOS prompt.

Note: There was a bug in version 0.9.8h of OpenSSL that caused fatal errors. But the current Cygwin installs
0.9.8i, which doesn’t have that bug. If you have 0.9.8h you’ll need to upgrade.

Once OpenSSL is installed, you need to create the PKCS10 file. Here are the steps.
1. The License Signing service needs a certificate signing request in PKCS10 format. The following line uses
OpenSSL to create an RSA Keypair and a CSR in PKCS10 format:
openssl req -newkey rsa:1024 -out operator.pkcs10 -keyout operator.key

2. You then need to answer questions on the command line - it doesn’t really matter what you enter as
those values will be overwritten in the certificate creation process on the License Signing server.
So, as an example, one might see this, where to the left of the colon is the SSL prompt and to the right is
what you enter:
Country Name (2 letter code) [AU]: US
State or Province Name (full name) [Some-State]: California
Locality Name (eg, city) []: San Jose
Organization Name (eg, company) [Internet Widgets Pty Ltd]: MyCompany
Organizational Unit Name (eg, section) []: MyGroup
Common Name (eg, YOUR name) []: My Name
Email Address []: my_email@my_domain.com

3. You will then see the following prompt and two more questions. DON’T answer them, just hit the return
key for each one. They are not needed, and OpenSSL has been known to crash if you do answer them!
Please enter the following 'extra' attributes to be sent with your certificate request.
A challenge password []: <hit return key>
An optional company name []: <hit return key>

4. You will then be prompted to enter a password (and then confirm it). Be sure to remember this password!
Remember your Operator/Fulfillment server URL Certificate Password!

5. The result of this is the file operator.pkcs10, which will contain the certificate request (to be uploaded to
Adobe) and the file operator.key, which will contain the password-protected private key.
6. Next, you need to upload those files to Adobe using the operatorClient. In the zipfile is the file
operatorClient.jar. Extract it from the zip file. You can start the operatorClient by double-clicking or
opening a DOS prompt window, navigate to that folder and enter:
java -Xmx1024M –jar operatorClient.jar

In the next few steps (through step 11) you will use the operatorClient interface to set parameters and
upload the certificate request and then receive the certificate back from Adobe.
7. The Authentication URL should be
http://adeactivate.adobe.com/adept
This is the default, but verify that it is correct.

Adobe Confidential Page 8 of 21


8. The License Signing URL should be
https://nasigningservice.adobe.com/licenseadmin
if you are fulfilling books from North America. Otherwise, you should change it to
https://eusigningservice.adobe.com/licenseadmin
Note that the URL must be https.
9. Login using the Adobe ID sent to you by Adobe. It will be of the form acs4operator@acme.com, where
acme.com is your company domain. The password will originally have been some variant of ChangeMe.
You can and should change that password by navigating to here .
Remember your new Adobe ID Password!

10. Now you need to add the Operator/Fulfillment server URL. Pick an Operator/Fulfillment server URL
appropriate for your own installation.
Go to the Operator URLs tab. Enter the URL that you will be using for your fulfillment server. If the port
you are using is 80 for HTTP (or 443 for HTTPS), you may omit the port. But if you are using a different
port, the value of the port must be specified as well, e.g. http://gort.corp.adobe.com:8080. The URL
must include the full path to the fulfillment service e.g.
http://gort.corp.adobe.com:8080/fulfillment and not http://gort.corp.adobe.com/
NOTE: Using ‘localhost’ might seem convenient but is not allowed. Use of ‘localhost’ for fulfillment is
reserved for Adobe. You can use ‘localhost’ for packaging (as we will show below).
11. Once you have entered the correct Operator/Fulfillment server URL, press the “Choose” button and
navigate to and select the pkscs10 file you created before. The “Result File” will be automatically entered
for you. When you are sure it is correct, press “Add”. This will make a call to the Adobe servers, which
will create and download the operator.cer file. This will take a few seconds.
12. The LicenseSigning service returns the certificate in DER format. OpenSSL p12 packaging requires the
certificate to be in PEM format. To convert from DER to PEM use the following OpenSSL command
openssl x509 -in operator.cer -inform DER -out operator.pem -outform PEM

13. Assuming you named the output file operator.pem then run this command to package the certificate and
the key together:
openssl pkcs12 -export -in operator.pem -inkey operator.key -name operator –out operator.p12

The result of this should be the file operator.p12. Verify that it is in the folder.
It is important to note that the parameter –name operator specifies, as implied, the name of the operator.
So when you set up your fulfillment configuration you will need to specify the location of the
operator.p12 file, the name of the “operator” of that file and the password. In the above example the
name is operator. But the name can be any one you like.

Note: There is a bug in ACS version 4.03 that requires you to use the exact name operator instead of any
other name. This has been fixed in later versions of ACS.

Now you are ready to configure the Content Server.

Adobe Confidential Page 9 of 21


Setting Up the Content Server Configuration Files
Buried inside each of the WAR files are property files named properties.txt. These files control the behavior
of the Content Server. The first line in the properties.txt file specifies how the Content Server gets initialized.
It is only valid in the WAR file and should never be changed. The other lines in the properties files simply point to
the external configurations file (one for Windows and one for Linux). The fulfillment property file, for example,
has the following values:
com.adobe.adept.init1=com.adobe.adept.shared.util.SharedInitialization
com.adobe.adept.config1=file:///C:/config/fulfillment-conf.txt
com.adobe.adept.config2=file:///etc/fulfillment.conf

There are two WARs (i.e. fulfillment.war and packaging.war) which are the source of the fulfillment and
packaging services. The admin.war is the source for the Admin Console. The property files in each WAR are
identical except for the name of the optional external properties file. By default, these files are named (on
Windows)
admin-conf.txt
fulfillment-conf.txt
packaging-conf.txt
And they are located, by default, in C:\config on Windows and /etc on Linux. It is possible to unpack the
WAR file and change the property file, but it is strongly discouraged. Just create the folder c:\config and put
the configuration files there.
Note that if you want to put comments in the configuration files you can do so by placing a # symbol at the
beginning of the line. That line will be ignored. Blank lines are also ignored.
Now, the configuration files supplied with the release come with the required fields, but none of them have any
values filled in. Clearly, that won’t work, so let’s add the proper values. First, we’ll set up the Admin Console
configuration since it is the simplest to start with and the others are essentially extensions of it.

Admin Console Service Configuration

The first two lines in the admin-conf.txt file are about what to log and where to put that information:
com.adobe.adept.log.level=trace
com.adobe.adept.log.file=C:\acs4\log\adminconsole.log

“trace” (which is the default) means that a fair amount of information will be written to the file. The other
possible values are “error”, in which case ONLY errors are written to the log, and “info”, in which case a LOT of
data will be written to the file. The location is where the file will actually be written.
The next three lines specify the type of database and hence the driver, the “dialect” of SQL to be used and the
path through which Content Server can find it.
com.adobe.adept.persist.sql.driverClass=com.mysql.jdbc.Driver
com.adobe.adept.persist.sql.dialect=mysql
com.adobe.adept.persist.sql.connection=jdbc:mysql://127.0.0.1:3306/adept

Note: These examples use the database name adept, but if you are using your own database (which is
presumably not named adept) then you should substitute your database’s name.

In this example, we are using MySQL with Java, so the driver is com.mysql.jdbc.Driver. The dialect of SQL is
mysql. The connection is also jdbc:mysql. Note that the address of the database (in this example) is
“localhost”. The port is the one you specified when you set up MySQL. The name of the database is always the
name of the database you are using (in these examples, adept).

Adobe Confidential Page 10 of 21


The next two lines are the ID and password of the user you created when you created the database (see page 7):
com.adobe.adept.persist.sql.user=klaatu
com.adobe.adept.persist.sql.password=nikto

The last line in the file is the URL to where the admin.war can be found, complete with the port (if it is not port
80). When entering the Admin Console service URL in the configuration files there should be no spaces before or
after the URL. And that’s it.
So the admin console configuration file looks like this (except that it should use the service URLS, user name,
password, and file locations you selected):
com.adobe.adept.log.level=trace
com.adobe.adept.log.file=C:\acs4\log\adminconsole.log
com.adobe.adept.persist.sql.driverClass=com.mysql.jdbc.Driver
com.adobe.adept.persist.sql.connection=jdbc:mysql://127.0.0.1:3306/adept
com.adobe.adept.persist.sql.dialect=mysql
com.adobe.adept.persist.sql.user=klaatu
com.adobe.adept.persist.sql.password=nikto
com.adobe.adept.serviceURL=http://gort.corp.adobe.com:8080/admin

You must always restart the Tomcat service after modifying the configuration files (since they are only read during
the Tomcat startup), so restart Tomcat now.
You can now test that the admin.war is properly configured. Go to a browser and enter the Admin Console
service URL you specified in the configuration file plus /statuscheck, e.g.
http://gort.corp.adobe.com:8080/admin/statuscheck

You should see

If you don’t see this, try changing the URL to:


http://gort.corp.adobe.com:8080/admin/Status?verbose=true

to get more detailed information. (Note that it is spelled Status starting in upper case, and that URLs are case-
sensitive.) The most common problem of configuration is simply mistyping an address or value. Also check for
trailing spaces or spaces around the equals sign for properties and remove them. Double check all the values.
Also, remember that if you change the config file you must stop the Tomcat service and restart it, since it already
read the configuration files when it started up, so you need to force it to refresh.

Start the Admin Console

As a final test that you have the configuration for the Admin Console set up correctly, let’s start it up. To launch
the admin console, enter into your browser the path to the admin console, e.g.
http://gort.corp.adobe.com:8080/admin/console

Note: The client machine must have Flash Player 9 (or higher) installed to run the Admin Console application.

Adobe Confidential Page 11 of 21


The Admin Console will prompt you for the password. The default password is park345 and once you have
entered that it will then prompt you to enter a new password. In these examples we use the password barada. Of
course, you should pick your own password. Once you have done that you will see the Admin Console. This
password is the one for the “built-in distributor” (as opposed to distributors that you will create). You can think of
this as the “Content Server” password, but it will normally be referred to as the password for the built-in
distributor.
Remember your new Content Server Built-in Distributor Password!

The Admin Console isn’t too interesting right now because you haven’t packaged any books yet. But wait, there’s
more…

Fulfillment Service Configuration

Now let’s set up the fulfillment service configuration. The configuration file fulfillment-conf.txt is basically
the same information (the “common settings”) plus the properties specific to fulfillment. Note that while it might
seem convenient to combine the configuration files, this is strongly discouraged. This guide is walking you
through the most basic (and common) setup, but there are many other available properties and some of them
are used by all three services, so having only one configuration file would preclude having service-specific
settings.
The first two lines are again about what to log and where to put that information:
com.adobe.adept.log.level=trace
com.adobe.adept.log.file=C:\acs4\log\fulfillment.log

The first line that differs from the admin console configuration file is the URL to the actual Content Server
fulfillment server:
com.adobe.adept.serviceURL=http://gort.corp.adobe.com:8080/fulfillment

This URL must include the port info if it is not port 80. In this case, Tomcat is on port 8080 so we need to include
this. This URL must match exactly that which was specified when the certificate was created (see page 9, step
10). Do not use spaces before or after the equal sign, as this will cause a problem when determining if the URLs
match.
The first new property specifies which of the two license-signing services Content Server will call to get licenses
signed. If you are in Canada or the US, you should specify:
com.adobe.adept.fulfillment.security.licensesignURL=https://nasigningservice.adobe.com/licensesign

Otherwise, specify
com.adobe.adept.fulfillment.security.licensesignURL=https://eusigningservice.adobe.com/licensesign

Note again that you must use https, not http.


The last 3 lines are the location of the PKCS12 file and the ID and password.
com.adobe.adept.fulfillment.security.pkcs12.file=file:///C:/ACS4p12/operator.p12
com.adobe.adept.fulfillment.security.keystore.user=operator
com.adobe.adept.fulfillment.security.keystore.password=********

The user name is the operator name that you specified (see page 9, step 13) when you created the p12 file. The
password is the one you specified when you created the p12 file (see page 8, step 4). Also it is important when
specifying the location of the pcks12 file to not have spaces before or after the file name itself, i.e. don’t do:
com.adobe.adept.fulfillment.security.pkcs12.file= file:///C:/ACS4p12/operator.p12

And note that file URLs must have file:/// prepended.

Adobe Confidential Page 12 of 21


So the final result would be (except that it should use the file locations, service URLS, username, and password
you selected):
com.adobe.adept.log.level=trace
com.adobe.adept.log.file=C:\ACS4\log\fulfillment.log
com.adobe.adept.persist.sql.driverClass=com.mysql.jdbc.Driver
com.adobe.adept.persist.sql.connection=jdbc:mysql://127.0.0.1:3306/adept
com.adobe.adept.persist.sql.dialect=mysql
com.adobe.adept.persist.sql.user=klaatu
com.adobe.adept.persist.sql.password=nikto
com.adobe.adept.serviceURL=http://gort.corp.adobe.com:8080/fulfillment
com.adobe.adept.fulfillment.security.licensesignURL=https://nasigningservice.adobe.com/licensesign
com.adobe.adept.fulfillment.security.pkcs12.file=file:///C:/ACS4/temp/operator.p12
com.adobe.adept.fulfillment.security.keystore.user=operator
com.adobe.adept.fulfillment.security.keystore.password=******

Don’t forget to restart Tomcat after changing any of the configuration files. So restart Tomcat now.
Again, the URL to the fulfillment status would be
http://gort.corp.adobe.com:8080/fulfillment/statuscheck/

Or append Status?verbose=true in place of statuscheck for more info.

Packaging Service Configuration

The packaging service configuration file packaging-conf.txt, like the fulfillment configuration file, is the same as
the admin console configuration file with the addition of the packaging-specific properties. The service URL is of
course pointing to the packaging WAR:
com.adobe.adept.serviceURL=http://gort.corp.adobe.com:8080/packaging

The next two lines specify the destination of the packaged file and how it will be deployed for download. The
baseLocation property in the configuration file specifies the location on the destination server’s storage where
the book will be placed. The baseURL property determines at what apparent URL the book will be.
Note that the baseLocation has to be relative to the Tomcat instance. The default installation of Tomcat is
C:\Program Files\Apache Software Foundation\Tomcat 6.0
so Tomcat addressing is relative to that location.
So if you want the baseLocation to be ‘media’, then the baseLocation property has to be relative to the
ROOT folder of the Tomcat folder, e.g.
.\webapps\ROOT\
So for example, if the baseLocation is .\webapps\ROOT\media and the baseURL is
http://gort.corp.adobe.com:8080/media
then when the book foo.epub is added it will be at the path
.\webapps\ROOT\media\foo.epub
and will be available (via Tomcat services) at
http://gort.corp.adobe.com/media/foo.epub
Of course, this is a function of how the Apache HTTP and Tomcat services are configured, but the above is true for
the set up described here.

Adobe Confidential Page 13 of 21


So here are the resulting packaging-conf.txt contents (except that it should use your own URLs, etc.):
com.adobe.adept.log.level=trace
com.adobe.adept.log.file=C:\acs4\log\packaging.log
com.adobe.adept.persist.sql.driverClass=com.mysql.jdbc.Driver
com.adobe.adept.persist.sql.connection=jdbc:mysql://gort.corp.adobe.cm/adept
com.adobe.adept.persist.sql.dialect=mysql
com.adobe.adept.persist.sql.user=klaatu
com.adobe.adept.persist.sql.password=nikto
com.adobe.adept.serviceURL=http://gort.corp.adobe.com/packaging
com.adobe.adept.packaging.baseLocation=.\webapps\ROOT\media
com.adobe.adept.packaging.baseURL=http://gort.corp.adobe.com:8080/media

Restart Tomcat one more time then check the status of the packaging service. The URL to the packaging status
would be:
http://gort.corp.adobe.com:8080/packaging/statuscheck/

Or append Status?verbose=true in place of statuscheck for more info.


Now that the Content Server is working, let’s package some books!

Packaging Books

The packaging tool is simple command line tool written in Java that makes the appropriate calls to the packaging
service’s web-service APIs. The tool is provided as source code (as well as the pre-built jar file). The input to the
tool is an unencrypted book and, optionally, some metadata. The result is the encrypted book is written to the
place specified by the packaging configuration (the baseLocation) and the data about the book (its key, location,
URL, etc.) are written to the Content Server database. Once the book is “packaged” and the metadata is in the
database, you can deploy the book off to distributors (bookstores, libraries). This will be covered in the next
section.
The first step is to get some books to package. Included in the release zip in the file sample_books.zip is a set of
public domain books in PDF and EPUB formats, as well as book-cover images and XML packaging files. Unzip
that file to some convenient location (e.g. C:\ACS4\srcbooks).
The packaging tool can be used to package individual books by themselves, though it is often more convenient
to use a helper file that defines a packaging request for multiple books. But we’ll start out by packaging an
individual file. The inputs to the tool are the URL to the packaging service, the path to the book itself and the
password. So if one navigates to the folder the books are in and enters
java –Xmx1024M –jar UploadTest-1_1.jar http://gort.corp.adobe.com:8080/packaging/Package
srcbooks\MonteCristo.epub –pass barada

A few notes:
• The parameter –Xmx1024M tells the Java Virtual Machine (JVM) to allocate 1 GB for the process. This isn’t
needed for small files, but large complex files may fail otherwise (and the JVM will often emit bizarre,
misleading messages when it runs out of memory). For very large files you may want to allocate even
more memory.
• Note that the tool needs to address the Package service inside the packaging WAR, hence the
packaging/Package in the URL
• The final parameter is the Content Server Built-in Distributor password for the Content Server services.
This password is the same one that you set when you first started the Admin Console (in these examples
it is barada, see page 12). So if you run the packaging tool before launching the Admin Console, the
password would be the default password, i.e. park345. Remember that this password is the Content
Server Built-in Distributor password and the line above must always use the current password value.
• The above example passes in the relative path to the book, i.e. srcbooks/MontteCristo.epub) but you
can also specify the fully qualified path, e.g. c:\ACS4\srcbooks\MonteCristo.epub)
Adobe Confidential Page 14 of 21
This is the most basic use of the tool, illustrating the required parameters. However, it supports an additional
number of optional parameter flags:

Metadata:
title the argument contains the dc:title value
creator the argument contains the dc:creator value
publisher the argument contains the dc:publisher value
format the argument contains the dc:format value

Miscellaneous Flags:
png looks for fileNameNoExt.png to upload as a thumbnail
jpeg looks for fileNameNoExt.jpeg to upload as a thumbnail
jpg looks for fileNameNoExt.jpg to upload as a thumbnail
gif looks for fileNameNoExt.gif to upload as a thumbnail
xml looks for fileNameNoExt.xml to use as XML source
verbose displays content of package request and detailed server response
version displays tool's version number
? displays the list of accepted command-line flags

So, for example, the following command


java –Xmx1024M –jar UploadTest-1_1.jar http://gort.corp.adobe.com:8080/packaging/Package
srcbooks\1984.epub –pass barada –title 1984 –publisher Gutenberg -jpg

will package the book and set the title to 1984 and the publisher to Gutenberg. It will also cause the tool to look
in the specified folder for the file 1984.jpg and it will be uploaded to the destination folder (i.e. baseLocation).
Although the above works, it can get rather cumbersome, so the parameters can also be passed in an XML file
that contains the packaging information. So for example, the following command:
java –Xmx1024M –jar UploadTest-1_1.jar http://gort.corp.adobe.com:8080/packaging/Package
srcbooks\theArtofWar.pdf –pass barada -xml -jpg

will cause the file theArtofWar.pdf to be packaged and the file theArtofWar.jpg to be placed in the same
destination folder. It will also cause the tool to load the file theArtofWar.xml from the same folder and read the
metadata and permissions from it.
The theArtofWar.xml contains the following:
<package xmlns="http://ns.adobe.com/adept">
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:format> application/epub+zip</dc:format>
</metadata>
<permissions>
<display>
<device/>
<until>2013-01-13T13:10:49-07:00</until>
</display>
<excerpt>
<until>2013-01-13T13:10:49-07:00</until>
</excerpt>
<print>
<count initial="10" max="20" incrementInterval="3600"/>
<maxResolution>300</maxResolution>
</print>
</permissions>
</package>

Adobe Confidential Page 15 of 21


An important aspect of the XML file is that it is the only way to package a file with base permissions set -- other
than writing your own tool, of course. The sources for the tool are provided in case you wish to modify or extend
its behavior. The interpretation of the permissions can be found in the User Manual and Technical Reference.
Now package up a few more books and we’ll try the Admin Console. Note that you can also package ALL the
books in a given folder. The following command will package all the books in a given folder:
java –Xmx1024M –jar UploadTest-1_1.jar http://gort.corp.adobe.com:8080/packaging/Package
srcbooks –pass barada -xml -jpg

Finally, what about REALLY BIG files? The way the packager works is that in the normal case (as above) the file is
converted to a huge blob of XML (that is base-64 encoded) and sent over to the packaging web service. The
problem with this is that base-64 encoding inflates the number of the bytes in the book by about 33%. So if you
have a large books (say 100 MB or larger) this starts to get really large. It’s even worse than that, but you see the
problem.
The solution is to send the location of the file to the packaging service rather than the actual bytes. Then the
packaging service can fetch the bytes a chunk at a time until it has packaged the book. Well, you might ask, why
isn’t that the standard way of packaging books? The problem is that the packaging service can only load the
bytes if it can get to them (since it uses the file-system to fetch the bytes), so the file has to be on the same
machine as the packaging service. If the normal method is used, then the source of the files can be on a different
machine from the packaging service.
But if you have a really large book or set of books, the solution is to use the datapath approach. This consists of
three parts. First, you have to specify datapath on the command line. Second, on the command line, instead of
specifying the name of the file, you specify the name of the folder where the XML file can be found. Third, you
need to add a new element to the XML file, the dataPath element. Note that the command line parameter is
datapath and the element is dataPath (P is capitalized in the element name).
So, suppose you have a really large file called humongous.pdf. And it is in a folder c:\ACS4\ oversize. Then
your XML file (named humongous.xml) would look like
<package xmlns="http://ns.adobe.com/adept">
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:format> application/epub+zip</dc:format>
</metadata>
<permissions>
<display>
<device/>
</display>
</permissions>
<dataPath>C:\ACS\oversize\humongous.pdf</dataPath>
</package>

Note that the path to the file in the dataPath element must be complete, i.e. it cannot be relative to the folder
from which you invoke the command since the packaging service is somewhere else. Then your command line
would look like (using the example service URL):
java –Xmx1024M –jar UploadTest-1_1.jar http://gort.corp.adobe.com:8080/packaging/Package
oversize -datapath –pass barada -xml

Note that the tool will process ALL the XML files in the folder, trying to package all of the files referenced by the
XML files. Also, just like the case above when you specify the folder to process all files (even though they may
not be dataPath elements), the packaging tool will look for a thumbnail file with the same name as the file to be
packaged. So if there were a thumbnail with the name humongous.gif in the folder oversize, it would be attached
to the book in the database even though the command line doesn’t have –jpg or any other reference to a
thumbnail.

Note: Very large book files (> 100MB) require more physical memory and large Java memory settings for the
servlet container to handle them. Be sure to optimize your book files, especially scanned book files, using Acrobat
or another tool – this can reduce the size of a book significantly (often by a factor of 2x to 4x or more). A smaller
book file will reduce user download times and reduce the likelihood of download communication errors for users.

Adobe Confidential Page 16 of 21


Admin Console
So now that there are packaged books, bring up the Admin Console again. Remember that the password is now
the new one that you entered the first time you brought it up (see page 12.)
There are three panels in the Console: Inventory, Distributors and Licenses. By default the Inventory panel is
selected. The books that you just packaged should be shown. If they do not, click on the “All Items” icon and you
should see all the items you have packaged in the current database.
You can sort the items in the inventory by just clicking on the head of the column. You can also search for
specific books based text in the title, author etc. To clear a search, click on the “All Items” icon again.
Note that down at the bottom is an area titled “Web Services APIs”. This is just informational and primarily for
developer’s interest. It shows what is happening under the covers. When you make some gesture in the Console
(like clearing a search), the Console makes a web-service call to the Content Server fulfillment service and gets
back some XML that represents the results of the search. This can be very useful information for developers
investigating problems or as tutorials as they learn how develop their own tools or integrate Content Server with
their own systems.
On the right, you will see basic information about the book. Select one of the books and you will see its
information displayed (title, author, etc.) as well as the thumbnail of the book (assuming it was packaged with the
thumbnail, i.e. –jpg was specified).
Below the basic information is the permissions info. These are the parameters that control what a user who
downloads a book can do with it. With Content Server you can control how many machines or devices a book
can be downloaded to, whether and how much the user can print from the book, whether the user can copy to
the clipboard and so on. (The User Manual and Technical Reference cover these elements in some depth).
There are two types of permissions:
• Base Permissions: These are the permissions you specified when the book was packaged (in the XML file,
if specified). These are part of the packaged book. You can edit them in the Admin Console, essentially
overriding the permissions that were specified when the book was packaged. But note that this will
change the base permissions associated with the packaged books and will affect any and all distributions
of the book.
• Distributor Permissions: With Content Server you can also “narrow” the permissions on a per-distributor
basis. In other words, you can make the permission more restrictive for any particular distributor or for all
distributors. But you cannot make the permissions less restrictive.
If you check the Distribution Rights for the selected book, you will find it tells you “No Distributor Selected” -
naturally enough, since we haven’t created one yet.
So what IS a distributor? A Distributor is an entity such as a bookstore or library through which you, as the
Content Server operator, distributes books. Again, there is the “Built-in Distributor”, but this should be thought of
as the Master or root. It is not a Distributor in the normal sense and should not be used to distribute books.
Navigate to the Distributor panel by clicking on the “Distributors” link at the top of the console. This takes you to
the Distributors panel. It is similar to the Inventory panel in that it lists all the Distributors, which can be sorted,
searched, the properties examined and so on. But at the moment there aren’t any, so click on the little “+” sign
button on the bottom right to create a new Distributor.
This will bring up a dialog prompting you to enter some properties for the new Distributor:

Adobe Confidential Page 17 of 21


• Name: Just the human readable label for the store
• URL: The URL where the store will be located (more on this below)
• Notify URL: The URL to which Content Server will instruct Digital Editions to send a notification when a
transaction is verified complete and the user has the valid eBook. Digital Editions will also send a
notification to this address when a loaned book is returned. This is an optional field.
• Description: A human readable description of the site
• Max Loan Count: The maximum number of loans a distributor can make of any given eBook. Many
publishers restrict the number of copies of a given ebook that can be loaned at any one time to 1. After
all, a library can only loan out the single copy of a real hardcover book at a time.
• Link Expires: The length of time after which a generated link is no longer valid, in seconds.
• Shared Secret: This is an automatically generated number which is known only to the Distributor and
Content Server. Using this number, messages between the two can be digitally signed in such a way that
each knows that only the other party could have sent the message.
Save the info. Now, you will see that you have the new distributor listed. If you select it, then the properties are
now editable on the right hand side. And the only books shown in the inventory will be those that have been
assigned to that Distributor.
You’re almost ready to enable a Distributor using the supplied Content Server Sample Store. But you need to
actually assign some books to the distributor. So go back to the Inventory panel. The new Distributor now
appears on the left side. You can simple drag books from the inventory pane over and drop them on the
Distributor. Do that for some books then you’re ready to install the Store.

Adobe Confidential Page 18 of 21


The Sample Store
The Sample Store is contained in a zip file that came with the rest of Content Server. To operate the Sample Store
you need a web server that can actually “serve” up the store (i.e. respond to HTTP requests and fetch the
necessary resources from the PHP that implement the store. Assuming you installed Apache as outlined at the
beginning of the guide, all you need to do is extract the contents of the zip file to a folder here:
C:\Program Files\Apache Software Foundation\Apache2.2\htdocs
For simplicity, extract the contents into a new folder in htdocs called bookstore. Then your new bookstore will
be addressed like this:
http://gort.corp.adobe.com/bookstore

And that’s it. The store is installed. Now let’s set it up.
Go back to the Admin Console in the Distributor’s panel. Click on the “Export Sample Site” button. You will see a
dialog like this (without the URL filled in)

This dialog’s workflow is a little odd, so let’s walk through it. You need to perform two operations:
• Export the Catalog XML file (books.xml). This is what it suggests, an XML file that contains all books that
are assigned to the specified distributor.
• Store Config XML file (config.xml). This sets up the configuration file for the store.
Select the radio-button next to the Catalog XML label and press “Next”. This will display a “SaveAs” file dialog
prompting you to select a location where the catalog.xml file should be saved. You must save the file into the
same folder where you unpacked the Store files (in htdocs/bookstore).
Then select the radio-button next to “Store Config”. Where it says “Enter link URL”, enter the exact link to the
fulfillment service for Content Server. The store will construct the necessary link for fulfillment for this info, so it
must include the port (if any). Then press “Next” and it will again prompt you to save the config.xml file. Save it
to the same folder (htdocs/bookstore).
You will then be back at the same dialog. Just dismiss it now by choosing “Close”.
So what’s in these files? Here is the config.xml:
<distributorInfo>
<distributor>urn:uuid:0339df67-1198-4aa0-a91b-6ca963205bba</distributor>
<ordersource>Gort's Emporium</ordersource>
<sharedSecret>YM4GWx1bY5gjMMWPUmOPqQ03D+U=</sharedSecret>
<linkURL>http://gort.corp.adobe.com:8080/fulfillment/URLLink.acsm</linkURL>
<operatorURL>http://gort.corp.adobe.com:8080/admin</operatorURL>
</distributorInfo>

Adobe Confidential Page 19 of 21


This is all pretty self-explanatory. And here is the books.xml that was exported:
<resourceItemList xmlns="http://ns.adobe.com/adept">
<resourceItemInfo>
<resource>urn:uuid:01a3b3dd-04bc-4da2-bdfa-dc6435f7fea2</resource>
<resourceItem>1</resourceItem>
<metadata>
<dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">The Art of War</dc:title>
<dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sun Tzu</dc:creator>
<dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">application/epub+zip</dc:format>
<dc:publisher xmlns:dc="http://purl.org/dc/elements/1.1/">FeedBooks
(www.feedbooks.com)</dc:publisher>
<dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">en</dc:language>
<dc:description xmlns:dc="http://purl.org/dc/elements/1.1/"/>
<dc:identifier xmlns:dc="http://purl.org/dc/elements/1.1/">urn:uuid:c719b2a8-250b-11dd-83f3-
001cc049a027</dc:identifier>
<thumbnailURL>http://gort.corp.adobe.com:8080/media/01a3b3dd-04bc-4da2-bdfa-
dc6435f7fea2.jpg</thumbnailURL>
</metadata>
<src>http://gort.corp.adobe.com:8080/media/01a3b3dd-04bc-4da2-bdfa-dc6435f7fea2.epub</src>
<downloadType>simple</downloadType>
<licenseToken>
<resource>urn:uuid:01a3b3dd-04bc-4da2-bdfa-dc6435f7fea2</resource>
<permissions>
<display>
<device/>
<until>2013-01-13T20:10:49Z</until>
</display>
<excerpt>
<until>2013-01-13T20:10:49Z</until>
</excerpt>
<print>
<maxResolution>300.0</maxResolution>
<count initial="10" max="20" incrementInterval="3600"/>
</print>
</permissions>
</licenseToken>
</resourceItemInfo>
</resourceItemList>

Here we see that there is only one book in the store. The one item contains:
• The resource ID for the book, within the ACS4 fulfillment server.
• The number of resource items for this ID. Typically 1.
• Some metadata, including the ID of the thumbnail of the book’s cover. This might also contain some
verbiage that the site would show along with the book, etc.
• The src of the book which is the URL to the fulfillment server and the name of the book (which is based
on its resource ID). This is used to generate the proper fulfillment URL.
• The download type. Currently, only simple is supported.
• The license token. This includes the base license which includes the resource ID and the permissions.
This information is used, along with the src element to build the URLLink that is sent to the fulfillment
server to trigger the fulfillment process.
Normally there would be many of these items. From this info the store can construct the pages that display the
books that are for sale or loan and, after the user has selected a book, construct the URLLink that triggers the
fulfillment process.

Note: You typically only have to set up the config.xml file once, unless you change the URL to the fulfillment
service. But you need to update the catalog (books.xml) anytime you change any part of the catalog – books,
permissions, etc. You can do this by re-exporting the sample site from the Admin Console, selecting the Catalog
XML file (books.xml) for export.

Adobe Confidential Page 20 of 21


Now, go back to your browser and enter the URL to the bookstore, e.g.
http://gort.corp.adobe.com/bookstore/index.htm

You should see a page that contains the books that were exported to that Distributor. Click on purchase and you
will be taken to another page with more choice to further restrict the permissions on the book. This is not part of
a normal store, of course, but this is a sample test app. Click on the purchase button again and it will take you to
the “Thank you” page. This is the page normally presented by a web site after the user has presented their money
and/or accreditation. Click on “Download” and the download to Digital Editions should start.

And Finally…
And that’s it. You now have a complete, end-to-end installation of Content Server. We have cut a number of
corners and simplified parts, but all the essential pieces are there.
For more information, please consult:
• Content Server 4 User Manual
• Content Server 4 Technical Reference
• Content Server 4 FAQ

Adobe Confidential Page 21 of 21

Você também pode gostar