CVS Drupal 6 HOWTO
The following walkthrough is just a boiled down version of the great info found at the links below, this howto does the following:
Setups a CVS based drupal using version 6 dev.
puts the non cvs files and folders into your home directory and softlinks them into the CVS drupal folder. this includes:
- sites/default/settings.php
- sites/all/libraries
- sites/default/files
The following resources are very helpful:
- http://www.redleafmedia.com/blog/converting-existing-drupal-site-cvs
- http://www.redleafmedia.com/blog/fast-drupal-installation-and-updates-cvs
- http://nicksergeant.com/blog/drupal/painless-drupal-revision-control-cvs...
- http://cvs.drupal.org/viewvc.py/drupal/?hideattic=0
Create the directory to hold your drupal, eg /var/www/cms then
cd /var/www
cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal checkout -d cms -r DRUPAL-6 drupalThis completes the checkout of drupal 6 from the CVS server
next, we should get the modules directory, we do this by entering the folder hierarchy and checking out the modules and themes folder only from the cvs repo
cd /var/www/cms/sites/all
cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -d modules -l contributions/modules
cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -d themes -l contributions/themesNow create a libraries directory elsewhere and link it to your drupal install.
mkdir ~/drupalcode
mkdir ~/drupalcode/libraries
ln -s ~/drupalcode/libraries /var/www/cms/sites/all/librariesNow we will install some critical modules:
cd /var/www/cms/sites/all/modules
cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -d drush-HEAD -r HEAD contributions/modules/drush/
cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -d admin_menu -r DRUPAL-6--3 contributions/modules/admin_menu
cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -d advanced_help -r HEAD contributions/modules/advanced_help
cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -d better_perms -r DRUPAL-6--1 contributions/modules/better_perms
cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -d codefilter -r DRUPAL-6--1 contributions/modules/codefilter
cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -d cck -r DRUPAL-6--2 contributions/modules/cck
cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -d calendar -r DRUPAL-6--2 contributions/modules/calendar
cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -d date -r DRUPAL-6--2 contributions/modules/date
cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -d devel -r DRUPAL-6--1 contributions/modules/devel
cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -d pathauto -r DRUPAL-6--1 contributions/modules/pathauto
cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -d rules -r DRUPAL-6--1 contributions/modules/rules
cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -d token -r DRUPAL-6--1 contributions/modules/token
cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -d views_bulk_operations -r DRUPAL-6--1 contributions/modules/views_bulk_operations
cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -d wysiwyg -r DRUPAL-6--2 contributions/modules/wysiwygNow lets install a theme:
cd /var/www/cms/sites/all/themes
cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -d pixture_reloaded -r DRUPAL-6--3 contributions/themes/pixture_reloadedNow before we can start the actual drupal install lets, set up our settings file and link it and make it writeable for the install.:
cp /var/www/cms/sites/default/default.settings.php ~/drupalcode/settings/settings.php
ln -s ~/drupalcode/settings/settings.php /var/www/cms/sites/default/settings.php
chmod 775 ~/drupalcode/settings/settings.php
mkdir ~/drupalfiles
chmod 775 ~/drupalfiles
ln -s ~/drupalfiles /var/www/cms/sites/default/filesMake your database and user,
You can now start the drupal install, when drupal is finished with your settings.php set it back to the correct write mode:
chmod 644 ~/drupalcode/settings/settings.phpNow lets set up the drupal shell aka drush (note if you have another site on this server with drush installed you wont need to do this - skip to the test):
ln -s /var/www/cms/sites/all/modules/drush-HEAD/drush /usr/bin/drushNow lets test drush and see if it is working:
# if you installed drush and linked it from this site to the bin dir as above then:
drush status
# but if you skipped the install becuase it is linked already do this:
cd /var/www/cms
sites/all/modules/drush-HEAD/drush statusThe results should look like this:
PHP configuration : /etc/php5/cli/php.ini
Drupal Root : /var/www/cms
Drupal version : 6.15-dev
Site Path : sites/default
Site URI : http://default
Database Driver : pgsql
Database Hostname : localhost
Database Username : demo
Database Name : cvsdrupal
Database Password : demo
Database : Connected
Drupal Bootstrap : Successful
Drupal User : AnonymousIf you now seem to have drush working then lets really test it out.
First enable all your modules in drupal, If you followed this howto word for word then you will notice that VBO is not usable becuase views is not installed, so lets take care of that. We will use drush to deploy views from CVS then enable both modules.
drush-HEAD/drush -v dl views --package-handler=cvs
# or
drush -v dl views --package-handler=cvs
# then
drush-HEAD/drush enable views
drush-HEAD/drush enable views_bulk_operations
#or
drush enable views
drush enable views_bulk_operationsYour life just got a whole lot easier and faster.
Updataing a contrib module
From the module folder, use the targeted release version eg. 6.x-3.2
cvs update -r DRUPAL-6--3-2 -dPPopular content