Forked from premist/stage0-change-mirror-to-korean.sh
Last active
December 16, 2015 21:58
-
-
Save shibz/5503094 to your computer and use it in GitHub Desktop.
Just some notes on my own installation of GitLab on Scientific Linux 6.4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-7.noarch.rpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#first try: | |
yum -y install apache make readline readline-devel ncurses-devel gdbm-devel glibc-devel tcl-devel openssl-devel curl-devel expat-devel db4-devel byacc gitolite sqlite-devel gcc-c++ libyaml libyaml-devel libffi libffi-devel libxml2 libxml2-devel libxslt libxslt-devel libicu libicu-devel python-devel | |
#if that doesn't have everything, refer to: | |
yum -y groupinstall 'Development Tools' 'Additional Development' | |
yum -y install readline readline-devel ncurses-devel gdbm-devel glibc-devel tcl-devel openssl-devel curl-devel expat-devel db4-devel byacc gitolite sqlite-devel gcc-c++ libyaml libyaml-devel libffi libffi-devel libxml2 libxml2-devel libxslt libxslt-devel libicu libicu-devel system-config-firewall-tui python-devel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.gz | |
tar xzvf ruby-1.9.3-p392.tar.gz | |
cd ruby-1.9.3-p392 | |
./configure --enable-shared --disable-pthread | |
make | |
make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem update --system | |
gem update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem install bundler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
useradd --shell /bin/bash --create-home --home-dir /home/git --comment 'GitLab' git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum -y install postgresql postgresql-server | |
/etc/init.d/postgresql initdb | |
/etc/init.d/postgresql start | |
chkconfig postgresql on | |
sudo -u postgres createuser -P git | |
# enter a password, then answer "no" to all questions | |
sudo -u postgres createdb -O git git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
su - git | |
# Clone gitlab shell | |
git clone https://github.com/gitlabhq/gitlab-shell.git | |
cd gitlab-shell | |
# switch to right version | |
git checkout v1.4.0 | |
cp config.yml.example config.yml | |
# Edit config and replace gitlab_url | |
# with something like 'http://domain.com/' | |
vim config.yml | |
# Do setup | |
./bin/install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# note, this is still in shell that is "su" to git | |
git clone https://github.com/gitlabhq/gitlabhq.git gitlab | |
cd /home/git/gitlab | |
git checkout 5-1-stable | |
cp config/gitlab.yml.example config/gitlab.yml | |
# Make sure to change "localhost" to the fully-qualified domain name of your | |
# host serving GitLab where necessary | |
vim config/gitlab.yml | |
chmod -R u+rwX log/ | |
chmod -R u+rwX tmp/ | |
mkdir /home/git/gitlab-satellites | |
mkdir tmp/pids/ | |
mkdir tmp/sockets | |
chmod -R u+rwX tmp/pids/ | |
chmod -R u+rwX tmp/sockets/ | |
cp config/puma.rb.example config/puma.rb | |
cp config/database.yml.postgresql config/database.yml | |
# Update username/password in DB config | |
vim config/database.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# return to root shell | |
exit | |
cd /home/git/gitlab | |
gem install charlock_holmes --version '0.6.9' | |
sudo -u git -H /usr/local/bin/bundle install --deployment --without development test mysql | |
yum install redis | |
chkconfig redis on | |
service redis start | |
sudo -i -u git | |
cd gitlab | |
bundle exec rake gitlab:setup RAILS_ENV=production | |
exit | |
#login.........admin@local.host | |
#password......5iveL!fe | |
# This should be run as root | |
curl --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlabhq/master/lib/support/init.d/gitlab | |
chmod +x /etc/init.d/gitlab | |
chkconfig gitlab on | |
service gitlab start | |
yum -y install nginx | |
curl --output /etc/nginx/conf.d/gitlab.conf https://raw.github.com/gitlabhq/gitlabhq/master/lib/support/nginx/gitlab | |
# Change **YOUR_SERVER_IP** and **YOUR_SERVER_FQDN** | |
# to the IP address and fully-qualified domain name | |
# of your host serving GitLab | |
sudo vim /etc/nginx/conf.d/gitlab.conf | |
chmod g+rx /home/git | |
usermod -a -G git nginx | |
chkconfig nginx on | |
service nginx start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment