Upgrading Jay Cooke 8.05 to 8.05.1 for SPARC Solaris 10

    Table of contents
    1. 1. IMPORTANT NOTICE

    IMPORTANT NOTICE

    This content is contributed by a Deki Wiki user to OpenGarden community. It has not been reviewed for technical accuracy by MindTouch. If you find an error or would like to comment on the article, please contact to contributor or use the comment field at the bottom of the document.


    --------------------------------
    References
    --------------------------------

    http://wiki.mindtouch.com/Official_M...ooke)_(non-VM)

    http://wiki.opengarden.org/User:Pete..._update-db.php

    --------------------------------
    Shutting down Apache server and Deki-api daemon before update
    --------------------------------

    Before delete old code, you should stop Apache Server and Deki-API (aka dekihost) daemon process.

    # /etc/init.d/dekiwiki stop
    # svcadm disable svc:/network/http:apache2
    # ps -ef | egrep 'httpd|apache|mono'

     
    --------------------------------
    Back Up Attachments
    --------------------------------

    Type the following commands to create the backup directory and back up your attachments:

    # mkdir $HOME/deki_backup
    # cd /var/www/dekiwiki/
    # gtar cvzpf $HOME/deki_backup/attachments.tar.gz attachments

    (NOTE) If you have multi-tenant configuration of Deki, you should back-up *EACH* attachments of Deki-instance as below:
    # cd <storageDir>
    # gtar cvzpf $HOME/deki_backup/attachments_<storageName>.tar.gz attachments_<storageName>

    (OPTIONAL) To back-up entire files for your Deki, type:
    # cd /var/www/
    # gtar cvzpf $HOME/deki_backup/dekiwiki-web-files.tar.gz dekiwiki
    # cd /
    # gtar cvzpf $HOME/deki_backup/dekiwiki-etc-files.tar.gz etc/dekiwiki


    --------------------------------
    Back Up Settings Files
    --------------------------------

    Enter the following commands to back up the files that Deki Wiki uses to determine settings:

    # cp -pi /var/www/dekiwiki/LocalSettings.php $HOME/deki_backup
    # cp -pi /etc/dekiwiki/mindtouch.deki.startup.xml $HOME/deki_backup
    # cp -pi /etc/dekiwiki/mindtouch.host.conf $HOME/deki_backup

    --------------------------------
    Backup your MySQL Database
    --------------------------------

    Export contents of your Deki Wiki's database schema to a export file (*.sql) by the "MySQL superuser".

    # mysqldump -u<user> -p<password> <database_name> > $HOME/deki_backup/wikidb.sql

    For example:
    mysqldump -uroot -proot wikidb > $HOME/deki_backup/wikidb.sql

    (NOTE) If you have multi-tenant configuration of Deki, you should back-up *EACH* users of MySQL as below:
    mysqldump -u<dbAdminUser> -p<dbAdminPassword> <dbWikiUser> > $HOME/deki_backup/wikidb_<dbWikiUser>.sql

    (OPTIONAL) To back-up entire datafiles of MySQL, type:

    # /etc/init.d/mysql.server stop
    # gtar cvfz $HOME/deki_backup/mysql_data.tar.gz /opt/mysql/data
    # /etc/init.d/mysql.server start

    --------------------------------
    Download The New Package
    --------------------------------

    Download the Deki Wiki build from one of the following sources:

        * RECOMMENDED: http://sourceforge.net/projects/dekiwiki (tarballs)
        * http://wiki.opengarden.org/Source_Code (includes SVN enlistment info)

    # cd $HOME
    # wget http://jaist.dl.sourceforge.net/sour..._source.tar.gz

    --------------------------------
    Install The New Package
    --------------------------------

    Exctract the archive to your home directory. Then copy web files to your apache share directory.

    Type the following lines to expand and move the files to their correct location:

    (OPTIONAL) Backup all web objects to archive, but recommended.

    # gtar xvfz Deki_Wiki_8.05.1_Jay_Cooke_source.tar.gz
    # cd Deki_Wiki_8.05.1_Jay_Cooke_source/

    # rm -rf /var/www/dekiwiki
    # mkdir /var/www/dekiwiki
    # cp -pir web/* /var/www/dekiwiki
    # chown -R webservd:webservd /var/www/dekiwiki

    (OPTIONAL)
    If you use Internet Explorer 6.0 browser, I recommend to do next ops to avoid link error.

    cd /var/www/dekiwiki/skins/
    cp -pi common/icons/icon-lock.gif ace/neutral/icon_lock.gif
    cp -pi common/icons/icon-mail.gif ace/neutral/icon_mail.gif
    cp -pi common/icons/icon-file.gif ace/neutral/icon_file.gif
    cp -pi common/icons/icon-discuss.gif ace/neutral/icon_discuss.gif
    cp -pi common/icons/anim-save.gif ace/neutral/anim-save.gif

    cp -pi common/icons/icon-lock.gif ace/blue/icon_lock.gif
    cp -pi common/icons/icon-mail.gif ace/blue/icon_mail.gif
    cp -pi common/icons/icon-file.gif ace/blue/icon_file.gif
    cp -pi common/icons/icon-discuss.gif ace/blue/icon_discuss.gif
    cp -pi common/icons/anim-save.gif ace/blue/anim-save.gif

    --------------------------------
    Restore Files
    --------------------------------

    Type the following commands to restore the attachments and settings files:

    # cd $HOME/deki_backup
    # cp -pi LocalSettings.php /var/www/dekiwiki

    # cd /var/www/dekiwiki
    # gtar xvzpf $HOME/deki_backup/attachments.tar.gz

    (NOTE) If you have multi-tenant configuration of Deki, you should restore *EACH* attachments of Deki-instance as below:

    # cd <storageDir>
    # gtar xvzpf $HOME/deki_backup/attachments_<storageName>.tar.gz


    --------------------------------
    (Optional) Multi-tenant update-db.php
    --------------------------------

    If you have multi-tenant configuration of Deki, confirm the contents of LocalSettings.php to Pate's guide ( http://wiki.developer.mindtouch.com/User:PeteE/Multi-tenant_update-db.php )

    # vi /var/www/dekiwiki/LocalSettings.php

    o Remove variable listed below.

        | This avoid following error when connect to your site.
        |
        | 2008-05-31 16:45:00,626 [1] ERROR MindTouch.Data.DataCommand - Execute(Text: ' /* BanningDA::GetBansForRequest */
        | select b.*, bi.banip_ipaddress, null as banuser_user_id
        | from bans b
        | left join banips bi on b.ban_id = bi.banip_ban_id
        | where   bi.banip_ipaddress in ('127.0.0.1', 'xxx.xxx.xxx.xxx')
        | union
        | select b.*, null as banip_ipaddress, bu.banuser_user_id
        | from bans b
        | left join banusers bu on b.ban_id = bu.banuser_ban_id
        | where bu.banuser_user_id = ?USERID', Type: Text)
        | MySql.Data.MySqlClient.MySqlException: Table 'wikidb.bans' doesn't exist
        |   at MySql.Data.MySqlClient.MySqlStream.OpenPacket () [0x00000]
        |   at MySql.Data.MySqlClient.NativeDriver.ReadResult (System.UInt64& affectedRows, System.Int64& lastInsertId) [0x00000]
        |   at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet () [0x00000]
        |   at MySql.Data.MySqlClient.MySqlDataReader.NextResult () [0x00000]
        | 2008-05-31 16:45:00,664 [1] ERROR MindTouch.Dream.DreamFeatureChain - handler for GET:local://c59d84bd8740440e87ebdf0cc11b...dream.in.host=<hostname>&dream.in.scheme=https&dream.in.origin=xxx.xxx.xxx.xxx&apikey=jQj4UUVK6Sr3iB74nj4XGPJ08aE7yRyW failed (set-deki-context)()
        | MySql.Data.MySqlClient.MySqlException: Table 'wikidb.bans' doesn't exist
        |   at MySql.Data.MySqlClient.MySqlStream.OpenPacket () [0x00000]
        |   at MySql.Data.MySqlClient.NativeDriver.ReadResult (System.UInt64& affectedRows, System.Int64& lastInsertId) [0x00000]
        |   at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet () [0x00000]
        |   at MySql.Data.MySqlClient.MySqlDataReader.NextResult () [0x00000]

        $wgDBserver
        $wgDBname
        $wgDBadminuser
        $wgDBadminpassword
        $wgEmergencyContact
        $wgPasswordSender

    o Add 'db-user' and 'db-password' parameters into each wiki's entry like below.

        | This avoid following error when run the update-db.php
        |
        | Sorry! The wiki is experiencing some technical difficulties, and cannot contact the database server. <br />
        | Access denied for user 'wikiuser'@'localhost' (using password: YES)

    $wgWikis = array(
            'foo.example.com' => array(
                    'db-server' => 'localhost',
                    'db-port' => '3306',
                    'db-catalog' => 'wikidb',
                    'db-user' => 'root',
                    'db-password' => 'root'
                    ),
            'bar.example.com' => array(
                    'db-server' => 'localhost',
                    'db-port' => '3306',
                    'db-catalog' => 'wikiwhql',
                    'db-user' => 'root',
                    'db-password' => 'root'
                    ),
            'baz.example.com' => array(
                    'db-server' => 'localhost',
                    'db-port' => '3306',
                    'db-catalog' => 'wikibmlinks',
                    'db-user' => 'root',
                    'db-password' => 'root'
                    ),
    );


    --------------------------------
    Run DB Update Script
    --------------------------------

    # cd /var/www/dekiwiki/maintenance

    # php update-db.php

    Updating wikidb on localhost
    permission system DB upgrade has already been performed.
    sprocs update complete
    Applying misc database updates...done
    cleanup up special pages
    anonymous user updated for all tables
    added 'languages' config key
    Done.


    (NOTE) If you run update-db.php for multi-tenant Deki, you will see following message:

    # php update-db.php

    Updating wikidb on localhost:3306
    permission system DB upgrade has already been performed.
    sprocs update complete
    Applying misc database updates...done
    cleanup up special pages
    anonymous user updated for all tables
    added 'languages' config key

    Updating <dbWikiUser> on localhost:3306
    permission system DB upgrade has already been performed.
    sprocs update complete
    Applying misc database updates...done
    cleanup up special pages
    anonymous user updated for all tables
    added 'languages' config key

    Done.


    --------------------------------
    Clean Up The Skins Cache Folder
    --------------------------------

    Please make sure your skins/common/cache folder can be written by the apache user

    Enter the following lines to clear the skins cache:

    # cd /var/www/dekiwiki/skins/common/cache/
    # rm -rf cache-*
    # ls -laR .

    --------------------------------
    Start Dekihost
    --------------------------------

    # /etc/init.d/dekiwiki start
    # ps -ef |grep "mono"
    webservd 20741 20737  10 18:44:50 pts/3       0:05 /opt/mono/bin/mono /var/www/dekiwiki/bin/mindtouch.host.exe apikey (snip)
    webservd 20737     1   0 18:44:49 pts/3       0:00 -sh -c /opt/mono/bin/mono /var/www/dekiwiki/bin/mindtouch.host.exe apikey (snip)

    # tail -f /var/log/dekiwiki/deki-api.log
    -------------------- shutting down
    Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
    -------------------- initializing
    -------------------- initialized 1.777248 secs
    -------------------- ready 1.863673 secs
    ^C (Press [Ctrl]+[C] simultaneously)


    --------------------------------
    Start Apache server
    --------------------------------

    # svcadm enable svc:/network/http:apache2
    # ps -ef | grep httpd

    --------------------------------
    Verification Deki Wiki
    --------------------------------
    Launch a web browser, and clear the browser-cache.

    Connect to your wiki.

    http://<hostname>/index.php

    Click on Tools, then select on About to verify that you are using version 8.05.1 .

     
    --------------------------------
    Rebuild the Index
    --------------------------------
    In the wiki, click on Tools, then Control Panel, and then Site Settings. Click Rebuild Index to re-index the wiki.


    --------------------------------
    Preserve backup file to safe place
    --------------------------------

    mv -i $HOME/deki_backup/ $HOME/deki_backup_8.05_jaycooke/
    chmod 400 $HOME/deki_backup_8.05_jaycooke/*
    chown root:root $HOME/deki_backup_8.05_jaycooke/*

     

    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by