gitlab-使用配置.docx_第1页
gitlab-使用配置.docx_第2页
gitlab-使用配置.docx_第3页
gitlab-使用配置.docx_第4页
gitlab-使用配置.docx_第5页
已阅读5页,还剩3页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

以下所有操作基于root用户,安装路径为默认路径安装gitlab服务器下载地址/redirect/to/39039/bitnami-gitlab-7.1.1-0-linux-x64-installer.run添加执行权限chmod +x bitnami-gitlab-7.4.3-0-linux-installer.run运行安装文件./bitnami-gitlab-7.4.3-0-linux-installer.run安装所带的软件- GitLab 7.4.3- Apache 2.4.10- ImageMagick 6.7.5- MySQL 5.5.40- Git 1.9.0- Ruby 1.9.3-p550- Rails 4.1.6- RubyGems 1.8.12安装过程The installer detects that exists a git user in the system. This installer will change the config uration for this user. Do you want tocontinue the installation? y/N: y-Welcome to the Bitnami Gitlab Stack Setup Wizard.-Select the components you want to install; clear the components you donot wantto install. Click Nextwhen you are ready tocontinue.GitLab : Y (Cannot be edited)GitLab CI Y/n :YIs the selection above correct? Y/n: Y-Installation folderPlease, choose a folder to install Bitnami Gitlab StackSelect a folder /opt/gitlab-7.4.3-0:注意此处可以直接按回车,否则在当前目录创建一个你自己命名的文件夹-Create Admin account设置管理员Bitnami Gitlab Stack admin user creationEmail Address : Login user: masterPassword :*Please confirm your password :*-Hostname that will be used tocreate internal URLs. If this valueis incorrect,you may be unable to access your Gitlab installation from other computers. It isadvisable to use a Domain instead of an IP address for compatibility withdifferent browsers.Domain 81:这里写域名Do you want to configure mail support? y/N: y-Configure SMTP SettingsThis is required so your application can send notifications via email.Default email provider:1 GMail2 CustomPlease choose an option 1 : 2选择2自定义,因为Gmail已经屏蔽了-Configure SMTP SettingsThis data is stored in the application configuration files and may be visible toothers. For this reason, it is recommended that you donot use your personalaccount credentials.Username : Password :Re-enter :SMTP Host : SMTP Port : 25Secure connection1 None2 SSL3 TLSPlease choose an option 3 :3-Setup is now ready tobegin installing Bitnami Gitlab Stack on your computer.Do you want tocontinue? Y/n: y-Please wait while Setup installs Bitnami Gitlab Stack on your computer. Installing0% _ 50% _ 100% #-Setup has finished installing Bitnami Gitlab Stack on your computer.Info: To access the Bitnami Gitlab Stack, goto81:80from your browser.访问路径Press Enter tocontinue:配置邮件服务Gitlab不能注册用户的,需要由经理创建用户并以邮件的方式告知开发人员,开发人员在通过邮件的链接设置密码才能登陆到gitlab。1, 更改config/environments/production.rbvi /opt/gitlab-7.4.3-0/apps/gitlab/htdocs/config/environments/production.rb在文件最后设置 config.action_mailer.perform_deliveries = true config.action_mailer.raise_delivery_errors = true config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = :address = , :port = 25, :domain = , :authentication = :plain, :user_name = , :password = xxxxxxxx, :enable_starttls_auto = true config.eager_load = true config.assets.js_compressor = :uglifier config.allow_concurrency = false2,更改config/environments/production.rb进入目录cd /opt/gitlab-7.1.1-0/apps/gitlab/htdocs/config/initializers/拷贝文件cp smtp_settings.rb.sample smtp_settings.rb编辑文件vi smtp_settings.rbif Rduction? Gitlab:Application.config.action_mailer.delivery_method = :smtp ActionMailer:Base.smtp_settings = address: , port: 25, user_name: , password: xxxxxxxx, domain: , authentication: :login, enable_starttls_auto: true End3, config/gitlab.yml备份gitlab.yml修改gitlab.ymlVi /opt/gitlab-7.4.3-0/apps/gitlab/htdocs/config/gitlab.yml在第38行修改email_from: 启动与关闭服务器进入文件夹Cd /opt/gitlab-7.4.3-0执行文件./ctlscript.shstart启动所有服务参数说明./ctlscript.sh help ./ctlscript.sh (start|stop|restart|status) ./ctlscript.sh (start|stop|restart|status) mysql ./ctlscript.sh (start|stop|restart|status) apache ./ctlscript.sh (start|stop|restart|status) redis ./ctlscript.sh (start|stop|restart|status) gitlab_sidekiq ./ctlscript.sh (start|stop|restart|status) gitlabci_sidekiq ./ctlscript.sh (start|stop|restart|status) gitlabci_runnerhelp - this screenstart - start the service(s)stop - stop the service(s)restart - restart or start the service(s)status - show the status of the service(s)目录结构及日志apache2/: Apache Web server.ruby/: Ruby language.redis/: Redis server.mysql/: MySQL Database.apps/ gitlab/: GitLab application folder conf/: GitLab Apache configuration files htdocs/: GitLab application filesapache错误日志/opt/gitlab-7.4.3-0/apache2/logs/error_logapache访问日志/opt/gitlab-7.4.3-0/apache2/logs/access_logmysql数据库mysql数据库默认用户名和密码: username: bitnami password: 48312c6b4d由于是一键安装,没有给出mysql的用户名密码,在database.yml文件里可以找到。路径:/opt/gitlab-7.4.3-0/apps/gitlab/htdocs/config/database.yml备份和恢复使用Gitlab一键安装包安装Gitlab非常简单, 同样的备份恢复与迁移也非常简单. 使用一条命令即可创建完整的Gitlab备份:gitlab-rake gitlab:backup:create使用以上命令会在/var/opt/gitlab/backups目录下创建一个名称类似为1393513186_gitlab_backup.tar的压缩包, 这个压缩包就是Gitlab整个的完整部分, 其中开头的1393513186是备份创建的日期.Gitlab修改备份文件默认目录你也可以通过修改/etc/gitlab/gitlab.rb来修改默认存放备份文件的目录:gitlab_railsbackup_path = /mnt/backups/mnt/backups修改为你想存放备份的目录即可, 修改完成之后使用gitlab-ctl reconfigure命令重载配置文件即可.Gitlab自动备份也可以通过crontab使用备份命令实现自动备份:sudo su -crontab -e加入以下, 实现每天凌晨2点进行一次自动备份:0 2 * * * /opt/gitlab/bin/gitlab-rake gitlab:backup:createGitlab恢复同样,Gitlab的从备份恢复也非常简单:# 停止相关数据连接服务gitlab-ctl stop unicorngitlab-ctl stop sidekiq# 从1393513186编号备份中恢复gitlab-rake gitlab:backup:r

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论