Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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