|
@@ -7148,55 +7148,85 @@ You will notice that an icon appears in the top right corner of the browser, whi
|
7148
|
7148
|
|
7149
|
7149
|
** Gitlab
|
7150
|
7150
|
|
|
7151
|
+Install some dependencies:
|
|
7152
|
+
|
|
7153
|
+#+BEGIN_SRC: bash
|
7151
|
7154
|
apt-get update -y
|
7152
|
7155
|
apt-get upgrade -y
|
7153
|
7156
|
apt-get install sudo -y
|
7154
|
|
-
|
7155
|
7157
|
apt-get install -y build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl openssh-server redis-server checkinstall libxml2-dev libxslt-dev libcurl4-openssl-dev libicu-dev logrotate git-core
|
|
7158
|
+#+END_SRC
|
7156
|
7159
|
|
|
7160
|
+Install bundler
|
|
7161
|
+
|
|
7162
|
+#+BEGIN_SRC: bash
|
7157
|
7163
|
gem install bundler --no-ri --no-rdoc
|
|
7164
|
+#+END_SRC
|
|
7165
|
+
|
|
7166
|
+Create a user for running Gitlab.
|
7158
|
7167
|
|
|
7168
|
+#+BEGIN_SRC: bash
|
7159
|
7169
|
adduser --disabled-login --gecos 'GitLab' git
|
|
7170
|
+#+END_SRC
|
|
7171
|
+
|
|
7172
|
+Install mysql (it may already be installed).
|
7160
|
7173
|
|
|
7174
|
+#+BEGIN_SRC: bash
|
7161
|
7175
|
apt-get install -y mysql-server mysql-client libmysqlclient-dev
|
7162
|
7176
|
mysql_secure_installation
|
7163
|
7177
|
mysql -u root -p
|
|
7178
|
+#+END_SRC
|
7164
|
7179
|
|
7165
|
|
-CREATE USER 'git'@'localhost' IDENTIFIED BY '$password';
|
|
7180
|
+Enter the following commands, substituting /gitlabpassword/ with a password to be used for the Gitlab installation.
|
|
7181
|
+
|
|
7182
|
+#+BEGIN_SRC: bash
|
|
7183
|
+CREATE USER 'git'@'localhost' IDENTIFIED BY 'gitlabpassword';
|
7166
|
7184
|
SET storage_engine=INNODB;
|
7167
|
7185
|
CREATE DATABASE IF NOT EXISTS `gitlabhq_production` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;
|
7168
|
7186
|
GRANT SELECT, LOCK TABLES, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `gitlabhq_production`.* TO 'git'@'localhost';
|
7169
|
7187
|
quit
|
|
7188
|
+#+END_SRC
|
|
7189
|
+
|
|
7190
|
+Obtain the code and install it.
|
7170
|
7191
|
|
|
7192
|
+#+BEGIN_SRC: bash
|
7171
|
7193
|
cd /home/git
|
7172
|
7194
|
sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-ce.git -b 6-8-stable gitlab
|
7173
|
7195
|
cd /home/git/gitlab
|
7174
|
|
-sudo -u git -H cp config/gitlab.yml.example config/gitlab.yml
|
7175
|
|
-sudo -u git -H editor config/gitlab.yml
|
7176
|
|
-chown -R git log/
|
7177
|
|
-chown -R git tmp/
|
7178
|
|
-chmod -R u+rwX log/
|
7179
|
|
-chmod -R u+rwX tmp/
|
|
7196
|
+sudo -u git -H cp /home/git/gitlab/config/gitlab.yml.example /home/git/gitlab/config/gitlab.yml
|
|
7197
|
+sudo -u git -H editor /home/git/gitlab/config/gitlab.yml
|
|
7198
|
+#+END_SRC
|
|
7199
|
+
|
|
7200
|
+Set /host/ to your gitlab domain name, /port/ to 443 and /https/ to true, then save and exit.
|
|
7201
|
+
|
|
7202
|
+#+BEGIN_SRC: bash
|
|
7203
|
+chown -R git /home/git/gitlab/log/
|
|
7204
|
+chown -R git /home/git/gitlab/tmp/
|
|
7205
|
+chmod -R u+rwX /home/git/gitlab/log/
|
|
7206
|
+chmod -R u+rwX /home/git/gitlab/tmp/
|
7180
|
7207
|
sudo -u git -H mkdir /home/git/gitlab-satellites
|
7181
|
7208
|
chmod u+rwx,g+rx,o-rwx /home/git/gitlab-satellites
|
7182
|
|
-chmod -R u+rwX tmp/pids/
|
7183
|
|
-chmod -R u+rwX tmp/sockets/
|
7184
|
|
-chmod -R u+rwX public/uploads
|
7185
|
|
-sudo -u git -H cp config/unicorn.rb.example config/unicorn.rb
|
7186
|
|
-sudo -u git -H editor config/unicorn.rb
|
7187
|
|
-sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb
|
|
7209
|
+chmod -R u+rwX /home/git/gitlab/tmp/pids/
|
|
7210
|
+chmod -R u+rwX /home/git/gitlab/tmp/sockets/
|
|
7211
|
+chmod -R u+rwX /home/git/gitlab/public/uploads
|
|
7212
|
+sudo -u git -H cp /home/git/gitlab/config/unicorn.rb.example /home/git/gitlab/config/unicorn.rb
|
|
7213
|
+#sudo -u git -H editor /home/git/gitlab/config/unicorn.rb
|
|
7214
|
+sudo -u git -H cp /home/git/gitlab/config/initializers/rack_attack.rb.example /home/git/gitlab/config/initializers/rack_attack.rb
|
7188
|
7215
|
sudo -u git -H git config --global user.name "GitLab"
|
7189
|
7216
|
sudo -u git -H git config --global user.email "gitlab@localhost"
|
7190
|
7217
|
sudo -u git -H git config --global core.autocrlf input
|
|
7218
|
+sudo -u git cp /home/git/gitlab/config/database.yml.mysql /home/git/gitlab/config/database.yml
|
|
7219
|
+sudo -u git -H chmod o-rwx /home/git/gitlab/config/database.yml
|
|
7220
|
+sudo -u git -H bundle install --deployment --without development test postgres aws
|
|
7221
|
+#+END_SRC
|
7191
|
7222
|
|
7192
|
|
-Edit gitlab.yml and unicorn.rb as needed.
|
|
7223
|
+Fails here with:
|
7193
|
7224
|
|
7194
|
|
-sudo -u git cp config/database.yml.mysql config/database.yml
|
7195
|
|
-sudo -u git -H editor config/database.yml
|
7196
|
|
-sudo -u git -H chmod o-rwx config/database.yml
|
7197
|
|
-sudo -u git -H bundle install --deployment --without development test postgres aws
|
|
7225
|
+/Could not find libv8-3.16.14.3 in any of the sources/
|
|
7226
|
+/Run `bundle install` to install missing gems./
|
|
7227
|
+
|
|
7228
|
+#+BEGIN_SRC: bash
|
7198
|
7229
|
sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production
|
7199
|
|
-cd /home/git/gitlab
|
7200
|
7230
|
sudo -u git -H bundle exec rake gitlab:shell:install[v1.9.3] REDIS_URL=redis://localhost:6379
|
7201
|
7231
|
sudo -u git -H editor /home/git/gitlab-shell/config.yml
|
7202
|
7232
|
cp lib/support/init.d/gitlab /etc/init.d/gitlab
|
|
@@ -7205,13 +7235,20 @@ cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab
|
7205
|
7235
|
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
|
7206
|
7236
|
sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
|
7207
|
7237
|
service gitlab start
|
|
7238
|
+#+END_SRC
|
|
7239
|
+
|
|
7240
|
+Set up the Apache configuration.
|
7208
|
7241
|
|
|
7242
|
+#+BEGIN_SRC: bash
|
7209
|
7243
|
cp lib/support/apache/gitlab /etc/apache2/sites-available/mygitlabdomain
|
7210
|
7244
|
editor /etc/apache2/sites-available/mygitlabdomain
|
|
7245
|
+#+END_SRC
|
7211
|
7246
|
|
7212
|
7247
|
Set your domain name and email accordingly.
|
7213
|
7248
|
|
|
7249
|
+#+BEGIN_SRC: bash
|
7214
|
7250
|
a2ensite mygitlabdomain
|
|
7251
|
+#+END_SRC
|
7215
|
7252
|
|
7216
|
7253
|
* Related projects
|
7217
|
7254
|
|