Unfortunately it's not easy to have the RPM packages complete the
installation as there are questions that need to be answered as part of
the process (like the root password for the database) and that's a
serious non-sequitor for an RPM package. Until we've built a specialised
web based installation setup tool (planned for the next release
0.8.2), there are a few steps that need to be done manually the first
time WACS is installed to build the database. In addition to appearing
here, they can be found in the text file README.database
in the WACS installation tree. This installation tree is usually
/usr/share/wacs
.
Connect to the database as the root user, giving the password as appropriate; if you've not set one the default is blank so just press return when prompted. You then create the database and the user account (once for each place you might be coming from), give access to that user account to the database, flush the contents and then quit. Here's a sample conversation - you obviously need to replace the 'myserver.example.com' with whatever your real fully qualified domain name is. You might also wish to choose a more secure password, but do remember you need to change it in /etc/wacs.d/wacs.cfg (dbpass and phpdbconnect variables) as well or it just won't work.
Here goes:
# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 80 Server version: 5.0.45 Source distribution Type 'help;' or \h for help. Type '\c' to clear the buffer. mysql> CREATE DATABASE wacs; Query OK, 1 row affected (0.03 sec) mysql> CREATE USER 'wacs'@'myserver.example.com
' -> IDENTIFIED BY 'wacs
'; Query OK, 0 rows affected (0.08 sec) mysql> CREATE USER 'wacs'@'myserver
' -> IDENTIFIED BY 'wacs
'; Query OK, 0 rows affected (0.00 sec) mysql> CREATE USER 'wacs'@'localhost' -> IDENTIFIED BY 'wacs
'; Query OK, 0 rows affected (0.00 sec) mysql> GRANT ALL ON wacs.* TO wacs; Query OK, 0 rows affected (0.00 sec) mysql> COMMIT; Query OK, 0 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) mysql> QUIT; Bye #
The next step is to log in as the wacs user account you just created
and run the SQL scripts that create the various database tables. There
are scripts provided for both MySQL 5 and Oracle 10, but this example
is based upon using the MySQL 5 version. These should be found in
/usr/share/wacs/creation/MySQL5
.
# cd /usr/share/wacs/creation/MySQL5 # mysql -u wacs -p wacs Enter password: Welcome to the MySQL monitor. Commands end withh ; or \g. Your MySQL connection id is 82 Server version: 5.0.45 Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> source create_mysql.sql WACS Database Table Creation Script for MySQL Commencing Table Creation: 1. Photographer Query OK, 0 rows affected (0.23 sec) 2. Vendor Query OK, 0 rows affected (0.01 sec) 3. Sets Query OK, 0 rows affected (0.01 sec) 4. Models Query OK, 0 rows affected (0.02 sec) 5. Assoc Query OK, 0 rows affected (0.01 sec) 6. Idmap Query OK, 0 rows affected (0.01 sec) 7. Download Query OK, 0 rows affected (0.00 sec) 8. Tag Query OK, 0 rows affected (0.01 sec) 9. Conn Query OK, 0 rows affected (0.02 sec) 10. Keyword Query OK, 0 rows affected (0.01 sec) Tables Created - Committing Changes Query OK, 0 rows affected (0.00 sec) Completed. mysql> commit; Query OK, 0 rows affected (0.00 sec) mysql> quit; Bye #
Note | |
---|---|
this step is RECOMMENDED unless you know precisely what you are doing. Some commercial sites may not wish to preload this data, but should substitute their own alternatives if they want certain features to work. |
Warning | |
---|---|
If you changed the password in step 1. above from the default value, you NEED to have made the matching change to the configuration file before doing this step. |
There are three database tables that contain standard values, plus whatever you add to them over time; these are called keywords, photographers and vendors. In this step you will be loading some initial values into these database tables. To do this you need to go to /usr/share/wacs/samples/database and run the three populate commands in the utils directory on the XML data files there.
# cd /usr/share/wacs/samples/database # /usr/share/wacs/utils/keywordpop keywords.xml Inserting Entry For Keyword: seethru Inserting Entry For Keyword: nopanties Inserting Entry For Keyword: teen [...] Inserting Entry For Keyword: cyc Inserting Entry For Keyword: country Inserting Entry For Keyword: alley # /usr/share/wacs/utils/photpop photographers.xml Inserting Entries For Photographer: DFR Inserting Entries For Photographer: SWE Inserting Entries For Photographer: MAX [...] Inserting Entries For Photographer: JAN Inserting Entries For Photographer: TOB Inserting Entries For Photographer: HBM # /usr/share/wacs/utils/vendpop vendors.xml Inserting Entries For Site: SE Inserting Entries For Site: WACSD Inserting Entries For Site: FJ [...] Inserting Entries For Site: AMK Inserting Entries For Site: KPC Inserting Entries For Site: KHA #
Note | |
---|---|
This is a very optional step but will help you if you're setting up a WACS web site for the first time. |
This step loads two sample model records into the database to provide an
example of how a typical model record might look. There are two such files
provided in /usr/share/wacs/samples/models
containing
details of two models: Sabrina and Roxanne.
# cd /usr/share/wacs/samples/models # wacsimport Sabrina-18.xml Keyless ID map for JAFN # wacsimport Roxanne-24.xml #
Note | |
---|---|
This step is not yet possible but will be very shortly. Please keep watching the WACS website for the announcement of our demonstration web site. |
You will first need to download the sets that appeal to you, so if you
select set number 14 for instance, you will need the set14.zip
file and the set14.xml
file.
Once you have these downloaded, place them both in
the same directory and run the wacsxmlin program to load
the data from the XML file. The zip file will be automatically unpacked and
it's contents placed in the images area.
# cd ~/Download # wacsxmlin set14.xml [ADD MORE DETAILS HERE!] [...] #