Beneath the dark glass of the monitor glowed the faintest hint of green light. A little green square blinked in the corner like a pulsating heartbeat. The whine of cathodes was palpable.

About a dozen of us stared silently into the darkness of their own monitor, as if entering a trance. A voice from behind us broke the spell: “This is called the ‘cursor’.”

The room was long and narrow, the walls lined with computers. Everyone sat with their backs to each other; together yet alone. The only human interaction was through an occasional brush against the chair-back as the teacher slowly paced the room.

And thus we were introduced to the personal computer — sitting in front of us at almost half our size, returning its own perplexed and curious gaze.

It was probably an Apple IIe. The green phosphor screen, the raised keyboard, the giant floppy disk drives. I vividly remember the sound it made while reading the disc. It was the early 1990’s and I was about 10 years old. That particular model was nearing its end of life. But it would mark a beginning for mine.

Sometimes our trip to the computer lab involved playing a game as a small group. In retrospect, it was a team-building experience. We weighed the risks and rewards. We made decisions collectively. We shared successes and failures. And if it was Oregon Trail, we always failed.

One day our teacher presented us with an ambitious class project. We were to create our own book. Each student would come up with a short story and illustrate it themself. We experienced the entire publishing process: writing, editing and layout. When everyone’s story was finished, we waited for the books to be bound. On release day, everyone was presented their own copy and read their story in front of the class. What a sense of accomplishment!

Creative collaboration. It started in that little computer lab. It continues with every project I take on.

—Mark Chambers

Mark David Chambers

Install Composer for Ubuntu 14.04 LTS and Drupal 7

Written by Mark Chambers on

Overview

  1. Prepare server
  2. Install Composer globally
  3. Install drush via Composer
  4. Install and enable Composer Manager module in Drupal
  5. Get BAT libraries via Composer

Although these instructions are for getting Booking and Availability Tools running on Drupal, each section stands on its own and may be useful for other purposes.

These instructions are for Ubuntu 12.04.5 LTS, and also tested on 14.04.5 LTS with PHP 5.6. It may need to be slightly adjusted for other versions of Linux.

1. Prepare server

A couple things are required on your Ubuntu server.

Install packages

sudo apt-get install curl git zip unzip

Restart Apache

sudo service apache2 restart

2. Install Composer globally on server

Important: Do not install Composer as root

2.1: Download and install

curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer

To test your installation, run:

composer

You should get this output:

All settings correct for using Composer
Downloading 1.2.2...

Composer successfully installed to: /usr/local/bin/composer
Use it: php /usr/local/bin/composer
dev@bornkamp:~$ composer
   ______
  / ____/___  ____ ___  ____  ____  ________  _____
 / /   / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__  )  __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
                    /_/
Composer version 1.2.2 2016-11-03 17:43:15

Usage:
  command [options] [arguments]

Options:
  -h, --help                     Display this help message
  -q, --quiet                    Do not output any message
  -V, --version                  Display this application version
      --ansi                     Force ANSI output
      --no-ansi                  Disable ANSI output
  -n, --no-interaction           Do not ask any interactive question
      --profile                  Display timing and memory usage information
      --no-plugins               Whether to disable plugins.
  -d, --working-dir=WORKING-DIR  If specified, use the given directory as working directory.
  -v|vv|vvv, --verbose           Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:

...

2.2: Correct permissions

Run this to fix cache directory write permission errors:

sudo chown -R $USER $HOME/.composer

3. Install Drush

3.1: Install latest stable Drush:

composer global require drush/drush

3.2: Verify that Drush works:

drush status

4. Install and enable Composer Manager module in Drupal

4.1: Get the latest stable version of the module from here:

https://www.drupal.org/project/composer_manager

4.2: Install and enable the module

4.3: Set Composer Directories

In a web browser, go to:

www.my-drupal-site.com/admin/config/system/composer-manager/settings

Set the Vendor directory and Composer File Directory to appropriate locations.

4.4: Linking composer with Drupal

Open a terminal window and go to the Composer File Directory and run the following command:

composer install

5. Get BAT libraries via Composer

5.1: Run composer update

Open a terminal window and go to the Composer File Directory and run the following command:

composer update

If it throws a PHP version error then go to the next step.

If no errors appear, then you are finished!

5.2: Force composer to update

Run this command:

composer update --ignore-platform-reqs

BAT should now be installed and ready to configure.