You are here: Foswiki>ITB Web>DrupalInstall (19 Jun 2010, RobGardner)Edit Attach

DrupalInstall

Installation

  • using itb3 and same mysql db as mw
  • Download into /opt
  • Copied settings file, create files directory (see instructions)
  • Sym link from /var/www/html/
  • Setting up database:
    #mysql -u root -p
    mysql> use mysql;
    mysql> INSERT INTO user (Host,User,Password) VALUES('%','drupaluser',PASSWORD('******'));
    mysql> select * from user;
    mysql> exit;
    #mysqladmin -u root -p create drupaldb  (got permission denied using drupaluser & pass)
    #mysql
     mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON drupaldb TO 'drupaluser'@'localhost' IDENTIFIED BY 'drupalpasswd';
    Query OK, 0 rows affected (0.00 sec)
    
    

  • User / password not setup correct? Completed installation w/ root.
  • Admin report says GD library for PHP missing
  • Check for availability:
     [root@itb3 www]# yum --enablerepo remi info php-gd
    Loading "kernel-module" plugin
    Setting up repositories
    remi                      100% |=========================| 2.0 kB    00:00     
    Reading repository metadata in from local files
    primary.xml.gz            100% |=========================|  49 kB    00:00     
    remi      : ################################################## 169/169
    Added 65 new packages, deleted 53 old in 0.23 seconds
    Available Packages
    Name   : php-gd
    Arch   : i386
    Version: 5.2.10
    Release: 1.el4.remi
    Size   : 112 k
    Repo   : remi
    Summary: A module for PHP applications for using the gd graphics library
    Description:
     The php-gd package contains a dynamic shared object that will add
    support for using the gd graphics library to PHP.
    
    [root@itb3 www]#  
  • PHPGDInstallLog
  • Also, yum --enablerepo remi install php-mbstring
  • To enable mod_rewrite, uncommented: "AllowOverride All" from "AllowOverride None"
  • Some image modules from Drupal require image magic (/usr/bin/convert, see further here): yum --enablerepo remi install ImageMagick

Configuration

  • Admin account is rwg

Updating 6-12-2010

  • Article: http://drupal.org/node/297496
  • Mysql helpers
  • Backing up:
    # mkdir /opt/drupal.2010-06-12
    # mysql -u root -p
    mysql> show databases;
    +--------------------+
    | Database           |
    +--------------------+
    | information_schema | 
    | drupaldb           | 
    | mysql              | 
    | test               | 
    | wikidb             | 
    +--------------------+
    5 rows in set (0.00 sec)
    
    mysql> 
    mysql> use drupaldb;
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    
    Database changed
    mysql> show tables;
    +-----------------------------+
    | Tables_in_drupaldb          |
    +-----------------------------+
    | access                      | 
    | accesslog                   | 
    | actions                     | 
    | actions_aid                 | 
    | advanced_help_index         | 
    | aggregator_category         | 
    | aggregator_category_feed    | 
    | aggregator_category_item    | 
    | aggregator_feed             | 
    | aggregator_item             | 
    | authmap                     | 
    | batch                       | 
    | blocks                      | 
    | blocks_roles                | 
    | blogapi_files               | 
    | book                        | 
    | boxes                       | 
    | cache                       | 
    | cache_block                 | 
    | cache_content               | 
    | cache_filter                | 
    | cache_form                  | 
    | cache_menu                  | 
    | cache_page                  | 
    | cache_update                | 
    | cache_views                 | 
    | cache_views_data            | 
    | comments                    | 
    | contact                     | 
    | content_group               | 
    | content_group_fields        | 
    | content_node_field          | 
    | content_node_field_instance | 
    | ctools_css_cache            | 
    | ctools_object_cache         | 
    | delegator_handlers          | 
    | delegator_pages             | 
    | delegator_weights           | 
    | files                       | 
    | filter_formats              | 
    | filters                     | 
    | flood                       | 
    | forum                       | 
    | history                     | 
    | image                       | 
    | image_attach                | 
    | imagecache_action           | 
    | imagecache_preset           | 
    | menu_custom                 | 
    | menu_links                  | 
    | menu_router                 | 
    | node                        | 
    | node_access                 | 
    | node_comment_statistics     | 
    | node_counter                | 
    | node_revisions              | 
    | node_type                   | 
    | panels_display              | 
    | panels_mini                 | 
    | panels_node                 | 
    | panels_pane                 | 
    | permission                  | 
    | poll                        | 
    | poll_choices                | 
    | poll_votes                  | 
    | profile_fields              | 
    | profile_values              | 
    | role                        | 
    | search_dataset              | 
    | search_index                | 
    | search_node_links           | 
    | search_total                | 
    | sessions                    | 
    | system                      | 
    | term_data                   | 
    | term_hierarchy              | 
    | term_node                   | 
    | term_relation               | 
    | term_synonym                | 
    | upload                      | 
    | url_alias                   | 
    | users                       | 
    | users_roles                 | 
    | variable                    | 
    | views_display               | 
    | views_object_cache          | 
    | views_view                  | 
    | vocabulary                  | 
    | vocabulary_node_types       | 
    | watchdog                    | 
    +-----------------------------+
    90 rows in set (0.00 sec)
    
    mysql> describe users;
    +------------------+------------------+------+-----+---------+----------------+
    | Field            | Type             | Null | Key | Default | Extra          |
    +------------------+------------------+------+-----+---------+----------------+
    | uid              | int(10) unsigned | NO   | PRI | NULL    | auto_increment | 
    | name             | varchar(60)      | NO   | UNI |         |                | 
    | pass             | varchar(32)      | NO   |     |         |                | 
    | mail             | varchar(64)      | YES  | MUL |         |                | 
    | mode             | tinyint(4)       | NO   |     | 0       |                | 
    | sort             | tinyint(4)       | YES  |     | 0       |                | 
    | threshold        | tinyint(4)       | YES  |     | 0       |                | 
    | theme            | varchar(255)     | NO   |     |         |                | 
    | signature        | varchar(255)     | NO   |     |         |                | 
    | signature_format | smallint(6)      | NO   |     | 0       |                | 
    | created          | int(11)          | NO   | MUL | 0       |                | 
    | access           | int(11)          | NO   | MUL | 0       |                | 
    | login            | int(11)          | NO   |     | 0       |                | 
    | status           | tinyint(4)       | NO   |     | 0       |                | 
    | timezone         | varchar(8)       | YES  |     | NULL    |                | 
    | language         | varchar(12)      | NO   |     |         |                | 
    | picture          | varchar(255)     | NO   |     |         |                | 
    | init             | varchar(64)      | YES  |     |         |                | 
    | data             | longtext         | YES  |     | NULL    |                | 
    +------------------+------------------+------+-----+---------+----------------+
    19 rows in set (0.00 sec)
    
    mysql> 
    mysql> select * from users;
    +-----+------+----------------------------------+----------------------+------+------+-----------+-------+-----------+------------------+------------+------------+------------+--------+----------+----------+---------+----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
    | uid | name | pass                             | mail                 | mode | sort | threshold | theme | signature | signature_format | created    | access     | login      | status | timezone | language | picture | init                 | data                                                                                                                                                 |
    +-----+------+----------------------------------+----------------------+------+------+-----------+-------+-----------+------------------+------------+------------+------------+--------+----------+----------+---------+----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
    |   0 |      |                                  |                      |    0 |    0 |         0 |       |           |                0 |          0 |          0 |          0 |      0 | NULL     |          |         |                      | NULL                                                                                                                                                 | 
    |   1 | rwg  | 8c2753548775b4161e531c323ea24c08 | rwg@hep.uchicago.edu |    0 |    0 |         0 |       |           |                0 | 1246560574 | 1276026441 | 1276024236 |      1 | -18000   |          |         | rwg@hep.uchicago.edu | a:4:{s:14:"picture_delete";s:0:"";s:14:"picture_upload";s:0:"";s:7:"contact";i:0;s:13:"form_build_id";s:37:"form-e86b3f3bab3eb52c605d899942820a24";} | 
    |   3 | joe  | 8c2753548775b4161e531c323ea24c08 | rob.rwg@gmail.com    |    0 |    0 |         0 |       |           |                0 | 1246564826 | 1246565863 | 1246564868 |      1 | -18000   |          |         | rob.rwg@gmail.com    | a:1:{s:13:"form_build_id";s:37:"form-ea3edcf9498b71354c987670fb7ba011";}                                                                             | 
    +-----+------+----------------------------------+----------------------+------+------+-----------+-------+-----------+------------------+------------+------------+------------+--------+----------+----------+---------+----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
    3 rows in set (0.00 sec)
    
    mysql> quit;
    
    # cd /opt
    # mkdir /opt/drupal.2010-06012
    # mysqldump -u root -p drupaldb > /opt/drupal.2010-06-12/osgmeta_db.sql
    # tar -czvpf /opt/drupal.2010-06-12/osgmeta.tar.gz /opt/drupal/*
    # tar -xvof drupal-6.17.tar 
    # rm drupal
    # ln -s drupal-6.17 drupal
    # cd /opt/drupal/sites/all/
    # cp -r /opt/drupal-6.13/sites/all/modules/ .
    # cd /opt/drupal/sites/default/
    # cp -r /opt/drupal-6.13/sites/default/files .
    # cp -r /opt/drupal-6.13/sites/default/settings.php .
    

  • Go to webpage to update database: http://itb3.uchicago.edu/d/update.php
  • I can't access, since I didn't login as the admin user. It gives me instructions to workaround (a temporary setting in the settings.php file)
  • After the change I can access the update database page, I press update
    The following queries were executed
    system module
    Update #6052
    ALTER TABLE {menu_router} ADD INDEX tab_root_weight_title (tab_root(64), weight, title)
    Update #6053
    ALTER TABLE {system} ADD INDEX type_name (type(12), name)
    Update #6054
    CREATE TABLE {semaphore} ( `name` VARCHAR(255) NOT NULL DEFAULT '', `value` VARCHAR(255) NOT NULL DEFAULT '', `expire` DOUBLE NOT NULL, PRIMARY KEY (name), INDEX expire (expire) ) /*!40100 DEFAULT CHARACTER SET UTF8 */
    Update #6055
    ALTER TABLE {url_alias} DROP INDEX src_language
    ALTER TABLE {url_alias} DROP KEY dst_language
    ALTER TABLE {url_alias} ADD INDEX src_language_pid (src, language, pid)
    ALTER TABLE {url_alias} ADD UNIQUE KEY dst_language_pid (dst, language, pid)
    dblog module
    Update #6000
    ALTER TABLE {watchdog} CHANGE `referer` `referer` TEXT DEFAULT NULL
    statistics module
    Update #6000
    ALTER TABLE {accesslog} CHANGE `url` `url` TEXT DEFAULT NULL
  • Not sure there were any problems.
  • Site stuck offline. See PutDrupalOnline.
  • When I get into the updated site, through the rwg admin account, I go to http://itb3.uchicago.edu/d/admin/reports/status and find a number of problems. Some are related to ownership/permissions, so I:
    # cd /opt/drupal/sites
    # chown -R apache default/
    # chgrp -R apache default/
    
  • Suddenly many of the errors vanished - the update cron seems to have run. Only two errors left.
  • # cp sites/all/modules/image/image.imagemagick.inc ./includes/
  • Ran cron manually, fixed that error. One left.
  • Message: Module and theme update status Not secure! There are security updates available for one or more of your modules or themes. To ensure the security of your server, you should update immediately! See the available updates page for more information.
  • I download a bunch of modules that need updating
  • I put the new versions in /opt/drupal/sites/all/modules
  • Periodically re-run the version check utility (link off the admins/modules page).

Problem changing theme

  • I changed the administrative theme and broke the site - only get blank pages.
  • So I am going into the database to fix it, hopefully. Reference: http://drupal.org/node/200774
  • Tried:
    mysql> update system set status=1 where name='garland';
    Query OK, 1 row affected (0.01 sec)
    Rows matched: 1  Changed: 1  Warnings: 0
    mysql> update users set theme='garland' where uid='1';
    Query OK, 1 row affected (0.00 sec)
    Rows matched: 1  Changed: 1  Warnings: 0
    
  • Did not work. Second try:
    mysql> update variable set value='s:7:"garland"' where name ='theme_default';
    Query OK, 1 row affected (0.00 sec)
    Rows matched: 1  Changed: 1  Warnings: 0
    mysql> truncate cache;
    Query OK, 0 rows affected (0.00 sec)
    mysql> 
  • This "worked" - I can now see something, the old garland theme. However there are lots of errors:
    warning: require_once(./sites/all/modules/cck/modules/content_multigroup/panels/content_types/content_multigroup.inc) [function.require-once]: failed to open stream: No such file or directory in /opt/drupal-6.17/sites/all/modules/ctools/includes/plugins.inc on line 297.
  • I am wondering if this is related to changes in modules yesterday - eg., CCK. (cck-6.x-2.7.tar - what was I using before?)
  • At least with the garland theme I am able to administer the site once again, though block assignments have been lost (easy to recover).

Multisite Dupal

  • MWT2 project page
  • OSG Sites Community
  • US ATLAS Facilities Integration Program
  • NSF (APAI) project

Linkage to MediaWiki

  • Link to a shared mediawiki information base
  • Anyone with a drupal account can access and contribute

References


-- RobGardner - 02 Jul 2009
Topic revision: r6 - 19 Jun 2010, RobGardner
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback