1、 开发机开启 Shadowsocks,允许其他设备连入
2、 临时开代理命令 (根据实际修改IP和端口)
export http_proxy="http://10.5.21.127:1080"
export https_proxy="http://10.5.21.127:1080"
export ftp_proxy="http://10.5.21.127:1080"
3、 测试:curl google.com
$ sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-selinux \
docker-engine-selinux \
docker-engine
yum install -y yum-utils \
device-mapper-persistent-data \
lvm2
yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce
vim /etc/docker/daemon.json
{"registry-mirrors":["https://aaxe3v8h.mirror.aliyuncs.com"]}
systemctl start docker
systemctl enable docker
sudo rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm
sudo yum update
sudo yum install dotnet-sdk-2.1
复制到 /etc/pki/ca-trust/source/anchors/
vim /etc/hosts
docker login 测试 success 说明成功
http://pkg.jenkins-ci.org 下载最近对应安装包
rpm -ivh jenkins-2.7.3-1.1.noarch.rpm
#修改默认用户
vim /etc/sysconfig/jenkins
JENKINS_USER="root"
#启动、停止、重启 (配置修改后需要重启)
service jenkins start/stop/restart
#开机启动
systemctl enable docker
systemctl status firewalld
firewall-cmd --state
# 开启
service firewalld start
# 重启
service firewalld restart
# 关闭(重启后失效)
service firewalld stop
#永久关闭(重启后仍后仍后仍有效)
systemctl disable firewalld
firewall-cmd --list-all
# 查询端口是否开放
firewall-cmd --query-port=8080/tcp
# 开放80端口
firewall-cmd --permanent --add-port=80/tcp
# 移除端口
firewall-cmd --permanent --remove-port=8080/tcp
#重启防火墙(修改配置后要重启防火墙)
firewall-cmd --reload
# 参数解释
1、firwall-cmd:是Linux提供的操作firewall的一个工具;
2、--permanent:表示设置为持久;
3、--add-port:标识添加的端口;
Jenkins 要用git 才能拉取代码
yum install -y git
###创建数据文件夹并授权
mkdir /home/nexus/data
chown -R 200 /home/nexus/data
###考入配置文件并授权
mkdir /home/nexus/etc
chown -R 200 /home/nexus/etc
提前把修改好的配置文件考入/etc//etc//etc/jetty文件夹(从其他机器中拷贝即可)(从其他机器中拷贝即可)(从其他机器中拷贝即可)
docker run -d -p 8081:8081 -p 8088:8088 -p 8085:8085 --name nexus --restart=unless-stopped -v /home/nexus/data:/nexus-data -v /home/nexus/etc:/opt/sonatype/nexus/etc sonatype/nexus3
从其他服务器拷贝数据文件(如是新数据库 则只拷贝配置文件my.cnf)(如是新数据库 则只拷贝配置文件my.cnf)(如是新数据库 则只拷贝配置文件my.cnf)
(从有文件的机器运行命令,后面填写的是目标机器)
执行后填写密码即可
docker run --name mysql --restart=unless-stopped -d -p 3306:3306 -v /home/mysql/data:/var/lib/mysql -v /home/mysql/conf/my.cnf:/etc/mysql/my.cnf -e MYSQL_ROOT_PASSWORD=123456 mysql
CREATE USER `markormes`@`%` IDENTIFIED BY 'xxxxx'; 建用户
GRANT ALL ON *.* TO `markormes`@`%` WITH GRANT OPTION; 授权
docker run -d --name rabbitmq --restart=unless-stopped --publish 5671:5671 \
--publish 5672:5672 --publish 4369:4369 --publish 25672:25672 --publish 15671:15671 --publish 15672:15672 \
rabbitmq:management
docker run -d --restart=unless-stopped \
-p 880:80 -p 8443:443 \
-v /home/rancher:/var/lib/rancher \
rancher/rancher:latest
docker run -d --restart=unless-stopped \
-p 880:80 -p 8443:443 \
-v /home/rancher:/var/lib/rancher \
rancher/rancher:latest