【运维】一些团队开发相关的软件安装。

gitlab

   安装步骤

   (1) 下载镜像,并且上传到服务器  https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-16.2.8-ce.0.el7.x86_64.rpm

(2)rpm -i gitlab-ce-16.2.8-ce.0.el7.x86_64.rpm

(3)安装成功后,会出现一个gitlab的logo

(4) 修改gitlab配置文件指定服务器ip和自定义端口:

vim /etc/gitlab/gitlab.rb

external_url改成指定的域名或者ip,如果没有,默认http://localhost即可。

进入编辑器后按“i”键进入编辑状态,ESC键退出编辑状态

退出并保存,命令输入“:wq”

(5) 修改80端口为8000,修改方式为 

vim /etc/gitlab/gitlab.rb

nginx['listen_port'] = 8888

(实测,高版本可能没有这个字段,没有可以不处理)

gitlab-ctl reconfigure

vim /var/opt/gitlab/nginx/conf/gitlab-http.conf 

listen *:8000;

然后重启gitlab服务,gitlab-ctl restart

获得登录密码:

cat /etc/gitlab/initial_root_password

 输入你的ip:端口号

登录后,可以创建组和项目以及用户了。

私有库

maven安装

(1)安装并且centos jdk,加入到系统变量,此处省略,自行百度。

  (2)  java -version查看版本

(3)下载maven镜像并且上传到服务器 

https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz

如果该版本不在了,去 https://dlcdn.apache.org/maven/maven-3/ 这层找。

(4) 解压到指定目录,如 /opt/maven

(5) 添加环境变量

vim /etc/profile

MAVEN_HOME=/opt/maven
export MAVEN_HOME
export PATH=${PATH}:${MAVEN_HOME}/bin

source /etc/profile

mvn -version

nexus安装

下载并解压,可以放到 /opt/nexus

https://download.sonatype.com/nexus/3/latest-unix.tar.gz

cd /opt/nexus

vim bin/nexus

run_as_user='root'
run_as_root=false

vim etc/nexus-default.properties

# Nexus服务监听的端口;
application-port=8081
# Nexus服务监听的主机;
application-host=0.0.0.0 
# Nexus服务的上下文路径
nexus-context-path=/

cd bin

./nexus start 启动(账号:admin 密码:admin123)

posted @ 2023-10-11 11:05  虹梦未来  阅读(2)  评论(0编辑  收藏  举报  来源