You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

  1. Check that the MAP systems users are created, Apache, PHP, and Touchstone are all installed on this system.
    ls -l /home
    /home/www/apache/bin/apachectl --version
    php --version
    /etc/init.d/shibd status
    yum install php-mbstring
    yum install php-mysqli
    
  2. Get the Drupal install package from the MAP software repository on Trogdor, and unpack it, and install into a home directory.
    scp root@trogdor:/opt/software-repository-tmp/PHP/acquia-drupal-1.0.0-beta1.1877.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
    
  3. Change the DocumentRoot settings to reflect the Drupal directory.
    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
    
  4. Create the settings.php file.
    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
    
  5. Setup the database.
    1. Create the database script
      mkdir /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 > rempve-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
      
      • Replace the dbname, dbuser, and ***** 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.
    2. Replace the socket setting for PHP with the local MySQL socket, or replace the MySQL server setting with the remote server that hosts the database.
      • For a local database, replace the default socket with the local socket.
        sed -i s#'mysql.default_socket ='#'mysql.default_socket = "/tmp/mysql.sock"'# /etc/php.ini
        sed -i s#'mysqli.default_socket ='#'mysqli.default_socket = "/tmp/mysql.sock"'# /etc/php.ini
        
      • For a remote MySQL server, set the default port and host. Use the remote server's hostname to replace "MySQL server hostname".
        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
        
  6. Bounce the server to bring the added PHP options into use.
    /etc/init.d/web restart
    
  7. To run the Drupal install script, go to the base URL of the server.
  • No labels