自动安装
- 满足自动安装的必要条件(centos7系列系统,cpu2核以上,内存4GB以上,使用root用户执行。
安装
[root@gitlab ~]# cd /opt [root@gitlab opt]# yum -y install git [root@gitlab opt]# git clone --depth=1 https://github.com/cncentoscn/setuptools.git [root@gitlab opt]# cd setuptools/scripts/ [root@gitlab scripts]# ll 总用量 24 drwxr-xr-x. 2 root root 25 7月 7 10:29 docker -rw-r--r--. 1 root root 913 7月 7 10:29 install_docker.sh -rw-r--r--. 1 root root 4752 7月 7 10:29 install_env.sh -rw-r--r--. 1 root root 1362 7月 7 10:29 install_mariadb.sh -rw-r--r--. 1 root root 722 7月 7 10:29 install_py3.sh -rw-r--r--. 1 root root 1466 7月 7 10:29 install_redis.sh drwxr-xr-x. 2 root root 46 7月 7 10:29 pypi
- 检测系统软硬件和安装依赖,自动关闭selinux和开启80/22/3306/443对外访问以及时间更新
[root@gitlab scripts]# ./install_env.sh CentOS7 Check ........................ [ OK ] CPU2 Check ........................ [ OK ] Memory4 Check ........................ [ OK ]
- 安装最新docker和加速器
[root@gitlab scripts]# ./install_docker.sh 完毕! Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
- 安装mariadb
[root@gitlab scripts]# ./install_mariadb.sh 完毕! Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
- 安装redis
[root@gitlab scripts]# ./install_redis.sh 已安装: redis.x86_64 0:3.2.12-2.el7 作为依赖被安装: jemalloc.x86_64 0:3.6.0-1.el7 完毕!
- 安装python3
[root@gitlab scripts]# ./install_py3.sh 已安装: python3.x86_64 0:3.6.8-13.el7 python3-devel.x86_64 0:3.6.8-13.el7 作为依赖被安装: dwz.x86_64 0:0.11-3.el7 libtirpc.x86_64 0:0.2.4-0.16.el7 perl-srpm-macros.noarch 0:1-8.el7 python-rpm-macros.noarch 0:3-32.el7 python-srpm-macros.noarch 0:3-32.el7 python3-libs.x86_64 0:3.6.8-13.el7 python3-pip.noarch 0:9.0.3-7.el7_7 python3-rpm-generators.noarch 0:6-2.el7 python3-rpm-macros.noarch 0:3-32.el7 python3-setuptools.noarch 0:39.2.0-10.el7 redhat-rpm-config.noarch 0:9.1.0-88.el7.centos 完毕!
查看账号和密码
- 使用获取到的账号信息登陆即可。
[root@gitlab setuptools]# pwd /opt/setuptools [root@gitlab setuptools]# cat config.conf # 以下设置默认情况下不需要修改, 系统会自动生成随机字符串填入 # 数据库 配置, 如果 数据库 安装在其他的服务器, 请修改下面设置 DB_HOST=127.0.0.1 DB_PORT=3306 DB_USER=centoscn DB_PASSWORD=RwTtBidBgnwWOndz9x9d6tZK DB_NAME=centoscn # Redis 配置, 如果 Redis 安装在其他的服务器, 请修改下面设置 REDIS_HOST=127.0.0.1 REDIS_PORT=6379 REDIS_PASSWORD=kamVWTufWuAWYRg0WWvVU3A3 # 服务安装目录 install_dir=/opt Server_IP=`ip addr | grep 'state UP' -A2 | grep inet | egrep -v '(127.0.0.1|inet6|docker)' | awk '{print $2}' | tr -d "addr:" | head -n 1 | cut -d / -f1` Docker_IP=`ip addr | grep docker.* | grep inet | awk '{print $2}' | head -n 1`
继续阅读
- 我的QQ
- QQ扫一扫
-
- 我的头条
- 头条扫一扫
-
评论