PDA

View Full Version : updating from .c to .d



bagseed
08-27-2007, 04:47 PM
Ok, whats the process / steps for updating from hays .c to the new current .d?
The only information i can find is upgrading from goose berry to hays not from one revision of hays to another hays revision.

1. do i have to backup and recreate the database then in-port the data back?
2. do i have to completly replace /var/www/wiki-directory?

The site is live i just need to update it, what the proccess?

Thanks guys!

Petrus4
08-27-2007, 05:23 PM
hey there do you have the Hayes VM?

bagseed
08-27-2007, 05:38 PM
No, its native....therein lies the issue as every update documentation shows the vm route. I, we, need a update path for non vm installs.

tobru
08-27-2007, 06:27 PM
have a look at http://forums.opengarden.org/showthread.php?t=545

bagseed
08-28-2007, 12:00 AM
"You do not need to run the installer again - upgrading from the c to d release is simply a matter of updating the PHP and Dekihost bits, and then running the database update scripts:"

Ok, I may have missed the documentation and apologize in advance. Most of my experience has been with complete installation.

How do you update the PHP and Dekihost bits?

Do I need to get the .d source and then cp -R web/* to /var/www/dekihost/web/?

bagseed
08-28-2007, 01:52 AM
Going back over the original install doc, the word bits makes more sense.

The following would be the process to update from .c to .d, yes?

1. download the .d source, untar it
2. rm -rf /var/www/dekidir/*
3. change to the .d source dir
4. cp -r web/* /var/www/dekidir/
5. cd /var/www/dekidir/maintenance
6. run the database update script

mikeslackenerny
08-28-2007, 09:50 AM
Bag Seed.. please update here once you do update. Have a native install running on a Vista box :)

PeteE
08-28-2007, 03:49 PM
Going back over the original install doc, the word bits makes more sense.

The following would be the process to update from .c to .d, yes?

1. download the .d source, untar it
2. rm -rf /var/www/dekidir/*
3. change to the .d source dir
4. cp -r web/* /var/www/dekidir/
5. cd /var/www/dekidir/maintenance
6. run the database update script

Hey bagseed - Those are the correct steps. However, you might want to insert two extra steps to make sure you backup and restore your file attachments properly.

1. download the .d source, untar it
2. cd /var/www/dekidir/
3. tar cvzpf ~/attachments.tar.gz attachments
3. rm -rf /var/www/dekidir/*
4. change to the .d source dir
5. cp -r web/* /var/www/dekidir/
6. cd /var/www/dekidir/maintenance
7. php update-db.php
8. tar xvpf ~/attachments.tar.gz -C /var/www/dekidir/

bagseed
08-28-2007, 06:28 PM
I guess we can include the need to cp the localsettings from the old install, correct?

maintenance# php update-db.php
A copy of your installation's LocalSettings.php
must exist in the source directory.

so I cp the LocalSettings.php from the old install into /var/www/dekidir/ ...and re-run the script

php update-db.php
Sorry! The wiki is experiencing some technical difficulties, and cannot contact the database server. <br />
Access denied for user 'root'@'localhost' (using password: NO)wdb:/var/www/foo.com/maintenance#

taking a gander at the update script i see its calling the following variables.

$wgDatabase = Database::newFromParams( $wgDBserver, $wgDBadminuser, $wgDBadminpassword, $wgDBname );

I was assuming it found these global variables in the LocalSettings.php that I just copied over to /var/www/dekidir/

Ok, so looking at the LocalSettings scripts I see the following:

cat LocalSettings.php
<?php

# This file was automatically generated by the Deki Wiki installer.
# If you make manual changes, please keep track in case you need to
# recreate them later.
#
# See includes/DefaultSettings.php for all configurable settings
# and their default values, but don't forget to make changes in _this_
# file, not there.

$IP = "/var/www/foo.com ";
ini_set( "include_path", ".:/var/www/foo.com/htdocs:/var/www/foo.com/htdocs/includes:/var/www/foo.com/htdocs/languages" );
require_once( "includes/DefaultSettings.php" );


$wgSitename = "foo.com";

$wgEmergencyContact = "wdbadmin@foo.com ";
$wgPasswordSender = "wdbadmin@foo.com";

$wgDBserver = "localhost";
$wgDBname = "wikidb";
$wgDBuser = "wikiuser";
$wgDBpassword = "blah";

$wgDekiApiKey = "blah,blah,foo";


So again the update script is call for:

$wgDatabase = Database::newFromParams( $wgDBserver, $wgDBadminuser, $wgDBadminpassword, $wgDBname );

Which is not in the localsettings.php script as you can see.!

Thre is DBpassword but not DBadminpassword etc……

royk
08-28-2007, 06:29 PM
the admin db passwords are stored in AdminSettings.php.

PeteE
08-28-2007, 06:37 PM
the admin db passwords are stored in AdminSettings.php.

oops! Thanks for clarifying royk. If you happened to delete the AdminSettings.php file, it should look something like this:



<?php
$wgDBadminuser = 'root';
$wgDBadminpassword = 'password';
?>

bagseed
08-29-2007, 12:16 AM
I was able to get the database update script to run after copying my the admin settings from the old install.

I also had to copy the mindtouch.host.sh script from the .d src to the bin dir in the virtual server. I cant get the api started now and get the following error which i believe is related to the api key.

# /etc/init.d/dekihost start
Stopping MindTouch Deki API
Starting MindTouch Deki API: mono /var/www/foo.com/htdocs/bin/mindtouch.host.exe apikey 12345 script /var/www/foo.com/htdocs/bin/mindtouch.deki.startup.xml server-name http://foo.com path-prefix @api http-port 8081 ip localhost notty




# ps -ef | grep host
root 2592 2506 0 18:15 pts/0 00:00:00 grep host

the api never starts.

bagseed
08-29-2007, 12:22 AM
logs are good, so here is the api.log

2007-08-28 18:05:40,345 [-1243612240] DEBUG MindTouch.Dream.Http.HttpTransport - RequestHandler: (POST,http://localhost:8081/host/?apikey=12345&dream.in.verb=DELETE)
ERROR argument script: file not found

MindTouch Console Host, Copyright (c) 2006, 2007 MindTouch, Inc.
USAGE: mindtouch.host.exe [arg1] ... [argN]
server-name <uri> server name to use for local:// uris (default: http://localhost)
server-path <path> path to prepend to uri for each requst received through http-listener (default: nothing)
http-port <int> startup port (default: 8081)
service-dir <path> service storage folder (default: host directory)
script <filename> XML startup script
notty Runs as daemon, and will have to be shutdown with a REST call
ip <#.#.#.#:#> Listen only on this network address and port (use 'localhost' to only allow local access)
config <filename> XML environment configuration
apikey <key> acces key to the Host service (must be non-empty)
capture-stack-trace capture stack trace for asynchronous calls
ERROR argument script: file not found

MindTouch Console Host, Copyright (c) 2006, 2007 MindTouch, Inc.
USAGE: mindtouch.host.exe [arg1] ... [argN]
server-name <uri> server name to use for local:// uris (default: http://localhost)
server-path <path> path to prepend to uri for each requst received through http-listener (default: nothing)
http-port <int> startup port (default: 8081)
service-dir <path> service storage folder (default: host directory)
script <filename> XML startup script
notty Runs as daemon, and will have to be shutdown with a REST call
ip <#.#.#.#:#> Listen only on this network address and port (use 'localhost' to only allow local access)
config <filename> XML environment configuration
apikey <key> acces key to the Host service (must be non-empty)
capture-stack-trace capture stack trace for asynchronous calls
ERROR argument script: file not found

MaxM
08-29-2007, 12:34 AM
ERROR argument script: file not found


It looks like it wasn't able to find the startup script at /var/www/foo.com/htdocs/bin/mindtouch.deki.startup.xml

Can you verify it exists there? You may have it in /etc/dekiwiki. Change your .sh file to point to the correct path.

bagseed
08-29-2007, 03:29 AM
I saw it looking for that xml file but used find on my old install to locate it in config so i copied it from etc to my new config. Anyways my fault for not reading the error completely had so many other things going on at the same time. It now seems to be working and the wiki is up.


Thanks for your help bro, i appreciate it.

PeteE
08-30-2007, 03:48 PM
FYI - I posted instructions on how to upgrade between Hayes versions on the wiki:

http://wiki.opengarden.org/Deki_Wiki/Installation_and_Upgrade/1.8_%22Hayes%22_Official_Install_and_Upgrade_Guide/Upgrading_Deki_Wiki_(non-VM)