Updates to install scripts
This commit is contained in:
parent
7510846fcc
commit
e7357c1788
3 changed files with 23 additions and 15 deletions
|
@ -4,14 +4,9 @@ if hash firewall-cmd 2>/dev/null; then
|
||||||
firewallCmdExists=yes
|
firewallCmdExists=yes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function installBase {
|
function installPrerequisities {
|
||||||
local urlBaseTrusted="$1"
|
|
||||||
local urlBaseSandbox="$2"
|
|
||||||
local urlBasePublic="$3"
|
|
||||||
local wwwHost="$4"
|
|
||||||
|
|
||||||
yum -y install epel-release
|
yum -y install epel-release
|
||||||
|
|
||||||
curl --silent --location https://rpm.nodesource.com/setup_10.x | bash -
|
curl --silent --location https://rpm.nodesource.com/setup_10.x | bash -
|
||||||
cat > /etc/yum.repos.d/mongodb-org.repo <<EOT
|
cat > /etc/yum.repos.d/mongodb-org.repo <<EOT
|
||||||
[mongodb-org-4.0]
|
[mongodb-org-4.0]
|
||||||
|
@ -21,19 +16,26 @@ gpgcheck=1
|
||||||
enabled=1
|
enabled=1
|
||||||
gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc
|
gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc
|
||||||
EOT
|
EOT
|
||||||
|
|
||||||
yum -y install mariadb-server nodejs ImageMagick git python redis pwgen bind-utils gcc-c++ make mongodb-org bzip2
|
yum -y install mariadb-server nodejs ImageMagick git python redis pwgen bind-utils gcc-c++ make mongodb-org bzip2
|
||||||
|
|
||||||
systemctl start mariadb
|
systemctl start mariadb
|
||||||
systemctl enable mariadb
|
systemctl enable mariadb
|
||||||
|
|
||||||
systemctl start redis
|
systemctl start redis
|
||||||
systemctl enable redis
|
systemctl enable redis
|
||||||
|
|
||||||
systemctl start mongod
|
systemctl start mongod
|
||||||
systemctl enable mongod
|
systemctl enable mongod
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function installMailtrain {
|
||||||
|
local urlBaseTrusted="$1"
|
||||||
|
local urlBaseSandbox="$2"
|
||||||
|
local urlBasePublic="$3"
|
||||||
|
local wwwHost="$4"
|
||||||
|
|
||||||
mysqlPassword=`pwgen 12 -1`
|
mysqlPassword=`pwgen 12 -1`
|
||||||
mysqlRoPassword=`pwgen 12 -1`
|
mysqlRoPassword=`pwgen 12 -1`
|
||||||
|
|
||||||
|
@ -259,6 +261,8 @@ EOT
|
||||||
|
|
||||||
|
|
||||||
function createCertificates {
|
function createCertificates {
|
||||||
|
# This assumes that HTTPD is not yet running
|
||||||
|
|
||||||
local hostTrusted="$1"
|
local hostTrusted="$1"
|
||||||
local hostSandbox="$2"
|
local hostSandbox="$2"
|
||||||
local hostPublic="$3"
|
local hostPublic="$3"
|
||||||
|
|
|
@ -43,10 +43,12 @@ hostSandbox="$2"
|
||||||
hostPublic="$3"
|
hostPublic="$3"
|
||||||
email="$4"
|
email="$4"
|
||||||
|
|
||||||
|
installPrerequisities
|
||||||
|
|
||||||
createCertificates "${hostTrusted}" "${hostSandbox}" "${hostPublic}" "${email}"
|
createCertificates "${hostTrusted}" "${hostSandbox}" "${hostPublic}" "${email}"
|
||||||
|
|
||||||
installHttps "${hostTrusted}" 443 "${hostSandbox}" 443 "${hostPublic}" 443 "/etc/letsencrypt/live/${hostPublic}/cert.pem" "/etc/letsencrypt/live/${hostPublic}/privkey.pem" "/etc/letsencrypt/live/${hostPublic}/chain.pem"
|
installHttps "${hostTrusted}" 443 "${hostSandbox}" 443 "${hostPublic}" 443 "/etc/letsencrypt/live/${hostPublic}/cert.pem" "/etc/letsencrypt/live/${hostPublic}/privkey.pem" "/etc/letsencrypt/live/${hostPublic}/chain.pem"
|
||||||
|
|
||||||
installBase "https://${hostTrusted}" "https://${hostSandbox}" "https://${hostPublic}" 127.0.0.1
|
installMailtrain "https://${hostTrusted}" "https://${hostSandbox}" "https://${hostPublic}" 127.0.0.1
|
||||||
|
|
||||||
installService
|
installService
|
||||||
|
|
|
@ -36,6 +36,8 @@ if [ $# -lt 0 ]; then
|
||||||
HELP
|
HELP
|
||||||
fi
|
fi
|
||||||
|
|
||||||
installBase http://localhost:3000 http://localhost:3003 http://localhost:3004 0.0.0.0
|
installPrerequisities
|
||||||
|
|
||||||
|
installMailtrain http://localhost:3000 http://localhost:3003 http://localhost:3004 0.0.0.0
|
||||||
|
|
||||||
installService
|
installService
|
||||||
|
|
Loading…
Reference in a new issue