-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_passenger.sh
More file actions
executable file
·53 lines (42 loc) · 1.4 KB
/
install_passenger.sh
File metadata and controls
executable file
·53 lines (42 loc) · 1.4 KB
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
#! /bin/sh
plantform_name=$(python -mplatform | tr '[:upper:]' '[:lower:]')
get_distribution_name(){
case "$plantform_name" in
*darwin*)
echo 'mac'
;;
*ubuntu*)
echo 'ubuntu'
;;
*centos*)
echo 'centos'
esac
}
distribution_name=$(get_distribution_name)
arch=$(uname -m)
case "$distribution_name" in
'ubuntu')
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 561F9B9CAC40B2F7
apt-get install -y apt-transport-https ca-certificates
# Add our APT repository
sh -c 'echo deb https://oss-binaries.phusionpassenger.com/apt/passenger trusty main > /etc/apt/sources.list.d/passenger.list'
apt-get update
# Install Passenger + Nginx
apt-get install -y nginx-extras passenger
;;
'centos')
if ! rpm -q epel-release ; then
if [[ $arch == *"64"* ]]
then
yum install -y yum-utils http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm;
else
yum install -y yum-utils http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm;
fi
fi
yum-config-manager --enable epel
yum install -y epel-release yum-utils
yum install -y pygpgme curl
curl --fail -sSLo /etc/yum.repos.d/passenger.repo https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo
# Install Passenger Nginx
yum install -y nginx passenger
esac