咸鱼之王7005阵容搭配(塔王之王小v终极阵容)

git对服务器的基本要求:

内存:4GB以上,最好8G,gitlab就需要占用4G硬盘:看代码所需大小

安装步骤:

//安装前置条件,sshsudo yum install -y curl policycoreutils-pythonopenssh-server//ssh加入开机启动sudo systemctl enable sshd //启动sshsudo systemctl start sshd//如需发邮件,则安装邮件功能yum -y install policycoreutils openssh-serve openssh-clients postfix//安装防火墙yum install firewalld systemd -y//启动防火墙service firewalld start//添加http服务到firewalld,pemmanent表示永久生效,若不加--permanent系统下次启动后就会失效。sudo firewall-cmd --permanent --add-service=http//重启防火墙sudo systemctl reload firewalld//安装Postfix以发送通知邮件sudo yum install postfix//将postfix服务设置成开机自启动sudo systemctl enable postfix//启动postfixsudo systemctl start postfix/*在安装Postfix期间,可能会出现配置屏幕。选择“Internet Site”并按enter键。使用您的服务器的外部DNS以“mail name”并按enter。如果出现额外的屏幕,继续按enter键接受默认值。*///安装镜像文件,镜像站点:https://mirrors.tuna.tsinghua.edu.cnwget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-13.9.7-ce.0.el7.x86_64.rpm//如提示无wgetyum install wget//再次添加镜像,等待加载完镜像,执行安装rpm -i gitlab-ce-13.9.7-ce.0.el7.x86_64.rpm/*安装过程有点长,需要等待*///安装完成后,查看配置vi /etc/gitlab/gitlab.rb//修改访问地址和端口,配置文件中找:external_url//修改为http://ip:7005 //默认8080容易被占用//:wq! 保存退出//继续调整,调整对外端clone路径//如进入后发现git clone 是locahost问题,需要调整gitlab.ymlvi /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml/*## GitLab settings gitlab: ## Web server settings (note: host is the FQDN, do not include http://) host: localhost >> 这里改为主机的IP即可 port: 80 https: false # Uncommment this line below if your ssh host is different from HTTP/HTTPS one # (you'd obviously need to replace ssh.host_example.com with your own host). # Otherwise, ssh host will be set to the `host:` value above*///继续设置swap交换分区//if=文件名,即指定源文件;of=文件名,即指定目的文件,自行定义dd if=/dev/zero of=/root/swap bs=1M count=2048//在/root/swap文件上创建交换分区,即格式化为交换分区文件mkswap /root/swap//启用交换分区swapon /root/swap//授权,建议把swap设置成644或600权限。chmod 600 /root/swap//验证分区free -h//或者swapon -s//或者cat /proc/swaps//设置开机自启动, 打开 /etc/fstab 文件(vi /etc/fstab),在文件最后添加以下内容并保存/root/swap swap swap defaults 0 0//重置并启动GitLabgitlab-ctl reconfigure //此操作也需要比较长的时间gitlab-ctl restart//通过浏览器访问http://ip:端口 (7005)//要求输入初始密码,查看初始密码/etc/gitlab/initial_root_password//用户名是root ,第一次登录修改密码Password: 初始密码

咸鱼之王7005阵容搭配(塔王之王小v终极阵容)插图

进入设置

咸鱼之王7005阵容搭配(塔王之王小v终极阵容)插图1

修改密码

设置中文点击用户头像那里有个prefrences->Localization->Language ,一定是点用户,不是点全局,全局没有这个选项