GitLab CE community version modified to MySQL mode configuration (yum)

Source: Internet
Author: User
Tags chmod git client git clone

GitlabDatabase ExchangeMysqlDatabase

Install first Mysql I'll take the test here . Yum installed a 5.6 of the

Edit Yum.repo

[Mysql56-community]

Name=mysql 5.6Community Server

baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/6/$basearch/

Enabled=1

Gpgcheck=0

Run directly after saving

Yum Installmysql-community-server–y installation

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/8D/47/wKiom1iURhzDP9ofAADNMFQvaeY113.png "title=" 1.png " alt= "Wkiom1iurhzdp9ofaadnmfqvaey113.png"/>

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/8D/44/wKioL1iURjHgPJ9zAAKQldUjGQQ418.png "title=" 2.png " alt= "Wkiol1iurjhgpj9zaakqldujgqq418.png"/>650) this.width=650; src= http://s4.51cto.com/wyfs02/M00/8D/47/ Wkiom1iurk7absb7aar_zmuinsi705.png "title=" 3.png "alt=" Wkiom1iurk7absb7aar_zmuinsi705.png "/>

Installation is complete.

/etc/init.d/mysqldstart Start MySQL

mysql_secure_installation Initialize

mysql–u root–p Connection

CREATE databasegitlab DEFAULT CHARACTER SET UTF8 COLLATE utf8_general_ci; Create a library Gitlab

Grant Allprivileges on gitlab.* to [e-mail protected] "%" identified by ' gitlab123 ' withgrant option; Create a connected user

flush Privileges; Refresh

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/8D/44/wKioL1iURmnSWlSmAAM55Lex5Ys553.png "title=" 4.png " alt= "Wkiol1iurmnswlsmaam55lex5ys553.png"/>

Install first MYSQL2 This bag, is Ruby The connection database is used as if.

adb /opt/gitlab/embedded/bin/

./gem install-i/opt/gitlab/embedded/service/gem/ruby/2.1.0 MYSQL2

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/8D/44/wKioL1iURofBii4DAAP9Xar5nLM179.png "title=" 5.png " alt= "Wkiol1iurofbii4daap9xar5nlm179.png"/>

There's a bug that needs to be installed Mysql-devel Package

Yum Installmysql-devel–y Install it

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/8D/47/wKiom1iURqfivbSXAAKEorJnmHI010.png "title=" 6.png " alt= "Wkiom1iurqfivbsxaakeorjnmhi010.png"/>

The configuration is then modified

Vi/opt/gitlab/embedded/service/gitlab-rails/.bundle/config

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/8D/47/wKiom1iURsfB6GYGAAClJdoU9SE035.png "title=" 7.png " alt= "Wkiom1iursfb6gygaacljdou9se035.png"/>

Vi/etc/gitlab/gitlab.rb

postgresql[' Enable ']= false

gitlab_rails[' Db_adapter ']= "MYSQL2"

gitlab_rails[' db_encoding ']= "UTF8"

gitlab_rails[' db_database ']= "Gitlab"

gitlab_rails[' Db_pool ']= 10

gitlab_rails[' Db_username ']= "Gitlab"

gitlab_rails[' Db_password ']= "gitlab123"

gitlab_rails[' Db_host ']= "127.0.0.1"

gitlab_rails[' Db_port ']= 3306

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/8D/47/wKiom1iUSbWDA6RMAABRA6Hy8Ok813.png "title=" cc.png "alt=" Wkiom1iusbwda6rmaabra6hy8ok813.png "/>


650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/8D/44/wKioL1iUSczQGpsgAAL9pwFWNiQ324.png "title=" dd.png "alt=" Wkiol1iusczqgpsgaal9pwfwniq324.png "/>

Configuration is complete.

Gitlab-rakegitlab:check Perform checks

Error?

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/8D/44/wKioL1iURuTAtAxuAACXUVh8ZlM622.png "title=" 8.png " alt= "Wkiol1iurutataxuaacxuvh8zlm622.png"/>

./gem install-i/opt/gitlab/embedded/service/gem/ruby/2.1.0 mysql2-v "0.3.20" carry out this 0.3.20 also installed on.

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/8D/47/wKiom1iUR8CwdSc_AAGHCYwzHPM656.png "title=" 10.png "alt=" Wkiom1iur8cwdsc_aaghcywzhpm656.png "/>

Gitlab-rakegitlab:check re-check: again wrong

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/8D/44/wKioL1iUR-qwWyidAAR-TkP46Bc310.png "title=" 11.png "alt=" Wkiol1iur-qwwyidaar-tkp46bc310.png "/>

gitlab-ctlreconfigure run this to make us change gitlab.rb document entry into force

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/8D/47/wKiom1iUSC3RMa02AAR3Yx_Qw7o825.png "title=" 12.png "alt=" Wkiom1iusc3rma02aar3yx_qw7o825.png "/>

Gitlab-rakegitlab:check re-detection:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/8D/44/wKioL1iUSE_jNZDGAAQ2Q1yWCqo480.png "title=" 13.png "alt=" Wkiol1iuse_jnzdgaaq2q1ywcqo480.png "/>

Gitlab-rakegitlab:setup in the DB Create new content and set up admin account

input Yes ( This creates the necessary database tables and builds the database.)

you will lose any previous data stored in the database. )

input Yes after

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/8D/47/wKiom1iUSIzi4UQMAAPp5RbWti4779.png "title=" 14.png "alt=" Wkiom1iusizi4uqmaapp5rbwti4779.png "/>

re-detection: Gitlab-rake Gitlab:check

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/8D/44/wKioL1iUSMvQLPeSAAM22jJwEuY920.png "title=" aa.png "alt=" Wkiol1iusmvqlpesaam22jjweuy920.png "/>

Restart the service

Gitlab-ctl stop

Gitlab-ctl start

After reboot or error, wow, I've been looking for a long time.

sudo chmod-rug+rwx,o-rwx/var/opt/gitlab/git-data/repositories

Chmod-r ug-s/var/opt/gitlab/git-data/repositories

Find/var/opt/gitlab/git-data/repositories-type d-print0 | sudo xargs-0 chmod g+s

perform the above 3 command, the permissions don't seem to be right.

The good status is as follows:

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/8D/47/wKiom1iUSRSy-t1mAAP30vhk0HY865.png "title=" bb.png "alt=" Wkiom1iusrsy-t1maap30vhk0hy865.png "/> and then re-access is just like our newly installed gitlab . Need to re-enter the setup password

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/8D/44/wKioL1iUSUjwLkVsAAGGDf7VRJY112.png "title=" 15.png "alt=" Wkiol1iusujwlkvsaaggdf7vrjy112.png "/>

The GIT client creates a look:

#mkdir test2 # cd test2 #git clone https://192.168.61.129/root/test.git #ls #cd test/#ls #touch test.txt #vi test.txt #gi T add test.txt #git status #git commit-m "test" #git push-u Origin Master

View Available data:

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/8D/47/wKiom1iUSnjjFoKSAACIYdzM-Mo087.png "title=" ff.png "alt=" Wkiom1iusnjjfoksaaciydzm-mo087.png "/>

Finally I check again:

Gitlab-rakegitlab:check

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/8D/44/wKioL1iUSX_SDqRKAATejMTbRs0090.gif "title=" Jdfw.gif "alt=" Wkiol1iusx_sdqrkaatejmtbrs0090.gif "/>

GitLab CE community version modified to MySQL mode configuration (yum)

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.