Drupal tips

Install Drupal on Ubuntu

#How to install Drupal 6 on Ubuntu 8.04
apt-get update; apt-get upgrade #first update to latest version
apt-get install -y ssh openssh-server vim-full
ln -sf /bin/bash /bin/sh
#http://howtoforge.com/perfect-server-ubuntu8.04-lts-p3 recommends the following:
apt-get -y install binutils cpp fetchmail flex gcc libarchive-zip-perl libc6-dev libcompress-zlib-perl libdb4.3-dev libpcre3 libpopt-dev lynx m4 make ncftp nmap openssl perl perl-modules unzip zip zlib1g-dev autoconf automake1.9 libtool bison autotools-dev g++ build-essential

Applying a patch

How to apply a patch in the correct directory

  • examine the patch to see the directory it expects to be in for applying the patch
  • use the -d option to make this the starting directory (the -p option can strip from the front of the path if necessary)

patch -u -p0 -d image/contrib/image_gallery/ <image_gallery_sorting_6x.module_0.patch

Search Engine Optimization links

MySQL mysqlimport examples

see: http://dev.mysql.com/doc/refman/5.0/en/mysqlimport.html
and also: http://dev.mysql.com/doc/refman/5.0/en/load-data.html

mysqlimport [options] db_name textfile1 [textfile2 ...]

cd "C:\Program Files\MySQL\MySQL Server 5.0\bin"
mysql -u root -p -e "CREATE TABLE temp_email(name VARCHAR(200), email VARCHAR(50) PRIMARY KEY)" cfaw
mysqlimport -u root -p --lines-terminated-by="\r\n" cfaw c:\temp\temp_email.tsv

Campaignmonitor.com subscribers can be downloaded as TSVs from the subscriber page
-needs separate downloads for bounces and unsubs

Colour test page

Regular colours

  • e.g. red is #FFxxxx; where xx varies from 00 through to FF
Colour 00 10 20 30 40 50 60 70 80 90 A0 B0 C0 D0 E0 F0 FF
Red                                  
Green                                  
Blue                                  
Cyan                                  
Magenta                                  
Yellow                                  
Grey/2                                  

Installing Drupal on RimuHosting.com

Here is how to install Drupal on a CentOS 5.4 Linux installation, hosted on http://RimuHosting.com

Installing Drupal on Centos5

Please note that more up-to-date instructions are available here:
http://drup.org/installing-drupal-rimuhostingcom

Here is how to install Drupal on a Centos5 Linux installation

  1. Install Centos5 including web server and mysql
  2. log in as root
  3. Update to latest version with: yum -y update yum ; yum -y update
  4. Install modules with: yum -y install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel system-config-securitylevel-tui
    Note that this is called system-confi-firewall in CentOS 6
  5. Enable .htaccess: cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.original
    vi /etc/httpd/conf/httpd.conf
    and in two places change AllowOverride None to All (may not be needed in CentOS 6
  6. Uncomment NameVirtualHost *:80
  7. Start apache with: service httpd start
  8. Run: system-config-securitylevel-tui and enable firewall for ssh and http, plus port 10000 for webmin
  9. Open a browser window pointed to the server to check if apache is running
  10. Create default page: echo "<html><head><title>Name of Server</title></head><body><h1>Name of Server</h1></body></html>" > /var/www/html/index.html
  11. Make sure server is running by visiting: http://servername/
  12. Create test script: echo "<html><head><title>Test Page</title></head><body><?php phpinfo(); ?></body></html>" > /var/www/html/testphp.php
  13. Make sure php is running by visiting: http://servername/testphp.php
  14. download and install webmin:
    WMVER=1.630-1
    wget http://prdownloads.sourceforge.net/webadmin/webmin-$WMVER.noarch.rpm
    rpm -U webmin-$WMVER.noarch.rpm
    system-config-firewall #to open port 10000
    
  15. Check it is working by visiting: http://servername:10000
  16. Use webmin to create a virtual server at /var/www/html with no server name. (This will be the default and must come first)
  17. Install MySQL with: yum -y install php-mysql mod_auth_mysql mysql-server php-gd php-mbstring
  18. Start MySQL: /etc/init.d/mysqld start
  19. Now setup MySQL: mysqladmin -u root password rootsqlpassword
  20. Make sure mysqld and httpd start on boot by checking the boxes: webmin / system / bootup and shutdown
  21. Download and install Drupal following the instructions here: http://drup.org/acquia-drupal-svn
  22. Well done! You are finished
Syndicate content