forked from thoughtbot/laptop
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathubuntu
95 lines (77 loc) · 3.69 KB
/
ubuntu
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/usr/bin/env bash
echo "Checking for SSH key, generating one if it exists ..."
if [[ ! -f ~/.ssh/id_rsa.pub ]] ; then
ssh-keygen -t rsa
fi;
read -p "Do you want to use Ubuntu mirror from Indonesia? [y/n] " answer;
if [[ $answer = y ]]; then
echo "Using Ubuntu mirror from Indonesia ..."
export codename=`lsb_release -sc`
sudo mv /etc/apt/sources.list /etc/apt/sources.list.backup
cat > tmp.sources.list <<DELIM
###### Ubuntu Indonesian Repos ######
deb http://kambing.ui.ac.id/ubuntu $codename main restricted universe multiverse
#deb-src http://kambing.ui.ac.id/ubuntu $codename main restricted universe multiverse
deb http://kambing.ui.ac.id/ubuntu $codename-updates main restricted universe multiverse
#deb-src http://kambing.ui.ac.id/ubuntu $codename-updates main restricted universe multiverse
deb http://kambing.ui.ac.id/ubuntu $codename-security main restricted universe multiverse
#deb-src http://kambing.ui.ac.id/ubuntu $codename-security main restricted universe multiverse
deb http://kambing.ui.ac.id/ubuntu $codename-proposed main restricted universe multiverse
#deb-src http://kambing.ui.ac.id/ubuntu $codename-proposed main restricted universe multiverse
deb http://kambing.ui.ac.id/ubuntu $codename-backports main restricted universe multiverse
#deb-src http://kambing.ui.ac.id/ubuntu $codename-backports main restricted universe multiverse
#### Ubuntu Partner Repo
deb http://archive.canonical.com/ubuntu $codename partner
#### Ubuntu Extras Repo
deb http://extras.ubuntu.com/ubuntu $codename main
deb-src http://extras.ubuntu.com/ubuntu $codename main
DELIM
sudo mv tmp.sources.list /etc/apt/sources.list
else
echo "Not using Ubuntu mirror from Indonesia ..."
fi;
echo "Using apt-get to install OS packages so let's update it first ..."
sudo apt-get update -y
echo "Using apt-get to install OS packages so let's upgrade it first ..."
sudo apt-get dist-upgrade
echo "Installing OS packages. You will be prompted for your password ..."
sudo apt-get install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev -y
read -p "Do you want to install Postgres? [y/n] " answer
if [[ $answer = y ]]
then
echo "Install Postgres, a great open source relational database ..."
sudo apt-get install libpq5 libpq-dev postgresql -y
else
echo "Not installing Postgres"
fi
echo "Install MySQL, a gread open source relational database ..."
sudo apt-get install libmysqlclient-dev mysql-server mysql-client -y
echo "Installing ack, a good way to search through files ..."
sudo apt-get install ack-grep -y
echo "Installing ImageMagick, good for cropping and re-sizing images ..."
sudo apt-get install imagemagick libmagick++-dev libmagickwand-dev libmagickcore-dev --fix-missing -y
echo "Installing subversion, an open source version control system ..."
sudo apt-get install subversion -y
echo "Installing git, free & open source, distributed version control system ..."
sudo apt-get install git git-core gitg -y
read -p "Do you want to install rvm and set default ruby? [y/n] " answer
if [[ $answer = y ]]
then
bash < <(curl -s https://raw.github.com/kiranatama/laptop/master/ruby)
else
echo "Not installing rvm and set default ruby ..."
fi
read -p "Do you want to install apache (required for installing php)? [y/n] " answer
if [[ $answer = y ]]
then
bash < <(curl -s https://raw.github.com/kiranatama/laptop/master/apache)
else
echo "Not installing apache ..."
fi
read -p "Do you want to install php? [y/n] " answer
if [[ $answer = y ]]
then
bash < <(curl -s https://raw.github.com/kiranatama/laptop/master/php)
else
echo "Not installing php ..."
fi