系统安装
Nginx
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
| # 安装nginx所需的依赖(如果有依赖,则直接跳过此目录)【安装gcc、pcre、zlib】 yum install -y gcc yum install -y pcre pcre-devel yum install -y zlib zlib-devel
# 进入opt目录 cd /opt
# 下载地址 wget https://nginx.org/download/nginx-1.22.1.tar.gz
# 解压 tar -xvf nginx-1.22.1.tar.gz
# 修改文件夹名字 mv nginx-1.22.1 nginx
# 进入nginx解压目录 cd /opt/nginx
# 编译nginx判断是否有错误 ./configure --prefix=/usr/local/nginx
# 安装 make make install
# 创建服务脚本 vim /usr/lib/systemd/system/nginx.service
# 设置开机启动(将下面文本写入上面创建的文件夹中) [Unit] Description=nginx After=network.target
[Service] Type=forking ExecStart=/usr/local/nginx/sbin/nginx ExecReload=/usr/local/nginx/sbin/nginx -s reload ExecStop=/usr/local/nginx/sbin/nginx -s quit PrivateTmp=true
[Install] WantedBy=multi-user.target
# 重新加载系统服务 systemctl daemon-reload
# 设置开机启动 systemctl enable nginx.servic
# 启动nginx systemctl start nginx
|
Docker
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
| # 1、卸载旧版本 yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-engine
# 2、需要的安装包 yum install -y yum-utils
# 3、设置stable镜像仓库(设置镜像仓库,走装阿里云镜像) yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
# 4、更新yum软件包索引 yum makecache fast
# 5、安装DOCKER CE yum -y install docker-ce docker-ce-cli containerd.io
# 6、启动docker systemctl start docker
# 设置开机启动 systemctl enable docker
# 设置docker走阿里云镜像 systemctl stop docker
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF' { "registry-mirrors": ["https://x3mwd92e.mirror.aliyuncs.com"] } EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
|
docker-compose
1 2 3 4 5 6 7 8 9 10 11 12 13
| # 下载地址 https://github.com/docker/compose/releases
# 找到对于的版本下载即可
# 将文件上传到 /usr/local/bin/
# 添加可执行权限 chmod +x /usr/local/bin/docker-compose
# 查看docker-compose版本 docker-compose --version
|
JDK安装
1 2 3 4
| # 两条命令分别执行 yum install -y java-1.8.0-openjdk
yum install -y java-devel
|
Maven安装
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| # 下载地址 https://maven.apache.org/download.cgi
# 下载maven连接实例(如直接使用下面连接版本直接下载即可) https://dlcdn.apache.org/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.tar.gz
# maven 配置文件修改示例 https://naste.top/articles/60
# maven环境变量设置(一条一条执行) vim /etc/profile
export MAVEN_HOME=/usr/local/maven
export PATH=$PATH:$MAVEN_HOME/bin
source /etc/profile
mvn -version
|
Git安装
Jenkins安装
https://naste.top/articles/60
war包安装,docker安装Jenkins不推荐
Node