gitlabhq/doc/debian_ubuntu.sh
Sytse Sijbrandij eae41ad1df Non-interactive AWS install by running a single script.
Non-interactive AWS install by running a single script.

Complete non-interactive AWS install with one line.

Squash of 28 commits:

Initial commit of complete install script.

Must be sudo.

Non interactive prostgres.

Install mysql with unique password.

Service file.

Add init file.

Nginx config.

Script contains aws specific settings.

Update references after rename.

Prevent localhost ssh prompt.

Postfix with policyd.

Typo in localhost. Postfix package has other name. sudo -l session needs oneliners.

More sudo commands to prevent permission problems.

Change in existing file.

Change in existing file must be referenced.

Switch order.

Postfix comment.

Old way to generate password, less sudo.

todo login

Must use private ip and login instructions.

Starting up.

Fixed and checked various todos.

Use service. Set host name. Go to default dir.

Only works on next login.

Only replace first host.

Cleaned up the comments.

Link to nginx config.

Move to aws dir.

Update links to aws for interactive install.

Existing script stays at the same location.

Change directory. Use the new init scripts for gitlab service and nginx. Use the branch for file downloads. Update with newest changes to installation.md.

Correct reference.

Use master branch since we need the nginx condfig and use absolute paths.

Need to copy with sudo.
2012-09-02 18:29:46 +02:00

46 lines
1.6 KiB
Bash

#!/bin/sh
sudo apt-get update
sudo apt-get upgrade
sudo DEBIAN_FRONTEND='noninteractive' apt-get install -y postfix-policyd-spf-python # Install postfix without prompting.
sudo apt-get install -y git git-core wget curl gcc checkinstall libxml2-dev libxslt-dev sqlite3 libsqlite3-dev libcurl4-openssl-dev libreadline-gplv2-dev libc6-dev libssl-dev libmysql++-dev make build-essential zlib1g-dev libicu-dev redis-server openssh-server python-dev python-pip libyaml-dev
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz
tar xfvz ruby-1.9.3-p194.tar.gz
cd ruby-1.9.3-p194
./configure
make
sudo make install
sudo adduser \
--system \
--shell /bin/sh \
--gecos 'git version control' \
--group \
--disabled-password \
--home /home/git \
git
sudo adduser --disabled-login --gecos 'gitlab system' gitlab
sudo usermod -a -G git gitlab
sudo -H -u gitlab ssh-keygen -q -N '' -t rsa -f /home/gitlab/.ssh/id_rsa
cd /home/git
sudo -H -u git git clone git://github.com/gitlabhq/gitolite /home/git/gitolite
sudo -u git -H sh -c "PATH=/home/git/bin:$PATH; /home/git/gitolite/src/gl-system-install"
sudo cp /home/gitlab/.ssh/id_rsa.pub /home/git/gitlab.pub
sudo chmod 777 /home/git/gitlab.pub
sudo -u git -H sed -i 's/0077/0007/g' /home/git/share/gitolite/conf/example.gitolite.rc
sudo -u git -H sh -c "PATH=/home/git/bin:$PATH; gl-setup -q /home/git/gitlab.pub"
sudo chmod -R g+rwX /home/git/repositories/
sudo chown -R git:git /home/git/repositories/
sudo -u gitlab -H git clone git@localhost:gitolite-admin.git /tmp/gitolite-admin
sudo rm -rf /tmp/gitolite-admin