1、拷贝执行脚本或手动创建执行脚本
cd /bin/whole51/
scp deploy_markavip-app2.sh root@172.31.0.105:/bin/whole51/
scp -r markavip-app2/ root@172.31.0.105:/bin/whole51/
2、拷贝workspace,git克隆代码
scp -r /var/www/workspace/markavip-app2/ root@172.31.0.105:/var/www/workspace/
git clone http://git.jollycorp.com:8088/yanfa/app2.git
3、拷贝tomcat配置
cp -r /data/apache-tomcat-7.0.54/ /usr/local/weekly-app2
4、设置时区
timedatectl
timedatectl set-timezone Asia/Shanghai
date
timedatectl set-timezone UTC
5、设置swap
dd if=/dev/zero of=/root/swapfile bs=1M count=1024
设置1G swap;
du -sh /root/swapfile
查询swap大小;
mkswap /root/swapfile
swapon /root/swapfile
增加swap;
vi /etc/fstab
/root/swapfile swap swap defaults 0 0
6、手动部署
cd /bin/whole51
sh deploy_pay-center.sh
7、修改dns
8、自动化部署平台创建server和project
9、特殊环境声明
export JAVA_HOME=/usr/local/jdk1.8.0_71
export MAVEN_HOME=/usr/local/apache-maven-3.3.3
export PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$PATH