-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinstall.cloud9.bash
55 lines (50 loc) · 1.97 KB
/
install.cloud9.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
#
# concrete5 Installation Shell to Cloud9:
# ----------
# Version 0.3
# By katzueno
# INSTRUCTION:
# ----------
# https://github.com/katzueno/concrete5-install-shell-scripts
# USE IT AT YOUR OWN RISK!
# VARIABLES
# ----------
CONCRETE5_DOWNLOAD="http://www.concrete5.org/download_file/-/view/107738/"
CONCRETE5_VERSION="concrete5-8.4.3"
DESTINATION="/home/ubuntu/workspace"
CONCRETE_PHP_RAW="https://raw.githubusercontent.com/katzueno/cloud9-concrete5-install-script/master/config/cloud9.concrete.php"
INSTALL_LEMP="no"
INSTALL_LEMP_URL="https://raw.githubusercontent.com/GabrielGil/c9-lemp/master/install.sh"
INSTALL_PHPMYADMIN="yes"
INSTALL_CONCRETE5="no"
ADMIN_EMAIL="[email protected]"
ADMIN_PASS="t4wbSIDuQgfy"
SITE_NAME="concrete5 Demo"
SAMPLE_DATA="elemental_full"
MYSQL_USER="concrete5"
MYSQL_PASS="concrete5"
MYSQL_SERVER="127.0.0.1"
MYSQL_DATABASE="c9"
CONCRETE5_LOCALE="en_US"
# STARTS HERE
# ----------
if [ "$INSTALL_LEMP" = "yes" ]; then
curl -L ${INSTALL_LEMP_URL} | bash
lemp start
fi
cd ${DESTINATION}
if [ "$INSTALL_PHPMYADMIN" = "yes" ]; then
phpmyadmin-ctl install
fi
wget ${CONCRETE5_DOWNLOAD} -O concrete5.zip
unzip concrete5.zip
mv ${DESTINATION}/${CONCRETE5_VERSION}/* ${DESTINATION}/
chmod 755 concrete/bin/concrete5
curl ${CONCRETE_PHP_RAW} > ${DESTINATION}/application/config/concrete.php
if [ "$INSTALL_CONCRETE5" = "yes" ]; then
concrete/bin/concrete5 c5:install --db-server=${MYSQL_SERVER} --db-username=${MYSQL_USER} --db-password=${MYSQL_PASS} --db-database=${MYSQL_DATABASE} --site="${SITE_NAME}" --starting-point=${SAMPLE_DATA} --admin-email=${ADMIN_EMAIL} --admin-password="${ADMIN_PASS}"
# concrete/bin/concrete5 c5:install --db-server=${MYSQL_SERVER} --db-username=${MYSQL_USER} --db-password=${MYSQL_PASS} --db-database=${MYSQL_DATABASE} --site="${SITE_NAME}" --starting-point=${SAMPLE_DATA} --admin-email=${ADMIN_EMAIL} --admin-password="${ADMIN_PASS}" --site-locale="${CONCRETE5_LOCALE}"
fi
rm -f concrete5.zip
rm -rf ${CONCRETE5_VERSION}*