Drupal tips

Command line Drupal install and update script for multi-site hosting

Maintaining a Drupal site, or a collection of sites is much easier if everything is kept completely separate--Drupal core, contributed modules, and the site itself.
This is even more important if multiple sites are hosted on the same server. Drupal's own multi-site support can be a nightmare to maintain, believe me! (e.g. when you want to upgrade modules or core).
A must simpler and easily supported configuration is to keep everything separate and to use symbolic links to tie it all together. For example, I keep:

Technical Notes

These notes are my personal online notebook of useful commands and "how-to's". You are welcome to make use of them if you find them helpful. They obviously don't come with any warranty! Click on one of the category tags above for the notes in any category.

The following module is missing from the file system

If you are getting the error message:

The following module is missing from the file system: <em class="placeholder"> <<module name>> </em>. In order to fix this, put the module back in its  original location.

Upgrading CentOS 6 to PHP 5.4 (or 5.5)

  • SCL is the way to go since it has RedHat’s blessing

Note that it is the .conf file that controls which version of php is used. For some reason this does not seem to be available for php55.

Add mobile theme to Drupal site

Some resources for setting up backups:

Comparisons

Duplicity

Rsync

  • Main resources

Installing Foundation on a bare Ubuntu 14.04 system

The goal is to sync a common directory structure over multiple sites.

Permissions on server

  • create sync user:
useradd -g office -d /home/common -c "btsync service" -m btsync
  • Don’t use a sticky bit, or sync will not be able to delete files
  • Make sure all contributors to /home/common have primary group office and umask=002
    • This will mean that they all have read/write access to the common files
  • Recommended to use the SGID bit to lock all new files with group office and prevent this changing
chgrp -R office /home/common
chmod g+s /home/common #just to top directory (assume no sub-directories)
chmod -R g+w /home/common
  • Note that if a user creates a new file, when btsync replicates it on other systems it will lose ownership information (and be owned by btsync). But because it will have group office it will be editable.

First time setup

Installing Drupal on Ubuntu 16.04

  • Install LAMP stack
apt -y install openssh-server
apt -y install tasksel
tasksel install lamp-server
  • Some basic stuff

Webform formatting

First: install server software and start it

yum install nfs-utils nfs-utils-lib system-config-nfs
yum install nfs-utils nfs4-acl-tools portmap
chkconfig nfs on
chkconfig portmap on
service nfs start
echo 'portmap:ALL' >> /etc/hosts.deny
echo 'portmap:192.168.1.0/24' >> /etc/hosts.allow
service portmap start

run the firewall gui and turn on NFS4 (2049)

Clouidflare

yum install ntp ntpdate ntp-doc
chkconfig ntpd on
ntpdate pool.ntp.org
/etc/init.d/ntpd start
date

from: www.cyberciti.biz/…erver-clock

JavaScript MVC Frameworks

A new way of creating a website is using what is sometimes called a “headless” site, with the front end being served by an MVC framework (Model View Controller).

Headless Drupal means using Drupal purely for content creation and management and feeding all the data in JSON format to a JavaScript front end.

Syndicate content