work:dotcms
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| work:dotcms [2012/09/20 21:01] – alun | work:dotcms [2013/01/10 09:46] (current) – alun | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== dotCMS ====== | ||
| + | |||
| + | ===== Build ===== | ||
| + | |||
| + | Trying a build on work PC VM (Centos 6.2). I suspect this won't have the grunt to run dotCMS - but will give it a go... | ||
| + | |||
| + | Cloned existing VM (as Springboard needed a downgraded 5.0 mysql database - dotCMS needs at least 5.1 which is the standard for CentOS6). | ||
| + | |||
| + | < | ||
| + | $ sudo service mysql stop | ||
| + | $ sudo yum remove MySQL-client MySQL-server MySQL-shared | ||
| + | ... | ||
| + | $ sudo yum install mysql-server | ||
| + | ... | ||
| + | $ sudo yum list mysql* | ||
| + | ... | ||
| + | Installed Packages | ||
| + | mysql.i686 | ||
| + | mysql-libs.i686 | ||
| + | mysql-server.i686 | ||
| + | ... | ||
| + | |||
| + | $ sudo chkconfig mysqld on | ||
| + | $ sudo chkconfig --list|grep mysqld | ||
| + | mysqld | ||
| + | $ sudo service mysqld start | ||
| + | ... | ||
| + | $ / | ||
| + | ... | ||
| + | $ sudo / | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | (Probably did not need to run mysql_secure_installation, | ||
| + | |||
| + | Increased VM memory to 2GB, and downloaded ZIP file: | ||
| + | |||
| + | < | ||
| + | $ mkdir dotcms | ||
| + | $ cd dotcms/ | ||
| + | $ unzip ~/ | ||
| + | ... | ||
| + | |||
| + | $ mysql -u root -p | ||
| + | ... | ||
| + | mysql> create database dotcms default character set = utf8 default collate = utf8_general_ci; | ||
| + | ... | ||
| + | mysql> grant all privileges on dotcms.* to " | ||
| + | ... | ||
| + | mysql> grant select on mysql.proc to " | ||
| + | ... | ||
| + | mysql> flush privileges; | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | Need to edit the database properties - in dotcms/ | ||
| + | |||
| + | < | ||
| + | $ vi dotcms/ | ||
| + | ... | ||
| + | <!-- MYSQL UTF8 --> | ||
| + | < | ||
| + | type=" | ||
| + | url=" | ||
| + | username=" | ||
| + | removeAbandoned=" | ||
| + | validationQuery=" | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | Edit the server settings (host/port) - defaults to localhost, port 80: | ||
| + | |||
| + | < | ||
| + | $ vi dotcms/ | ||
| + | ... | ||
| + | < | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | Update script permissions: | ||
| + | |||
| + | < | ||
| + | $ chmod 755 dotcms/ | ||
| + | $ chmod 755 dotcms/ | ||
| + | </ | ||
| + | |||
| + | Start-up... | ||
| + | |||
| + | (NOTE: On a re-configured VM make sure that you don't have a rogue $CATALINA_HOME setting - as I did - I've set this up now with $JAVA_HOME set, but no $CATALINA_HOME) | ||
| + | |||
| + | < | ||
| + | $ cd dotcms/ | ||
| + | $ ./ | ||
| + | $ less tomcat/ | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | Up and running... | ||
| + | |||
| + | ===== WebDav ===== | ||
| + | |||
| + | On Centos6 install devfs2: | ||
| + | |||
| + | < | ||
| + | $ sudo yum install davfs2 | ||
| + | ... | ||
| + | |||
| + | $ sudo mkdir /dav | ||
| + | $ sudo mount -t davfs http:// | ||
| + | Please enter the username to authenticate with server | ||
| + | http:// | ||
| + | Username: [email protected] | ||
| + | Please enter the password to authenticate user [email protected] with server | ||
| + | http:// | ||
| + | Password: | ||
| + | |||
| + | </ | ||
| + | |||
| + | This makes files available on Centos filesystem: | ||
| + | |||
| + | < | ||
| + | $ ls -l /dav/ | ||
| + | total 0 | ||
| + | drwxr-xr-x 15 root root 0 Apr 25 10:05 demo.dotcms.com | ||
| + | drwx------ | ||
| + | drwxr-xr-x 12 root root 0 Jun 21 16:53 m.demo.dotcms.com | ||
| + | drwxr-xr-x | ||
| + | drwxr-xr-x | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Build on Home Laptop ===== | ||
| + | |||
| + | **N.B. dotCMS 2.1.1 doesn' | ||
| + | |||
| + | Started with standard Centos 6.3 netinstall... | ||
| + | |||
| + | [[linux: | ||
| + | |||
| + | Used default (minimal) installation. | ||
| + | |||
| + | Will need Java 6, MySQL 5.1, and dotCMS software... | ||
| + | |||
| + | < | ||
| + | # yum update | ||
| + | ... | ||
| + | |||
| + | # yum install mysql-server | ||
| + | ... | ||
| + | # chkconfig mysqld on | ||
| + | # service mysqld start | ||
| + | ... | ||
| + | # / | ||
| + | |||
| + | |||
| + | # cd /srv/ | ||
| + | # tar -zxf ~/ | ||
| + | # ln -s / | ||
| + | # ls -l | ||
| + | lrwxrwxrwx. 1 root root 17 Sep 19 23:01 java -> / | ||
| + | drwxr-xr-x. 8 root root 4096 Aug 29 02:12 jdk1.7.0_07 | ||
| + | |||
| + | </ | ||
| + | |||
| + | Added non-root account, and define Java home an path: | ||
| + | |||
| + | < | ||
| + | # useradd dotcms | ||
| + | # passwd dotcms | ||
| + | ... | ||
| + | |||
| + | # su - dotcms | ||
| + | $ vi ~/ | ||
| + | ... | ||
| + | export JAVA_HOME=/ | ||
| + | export PATH=$JAVA_HOME/ | ||
| + | |||
| + | </ | ||
| + | |||
| + | Now unpack the dotCMS package (had to install unzip too!): | ||
| + | |||
| + | < | ||
| + | # yum install unzip | ||
| + | ... | ||
| + | $ mkdir dotcms | ||
| + | $ cd dotcms | ||
| + | $ unzip ../ | ||
| + | ... | ||
| + | |||
| + | </ | ||
| + | |||
| + | Create database, and user: | ||
| + | |||
| + | < | ||
| + | $ mysql -u root -p | ||
| + | ... | ||
| + | mysql> create database dotcms default character set = utf8 default collate = utf8_general_ci; | ||
| + | ... | ||
| + | mysql> grant all privileges on dotcms.* to " | ||
| + | ... | ||
| + | mysql> grant select on mysql.proc to " | ||
| + | ... | ||
| + | mysql> flush privileges; | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | Configure the database properties... | ||
| + | |||
| + | < | ||
| + | $ vi ~/ | ||
| + | ... | ||
| + | <!-- MYSQL UTF8 --> | ||
| + | < | ||
| + | type=" | ||
| + | url=" | ||
| + | username=" | ||
| + | removeAbandoned=" | ||
| + | validationQuery=" | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | Edit the server settings (host/port) - defaults to localhost, port 80: | ||
| + | |||
| + | < | ||
| + | $ vi ~/ | ||
| + | ... | ||
| + | < | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | Update script permissions: | ||
| + | |||
| + | < | ||
| + | $ chmod 755 ~/ | ||
| + | $ chmod 755 ~/ | ||
| + | </ | ||
| + | |||
| + | Start-up... | ||
| + | |||
| + | < | ||
| + | $ cd ~/ | ||
| + | $ ./ | ||
| + | $ less tomcat/ | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Resources ===== | ||
| + | |||
| + | Documentation: | ||
| + | |||
| + | Architecture Overview: {{: | ||
| + | |||
| + | |||
| + | ===== Site Building ===== | ||
| + | |||
| + | So how do we build and deploy sites? | ||
| + | |||
| + | Have started creating a copy of the Significance website. | ||
| + | |||
| + | Started by creating a copy of the magazine article section page as a dotCMS template (everything in one template), then getting all the assets (images, CSS, javascript) and loading then into dotCMS via webdav. | ||
| + | |||
| + | > | ||
| + | |||
| + | From this starting point I have started to separate out the parts of this page into Springboard like blocks, using dotCMS containers. | ||
| + | |||
| + | >How can we move templates from one site to another, or one dotCMS instance to another? | ||
| + | |||
| + | >How can we control access to site editors, to only allow them access to edit ' | ||
| + | |||
| + | >The use of containers in templates is hard-coded - not re-using templates as in Springboard. How would we organise sites in dotCMS? | ||
| + | |||
| + | Next I want to create a magazine article listing... | ||
| + | |||
| + | ...also work out how to export/ | ||
| + | |||
| + | |||
| + | ===== gitflow on Centos ===== | ||
| + | |||
| + | < | ||
| + | $ curl -LO http:// | ||
| + | ... | ||
| + | |||
| + | $ sudo vi / | ||
| + | [epel] | ||
| + | name=Extra Packages for Enterprise Linux 6 - $basearch | ||
| + | # | ||
| + | mirrorlist=https:// | ||
| + | failovermethod=priority | ||
| + | enabled=0 | ||
| + | gpgcheck=1 | ||
| + | gpgkey=file:/// | ||
| + | ... | ||
| + | |||
| + | $ sudo yum --enablerepo=epel install gitflow | ||
| + | ... | ||
| + | |||
| + | |||
| + | </ | ||
| + | |||
| + | === Licence Key === | ||
| + | |||
| + | The licence file I have moved and preserved on my dotCMS instances is found here: | ||
| + | |||
| + | dotCMS/ | ||
| + | |||
| + | (The license folder doesn’t exist if there’s no licence key.) This will be preserved if all instance assets are copied from one server to another – and I assume the key will work on any instance. | ||
| + | |||
| + | |||
| + | |||
