⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 howto

📁 图片管理程序
💻
字号:
Dustin's PhotoServlet Quick Install Guide (12/25/2000)This is a quick install guide.  I assume you know what you're doingwith databases and servlets.----------------------------------------------------------------------Contents:BEFORE YOU BEGIN!!!UPGRADING FROM A PREVIOUS VERSION OF THE PHOTOSERVLETMIGRATIONINSTALLING FROM SCRATCH  DATABASE SETUP  APPLICATION SERVER SETUPGENERAL USAGEERRATA----------------------------------------------------------------------BEFORE YOU BEGIN!!!1. Make sure you read the project home page at    http://photoservlet.sourceforge.net.2. Make sure you have all of the components listed under     ``What Do I Need To Start My Own''3. Make sure they're all working properly.----------------------------------------------------------------------UPGRADING FROM A PREVIOUS VERSION OF THE PHOTOSERVLETStep 1. Getting the updated files.If you have the latest version of this tarball, you're almost set.Grab the latest release of the spy.jar (set of classes required torun the servlet)  This can be obtained from the following location:http://bleu.west.spy.net/~dustin/spyjar/Step 2. Put the jars in in your CLASSPATH The jars need to be added to the directory(ies) that you keep allyour java classes in. Keep backups of your old copies.Step 3.  Update configurationI'd recommend dropping in a new config and changing whatever values aredifferent for you.Step 4. Restart the Servlet EngineRestart the servlet engine (and the helper app if you use it),and you should be off and running.----------------------------------------------------------------------MIGRATIONIf you are upgrading to a release before 2002/02/20, you will need to runthe third, fourth, and fifth migration kits.NOTE:  A few things changed about the image format, so you'll need to clear       your cache again before trying to use it.If you are upgrading to a release before 2001/12/27, you will need to runthe second migration kit.If you are upgrading to a release before 2000/07/16, you will need to runthe first migration kit.Please be sure to back up your data before you attempt to run the migrationkit.  Backups are essential to data integrity!Also, this release uses a new PhotoImage format, so you'll need to moveyour cache before restarting the spyservices.  This is located in /var/tmp/rcache by default, or as defined by rhash.args in the spyrunner.conf. It's recommended to back up the cache, just in case something goes wrong.This is both the first place your images are stored, and the first placethe image server looks for your images.  The storage is not portable acrossversions (thanks to java), but if you need to roll back, it's good to havearound.Restart the application server with the new classfile in place.Once you've got your data backed up, cache cleared, and spyservices runningunder the new version, you can use the following commands to begin themigration:    java net.spy.photo.migration.PhotoMigration01    java net.spy.photo.migration.PhotoMigration02    java net.spy.photo.migration.PhotoMigration03    java net.spy.photo.migration.PhotoMigration04    java net.spy.photo.migration.PhotoMigration05Make sure to run this with the same class path you used to start theapplication server.It may take a while depending on how many images you have.  When it's done,every image (including thumbnails) will be cached and ready to go.It is safe to run the migration kits more than once, so when it doubt, runthem again.----------------------------------------------------------------------INSTALLING FROM SCRATCH    Installation is a lot easier than it used to be.  For one thing, I nolonger force my swank distributed architecture on everybody (I think I wasthe only person running PhotoServlet on more than one machine anyway).This is now a configuration option and saves first-time users a bunch ofheadache while still allowing me to have it my way.  :)    I'm going to skip configution and management of the old-style helperapp and distributed image server and all that to avoid confusion.  If youwant to try it, send me email.	It's assumed that the installer knows something about web-apps andservlet containers and all that.  PhotoServlet ships as a .war file, but itmust be expanded and configured to be useful for most people.  that alsomakes it quite a bit easier to tweak the jsps and get what you want out ofit.  :)	Go to your application directory, mkdir photo, and unzip the war, thenedit WEB-INF/photo.conf to match your site config.	The most important thing to look at is the DB config (and it's at thetop).  I'd encourage you to look around at other stuff as well.DATABASE SETUP    I'm currently using postgres 7.1, but I believe a slightlyolder version will work.  Some changes in Postgres 7.2 prevent thissoftware from running out of the box, but minor changes can be madeto the bootstrap SQL script to get it going.    Although photoservlet could theoretically be run withanother database, it would require changes to the application, theprocedural language, and other areas.  (none of which are prioritiesat this time)    You can use another database name (photo) if you'd like,just make sure you modify the config file to reflect the new databasename.  If you want to use a different username, you can do that aswell, but you'll have to modify the bootstrap script (etc/photo.sql)and replace all references to ``nobody'' with your new username.    Begin by creating the ``photo'' database, and the ``nobody''user.  If you do not have an administrative user, please createone to create tables under.  The example administrative user hereis ``berry''.As postgres:    $ createdb photo    CREATE DATABASE    $        $ createuser nobody    Shall the new user be allowed to create databases? (y/n) n      Shall the new user be allowed to create more new users? (y/n) n    CREATE USER    $        $ createuser berry    Shall the new user be allowed to create databases? (y/n) y    Shall the new user be allowed to create more new users? (y/n) y    CREATE USER    $    Once you can connect to the ``photo'' database as the user``nobody,'' execute all of the commands in the script etc/photo.sql.You will need to do this as a user who has access to create tablesin the database.  If there are any errors, report them as bugs,please, and try to get ahold of me.  :)    $ psql -f photo.sql photo berry    BEGIN    CREATE    [...]    COMMIT    $    The photo.sql script should not generate errors.  If it does, it'slikely you're running as a user not capable of creating tables, or arerunning a version of postgres that isn't quite up-to-date.----------------------------------------------------------------------GENERAL USAGEWhen you're first setting up, you'll want to create categories and users.There's a link at the bottom that tells you which user you're authenticated as.Clicking on that will take you to the authentication screen.  The default user is ``admin'' with the password ``admin''.  Please, please,please change the admin password before anything else (changepw.jsp).The admin user is only special in that it has access to administrativefunctions by default.  That is to say, any user may have equaladministrative access to the default user admin (and, for example, there isno user ``admin'' in my photo album).If you have administrative access enabled (either with the checkbox on thelogin form, or if you enabled it after logging in (from credform.jsp)), youwill have an administrative menu available from the index page that givesyou all your management needs.Next, create a few categories for your images.  Since categories are currentlymade visible to the users through the user administration window, it's easierto setup the categories, -then- the users.Add users for yourself and your friends, capable of adding images. As you add the users, allow them access to the various categories you created.You don't want all of your images showing up as ``admin''.Let us know if you have any problems at dustin@spy.net or berry@housebsd.org.----------------------------------------------------------------------ERRATA1. There's no UI yet for giving yourself admin privileges, but if you insert    your userid into the group 'admin' in wwwgroup, you'll be able to request    admin privs as yourself.      $ pgsql photo nobody       photo=> select id from wwwusers where username='berry';       id       ----        3      (1 row)photo=> insert into wwwgroup values(3, 'admin');----------------------------------------------------------------------$Id: HOWTO,v 1.16 2002/06/23 03:11:12 dustin Exp $

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -