【最好给服务器分配至少4G内存】
先检查一下依赖:sshd
[root@localhost soft]# rpm -qa|grep openssh-server openssh-server-7.4p1-11.el7.x86_64 [root@localhost soft]# ps -e|grep sshd1107 ? 00:00:00 sshd12585 ? 00:00:00 sshd12590 ? 00:00:00 sshd
如果你没有,那么:
sudo yum install -y curl policycoreutils-python openssh-server sudo systemctl enable sshd sudo systemctl start sshd sudo firewall-cmd --permanent --add-service=http sudo systemctl reload firewalld
再检查一下postfix
[root@localhost soft]# rpm -qa|grep postfix postfix-2.10.1-6.el7.x86_64 [root@localhost soft]# ps -e|grep postfix
如果你没有,那么
sudo yum install postfix sudo systemctl enable postfix sudo systemctl start postfix
..
最后找到你存放rpm目录并进入
[root@localhost soft]# wget .0.6-ce.0.el7.x86_64.rpm --2018-09-19 03:12:09-- .0.6-ce.0.el7.x86_64.rpm Resolving mirrors.tuna.tsinghua.edu (mirrors.tuna.tsinghua.edu)... 101.6.8.193, 2402:f000:1:408:8100::1 Connecting to mirrors.tuna.tsinghua.edu (mirrors.tuna.tsinghua.edu)|101.6.8.193|: connected. HTTP request sent, 200 OK Length: 436017937 (416M) [application/x-redhat-package-manager] Saving to: ‘gitlab-ce-11.0.6-ce.0.el7.x86_64.rpm’100%[=========================================================================================================================================================>] 436,017,937 1.50MB/s in 4m 37s 2018-09-19 03:16:46 (1.50 MB/s) - ‘gitlab-ce-11.0.6-ce.0.el7.x86_64.rpm’ saved [436017937/436017937]
..查看
[root@localhost soft]# ll total 695524 -rw-r--r--. 1 root root 436017937 Sep 7 01:24 gitlab-ce-11.0.6-ce.0.el7.x86_64.rpm -rw-r--r--. 1 root root 189756259 Mar 26 07:20 -rw-r--r--. 1 root root 49766096 Mar 26 07:20 kafka_2.11-1. -rw-r--r--. 1 root root 36668066 Mar 26 07:20 zookeeper-3.4.11.tar.gz [root@localhost soft]#
安装
[root@localhost soft]# rpm -ivh gitlab-ce-11.0.6-ce.0.el7.x86_64.rpm warning: gitlab-ce-11.0.6-ce.0.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f27eab47: NOKEY ################################# [100%] Updating / 1:gitlab-ce-11.0.6-ce.0.el7 ################################# [100%] It looks like GitLab has not been configured yet; skipping the upgrade script.*. *.*** ******** *****.****** *************** ********,,,,,,,,,***********,,,,,,,,,,,,,,,,,,,,*********,,,,,,,,,,,.,,,,,,,,,,,*******,,,,,,,,,,,,,,,,,,,,,*****,,,,,,,,,.,,,,,,,****,,,,,,.,,,***,,,,,*,._______ __ __ __/ ____(_) /_/ / ____ _/ /_/ / __/ / __/ / / __ `/ __ / /_/ / / /_/ /___/ /_/ / /_/ /____/_/__/_____/__,_/_.___/Thank you for installing GitLab! GitLab was unable to detect a valid hostname for your instance. Please configure a URL for your GitLab instance by setting `external_url` configuration in /etc/gitlab/gitlab.rb file. Then, you can start your GitLab instance by running the following command:sudo gitlab-ctl reconfigureFor a comprehensive list of configuration options please see the Omnibus GitLab readme .md
然后编辑
vim /etc/gitlab/gitlab.rb
修改
然后执行
gitlab-ctl reconfigure
..
..启动
gitlab-ctl restart
..
..
查看端口占用
[root@localhost soft]# netstat -tunlp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:9100 0.0.0.0:* LISTEN 18777/node_exporter tcp 0 0 127.0.0.1:9229 0.0.0.0:* LISTEN 18750/gitlab-workho tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1/systemd tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 19015/unicorn maste tcp 0 0 127.0.0.1:9168 0.0.0.0:* LISTEN 18747/ruby tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 18765/nginx: master tcp 0 0 127.0.0.1:8082 0.0.0.0:* LISTEN 18827/sidekiq 5.1.3 tcp 0 0 127.0.0.1:9236 0.0.0.0:* LISTEN 18737/gitaly tcp 0 0 192.168.122.1:53 0.0.0.0:* LISTEN 1514/dnsmasq tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1107/sshd tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1106/cupsd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1477/master tcp 0 0 0.0.0.0:8060 0.0.0.0:* LISTEN 18765/nginx: master tcp 0 0 0.0.0.0:6783 0.0.0.0:* LISTEN 18731/alertmanager tcp 0 0 127.0.0.1:9121 0.0.0.0:* LISTEN 18818/redis_exporte tcp 0 0 127.0.0.1:9090 0.0.0.0:* LISTEN 18808/prometheus tcp 0 0 127.0.0.1:9187 0.0.0.0:* LISTEN 18782/postgres_expo tcp 0 0 127.0.0.1:9093 0.0.0.0:* LISTEN 18731/alertmanager tcp6 0 0 :::111 :::* LISTEN 1/systemd tcp6 0 0 ::1:9168 :::* LISTEN 18747/ruby tcp6 0 0 :::22 :::* LISTEN 1107/sshd tcp6 0 0 ::1:631 :::* LISTEN 1106/cupsd tcp6 0 0 ::1:25 :::* LISTEN 1477/master udp 0 0 0.0.0.0:35759 0.0.0.0:* 729/avahi-daemon: r udp 0 0 0.0.0.0:5353 0.0.0.0:* 729/avahi-daemon: r udp 0 0 192.168.122.1:53 0.0.0.0:* 1514/dnsmasq udp 0 0 0.0.0.0:67 0.0.0.0:* 1514/dnsmasq udp 0 0 0.0.0.0:68 0.0.0.0:* 908/dhclient udp 0 0 0.0.0.0:10338 0.0.0.0:* 908/dhclient udp 0 0 127.0.0.1:323 0.0.0.0:* 691/chronyd udp6 0 0 :::41175 :::* 908/dhclient udp6 0 0 ::1:323 :::* 691/chronyd
..
查看防火墙
[root@localhost soft]# firewall-cmd --zone=public --list-ports 2888/tcp 3888/tcp 2181/tcp [root@localhost soft]# firewall-cmd --zone=public --add-port=80/tcp --permanent success [root@localhost soft]# firewall-cmd --reload success
打开浏览器,访问
..会让你重置密码,并且至少8位,我输入的12345678。然后会让你登录,用户名是root,密码是你重置的那个
你可以创建用户,创建项目。还可以设置SSH Key。
到此就完成啦。
打开:
现在我们换一台机器
[root@localhost admin]# cd /soft/ [root@localhost soft]# curl -s .rpm.sh | bash Detected operating system as centos/7. Checking Downloading repository file: .repo?os=centos&dist=7&source=script done. Installing pygpgme to verify Loaded plugins: fastestmirror, langpacks base | 3.6 kB 00:00:00 extras | 3.4 kB 00:00:00 .xml: [Errno 12] Timeout on .xml?AWSAccessKeyId=AKIAJ74R7IHMTQVGFCEA&Signature=iiqnja2rIZZgVhZPOxxLPMg8vWI=&Expires=1537345200: (28, 'Operation timed out after 30827 milliseconds with 0 out of 0 bytes received') Trying other mirror.
问题在于访问超时
我不玩了好吧~
转载于:.html
本文发布于:2024-01-31 05:28:54,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170665013525895.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |