ZweiBieren on Mt. FujiPictools V3.3 (342)

Installing Pictools

Pictools build and upload a website. Their strength is in building pages with pictures and captions. See physpics.com/pictools. The instructions here are a brief sketch; for more details, see setup.php.

1. Load tools. Load tools to your local computer. You will need Cygwin. After launching setup, the prompts can be answered by accepting the defaults. Then select the base category and at least these individual components: dos2unix, gcc-g++, ghostscript, ghostscript-fonts-std, ImageMagick, inetutils, make, openssh, and tcsh. To these I add gdb, less, and ed. You will also want a browser, a pictures manager, and editors for web pages, text, documents, and spreadsheets.

2. Hosting. Arrange for a domain name and a hosting service. Record the • site name, the • user name and • password, and the name of the • subdirectory where served pages reside. Let's call these values sitename, username, password, and pagesdir.

3. Test the site. Browse to sitename. There should be a dummy page. In a terminal window give the command: ssh username@sitename, entering password when prompted. Enter the command

ls pagesdir

The file for the dummy page should be listed.

4. Directories. Choose/create three directories on your local computer to contain web files, staging files, and pictures. They will be the values of properties SRCROOT, STAGINGAREA, and PICTURESROOT. Each is a full path name NOT ending in slash. The name is in Cygwin form delimited with slashes and beginning with "/cygdrive/x" where x is a windows drive letter.

5. Tailor your shell environment on your local computer. Modify ~/.login or ~/.profile to define SRCROOT with the name of the chosen directory.. Also set PICTOOLS to ${SRCROOT}/pictools (no trailing slash).

6. Avoid passwords. In a cygwin terminal, run ssh-keygen answering the prompts with the ENTER key. Note the directory where it stored the key and cd to it. Then enter these commands, giving password when prompted for it.

scp id_rsa.pub username@sitename:.ssh/incoming_id
ssh username@sitename \ 'cat .ssh/incoming_id >> .ssh/authorized_keys'
ssh username@sitename 'rm .ssh/incoming_id'

After the first two lines, emtering the password will be unnecessary

7. Download Pictools.tgz into the parent dirstory of SRCROOT.

8. Untar. In a cygwin terminal window, change directory to SRCROOT and copy/paste this command

tar -x --skip-old-files --warning-existing-file -z -f ../Pictools.tgz

9. Tailor properties. Edit SRCROOT/Pictools.properties and in section

Directory Tree Properties set these four values, substituting the values from above.
stagingarea: STAGINGAREA-value
sshdest: username@sitename
picsdir: pagesdir
picturesroot: PICTURESROOT-value

10. PHP on server. Most hosting services tailor PHP with a .php.ini file. My service instead reads /home/physpics/.php/phpversion/phprc. Some necessary and some useful settings are listed in setup.php.

11. Upload. Open a new cygwin terminal and do

cd $SRCROOT; make uploadall

12. Visit site. Voila.

See setup.php for details of the above and a few additional useful steps.

December 2018