Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

  1. Check

...

  1. that

...

  1. the

...

  1. MAP

...

  1. systems

...

  1. users

...

  1. are

...

  1. created,

...

  1. Apache,

...

  1. PHP,

...

  1. and

...

  1. Touchstone

...

  1. are

...

  1. all

...

  1. installed

...

  1. on

...

  1. this

...

  1. system.

...

  1. Code Block

...

  1. 
    ls -l /home
    apachectl -version
    php --version
    /etc/init.d/shibd status
    

...

  1. Get the Drupal install package from the MAP software repository on Trogdor, and unpack it, and install into a home directory.  Make sure you have set the "troguser" environment variable.
    Code Block
    
    scp $troguser@trogdor:/opt/software-repository-tmp/PHP/drupal-6.4.tar.gz /home/www/tmp
    cd /home/www
    tar -xzvf /home/www/tmp/drupal-6.4.tar.gz
    ln -s /home/www/drupal-6.4 /home/www/drupal
    cd /home/www/drupal
    

...

  1. Change the DocumentRoot settings to reflect the Drupal directory.
    Code Block
    
    sed -i s#'DocumentRoot "/home/www/apache/htdocs"'#'DocumentRoot "/home/www/drupal"'# /home/www/apache/conf/httpd.conf
    sed -i s#'DocumentRoot "/home/www/apache/htdocs"'#'DocumentRoot "/home/www/drupal"'# /home/www/apache/conf/extra/httpd-ssl.conf
    

...

  1. Create the settings.php

...

  1. file.

...

  1. Code Block

...

  1. 
    cd /home/www/drupal
    cp sites/default/default.settings.php sites/default/settings.php
    cp /home/www/apache/htdocs/phpinfo.php /home/www/drupal
    chown -R www:www /home/www
    chmod o+w /home/www/drupal/sites/default/settings.php
    chmod o+w /home/www/drupal/sites/default
    

...

  1. Setup the database.
    1. Create the database script
      Code Block
      
      mkdir -p /home/www/sql
      cd /home/www/sql
      cat > setup-db-[dbname].sql
      create database [dbname];
      grant all on [dbname].* to '[dbuser]'@'localhost' identified by '*****' with grant option;
      grant all on [dbname].* to '[dbuser]'@'localhost.localdomain' identified by '*****' with grant option;
      ^C
      cat > remove-db-[dbname].sql
      drop database [dbname];
      revoke all privileges, grant option from '[dbuser]'@'localhost';
      drop user '[dbuser]'@'localhost';
      ^C
      mysql -p < setup-db-[dbname].sql
      

...

...

      • *

...

      • with

...

      • appropriate

...

      • database

...

      • name,

...

      • database

...

      • username,

...

      • and

...

      • password.

...

      • Also

...

      • add

...

      • additional

...

      • lines

...

      • for

...

      • each

...

      • server

...

      • that

...

      • will

...

      • need

...

      • to

...

      • access

...

      • the

...

      • database,

...

      • replacing

...

      • 'localhost'

...

      • and

...

      • 'localhost.localdomain'

...

      • with

...

      • the

...

      • server

...

      • hostname

...

      • and

...

      • server

...

      • hostname.domainname.

...

    1. Replace

...

    1. the

...

    1. socket

...

    1. setting

...

    1. for

...

    1. PHP

...

    1. with

...

    1. the

...

    1. local

...

    1. MySQL

...

    1. socket,

...

    1. or

...

    1. replace

...

    1. the

...

    1. MySQL

...

    1. server

...

    1. setting

...

    1. with

...

    1. the

...

    1. remote

...

    1. server

...

    1. that

...

    1. hosts

...

    1. the

...

    1. database.

...

      • For

...

      • a

...

      • local

...

      • database,

...

      • replace

...

      • the

...

      • default

...

      • socket

...

      • with

...

      • the

...

      • local

...

      • socket.

...

      • Code Block

...

      • 
        sed -i s#'mysql.default_socket ='#'mysql.default_socket = "/tmp/mysql.sock"'# /home/www/php/lib/php.ini
        sed -i s#'mysqli.default_socket ='#'mysqli.default_socket = "/tmp/mysql.sock"'# /home/www/php/lib/php.ini
        

...

      • For a remote MySQL server, set the default port and host. Use the remote server's hostname to replace "MySQL server hostname".
        Code Block
        
        sed -i s#'mysql.default_port ='#'mysql.default_port = "3306"'# /etc/php.ini
        sed -i s#'mysql.default_host ='#'mysql.default_host = "[MySQL server hostname]"'# /etc/php.ini
        sed -i s#'mysqli.default_port ='#'mysqli.default_port = "3306"'# /etc/php.ini
        sed -i s#'mysqli.default_host ='#'mysqli.default_host = "[MySQL server hostname]"'# /etc/php.ini
        

...

  1. Bounce the server to bring the added PHP options into use.
    Code Block
    
    /etc/init.d/web restart
    

...

  1. To run the Drupal install script, go to the base URL of the server. If you encounter problems with SQL syntax errors, check your browsers cookie settings (must be enabled for the server your are setting up), check the various solutions on this site, then drop and recreate the database, and try again.
    1. For the site and root user email addresses, use mapsupport@`hostname -f`. Use the user facing hostname for the site hostname, and in the email addresses. Since there are occasionally problems with Drupal root users not named 'admin', use 'admin' as the root username for Drupal (pending: if this is confirmed as fixed, then use 'maproot').
    2. Edit /home/www/apache/conf/extra/httpd-modules.conf,

...

    1. and

...

    1. uncomment

...

    1. the

...

    1. line

...

    1. for

...

    1. mod_rewrite.so.

...

    1. Copy

...

    1. the

...

    1. Drupal

...

    1. .htaccess

...

    1. file

...

    1. into

...

    1. the

...

    1. Apache

...

    1. extra

...

    1. confs

...

    1. directory.

...

    1. Code Block

...

    1. 
      cp /home/www/drupal/.htaccess /home/www/apache/conf/extra/httpd-drupal.conf
      chown -R www:www /home/www
      

...

    1. Edit /home/www/apache/conf/httpd.conf,

...

    1. and

...

    1. add

...

    1. an

...

    1. Include

...

    1. for

...

    1. the

...

    1. Drupal

...

    1. configs

...

    1. at

...

    1. the

...

    1. bottom

...

    1. of

...

    1. the

...

    1. drupal

...

    1. directory

...

    1. section.

...

    1. Remove

...

    1. or

...

    1. comment

...

    1. out

...

    1. other

...

    1. settings.

...

    1. Code Block

...

    1. 
      <Directory "/home/www/drupal">
      # Drupal configurations
      Include /home/www/apache/conf/extra/httpd-drupal.conf
      </Directory>
      

...