You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
curl --progress https://git-core.googlecode.com/files/git-1.9.0.tar.gz | tar xz
206
205
cd git-1.9.0/
207
206
./configure
208
207
make
209
208
make prefix=/usr/local install
210
-
209
+
211
210
Make sure Git is in your `$PATH`:
212
211
213
212
which git
214
-
215
-
You might have to run `source ~/.bash_profile` for the `$PATH` to take effect.
216
213
214
+
You might have to logout and login again for the `$PATH` to take effect.
215
+
**Note:** When editing `config/gitlab.yml` (step 6), change the git `bin_path` to `/usr/local/bin/git`.
217
216
218
217
----------
219
218
220
219
## 2. Ruby
221
220
222
221
The use of ruby version managers such as [RVM](http://rvm.io/), [rbenv](https://github.com/sstephenson/rbenv) or [chruby](https://github.com/postmodern/chruby) with GitLab in production frequently leads to hard to diagnose problems. Version managers are not supported and we strongly advise everyone to follow the instructions below to use a system ruby.
223
222
224
-
Remove the old Ruby 1.8 package if present. Gitlab 6.7 only supports the Ruby 2.0.x release series:
223
+
Remove the old Ruby 1.8 package if present. GitLab only supports the Ruby 2.0+ release series:
@@ -312,37 +313,52 @@ Install `mysql` and enable the `mysqld` service to start on boot:
312
313
chkconfig mysqld on
313
314
service mysqld start
314
315
315
-
Secure MySQL by entering a root password and say "Yes" to all questions:
316
+
Ensure you have MySQL version 5.5.14 or later:
317
+
318
+
mysql --version
316
319
317
-
/usr/bin/mysql_secure_installation
320
+
Secure your installation:
318
321
319
-
Create a new user and database for GitLab:
322
+
mysql_secure_installation
323
+
324
+
Login to MySQL (type the database root password):
320
325
321
-
# Login to MySQL
322
326
mysql -u root -p
323
-
# Type the database root password
324
-
# Create a user for GitLab. (change supersecret to a real password)
325
-
CREATE USER 'git'@'localhost' IDENTIFIED BY 'supersecret';
326
327
327
-
# Create the GitLab production database
328
+
329
+
Create a user for GitLab (change $password in the command below to a real password you pick):
330
+
331
+
CREATE USER 'git'@'localhost' IDENTIFIED BY '$password';
332
+
333
+
Ensure you can use the InnoDB engine which is necessary to support long indexes.
334
+
If this fails, check your MySQL config files (e.g. `/etc/mysql/*.cnf`, `/etc/mysql/conf.d/*`) for the setting "innodb = off".
335
+
336
+
SET storage_engine=INNODB;
337
+
338
+
Create the GitLab production database:
339
+
328
340
CREATE DATABASE IF NOT EXISTS `gitlabhq_production` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;
329
341
330
-
# Grant the GitLab user necessary permissions on the table.
342
+
Grant the GitLab user necessary permissions on the table:
343
+
331
344
GRANT SELECT, LOCK TABLES, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `gitlabhq_production`.* TO 'git'@'localhost';
332
345
333
-
# Quit the database session
346
+
Quit the database session:
347
+
334
348
\q
335
349
336
350
Try connecting to the new database with the new user:
337
351
338
-
mysql -u git -p -D gitlabhq_production
339
-
# Type the password you replaced supersecret with earlier
340
-
# Quit the database session
352
+
sudo -u git -H mysql -u git -p -D gitlabhq_production
353
+
354
+
Type the password you replaced $password with earlier.
355
+
Quit the database session:
356
+
341
357
\q
342
358
343
359
### 5.2 PostgreSQL
344
360
345
-
NOTE: because we need to make use of extensions we need at least pgsql 9.1 and the default 8.x on centos will not work. We need to get the PGDG repositories enabled
361
+
NOTE: because we need to make use of extensions we need at least pgsql 9.1 and the default 8.x on centos will not work. We need to get the PGDG repositories enabled
346
362
347
363
Install the pgdg repositories
348
364
@@ -370,9 +386,10 @@ Configure the database user and password:
370
386
371
387
su - postgres
372
388
psql -d template1
373
-
psql (8.4.13)
374
389
375
-
template1=# CREATE USER git WITH PASSWORD 'your-password-here';
0 commit comments