CentOS 7 installs Gitlab 8-6 Chinese Edition tutorial

Source: Internet
Author: User
Tags generator gettext mysql manual oauth openssl socket git clone flowdock

1. Close SELinux

[root@ds-vm-node83 ~]# sed-i ' s/^selinux=.*/#&/;s/^selinuxtype=.*/#&/;/selinux=.*/a SELINUX=disabled '/etc/ Sysconfig/selinux
[Root@ds-vm-node83 ~]# Setenforce 0
Setenforce:selinux is disabled
[Root@ds-vm-node83 ~]#

2. Install Epel source

[root@ds-vm-node83 ~]# Yum Install epel-release-y
[Root@ds-vm-node83 ~]# rpm--import http://mirrors.dwhd.org/EPEL/RPM-GPG-KEY-EPEL-7

3. Install Rpmforge Source

[root@ds-vm-node83 ~]# Yum Install http://mirrors.dwhd.org/RepoForgeRPM/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm -Y
[Root@ds-vm-node83 ~]# rpm--import http://mirrors.dwhd.org/RepoForge/RPM-GPG-KEY.dag.txt

4, install the Bash-completion Package (tab-padded enhanced package)

[root@ds-vm-node83 ~]# yum-y Install bash-completion

5, install Puias source and import corresponding key

[Root@ds-vm-node83 ~]# wget-qo-https://gitlab.com/gitlab-org/gitlab-recipes/raw/master/install/centos/puias_6_ Computational.repo >/etc/yum.repos.d/puias_6_computational.repo
[Root@ds-vm-node83 ~]# rpm--import Http://springdale.math.ias.edu/data/puias/6/x86_64/os/RPM-GPG-KEY-puias
[Root@ds-vm-node83 ~]#

6. Detect key and update source cache

[root@ds-vm-node83 ~]# Rpm-qa gpg*|grep 352c64e5
gpg-pubkey-352c64e5-52ae6884
[root@ds-vm-node83 ~]# Rpm-qa gpg*|grep 41a40948
gpg-pubkey-41a40948-4ce19266
[Root@ds-vm-node83 ~]# yum clean all && yum Makecache

7, Installation Development tools development package and the necessary package files

[root@ds-vm-node83 ~]# yum-y groupinstall ' Development Tools '
[root@ds-vm-node83 ~]# yum-y install readline readline-devel ncurses-devel gdbm-devel \
Glibc-devel tcl-devel openssl-devel curl-devel expat-devel db4-devel byacc sqlite-devel \
Libyaml libyaml-devel libffi libffi-devel libxml2 libxml2-devel libxslt libxslt-devel libicu \
Libicu-devel system-config-firewall-tui sudo crontabs logwatch logrotate perl-time-hires \
libcom_err-devel.i686 libcom_err-devel.x86_64 Nodejs python-docutils postfix NTP

8, install VIM and set as the default editor

[root@ds-vm-node83 ~]# yum-y Install vim-enhanced
[root@ds-vm-node83 ~]# update-alternatives--set editor/usr/bin/vim.basic
[Root@ds-vm-node83 ~]# Ln-sv/usr/bin/vim/usr/bin/editor
[Root@ds-vm-node83 ~]#

9. Set time synchronization

[Root@ds-vm-node83 ~]# Rm-rf/etc/localtime
You are are going to execute "/bin/rm-rf/etc/localtime", and please confirm (yes or no): Yes
[Root@ds-vm-node83 ~]# Ln-sv/usr/share/zoneinfo/asia/shanghai/etc/localtime
"/etc/localtime"-> "/usr/share/zoneinfo/asia/shanghai"
[Root@ds-vm-node83 ~]# ntpdate pool.ntp.org
6 APR 09:14:53 ntpdate[11275]: Adjust time server 212.26.18.41 offset-0.105925 sec
[Root@ds-vm-node83 ~]# echo ' */20 * * */usr/sbin/ntpdate pool.ntp.org >/dev/null 2>&1 ' >>/VAR/SPOOL/CR On/root
[Root@ds-vm-node83 ~]# Date-r
Wed, April 2016 09:15:14 +0800
[Root@ds-vm-node83 ~]#

10, compile the high version git (git version >= 2.7.3)

Root@ds-vm-node83 ~]# yum-y install zlib-devel perl-cpan gettext curl-devel expat-devel gettext-devel openssl-devel< br> [root@ds-vm-node83 ~]# yum-y remove git
[root@ds-vm-node83/tmp/git]# url= ' Https://www.kernel.org/pub/software /scm/git/' && wget-c ' curl-s $URL |awk--posix-f ' "' $2~/git-([0-9]+.) {3}tar.xz/{a=$2}end{print ' ' $URL ' ' A} '
[root@ds-vm-node83/tmp/git]# tar xf git-*.tar.xz
[root@ds-vm-node83 /tmp/git]# CD git-*
[root@ds-vm-node83/tmp/git/git-2.8.1]#./configure--prefix=/usr/local
[ root@ds-vm-node83/tmp/git/git-2.8.1]# make-j $ (awk '/processor/{i++}end{print i} '/proc/cpuinfo) && make Install && CD. /..
[root@ds-vm-node83/tmp]# echo path=/usr/local/bin:\ $PATH >/etc/profile.d/git.sh
[root@ds-vm-node83/ tmp]#. /etc/profile.d/git.sh
[root@ds-vm-node83/tmp]# which git
/usr/local/bin/git
[root@ds-vm-node83/tmp]# git Version
git version 2.8.1
[root@ds-vm-node83/tmp]#

11, compile and install the high version of Ruby (Ruby version >= 2.1.0)

[root@ds-vm-node83/tmp]# yum-y Remove Ruby
[root@ds-vm-node83/tmp/ruby]# url1= ' http://mirrors.dwhd.org/Ruby/ruby/' && url2= ' curl-s $URL 1|awk-pf ' "' { if ($2~/^[0-9]+\.[ 0-9]+/) a=$2}end{print "' $URL 1 '" A} ' && wget-c ' curl-s $URL 2|awk-pf ' "' {if ($2~/^ruby.*xz$/) a=$2}end{print" ' $ URL2 ' "A}"
[root@ds-vm-node83/tmp/ruby]# Tar XF ruby-*
[root@ds-vm-node83/tmp/ruby]# CD ruby-*
[root@ds-vm-node83/tmp/ruby/ruby-2.3.0]#./configure--prefix=/usr/local--disable-install-rdoc
[root@ds-vm-node83/tmp/ruby/ruby-2.3.0]# make-j $ (awk '/processor/{i++}end{print i} '/proc/cpuinfo) && make Install && CD. /..
[root@ds-vm-node83/tmp]# ruby-v
Ruby 2.3.0p0 (2015-12-25 revision 53290) [X86_64-linux]
[root@ds-vm-node83/tmp]#

12. Installation Bundler

[root@ds-vm-node83/tmp]# gem install bundler--no-doc
[root@ds-vm-node83/tmp]# bundler-v
Bundler version 1.11.2
[root@ds-vm-node83/tmp]#

13, the installation Go (Gitlab 8.0 version of the need to go language support)

[root@ds-vm-node83/tmp]# mkdir/tmp/go && Cd/tmp/go
[root@ds-vm-node83/tmp/go]# url= ' https://storage.googleapis.com/golang/' && wget-c ' curl-s $URL |xmllint- Format-|AWK-PF ' [><] ' {if ($3~/linux/&& $3!~/(BETA|RC) [0-9]+|armv6l|386/) a=$3}end{print "' $URL '" "A}"
[root@ds-vm-node83/tmp/go]# Tar XF go*.linux-amd64.tar.gz-c/usr/local/
[root@ds-vm-node83/tmp/go]# echo "Path=/usr/local/go/bin:\ $PATH" >/etc/profile.d/go.sh
[root@ds-vm-node83/tmp/go]#. /etc/profile.d/go.sh
[root@ds-vm-node83/tmp/go]# Go version
Go version go1.6 linux/amd64
[root@ds-vm-node83/tmp/go]# CD ...

14, add git system user

[root@ds-vm-node83/tmp]# mkdir-p/data/
[root@ds-vm-node83/tmp]# adduser-r-s/bin/bash-c ' Gitlab '-m-d/data/git/git

15. Installation MARIADB

[root@ds-vm-node83/tmp]# wget http://mirrors.dwhd.org/SQL/MariaDB/mariadb-10.1.13/bintar-linux-x86_64/ Mariadb-10.1.13-linux-x86_64.tar.gz


[root@ds-vm-node83/tmp]# Tar XF mariadb-10.1.13-linux-x86_64.tar.gz-c/usr/local/


[root@ds-vm-node83/tmp]# ln-sv/usr/local/mariadb-10.1.13-linux-x86_64/usr/local/mariadb


"/usr/local/mariadb"-&gt; "/usr/local/mariadb-10.1.13-linux-x86_64"


[root@ds-vm-node83/tmp]# cd/usr/local/mariadb


[root@ds-vm-node83/usr/local/mariadb]# username= "MySQL"


[root@ds-vm-node83/usr/local/mariadb]# for I in ' SEQ 1000 1500 ';d o [-Z ' $ (awk-f: ' {print$3,$4} '/etc/passwd | grep "$i") "-a-z" $ (awk-f: ' {print$3} '/etc/group | grep "$i") "] &amp;&amp; ugid= $i &amp;&amp; break;done &amp;&amp; groupadd-g $UGID $Username &amp;&amp; useradd-m-u $UG Id-g $UGID-S/sbin/nologin $Username


[root@ds-vm-node83/usr/local/mariadb]# chown-r mysql.mysql/data/mariadb


[root@ds-vm-node83/usr/local/mariadb]# ls-l/data/


Total dosage 0


drwx------2 git git 59 April 6 16:16 git


Drwxr-xr-x 2 MySQL MySQL 6 April 6 16:14 mariadb


[root@ds-vm-node83/usr/local/mariadb]# CP Support-files/mysql.server/etc/rc.d/init.d/mysqld


[root@ds-vm-node83/usr/local/mariadb]# sed-i "s@^basedir=.* @basedir =/usr/local/mariadb@"/etc/init.d/mysqld


[root@ds-vm-node83/usr/local/mariadb]# sed-i "s@^datadir=.* @datadir =/data/mariadb@"/etc/init.d/mysqld


[root@ds-vm-node83/usr/local/mariadb]# chmod +x/etc/rc.d/init.d/mysqld


[root@ds-vm-node83/usr/local/mariadb]# cat/etc/my.cnf


[Client]


Port = 3306


Socket =/tmp/mysql.sock


Default-character-set = UTF8





[MySQL]


Default-character-set=utf8





[Mysqld]


Port = 3306


Socket =/tmp/mysql.sock


Character-set-server=utf8





Basedir =/usr/local/mariadb


DataDir =/data/mariadb


Pid-file =/data/mariadb/mysql.pid


user = MySQL


Bind-address = 0.0.0.0


Server-id = 1





Skip-name-resolve


#skip-networking


Back_log = 300





max_connections = 1000


Max_connect_errors = 6000


Open_files_limit = 65535


Table_open_cache = 128


Max_allowed_packet = 4M


Binlog_cache_size = 1M


Max_heap_table_size = 8M


Tmp_table_size = 16M





Read_buffer_size = 2M


Read_rnd_buffer_size = 8M


Sort_buffer_size = 8M


Join_buffer_size = 8M


Key_buffer_size = 4M





Thread_cache_size = 8





Query_cache_type = 1


Query_cache_size = 8M


Query_cache_limit = 2M





Ft_min_word_len = 4





Log_bin = Mysql-bin


Binlog_format = Mixed


Expire_logs_days = 30





Log_error =/data/mariadb/mysql-error.log


Slow_query_log = 1


Long_query_time = 1


Slow_query_log_file =/data/mariadb/mysql-slow.log





Performance_schema = 0





#lower_case_table_names = 1





Skip-external-locking





Default_storage_engine = InnoDB


#default-storage-engine = MyISAM


innodb_file_per_table = 1


Innodb_open_files = 500


Innodb_buffer_pool_size = 64M


Innodb_write_io_threads = 4


Innodb_read_io_threads = 4


innodb_thread_concurrency = 0


Innodb_purge_threads = 1


Innodb_flush_log_at_trx_commit = 2


Innodb_log_buffer_size = 2M


Innodb_log_file_size = 32M


Innodb_log_files_in_group = 3


innodb_max_dirty_pages_pct = 90


Innodb_lock_wait_timeout = 120





Bulk_insert_buffer_size = 8M


Myisam_sort_buffer_size = 8M


Myisam_max_sort_file_size = 10G


Myisam_repair_threads = 1





Interactive_timeout = 28800


Wait_timeout = 28800





[Mysqldump]


Quick


Max_allowed_packet = 16M





[Myisamchk]


Key_buffer_size = 8M


Sort_buffer_size = 8M


Read_buffer = 4M


Write_buffer = 4M


[root@ds-vm-node83/usr/local/mariadb]#/usr/local/mariadb/scripts/mysql_install_db--user=mysql--datadir=/data/ Mariadb


Installing Mariadb/mysql system tables in '/data/mariadb ' ...


2016-04-06 16:22:35 140361217341312 [note]/usr/local/mariadb/bin/mysqld (mysqld 10.1.13-mariadb) starting as Process 11169..


Ok


Filling Help Tables ...


2016-04-06 16:22:47 139961125017472 [note]/usr/local/mariadb/bin/mysqld (mysqld 10.1.13-mariadb) starting as Process 11199..


Ok


Creating OpenGIS required Sp-s ...


2016-04-06 16:22:50 139730244343680 [note]/usr/local/mariadb/bin/mysqld (mysqld 10.1.13-mariadb) starting as Process 11259..


Ok





To start mysqld at boot time and you have to copy


Support-files/mysql.server to the ' right place ' for your system





Please REMEMBER to SET A PASSWORD for the mariadb root USER!


To did so, start the server, then issue the following commands:





'/usr/local/mariadb/bin/mysqladmin '-u root password ' New-password '


'/usr/local/mariadb/bin/mysqladmin '-u root-h 10.0.1.83 password ' new-password '





Alternatively you can run:


'/usr/local/mariadb/bin/mysql_secure_installation '





Which would also give you the option of removing the test


Databases and anonymous user created by default. This is


Strongly recommended for production servers.





The MARIADB knowledgebase at http://mariadb.com/kb or the


MySQL Manual for the more instructions.





You can start the mariadb daemon with:


CD '/USR/LOCAL/MARIADB '; /usr/local/mariadb/bin/mysqld_safe--datadir= '/data/mariadb '





Can test the mariadb daemon with mysql-test-run.pl


CD '/usr/local/mariadb/mysql-test '; Perl mysql-test-run.pl





Please have a problems at Http://mariadb.org/jira





The latest information about MARIADB is available at http://mariadb.org/.


Can find additional information about the "MySQL part" at:


Http://dev.mysql.com


Support mariadb Development by buying Support/new features from MARIADB


Corporation Ab. You can contacts us about this at sales@mariadb.com.


Alternatively consider joining our community based development effort:


http://mariadb.com/kb/en/contributing-to-the-mariadb-project/





[root@ds-vm-node83/usr/local/mariadb]# service mysqld start


Reloading systemd: [OK]


Starting mysqld (via Systemctl): [OK]


[root@ds-vm-node83/usr/local/mariadb]# chkconfig mysqld on


[root@ds-vm-node83/usr/local/mariadb]# chkconfig |grep MySQL


Mysqld 0: Off 1: Off 2: Open 3: Open 4: Open 5: Open 6: Off


[root@ds-vm-node83/usr/local/mariadb]# echo "Export path=/usr/local/mariadb/bin:\ $PATH" &gt;/etc/profile.d/ mariadb.sh


[root@ds-vm-node83/usr/local/mariadb]#. /etc/profile.d/mariadb.sh


[root@ds-vm-node83/usr/local/mariadb]# which MySQL


/usr/local/mariadb/bin/mysql


[root@ds-vm-node83/usr/local/mariadb]# usermod-a-G git MySQL

16. Configuration Database

[root@ds-vm-node83/usr/local/mariadb]# Mysql-uroot


Welcome to the MARIADB Monitor. Commands End With; or \g.


Your mariadb Connection ID is 5


Server VERSION:10.1.13-MARIADB MARIADB Server





Copyright (c), 2016, Oracle, mariadb Corporation Ab and others.





Type ' help, ' or ' \h ' for help. Type ' \c ' to clear the current input statement.





MARIADB [(none)]&gt; use MySQL;


Reading table information for completion of table and column names


You can turn off the feature to get a quicker startup with-a





Database changed


MARIADB [mysql]&gt; UPDATE user SET Password=password (' lookback ') WHERE user= ' root ';


Query OK, 4 rows Affected (0.00 sec)


Rows Matched:4 Changed:4 warnings:0





MARIADB [mysql]&gt; DELETE from user WHERE user= ';


Query OK, 2 rows Affected (0.00 sec)





MARIADB [mysql]&gt; DROP DATABASE test;


Query OK, 0 rows Affected (0.00 sec)





MARIADB [mysql]&gt; CREATE USER ' git ' @ ' localhost ' identified by ' lookback ';


Query OK, 0 rows Affected (0.00 sec)





MARIADB [mysql]&gt; SET Storage_engine=innodb;


Query OK, 0 rows Affected (0.00 sec)





MARIADB [mysql]&gt; CREATE DATABASE IF not EXISTS gitlabhq_production DEFAULT CHARACTER SET UTF8 COLLATE utf8_unicode_ci;


Query OK, 1 row Affected (0.00 sec)





MARIADB [mysql]&gt; GRANT SELECT, LOCK TABLES, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER on gitlabhq_production.* To ' git ' @ ' localhost ';


Query OK, 0 rows Affected (0.00 sec)





MARIADB [mysql]&gt; FLUSH privileges;


Query OK, 0 rows Affected (0.00 sec)





MARIADB [mysql]&gt; SELECT user,password,host from USER;


+------+-------------------------------------------+--------------------------+


| USER | PASSWORD | HOST |


+------+-------------------------------------------+--------------------------+


| Root | *153ccfaeaa83407d8dbdbfaa3d17b1a95553e60c | localhost |


| Root | *153ccfaeaa83407d8dbdbfaa3d17b1a95553e60c | ds-vm-node83.cluster.com |


| Root | *153ccfaeaa83407d8dbdbfaa3d17b1a95553e60c | 127.0.0.1 |


| Root | *153ccfaeaa83407d8dbdbfaa3d17b1a95553e60c | :: 1 |


| git | *153ccfaeaa83407d8dbdbfaa3d17b1a95553e60c | localhost |


+------+-------------------------------------------+--------------------------+


5 rows in Set (0.00 sec)





MARIADB [mysql]&gt; show DATABASES;


+---------------------+


| Database |


+---------------------+


| gitlabhq_production |


| Information_schema |


| MySQL |


| Performance_schema |


+---------------------+


4 rows in Set (0.00 sec)





MARIADB [mysql]&gt; \q


Bye

17. Compile and install Redis (Redis version >= 2.8.0)

[root@ds-vm-node83/usr/local/mariadb]# Mkdir/tmp/redis &amp;&amp; Cd/tmp/redis


[root@ds-vm-node83/tmp/redis]# wget-c ' Curl-s http://redis.io/download | Awk-f "'" '/[0-9]. [0-9].*.tar.gz/{print $4;exit} '


[root@ds-vm-node83/tmp/redis]# Tar XF redis-*.tar.gz


[root@ds-vm-node83/tmp/redis]# CD redis-*


[root@ds-vm-node83/tmp/redis/redis-3.0.7]# Make


[root@ds-vm-node83/tmp/redis/redis-3.0.7]# mkdir-p/usr/local/redis/{bin,etc,var}


[root@ds-vm-node83/tmp/redis/redis-3.0.7]# Cp-af Src/{redis-benchmark,redis-check-aof,redis-check-dump,redis-cli , redis-sentinel,redis-server}/usr/local/redis/bin/


[root@ds-vm-node83/tmp/redis/redis-3.0.7]# cp-a redis.conf/usr/local/redis/etc/


[root@ds-vm-node83/tmp/redis/redis-3.0.7]# echo "Export path=/usr/local/redis/bin:\ $PATH" &gt;/etc/profile.d/ redis.sh


[root@ds-vm-node83/tmp/redis/redis-3.0.7]#. /etc/profile.d/redis.sh


[root@ds-vm-node83/tmp/redis/redis-3.0.7]# sed-i ' s@pidfile.* @pidfile/var/run/redis.pid@ '/usr/local/redis/etc/ Redis.conf


[root@ds-vm-node83/tmp/redis/redis-3.0.7]# sed-i "s@logfile.* @logfile/usr/local/redis/var/redis.log@"/usr/local/ Redis/etc/redis.conf


[root@ds-vm-node83/tmp/redis/redis-3.0.7]# sed-i "s@^dir.* @dir/usr/local/redis/var@"/usr/local/redis/etc/ Redis.conf


[root@ds-vm-node83/tmp/redis/redis-3.0.7]# sed-i ' s@daemonize no@daemonize yes@ '/usr/local/redis/etc/redis.conf


[root@ds-vm-node83/tmp/redis/redis-3.0.7]# [-z] ' grep ^maxmemory/usr/local/redis/etc/redis.conf '] &amp;&amp; sed-i ' S@maxmemory &lt;bytes&gt; @maxmemory &lt;bytes&gt;\nmaxmemory 360000000@ '/usr/local/redis/etc/redis.conf


[root@ds-vm-node83/tmp/redis/redis-3.0.7]# mkdir-p/var/run/redis &amp;&amp; chown-r git/var/run/redis/


[root@ds-vm-node83/tmp/redis/redis-3.0.7]# Sed-ri ' s/^ (port). */\1 0/'/usr/local/redis/etc/redis.conf


[root@ds-vm-node83/tmp/redis/redis-3.0.7]# Echo ' Unixsocket/var/run/redis/redis.sock ' &gt;&gt;/usr/local/redis/ Etc/redis.conf


[root@ds-vm-node83/tmp/redis/redis-3.0.7]# Echo ' unixsocketperm 0770 ' &gt;&gt;/usr/local/redis/etc/redis.conf


[root@ds-vm-node83/tmp/redis/redis-3.0.7]# wget-q Http://www.dwhd.org/script/Redis-server-init-CentOS-O/etc/ Init.d/redis-server


[root@ds-vm-node83/tmp/redis/redis-3.0.7]# sed-i "/touch $lockfile/a \ chown git $ (awk '/^unixsocket/{print $} '/US r/local/redis/etc/redis.conf) "/etc/init.d/redis-server


[root@ds-vm-node83/tmp/redis/redis-3.0.7]# chmod +x/etc/init.d/redis-server


[root@ds-vm-node83/tmp/redis/redis-3.0.7]# chkconfig Redis-server on


[root@ds-vm-node83/tmp/redis/redis-3.0.7]# service Redis-server start


Starting Redis-server (via Systemctl): [OK]


[root@ds-vm-node83/tmp/redis/redis-3.0.7]# ls-l/var/run/redis


Total dosage 0


srwxrwx---1 git root 0 April 6 16:37 redis.sock


[root@ds-vm-node83/tmp/redis/redis-3.0.7]# redis-cli-s/var/run/redis/redis.sock &lt;&lt;&lt; "Info" | grep ' redis.version ' &amp;&amp; CD. /..


redis_version:3.0.7


[root@ds-vm-node83/tmp]#

18. Compile and install Nginx

[root@ds-vm-node83/tmp/nginx]# wget http://mirrors.dwhd.org/Nginx/nginx-1.9.14.tar.gz


[root@ds-vm-node83/tmp/nginx]# Tar XF nginx-1.9.14.tar.gz


[root@ds-vm-node83/tmp/nginx]# CD nginx-1.9.14/


[root@ds-vm-node83/tmp/nginx/nginx-1.9.14]# adduser-r-s/sbin/nologin-c ' Web Server '-M www


[root@ds-vm-node83/tmp/nginx/nginx-1.9.14]# yum-y Install Pcre-devel pcre


[root@ds-vm-node83/tmp/nginx/nginx-1.9.14]#./configure--prefix=/usr/local/nginx/\


--user=www--group=www \


--error-log-path=/tmp/nginx/error.log \


--http-log-path=/tmp/nginx/access.log \


--pid-path=/var/run/nginx/nginx.pid \


--lock-path=/var/lock/nginx.lock \


--with-pcre \


--with-http_ssl_module \


--with-http_flv_module \


--with-http_v2_module \


--with-http_gzip_static_module \


--with-http_stub_status_module \


--http-client-body-temp-path=/usr/local/nginx/client/\


--http-proxy-temp-path=/usr/local/nginx/proxy/\


--http-fastcgi-temp-path=/usr/local/nginx/fcgi/\


--HTTP-UWSGI-TEMP-PATH=/USR/LOCAL/NGINX/UWSGI \


--http-scgi-temp-path=/usr/local/nginx/scgi


[root@ds-vm-node83/tmp/nginx/nginx-1.9.14]# make-j $ (awk '/processor/{i++}end{print i} '/proc/cpuinfo) &amp;&amp; Make install &amp;&amp; CD ... /..


[root@ds-vm-node83/tmp]# echo "Export path=/usr/local/nginx/sbin:\ $PATH" &gt;/etc/profile.d/nginx.sh


[root@ds-vm-node83/tmp]#. /etc/profile.d/nginx.sh


[root@ds-vm-node83/tmp]# wget-q Http://www.dwhd.org/script/Nginx-init-CentOS-O/etc/rc.d/init.d/nginx


[root@ds-vm-node83/tmp]# chmod +x/etc/rc.d/init.d/nginx


[root@ds-vm-node83/tmp]# chkconfig Nginx on


[root@ds-vm-node83/tmp]# nginxconf=/usr/local/nginx/conf/nginx.conf


[root@ds-vm-node83/tmp]# sed-i $ (awk ' {A=nr}end{print A} ' $nginxCONF) s@^@ include vhost/*.conf;\n&amp;@ "$nginxCONF


[root@ds-vm-node83/tmp]# mkdir-p/usr/local/nginx/conf/vhost/


[root@ds-vm-node83/tmp]# mkdir-p/var/log/nginx/


[root@ds-vm-node83/tmp]# wget-q Https://gitlab.com/gitlab-org/gitlab-ce/raw/master/lib/support/nginx/gitlab-O/ Usr/local/nginx/conf/vhost/git.dwhd.org.conf


[root@ds-vm-node83/tmp]# usermod-a-G git www


[root@ds-vm-node83/tmp]# sed-i ' s/server.*gitlab-workhorse.socket.*/#&amp;/'/usr/local/nginx/conf/vhost/ Git.dwhd.org.conf


[root@ds-vm-node83/tmp]# sed-i '/upstream/a \ server 127.0.0.1:8080 fail_timeout=0; '/usr/local/nginx/conf/vhost/git . dwhd.org.conf


[root@ds-vm-node83/tmp]# sed-i ' s/your_server_fqdn/your domain name/'/usr/local/nginx/conf/vhost/git.dwhd.org.conf

19, modify sudo configuration


[root@ds-vm-node83/tmp]# chmod u+w/etc/sudoers
[root@ds-vm-node83/tmp]# Sed-ri ' s@^ (defaults\s+secure_path\s+=). *@\1/usr/local/go/bin:/usr/local/mariadb/bin:/ usr/local/nginx/sbin:/usr/local/redis/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin@ '/etc/sudoers
[root@ds-vm-node83/tmp]# chmod ugo-w/etc/sudoers
[root@ds-vm-node83/tmp]#

20, the detection of various environmental installation situation

[root@ds-vm-node83/tmp]# mysql-v
MySQL Ver 15.1 distrib 10.1.13-mariadb, for Linux (x86_64) using ReadLine 5.1
[root@ds-vm-node83/tmp]# nginx-v
Nginx version:nginx/1.9.14
[root@ds-vm-node83/tmp]# ruby-v
Ruby 2.3.0p0 (2015-12-25 revision 53290) [X86_64-linux]
[root@ds-vm-node83/tmp]# Go version
Go version go1.6 linux/amd64
[root@ds-vm-node83/tmp]# bundle-v
Bundler version 1.11.2
[root@ds-vm-node83/tmp]# git--version
git version 2.8.1
[root@ds-vm-node83/tmp]#
Linux CentOS 7 installed Gitlab 8-6 Chinese version

Second, install Gitlab

1, Clone gitlab 8.6 Chinese version Branch

[root@ds-vm-node83/tmp]# cd/data/git/
[root@ds-vm-node83/data/git]# sudo-u git-h git clone https://gitlab.com/larryli/gitlab.git-b 8-6-zh Gitlab
Cloning to ' Gitlab ' ...
Remote:counting objects:214761, done.
Remote:compressing objects:100% (45405/45405), done.
Remote:total 214761 (Delta 166493), reused 214623 (Delta 166408)
Receiving object: 100% (214761/214761), 111.36 MiB | 266.00 kib/s, complete.
Process Delta: 100% (166493/166493), complete.
Check connection ... Complete.
[root@ds-vm-node83/data/git]# CD gitlab/
[root@ds-vm-node83/data/git/gitlab]# sudo-u git-h git branch-va |head-1

2. Copy gitlab configuration file config/gitlab.yml

[root@ds-vm-node83/data/git/gitlab]# sudo-u git-h CP config/gitlab.yml.example CONFIG/GITLAB.YML

3, modify the Gitlab configuration file

[root@ds-vm-node83/data/git/gitlab]# sudo-u git-h sed-i ' s@/home/git@/data/git@ ' config/gitlab.yml
[root@ds-vm-node83/data/git/gitlab]# sudo-u git-h Sed-ri s/^ (\s+email_from:). */\1 gitlab@dwhd.org/"config/ Gitlab.yml
[root@ds-vm-node83/data/git/gitlab]# sudo-u git-h Sed-ri s/^ (\s+host:). */\1 git.dwhd.org/"Config/gitlab.yml
[root@ds-vm-node83/data/git/gitlab]# Sed-ri "s@ (Bin_path:). *@\1$ (which git) @" config/gitlab.yml
[root@ds-vm-node83/data/git/gitlab]# Sed-ri] s/(time_zone:). */\1 ' Beijing '/' config/gitlab.yml

# # #下面是我的配置文件参考


[root@ds-vm-node83/data/git/gitlab]# Grep-ev ' ^ (\s+)? (#|$) ' Config/gitlab.yml


Production: &amp;base


Gitlab:


host:git.dwhd.org


PORT:80 # Set to 443 if using HTTPS, and Installation.md#using-https for additional HTTPS configuration details


Https:false # Set to True if using HTTPS, the Installation.md#using-https for additional HTTPS configuration details


email_from:gitlab@dwhd.org


Email_display_name:gitlab


Email_reply_to:noreply@example.com


Default_projects_features:


Issues:true


Merge_requests:true


Wiki:true


Snippets:false


Builds:true


Incoming_email:


Enabled:false


Address: "Gitlab-incoming+%{key} @gmail. com"


User: "Gitlab-incoming@gmail.com"


Password: "[redacted]"


host:git.dwhd.org


port:993


Ssl:true


Start_tls:false


Mailbox: "Inbox"


Artifacts:


Enabled:true


Lfs:


Enabled:true


Gravatar:


Enabled:true # Use user avatar image from gravatar.com (default:true)


Cron_jobs:


Stuck_ci_builds_worker:


Cron: "0 0 * * *"


GITLAB_CI:


Ldap:


Enabled:false


Servers


Main: # ' main ' is the Gitlab ' provider ID ' of this LDAP server


Label: ' LDAP '


host:git.dwhd.org


port:389


UID: ' sAMAccountName '


Method: ' Plain ' # "TLS" or "SSL" or "plain"


BIND_DN: ' _the_full_dn_of_the_user_you_will_bind_with '


Password: ' _the_password_of_the_bind_user '


Timeout:10


Active_directory:true


Allow_username_or_email_login:false


Block_auto_created_users:false


Base: '


User_filter: '


Attributes


Username: [' uid ', ' userid ', ' sAMAccountName ']


Email: [' mail ', ' email ', ' userprincipalname ']


Name: ' CN '


First_Name: ' givenname '


Last_Name: ' SN '


Omniauth:


Enabled:false


ALLOW_SINGLE_SIGN_ON: ["SAML"]


Block_auto_created_users:true


Auto_link_ldap_user:false


Auto_link_saml_user:false


Providers


Shared


Satellites:


Path:/data/git/gitlab-satellites/


Backup


Path: "Tmp/backups" # relative paths are relative to Rails.root (default:tmp/backups/)


Gitlab_shell:


Path:/data/git/gitlab-shell/


Repos_path:/data/git/repositories/


Hooks_path:/data/git/gitlab-shell/hooks/


Upload_pack:true


Receive_pack:true


Git:


Bin_path:/usr/local/bin/git


max_size:20971520 # 20.megabytes


Timeout:10


Extra


Rack_attack:


Git_basic_auth:


Development


&lt;&lt;: *base


Test


&lt;&lt;: *base


Gravatar:


Enabled:true


Lfs:


Enabled:false


Gitlab:


host:git.dwhd.org


Port:80


Satellites:


path:tmp/tests/gitlab-satellites/


Backup


Path:tmp/tests/backups


Gitlab_shell:


path:tmp/tests/gitlab-shell/


repos_path:tmp/tests/repositories/


hooks_path:tmp/tests/gitlab-shell/hooks/


Issues_tracker:


Redmine:


Title: "Redmine"


Project_url: "http://redmine/projects/:issues_tracker_id"


Issues_url: "http://redmine/:p Roject_id/:issues_tracker_id/:id"


New_issue_url: "Http://redmine/projects/:issues_tracker_id/issues/new"


Ldap:


Enabled:false


Servers


Main


Label:ldap


host:git.dwhd.org


port:3890


UID: ' UID '


Method: ' Plain ' # "TLS" or "SSL" or "plain"


Base: ' dc=example,dc=com '


User_filter: '


Group_base: ' ou=groups,dc=example,dc=com '


Admin_group: '


Staging


&lt;&lt;: *base


[root@ds-vm-node83/data/git/gitlab]#

4, to the directory log/and tmp/git users have write permission

[root@ds-vm-node83/data/git/gitlab]# sudo-u git mkdir/data/git/gitlab/public/uploads
[root@ds-vm-node83/data/git/gitlab]# sudo-u git chown-r git {log,tmp}/public/uploads
[root@ds-vm-node83/data/git/gitlab]# sudo-u git chmod-r u+rwx {log,tmp}/public/uploads
[root@ds-vm-node83/data/git/gitlab]# sudo-u git chmod-r ug+rwx,o-rwx/data/git/repositories/
[root@ds-vm-node83/data/git/gitlab]# sudo-u git chmod-r ug-s/data/git/repositories/
[root@ds-vm-node83/data/git/gitlab]# find/data/git/repositories/-type d-print0 | sudo xargs-0 chmod g+s
[root@ds-vm-node83/data/git/gitlab]# sudo-u git ls-ld {log,tmp}/public/uploads
Drwxr-xr-x 2 git git 4096 April 6 18:52 log/
Drwxr-xr-x 2 git git 6 April 8 00:50 public/uploads
Drwxr-xr-x 6 git git 58 April 6 18:52 tmp/
[root@ds-vm-node83/data/git/gitlab]#

5. Create satellites directory and set permissions

[root@ds-vm-node83/data/git/gitlab]# sudo-u git mkdir/data/git/gitlab-satellites
[root@ds-vm-node83/data/git/gitlab]# chmod u+rwx,g=rx,o-rwx/data/git/gitlab-satellites

6, to Tmp/pids, tmp/sockets and public/uploads/directory git users have write permission

[root@ds-vm-node83/data/git/gitlab]# chmod-r u+rwx Tmp/{pids,sockets}
[root@ds-vm-node83/data/git/gitlab]# ls-ld Tmp/{pids,sockets}
Drwxr-xr-x 2 git git 21 April 6 17:56 Tmp/pids
Drwxr-xr-x 2 git git 21 April 6 17:56 tmp/sockets
[root@ds-vm-node83/data/git/gitlab]#

7, copy from the template unicorn configuration file

[root@ds-vm-node83/data/git/gitlab]# sudo-u git-h CP config/unicorn.rb.example CONFIG/UNICORN.RB
[root@ds-vm-node83/data/git/gitlab]# sudo-u git-h sed-i ' s@/home/git@/data/git@ ' config/unicorn.rb

8, if you load larger, please enable cluster mode

[root@ds-vm-node83/data/git/gitlab]# sudo-u git-h Sed-ri s/^ (worker_processes). */\1 $ (Nproc)/"config/unicorn.rb
[root@ds-vm-node83/data/git/gitlab]# sudo-u git-h Sed-ri "s/^ (timeout). */\1 300/" config/unicorn.rb

9, copy from the template rack attack configuration file

[root@ds-vm-node83/data/git/gitlab]# sudo-u git-h CP config/initializers/rack_attack.rb.example Config/initializers /rack_attack.rb

10, for Git users to do the global configuration

[root@ds-vm-node83/data/git/gitlab]# sudo-u git-h git config--global user.name "Gitlab"
[root@ds-vm-node83/data/git/gitlab]# sudo-u git-h git config--global user.email "gitlab@dwhd.org"
[root@ds-vm-node83/data/git/gitlab]# sudo-u git-h git config--global core.autocrlf input
[root@ds-vm-node83/data/git/gitlab]#

11, configure the Redis connection

[root@ds-vm-node83/data/git/gitlab]# sudo-u git-h CP config/resque.yml.example CONFIG/RESQUE.YML
[root@ds-vm-node83/data/git/gitlab]# sudo-u git-h Sed-ri s@^ (development:). *@\1 unix:/var/run/redis/redis.sock@ " Config/resque.yml

12. Configure Gitlab Database Settings

[root@ds-vm-node83/data/git/gitlab]# sudo-u git cp config/database.yml.mysql config/database.yml
[root@ds-vm-node83/data/git/gitlab]# sudo-u git-h Editor Config/database.yml
[root@ds-vm-node83/data/git/gitlab]# sudo-u git-h chmod o-rwx config/database.yml
Linux CentOS 7 installed Gitlab 8-6 Chinese version

13. Installation Gems

[root@ds-vm-node83/data/git/gitlab]# sudo-u git-h Bundle install--deployment--without Development Test Postgres AWS
# #如果是国内服务器安装请修改为淘宝的ruby源
##[root@ds-vm-node83/data/git/gitlab]# Sed-ri ' s@^ (source). *@\1 "https://ruby.taobao.org" @ ' Gemfile

[root@ds-vm-node83/data/git/gitlab]# sudo-u git-h Bundle install--deployment--without Development Test Postgres AWS


Fetching gem metadata from https://rubygems.org/...


Fetching version metadata from https://rubygems.org/...


Fetching dependency metadata from https://rubygems.org/.


Installing Rake 10.5.0


Installing Cfpropertylist 2.3.2


Installing Redcloth 4.2.9 with native extensions


Installing Ace-rails-ap 2.0.1


Installing i18n 0.7.0


Using JSON 1.8.3


Installing Minitest 5.7.0


Installing Thread_safe 0.3.5


Installing builder 3.2.2


Installing Erubis 2.7.0


Installing Mini_portile2 2.0.0


Installing Rack 1.6.4


Installing Mime-types 1.25.1


Installing Arel 6.0.3


Installing Activerecord-deprecated_finders 1.0.4


Installing Thor 0.19.1


Installing addressable 2.3.8


Installing Akismet 2.0.0


Installing allocations 1.0.4 with native extensions


Installing Multipart-post 2.0.0


Installing Multi_json 1.11.2


Installing JWT 1.5.2


Installing Multi_xml 0.5.5


Installing Asciidoctor 1.5.3


Installing Encryptor 1.3.0


Installing attr_required 1.0.0


Installing Execjs 2.6.0


Installing Ice_nine 0.11.1


Installing Babosa 1.0.2


Installing Bcrypt 3.1.10 with native extensions


Installing SASS 3.4.20


installing Browser 1.0.1


Installing Cal-heatmap-rails 3.5.1


Installing cause 0.1


Installing Charlock_holmes 0.7.3 with native extensions


Installing Chunky_png 1.3.5


Installing Coffee-script-source 1.10.0


Installing Colorize 0.7.7


Installing Concurrent-ruby 1.0.0


Installing Connection_pool 2.2.0


Installing Safe_yaml 1.0.4


Installing Creole 0.5.0


Installing Orm_adapter 0.5.0


Installing ROTP 2.1.1


Installing Diff-lcs 1.2.5


Installing Diffy 3.0.7


Using bundler 1.11.2


Installing Email_reply_parser 0.5.8


Installing Equalizer 0.0.11


Installing Escape_utils 1.1.0 with native extensions


Installing Eventmachine 1.0.8 with native extensions


Installing Excon 0.45.4


Installing Expression_parser 0.9.0


Installing Formatador 0.2.5


Installing IPAddress 0.8.2


Installing Xml-simple 1.1.5


Installing Inflecto 0.0.2


Installing rugged 0.24.0 with native extensions


Installing Get_process_mem 0.2.0


Installing Github-markup 1.3.3


Installing Posix-spawn 0.3.11 with native extensions


Installing Gitlab_meta 7.0


Installing NET-LDAP 0.12.1


Installing Hashie 3.4.3


Installing PYU-RUBY-SASL 0.0.3.3


Installing RUBYNTLM 0.5.2


Installing Rouge 1.10.1


Installing Stringex 2.5.2


Installing Request_store 1.2.1


Installing Tilt 2.0.2


Installing Sexp_processor 4.6.0


Installing Mimemagic 0.3.0


Installing Htmlentities 4.3.4


Installing HTTP_PARSER.RB 0.5.3 with native extensions


Installing HttpClient 2.7.0.1


Installing Jquery-atwho-rails 1.3.2


Installing Kgio 2.10.0 with native extensions


Installing Systemu 2.6.5


Installing Mail_room 0.6.1


Installing Method_source 0.8.2


Installing Mousetrap-rails 1.4.6


Installing MYSQL2 0.3.20 with native extensions


Installing Nested_form 0.3.2


Installing Net-ssh 3.0.1


Installing newrelic_rpm 3.14.1.311


Installing OAuth 0.4.7


Installing Timfel-krb5-auth 0.8.3 with native extensions


Installing Rubypants 0.2.0


Installing Rack-cors 0.4.0


Installing raindrops 0.15.0 with native extensions


Installing Raphael-rails 2.1.2


Installing Redcarpet 3.3.3 with native extensions


Installing Redis 3.2.2


Installing Rinku 1.7.3 with native extensions


Installing Rufus-scheduler 3.1.10


Installing Settingslogic 2.0.9


Installing Simple_oauth 0.1.9


Installing six 0.2.0


Installing Slack-notifier 1.2.1


Installing State_machines 0.4.0


Installing Underscore-rails 1.8.3


Installing Unf_ext 0.0.7.1 with native extensions


Installing Version_sorter 2.0.0 with native extensions


Installing fission 0.5.0


Installing Gemojione 2.2.1


Installing RDoc 3.12.2


Installing reCAPTCHA 1.0.2


Installing Tzinfo 1.2.2


Installing Descendants_tracker 0.0.4


Installing Nokogiri 1.6.7.2 with native extensions


Installing Rack-test 0.6.3


Installing Warden 1.2.4


Installing Sprockets 3.3.5


Installing Rack-accept 0.4.5


Installing Rack-mount 0.8.3


Installing Rack-attack 4.3.1


Installing Rack-protection 1.5.3


Installing Mail 2.6.3


Installing Select2-rails 3.5.9.3


Installing Css_parser 1.3.7


Installing Faraday 0.9.2


Installing Httparty 0.13.7


Installing attr_encrypted 1.3.4


Installing Autoprefixer-rails 6.2.3


Installing Uglifier 2.7.2


Installing Influxdb 0.2.3


Installing Rqrcode 0.7.0


Installing Coffee-script 2.4.1


Installing Crack 0.4.3


Installing Fog-core 1.35.0


Installing Gemnasium-gitlab-service 0.2.6


Installing Github-linguist 4.7.5


Installing Gollum-rugged_adapter 0.4.2


Installing Gitlab-grit 2.7.3


Installing Omniauth 1.3.1


Installing Haml 4.0.7


Installing Ruby_parser 3.7.2


Installing MACADDR 1.7.1


Installing Org-ruby 0.9.12


Installing unicorn 4.9.0 with native extensions


Installing Redis-store 1.1.7


Installing Redis-namespace 1.5.2


Installing Sidekiq 4.0.1


Installing Wikicloth 0.8.1


Installing Twitter-stream 0.1.16


Installing UNF 0.1.4


Installing Gitlab_emoji 0.3.1


Installing Activesupport 4.2.5.2


Installing Axiom-types 0.1.1


Installing Coercible 1.0.0


Installing Loofah 2.0.3


Installing Sanitize 2.1.0


Installing Sinatra 1.4.6


Installing Premailer 1.8.6


Installing Faraday_middleware 0.10.0


Installing Oauth2 1.0.0


Installing Sawyer 0.6.0


Installing Sentry-raven 0.15.6


Installing Flowdock 0.7.1


Installing Hipchat 1.5.2


Installing Bootstrap-sass 3.3.6


Installing RQRCODE-RAILS3 0.1.7


Installing Ruby-fogbugz 0.2.1


Installing Fog-json 1.0.2


Installing Fog-xml 0.1.2


Installing Fog-local 0.2.1


Installing Fog-vmfusion 0.1.0


Installing Gollum-grit_adapter 1.0.0


Installing Gitlab_omniauth-ldap 1.2.1


Installing Omniauth-oauth 1.1.0


Installing OMNIAUTH-CAS3 1.1.3


Installing Omniauth-multipassword 0.4.2


Installing Omniauth-shibboleth 1.2.1


Installing Html2haml 2.0.0


Installing UUID 2.3.8


Installing Unicorn-worker-killer 0.4.4


Installing Redis-rack 1.5.0


Installing Sidekiq-cron 0.4.0


Installing Rails-deprecated_sanitizer 1.0.3


Installing Globalid 0.3.6


Installing Activemodel 4.2.5.2


Installing Gitlab_git 10.0.0


Installing Grape-entity 0.4.8


Installing Html-pipeline 1.11.0


Installing Omniauth_crowd 2.2.3


Installing Rack-oauth2 1.2.1


Installing Redis-activesupport 4.1.5


Installing Virtus 1.0.5


Installing Rails-html-sanitizer 1.0.3


Installing Faraday_middleware-multi_json 0.0.6


Installing Tinder 1.10.1


Installing Omniauth-oauth2 1.3.1


Installing Octokit 3.8.0


Installing Gitlab-flowdock-git-hook 1.0.1


Installing Fog-aliyun 0.1.0


Installing Fog-brightbox 0.10.1


Installing Fog-sakuracloud 1.7.5


Installing Fog-serverlove 0.1.2


Installing Fog-softlayer 1.0.3


Installing Fog-storm_on_demand 0.1.1


Installing Fog-atmos 0.1.0


Installing Fog-aws 0.8.1


Installing Fog-dynect 0.0.2


Installing Fog-ecloud 0.3.0


Installing Fog-google 0.1.0


Installing Fog-powerdns 0.1.1


Installing Fog-profitbricks 0.0.5


Installing FOG-RADOSGW 0.0.5


Installing FOG-RIAKCS 0.1.0


Installing Fog-terremark 0.1.0


Installing Fog-voxel 0.1.0


Installing Fog-xenserver 0.2.2


Installing Gollum-lib 4.1.0


Installing Omniauth-bitbucket 0.0.2


Installing Omniauth-twitter 1.2.1


Installing Omniauth-kerberos 0.3.0


Installing Ruby-saml 1.1.2


Installing Rails-dom-testing 1.0.7


Installing Activejob 4.2.5.2


Installing ActiveRecord 4.2.5.2


Installing Carrierwave 0.10.0


Installing State_machines-activemodel 0.3.0


Installing Task_list 1.0.2


Installing Grape 0.13.0


Installing Asana 0.4.0


Installing Omniauth-auth0 1.4.1


Installing Omniauth-azure-oauth2 0.0.6


Installing Omniauth-facebook 3.0.0


Installing Omniauth-github 1.1.2


Installing Omniauth-gitlab 1.0.1


Installing Omniauth-google-oauth2 0.2.10


Installing Fog 1.36.0


Installing Omniauth-saml 1.5.0


Installing Actionview 4.2.5.2


Installing Acts-as-taggable-on 3.5.0


Installing After_commit_queue 1.3.0


Installing Default_value_for 3.0.1


Installing Paranoia 2.1.4


Installing Seed-fu 2.3.5


Installing State_machines-activerecord 0.3.0


Installing Actionpack 4.2.5.2


Installing Actionmailer 4.2.5.2


Installing Railties 4.2.5.2


Installing Sprockets-rails 2.3.3


Installing Gon 6.0.1


Installing Kaminari 0.16.3


Installing Redis-actionpack 4.0.1


Installing Premailer-rails 1.9.0


Installing Activerecord-session_store 0.1.2


Installing Coffee-rails 4.1.0


Installing D3_rails 3.5.11


Installing Responders 2.1.1


Installing Doorkeeper 2.2.2


Installing Font-awesome-rails 4.5.0.0


Installing Haml-rails 0.9.0


Installing Jquery-rails 4.0.5


Installing Jquery-scrollto-rails 1.4.3


Installing Jquery-ui-rails 5.0.5


Installing Rails 4.2.5.2


Installing Sass-rails 5.0.4


Installing Redis-rails 4.0.0


Installing Turbolinks 2.5.3


Installing Devise 3.5.4


Installing Dropzonejs-rails 0.7.2


Installing Jquery-turbolinks 2.1.0


Installing Devise-async 0.9.0


Installing Devise-two-factor 2.0.1


Bundle complete! 173 gemfile dependencies, 267 gems now installed.


Gems in the groups development, test, Postgres and AWS were not installed.


Bundled gems are installed into./vendor/bundle.


Post-Install Message from Browser:





#################### WARNING ##############################


#                                                         #


# Internet Explorer detection has changed on v1.0.0+. #


# If This was important for your, please read #


# https://github.com/fnando/browser#internet-explorer #


#                                                         #


###########################################################





Post-Install Message from Mousetrap-rails:





Remember to run generator to generate sample file and include mousetrap-rails with rails Asset Pipeline





$ rails Generate Mousetrap:install





Post-Install Message from RDoc:


Depending on your version of Ruby, if need to install ruby Rdoc/ri data:





&lt;= 1.8.6:unsupported


= 1.8.7:gem Install rdoc-data; Rdoc-data--install


= 1.9.1:gem Install rdoc-data; Rdoc-data--install


&gt;= 1.9.2:nothing to Do! yay!


Post-Install Message from Httparty:


When you httparty, your must party hard!


Post-Install Message from Haml:





HEADS up! HAML 4.0 has many improvements, but also has changes


Your application:





* Support for Ruby 1.8.6 dropped


* Support for Rails 2 dropped


* Sass filter now always outputs &lt;style&gt; tags


* Data attributes are now hyphenated, not underscored


* Html2haml utility moved to the Html2haml gem


* Textile and Maruku filters moved to the Haml-contrib gem





For more info:





Http://rubydoc.info/github/haml/haml/file/CHANGELOG.md





Post-Install Message from Html-pipeline:


-------------------------------------------------


Thank for installing html-pipeline!


You must bundle Filter gem dependencies.


Html-pipeline readme.md for more details.


Https://github.com/jch/html-pipeline#dependencies


-------------------------------------------------


Post-Install Message from acts-as-taggable-on:


When upgrading





Re-run the migrations generator





Rake Acts_as_taggable_on_engine:install:migrations





This'll create any new migrations and skip existing ones


Version 3.5.0 has a migration for MySQL adapter


[root@ds-vm-node83/data/git/gitlab]#

14. Installation Gitlab-shell




[root@ds-vm-node83/data/git/gitlab]# sudo-u git-h bundle exec Rake gitlab:shell:install[v$ (cat gitlab_shell_version)] Redis_url=unix:/var/run/redis/redis.sock rails_env=production


Warning:this version of Gitlab depends on Gitlab-shell 2.6.11, but you ' re running Unknown. Please update Gitlab-shell.


Missing ' db_key_base ' for ' production ' environment. The secrets is generated and stored in ' config/secrets.yml '


Cloning to '/data/git/gitlab-shell ' ...


Remote:counting objects:2558, done.


Remote:compressing objects:100% (895/895), done.


Remote:total 2558 (Delta 1607), reused 2501 (Delta 1571)


Receiving object: 100% (2558/2558), 360.62 KiB | 221.00 kib/s, complete.


Process Delta: 100% (1607/1607), complete.


Check connection ... Complete.


Head is now located in bceed73 Update changelog for 2.6.11


Mkdir-p/data/git/repositories/: OK


Mkdir-p/data/git/.ssh:ok


chmod 700/data/git/.ssh:ok


Touch/data/git/.ssh/authorized_keys:ok


chmod 600/data/git/.ssh/authorized_keys:ok


chmod ug+rwx,o-rwx/data/git/repositories/: OK


[root@ds-vm-node83/data/git/gitlab]#

15. Configure Gitlab-shell

[root@ds-vm-node83/data/git/gitlab]# cat/data/git/gitlab-shell/config.yml
---
User:git
gitlab_url:http://git.dwhd.org/
Http_settings:
Self_signed_cert:false
Repos_path: "/data/git/repositories/"
Auth_file: "/data/git/.ssh/authorized_keys"
Redis:
Bin: "/usr/local/redis/bin/redis-cli"
Namespace:resque:gitlab
Socket: "/var/run/redis/redis.sock"
Log_level:info
Audit_usernames:false
[root@ds-vm-node83/data/git/gitlab]#

16. Installation Gitlab-workhorse

[root@ds-vm-node83/data/git/gitlab]# CD ...
[root@ds-vm-node83/data/git]# sudo-u git-h git clone https://gitlab.com/gitlab-org/gitlab-workhorse.git
[root@ds-vm-node83/data/git]# CD Gitlab-workhorse
[root@ds-vm-node83/data/git]# sudo-u git-h make
17. Initialize data and activate advanced features
1
[root@ds-vm-node83/data/git/gitlab]# sudo-u git-h bundle exec Rake Gitlab:setup rails_env=production Ord=lookback gitlab_root_email=admin@dwhd.org
Linux CentOS 7 installed Gitlab 8-6 Chinese version

18. Install startup script and set boot up

[root@ds-vm-node83/data/git/gitlab]# cd/etc/systemd/system/


[root@ds-vm-node83/etc/systemd/system]# wget-o Gitlab-sidekiq.service https://gitlab.com/gitlab-org/ Gitlab-recipes/raw/master/init/systemd/gitlab-sidekiq.service


[root@ds-vm-node83/etc/systemd/system]# wget-o Gitlab-unicorn.service https://gitlab.com/gitlab-org/ Gitlab-recipes/raw/master/init/systemd/gitlab-unicorn.service


[root@ds-vm-node83/etc/systemd/system]# wget-o Gitlab-workhorse.service https://gitlab.com/gitlab-org/ Gitlab-recipes/raw/master/init/systemd/gitlab-workhorse.service


[root@ds-vm-node83/etc/systemd/system]# wget-o Gitlab-mailroom.service https://gitlab.com/gitlab-org/ Gitlab-recipes/raw/master/init/systemd/gitlab-mailroom.service


[root@ds-vm-node83/etc/systemd/system]# sed-i ' s/requires=redis.service/#&amp;/'/etc/systemd/system/gitlab-*


[root@ds-vm-node83/etc/systemd/system]# sed-i ' s@/home@/data@g '/etc/systemd/system/gitlab-*


[root@ds-vm-node83/etc/systemd/system]# sed-i ' s@/usr/bin/bundle@/usr/local/bin/bundle@g '/etc/systemd/system/ gitlab-* &amp;&amp; Cd/data/git/gitlab


[root@ds-vm-node83/data/git/gitlab]# Systemctl Daemon-reload


[root@ds-vm-node83/data/git/gitlab]# systemctl start Gitlab-sidekiq gitlab-unicorn gitlab-workhorse gitlab-mailroom


[root@ds-vm-node83/data/git/gitlab]# systemctl Enable Gitlab-sidekiq.service Gitlab-unicorn.service Gitlab-workhorse.service Gitlab-mailroom.service

[root@ds-vm-node83/data/git/gitlab]# systemctl status Gitlab-sidekiq.service gitlab-unicorn.service Gitlab-workhorse.service Gitlab-mailroom.service


Gitlab-sidekiq.service-gitlab Sidekiq Worker


Loaded:loaded (/etc/systemd/system/gitlab-sidekiq.service; enabled; vendor preset:disabled)


Active:active (running) since five 2016-04-08 02:17:10 CST; 1min 19s ago


process:9394 execstop=/usr/local/bin/bundle exec sidekiqctl stop/data/git/gitlab/tmp/pids/sidekiq.pid &gt;&gt;/data /git/gitlab/log/sidekiq.log 2&gt;&amp;1 (code=exited, status=0/success)


process:9444 execstart=/usr/local/bin/bundle exec sidekiq-d-q archive_repo-q post_receive-q mailers-q system_hook-q Incoming_email-q project_web_hook-q gitlab_shell-q common-q default-e production-p tmp/pids/sidekiq.pid-d-L log/s Idekiq.log &gt;&gt; log/sidekiq.log 2&gt;&amp;1 (code=exited, status=0/success)


Main pid:9484 (Ruby)


Cgroup:/system.slice/gitlab-sidekiq.service


└─9484 Sidekiq 4.0.1 Gitlab [0 Busy]





April 02:17:09 ds-vm-node83.cluster.com systemd[1]: Starting Gitlab sidekiq Worker ...


April 02:17:10 ds-vm-node83.cluster.com systemd[1]: PID file/data/git/gitlab/tmp/pids/sidekiq.pid not readable (yet?) AF ter start.


April 02:17:10 ds-vm-node83.cluster.com systemd[1]: gitlab-sidekiq.service:supervising process 9484 which are not we chil D. We ' ll most likely not notice when it exits.


April 02:17:10 ds-vm-node83.cluster.com systemd[1]: Started Gitlab sidekiq Worker.





Gitlab-unicorn.service-gitlab Unicorn Server


Loaded:loaded (/etc/systemd/system/gitlab-unicorn.service; enabled; vendor preset:disabled)


Active:active (running) since five 2016-04-08 02:17:09 CST; 1min 20s ago


Main pid:9478 (Ruby)


Cgroup:/system.slice/gitlab-unicorn.service


├─9478 unicorn_rails master-d-c/data/git/gitlab/config/unicorn.rb-e Production


├─9576 unicorn_rails Worker[0]-d-c/data/git/gitlab/config/unicorn.rb-e production


└─9579 unicorn_rails Worker[1]-d-c/data/git/gitlab/config/unicorn.rb-e production





April 02:17:09 ds-vm-node83.cluster.com systemd[1]: Started Gitlab unicorn Server.


April 02:17:09 ds-vm-node83.cluster.com systemd[1]: Starting Gitlab unicorn Server ...





Gitlab-workhorse.service-gitlab workhorse handles slow HTTP requests for gitlab.


Loaded:loaded (/etc/systemd/system/gitlab-workhorse.service; enabled; vendor preset:disabled)


Active:active (running) since five 2016-04-08 02:17:10 CST; 1min 20s ago


process:9446 Execstart=/data/git/gitlab/bin/daemon_with_pidfile/data/git/gitlab/tmp/pids/gitlab-workhorse.pid/ Data/git/gitlab-workhorse/gitlab-workhorse-listenumask 0-listennetwork unix-listenaddr/data/git/gitlab/tmp/ Sockets/gitlab-workhorse.socket-authbackend http://127.0.0.1:8080-authSocket/data/git/gitlab/tmp/sockets/ Gitlab.socket-documentroot/data/git/gitlab/public &gt;&gt;/data/git/gitlab/log/gitlab-workhorse.log 2&gt;&amp;1 ( code=exited, Status=0/success)


Main pid:9460 (gitlab-workhors)


Cgroup:/system.slice/gitlab-workhorse.service


└─9460/data/git/gitlab-workhorse/gitlab-workhorse-listenumask 0-listennetwork unix-listenaddr/data/git/gitlab/ Tmp/sockets/gitlab-workhorse.socket-authbackend http://127.0 .....





April 02:17:09 ds-vm-node83.cluster.com systemd[1]: Starting Gitlab workhorse handles slow HTTP requests for gitlab ....


April 02:17:10 ds-vm-node83.cluster.com systemd[1]: Started Gitlab workhorse handles slow HTTP requests for gitlab.





Gitlab-mailroom.service-gitlab mailroom Worker


Loaded:loaded (/etc/systemd/system/gitlab-mailroom.service; enabled; vendor preset:disabled)


Active:active (exited) since five 2016-04-08 02:17:10 CST; 1min 20s ago


process:9395 execstop=/data/git/gitlab/bin/mail_room Stop (code=exited, status=0/success)


process:9447 execstart=/data/git/gitlab/bin/mail_room Start (code=exited, status=0/success)


Main pid:9447 (code=exited, status=0/success)


Cgroup:/system.slice/gitlab-mailroom.service


└─9464 Ruby/data/git/gitlab/vendor/bundle/ruby/2.3.0/bin/mail_room-q-c/data/git/gitlab/config/mail_room.yml





April 02:17:09 ds-vm-node83.cluster.com systemd[1]: Starting Gitlab mailroom Worker ...


April 02:17:10 ds-vm-node83.cluster.com systemd[1]: Started Gitlab mailroom Worker.


[root@ds-vm-node83/data/git/gitlab]#


Linux CentOS 7 installed Gitlab 8-6 Chinese version

19. Set Log Scrolling
1
2
[root@ds-vm-node83/data/git/gitlab]# CP Lib/support/logrotate/gitlab/etc/logrotate.d/gitlab
[root@ds-vm-node83/data/git/gitlab]# chmod G+rx/data/git

20. Check Application Status

[root@ds-vm-node83/data/git/gitlab]# sudo-u git-h bundle exec Rake Gitlab:env:info rails_env=production





System Information


System:


Current User:git


Using Rvm:no


Ruby version:2.3.0p0


Gem version:2.5.1


Bundler version:1.11.2


Rake version:10.5.0


Sidekiq version:4.0.1





Gitlab Information


version:8.6.2


revision:cc5211c


Directory:/data/git/gitlab


DB ADAPTER:MYSQL2


url:http://git.dwhd.org


HTTP Clone Url:http://git.dwhd.org/some-group/some-project.git


SSH Clone Url:git@git.dwhd.org:some-group/some-project.git


Using Ldap:no


Using Omniauth:no





Gitlab Shell


version:2.6.11


Repositories:/data/git/repositories/


Hooks:/data/git/gitlab-shell/hooks/


Git:/usr/local/bin/git


[root@ds-vm-node83/data/git/gitlab]#.. /gitlab-shell/bin/check


Check Gitlab API Access:ok


Check Directories and files:


/data/git/repositories/: OK


/data/git/.ssh/authorized_keys:ok


Test redis-cli executable:redis-cli 3.0.7


Send Ping to Redis Server:pong


[root@ds-vm-node83/data/git/gitlab]#

[root@ds-vm-node83/data/git/gitlab]# sudo-u git-h bundle exec Rake Gitlab:check rails_env=production


Checking Gitlab Shell ...





Gitlab Shell version &gt;= 2.6.12? ... OK (2.6.12)


Repo Base directory exists? . Yes


Repo base directory is a symlink? .. no


Repo base owned by Git:git? . Yes


Repo base access is DRWXRWS---? . Yes


Hooks directories in repos are links: ...


Benyoo/test ... ok


Jason/ceshi ... ok


Running/data/git/gitlab-shell/bin/check


Check Gitlab API Access:ok


Check Directories and files:


/data/git/repositories/: OK


/data/git/.ssh/authorized_keys:ok


Test redis-cli executable:redis-cli 3.0.6


Send Ping to Redis Server:pong


Gitlab-shell self-check Successful





Checking Gitlab Shell ... Finished





Checking Sidekiq ...





Running? . Yes


Number of SIDEKIQ processes ... 1





Checking Sidekiq ... Finished





Checking Reply by email ...





Reply by e-mail is disabled in CONFIG/GITLAB.YML





Checking Reply by email ... Finished





Checking LDAP ...





LDAP is disabled in CONFIG/GITLAB.YML





Checking LDAP ... Finished





Checking Gitlab ...





Git configured with Autocrlf=input? . Yes


Database config exists? . Yes


All migrations up? . Yes


Database contains orphaned groupmembers? .. no


Gitlab config exists? . Yes


Gitlab config outdated? .. no


Log directory writable? . Yes


TMP directory writable? . Yes


Uploads directory setup correctly? .. no


Try Fixing it:


sudo find/data/git/gitlab/public/uploads-type d-not-path/data/git/gitlab/public/uploads-exec chmod 0700 {} \;


For more information:


Doc/install/installation.md in section "Gitlab"


Please fix the error above and rerun the checks.


Init script exists? . Yes


Init script up-to-date? .. no


Try Fixing it:


Redownload the init script


For more information:


DOC/INSTALL/INSTALLATION.MD in section "Install Init Script"


Please fix the error above and rerun the checks.


Projects have namespace: ...


Benyoo/test. Yes.


Jason/ceshi. Yes.


Redis version &gt;= 2.8.0? . Yes


Ruby version &gt;= 2.1.0? ... yes (2.3.0)


Your git bin path is "/usr/local/bin/git"


Git version &gt;= 2.7.3? ... yes (2.8.0)


Active Users:3





Checking Gitlab ... Finished





[root@ds-vm-node83/data/git/gitlab]#

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.