安装配置ubuntu16、gitLab14社区版及相关问题
安装配置ubuntu16、gitLab14过程及相关问题
虚拟机 : Vmware workstation 16 安装todo
安装ubuntu16
安装ubuntu16 : https://releases.ubuntu.com/16.04.7/
问题1,ubuntu和windows交互粘贴复制问题
安装vm-tools
sudo apt-get autoremove open-vm-tools
sudo apt-get install open-vm-tools-desktop
重启
问题2,重启后,键盘鼠标不可用

问题3,设置增强型键盘后,重启报错:传输 (VMDB)错误 -14: Pipe connection has been broken。
原因
产生这个问题的是因为VMware Workstation 的虚拟化与window10自带的Hyper-V 服务发生了冲突,关闭windows的Hyper-V功能重启电脑就好了。
如果你电脑上同时安装了Docker Desktop 和 WMware Workstation,就有些麻烦了。因为Docker Desktop以来windows 的Hyper-V 技术。
解决方法
参考:https://blog.csdn.net/qq_40584960/article/details/82946371
或改为删除ubuntu,重新安装!不是用vmtools。
问题4:暂时不能解析域名“cn.archive.ubuntu.com”
访问不了网络。
执行命令,重启网关服务:
sudo service network-manager stop//把network-manager停掉(//后的不要复制)
sudo rm /var/lib/NetworkManager/NetworkManager.state
sudo service network-manager start //启动
会有提示,且右上角能看到具体的网络信息。
如果还不能解决,参考:
https://blog.csdn.net/qq_33680024/article/details/83239890
问题5:有几个软件包无法下载,要不运行 apt-get update 或者加上 --fix-missing 的选项再试试
执行命令
sudo apt-get update
sudo apt-get install --fix-missing
问题6:文件权限问题
1,切换为root用户
sudo su
//输入密码
2,授权755
chmod 755 文件
安装gitLab社区版
官网下载
https://about.gitlab.cn/install
所有社区版本下载
https://packages.gitlab.com/gitlab/gitlab-ce
安装过程及配置参考:
https://blog.csdn.net/friendgx/article/details/102875062
ubuntu安装gitLab
sudo apt-get update
sudo apt-get install -y curl openssh-server ca-certificates tzdata perl
(可选)下一步,安装 Postfix 以发送电子邮件通知。如果您想使用其他解决方案发送电子邮件
sudo apt-get install -y postfix
在安装 Postfix 的过程中可能会出现一个配置界面,在该界面中选择“Internet Site”并按下回车。把“mail name”设置为您服务器的外部 DNS 域名并按下回车。如果还有其它配置界面出现,继续按下回车以接受默认配置。
安装GitLab-社区版
指定社区版本地址:
https://packages.gitlab.com/gitlab/gitlab-ce
下载安装
【官方安装】
# Ubuntu 16.04
wget https://omnibus.gitlab.cn/ubuntu/xenial/gitlab-jh_14.6.1-jh.0_amd64.deb
接着执行如下命令开始安装:
sudo dpkg -i gitlab-jh_14.6.1-jh.0_amd64.deb
gitLab初始化并启动
sudo gitlab-ctl reconfigure
gitlab的初始化完成。
7,开启sshd和postfix服务
service sshd start
service postfix start
8,开启80端口,通过防火墙进行网络访问
sudo iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
9,检查gitlab是否正确安装且已经在运行输入如下命令
sudo gitlab-ctl status
10,出现如下内容,说明gitlab运行正常:

默认密码位置
安装成功后,初始化gitLab默认密码:

默认密码位置
登录成功

登录成功
gitLab中文设置
在User > Settings > Profile > Preferred > Localization > language设置 简体中文,
最后点击 Save changes,F5刷新页面即可。

中文字体
ubuntu卸载gitLab
# 停止gitlab
sudo gitlab-ctl stop
# 查看进程
ps -e | grep gitlab
# 如果存在进程 kill -9
kill -9 进程id
# 检查还有没有卸载的gitlab相关软件
dpkg --get-selections | grep gitlab
gitlab-ce deinstall # 安装的gitLab版本名称
# 再执行
sudo apt-get --purge remove gitlab-ce
# 确保卸载社区版 sudo apt-get remove gitlab-ce
# Debian/Ubuntu sudo dpkg -r gitlab-jh
# 【如果有,就执行】删除所有包含gitlab的文件及目录 (gitlab使用上文中查询到的目标名称)
find / -name gitlab | xargs rm -rf
# 假设搜索到的目录名称是 gitlab-jh 名称要注意,可能会报权限不足
# find / -name gitlab-jh | xargs rm -rf
gitLab常用命令
sudo gitlab-ctl stop // 停止
sudo gitlab-ctl start // 开启
sudo gitlab-ctl restart // 重启
sudo gitlab-ctl status // 查看状态
sudo gitlab-ctl reconfigure // 确认配置(修改配置后,必须执行)
sudo gitlab-ctl tail // 查看日志,如果有问题可以查看排查
gitLab默认设置及代码连接测试后续更新!
相关推荐
-
PHP8种变量类型的详细讲解2025-02-22 00:32:24
-
php+apache 和 php+nginx的区别2025-02-22 00:21:27
-
PHP:与workerman结合实现定时任务2025-02-22 00:15:57
-
Nginx的Rewrite规则与实例2025-02-22 00:15:39
-
MySql中身份证字段的简单脱敏介绍2025-02-22 00:15:36