自制一键安装环境oneshell_v1.0.sh
echo install env... yum -y install gcc gcc-c++ make libtool zlib zlib-devel openssl openssl-devel pcre pcre-devel #下载Nginx echo downloading nginx-1.18.0 wget -c https://nginx.org/download/nginx-1.18.0.tar.gz #安装 nginx echo install nginx-1.18.0 tar -zxvf nginx-1.18.0.tar.gz cd nginx-1.18.0 ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-stream --with-http_gzip_static_module make && make install cp ./objs/nginx /usr/local/nginx/sbin/nginx echo start nginx /usr/local/nginx/sbin/nginx cd /root ln -s /usr/local/nginx nginx #安装 docker echo install docker yum install -y yum-utils device-mapper-persistent-data lvm2 yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo yum -y install docker-ce #启动 systemctl start docker #开机启动 systemctl enable docker #安装 docker-compose echo install docker-compose wget -c https://blog.peos.cn/wp-content/uploads/2022/03/docker-compose-linux-x86_64_v2.1.6.zip yum -y install unzip unzip docker-compose-linux-x86_64_v2.1.6.zip mv docker-compose-linux-x86_64_v2.1.6 docker-compose chmod +x docker-compose cp docker-compose /usr/local/bin/docker-compose docker-compose --version echo install completed.