-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconf
43 lines (31 loc) · 1.13 KB
/
conf
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
#!/bin/bash -ex
install()
{
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get -y \
-o DPkg::Options::=--force-confdef \
-o DPkg::Options::=--force-confold \
install $@
}
# set hostname
HOSTNAME=nginx
echo "$HOSTNAME" > /etc/hostname
sed -i "s|127.0.1.1 \(.*\)|127.0.1.1 $HOSTNAME|" /etc/hosts
hostname nginx
# Install dependency for add-apt-repository
install python-software-properties
# Use the latest stable version of nginx
add-apt-repository ppa:nginx/stable
# Use the latest development version of nginx
# add-apt-repository ppa:nginx/development
# Use nginx repo for PHP 5.3.3
# add-apt-repository ppa:nginx/php5
# Repository for php-fpm
add-apt-repository ppa:brianmercer/php
# install packages
install nginx php5-fpm php5-cgi php5-common php5-suhosin php5-xcache php5-mysql php5-curl php5-gd php5-mcrypt php-pear libssh2-php openssl ssl-cert libsasl2-modules mcrypt mysql-server mysql-client dbconfig-common postfix webmin-postfix phpmyadmin webmin-mysql zlib1g-dev
# enable phpmyadmin
ln -s /etc/nginx/sites-available/phpmyadmin /etc/nginx/sites-enabled/phpmyadmin
# restart nginx service
service nginx restart
apt-get clean