Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 47 lines (42 sloc) 1.565 kb
d219bc7 @AlainODea Automated Installation Script
AlainODea authored
1 #!/bin/bash
2 ZOTONIC=/home/zotonic && \
3 SHELL=/bin/bash && \
4 apt-get install -y \
5 erlang \
af2751d @mworrell Added erlang_src, with thanks to Fabian Moser.
mworrell authored
6 erlang-src \
d219bc7 @AlainODea Automated Installation Script
AlainODea authored
7 build-essential \
8 postgresql-8.4 \
9 imagemagick \
463e6b1 @arjan Updated the zotonic_install script
arjan authored
10 exif \
11 git && \
d219bc7 @AlainODea Automated Installation Script
AlainODea authored
12
13 echo "CREATE USER zotonic WITH PASSWORD 'zotonic';
14 ALTER ROLE zotonic WITH CREATEDB;
15 CREATE DATABASE zotonic WITH OWNER = zotonic ENCODING = 'UTF8';
16 \c zotonic
17 CREATE LANGUAGE \"plpgsql\";" | su -l postgres -c psql && \
18 echo "# Zotonic settings
e6c78c6 @AlainODea Enhance PostgreSQL security
AlainODea authored
19 local all zotonic ident
20 host all zotonic 127.0.0.1/32 md5
21 host all zotonic ::1/128 md5" >> /etc/postgresql/8.4/main/pg_hba.conf && \
d219bc7 @AlainODea Automated Installation Script
AlainODea authored
22 /etc/init.d/postgresql reload && \
23
24 mkdir /home/zotonic &&\
25 useradd -d $ZOTONIC -s /bin/bash zotonic && \
26 chown -R zotonic:zotonic $ZOTONIC && \
27
463e6b1 @arjan Updated the zotonic_install script
arjan authored
28 echo "git clone git://github.com/zotonic/zotonic.git zotonic && \
d219bc7 @AlainODea Automated Installation Script
AlainODea authored
29 cd zotonic/ && \
30 make && \
31 echo export PATH=\$PATH:\$HOME/zotonic/bin > \$HOME/.profile && \
32 . \$HOME/.profile && \
33 zotonic start" | su -l zotonic && \
34
35 CONFIG=$ZOTONIC/zotonic/priv/config && \
36 while [ ! -f $CONFIG ]
37 do
38 sleep 2
39 done && \
40 PASSWORD=`cat $CONFIG | grep password | sed -E 's/^\s\{\s*password\s*,\s*"(.*?)".*/\1/'` && \
41 echo "
42 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
43 Zotonic has been successfully installed:
44 - Visit http://locahost:8000/ to see the Sites administration page
45 - The password for login to this page is $PASSWORD
46 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
Something went wrong with that request. Please try again.