码迷,mamicode.com
首页 > 其他好文 > 详细

Gitlab 安装

时间:2018-09-08 15:32:37      阅读:304      评论:0      收藏:0      [点我收藏+]

标签:tls   本地ip   obj   text   获取   server   glob   nss   好的   

一、Gitlab 安装

git clone https://github.com/PX4/Firmware.git

 

一、安装ssh服务
ps -e|grep ssh
sudo apt-get install openssh-server
sudo /etc/init.d/ssh start

二、设置root密码

1、sudo passwd root

2、输入sudo 密码

3、输入新的 root账号密码

4、切换到root

   Su root

 

三、安装gitlao整合包

1、下载

https://bitnami.com/redirect/to/96764/bitnami-gitlab-8.5.1-0-linux-x64-installer.run

2、加入执行权限

chmod 777 bitnami-gitlab-8.5.7-0-linux-x64-installer.run

3、执行安装

./bitnami-gitlab-8.5.7-0-linux-x64-installer.run

4、执行后就会弹出图形化界面,一步步确认就行,如下  

 

       

 

 

 

 

5、输入gitlan管理员账号密码

 

5、输入gitlan服务器域名,这里测试发现用域名,当用户注册后,收到的邮件链接无法点开,将127.0.1.1改为虚拟机的本地ip地址 例如:192.168.61.128

这里通过ifconfig命令获取当前的ip地址

如果更改ip

 

//////

vi apps/gitlab/htdocs/config/gitlab.yml +474

 vi apps/gitlab/htdocs/config/gitlab.yml +32

 vi apps/gitlab/gitlab-shell/config.yml +16

             

      

6、第一次安装好了就默认启动了gitlab,如果要手动启 动的话有两种办法
1.找到安装好的路径/opt/gitlab-8.5.7-0需要root 权限执行命令:

Sudo ./ctlscript.sh restart

 

          

7、window系统浏览器访问

 

8、配置邮件服务器

1、./apps/gitlab/htdocs/config/environments/production.rb

#config.action_mailer.delivery_method = :sendmail

  # Defaults to:

  # # config.action_mailer.sendmail_settings = {

  # #   location: ‘/usr/sbin/sendmail‘,

  # #   arguments: ‘-i -t‘

  # # }

  # Defaults to:

  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 => "smtp.163.com",

:port => 25,

:domain => "163.com",

:authentication => :plain,

:user_name => "liushuhe1990@163.com",

:password => "lshjn@52013140",

:enable_starttls_auto => true

   }

2、apps/gitlab/htdocs/config/gitlab.yml

    ## Email settings

     # Uncomment and set to false if you need to disable email sending from GitLab (default: true)

     #email_enabled: true

      # Email address used in the "From" field in mails sent by GitLab

     email_from: liushuhe1990@163.com

     email_display_name: GitLab

     email_reply_to: noreply@163.com

 

3、

9、./apps/gitlab/htdocs/config/environments/production.rb

二、GitLab配置ssh key

1、ssh-keygen -t rsa -C ‘liushuhe1990@163.com‘

2、cat ~/.ssh/id_rsa.pub

 

四、卸载

1、停止gitlab 进入opt/gitlab-8.5.1-0目录

 ./ctlscript.sh stop

2、卸载gitlab(注意这里写的是gitlab-ce)

rpm -e gitlab-ce

1、查看gitlab进程

ps aux | grep gitlab

 

2、杀掉第一个进程(就是带有好多.............的进程)

kill -9 18777

杀掉后,在ps aux | grep gitlab确认一遍,还有没有gitlab的进程

5、删除所有包含gitlab文件

find / -name gitlab | xargs rm -rf

 

三、git 出现错误 Could not resolve host: github.com

sudo vi /etc/hosts

i  启动编辑模式

::1             localhost
192.30.255.112  github.com

然后添加github的地址

192.30.253.113    github.com

192.30.252.131 github.com

185.31.16.185 github.global.ssl.fastly.net

74.125.237.1 dl-ssl.google.com

173.194.127.200 groups.google.com

192.30.252.131 github.com

185.31.16.185 github.global.ssl.fastly.net

74.125.128.95 ajax.googleapis.com

 

1、开始需要我们做的是先在我们的ubuntu下安装好samba:

安装sambasudo apt-get install samba

安装smbclientsudo apt-get install smbclient

2、修改配置文件

vi /etc/samba/smb.conf 编辑smb.conf 文件

在配置文件的最末尾加上:

[fwl]

   comment = my samba

   path = /

   browseable = yes

   read only = no

   guest ok = no

保存后重新启动sambasudo /etc/init.d/samba restart

 

3、设置用户和密码

sudo smbpasswd -a fwl 接着俺提示输入密码。(前提是添加了此用户:useradd fwl )

否则系统在没有此用户的前提下按默认操作是会报如下错的:

增加samba用户提示Failed to add entry for user

root@tyc-virtual-machine:/home#  smbpasswd -a fwl 

New SMB password:

Retype new SMB password:

Failed to add entry for user fwl .

解决办法:

这是因为没有加相应的系统账号,所以会提示Failed to add entry for user的错误,只需增加相应的系统账号share就可以了:

root@tyc-virtual-machine:/home#  groupadd fwl -g 6000

[root@tyc-virtual-machine:/home# useradd fwl -u 6000 -g 6000 -s /sbin/nologin -d /dev/null

 

4、最后计算机下右键添加一个网络位置

输入 文件夹框 \\ip地址\share,按提示输入用户名密码即可。

 

 

 

Ubuntu:下载

fwl@ubuntu:/work$ rm px4/ -rf

fwl@ubuntu:/work$ git clone git@192.168.1.103:liushuhe/px4.git

正克隆到 ‘px4‘...

remote: Counting objects: 17053, done.

remote: Compressing objects: 100% (7635/7635), done.

remote: Total 17053 (delta 8581), reused 16881 (delta 8520)

接收对象中: 100% (17053/17053), 264.72 MiB | 21.39 MiB/s, 完成.

处理 delta 中: 100% (8581/8581), 完成.

检查连接... 完成。

正在检出文件: 100% (15080/15080), 完成.

Minigeiw32:下载

 

Gitlab 安装

标签:tls   本地ip   obj   text   获取   server   glob   nss   好的   

原文地址:https://www.cnblogs.com/liushuhe1990/p/9609014.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!