1、 wsdl生成代碼: wsdl2Java -encoding utf-8 -d /Users/ -classdir /Users/ -p http://www.travelport.com/service/air_v45_0=com.travelport.service.air_v45_0 -impl -validate -exsh true -dns true -dex true -autoNameResolution -xjc-Xts,-Xts:style:multiline,-Xlocator,-mark-generated -wsdlLocation http://localhost:8080/kestrel/ExternalCacheAccessService?wsdl -verbose -fe jaxws -db jaxb -wv 1.1 file:D:utech-travel-portdocswsdl-V18.2Air_v45_0Air.wsdl
2、 Linux清除缓存:
echo 1 > /proc/sys/vm/drop_caches
echo 2 > /proc/sys/vm/drop_caches
echo 3 > /proc/sys/vm/drop_caches
3、 mvn打包到私服: mvn clean package install -Dmaven.test.skip=true deploy
4、 java -jar scm-data-1.0.0-SNAPSHOT.jar com.utech.agg.scmdata.ScmDataApplication --spring.profiles.active=dev
5、 docker清楚Nexus私服上包的命令:
a) docker exec -it eager_northcutt /bin/bash
b) cd /var/jenkins_home/.m2/repository/com
c) rm -rf utech
6、 需求:根據MAARRWSPHKG這個字段匹配數據庫裏“*HK#”值
SELECT t.fare_basis FROM hk_trp_commission t WHERE
'MAARRWSPHKG' REGEXP CONCAT_WS(REPLACE(REPLACE(t.fare_basis,'#','.'),'*','.*'),'^','$');
8、Linux關閉防火墻:
关闭firewall:
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
firewall-cmd --state #查看默认防火墙状态(关闭后显示notrunning,开启后显示running)
9、ps -aux|grep sendmail(查看进程)
10、nohup java -jar cloud-eureka-1.0.0-SNAPSHOT.jar & (後臺運行項目輸出日志到nohup.out文件内)
tail -f nohup.out(可以實時刷新查看此目錄)
netstat -anp|grep 21001(查看端口在被哪个进程使用)
ps -aux|grep 21001
11、nohup java -jar inf-eureka-1.0.0.jar --spring.profiles.active=dev1 &
nohup java -jar inf-eureka-1.0.0.jar --spring.profiles.active=dev2 &
12、Mysql安装:
软连接:ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
修改密码:
use mysql;
UPDATE user SET password=PASSWORD('123456') WHERE user='root';
flush privileges;
exit;
13、正則:departureDate": "S+"
14、docker镜像安装可参考:https://www.cnblogs.com/yufeng218/p/8370670.html
docker镜像搭建之后安装nexus3/禅道
Nexus3:docker run -tid -p 8081:8081 --name nexus -e NEXUS_CONTEXT=nexus -v /usr/local/nexus3/nexus-data:/nexus-data sonatype/nexus3
禅道:mkdir -p /data/zbox && docker run -d -p 80:80 -p 3306:3306 -e USER="root" -e PASSWD="password" -e BIND_ADDRESS="false" -e SMTP_HOST="163.177.90.125 smtp.exmail.qq.com" -v /data/zbox/:/opt/zbox/ --name zentao-server idoop/zentao:latest
docker ps -a可以查看当前镜像下的服务。
15、docker安装jenkins
docker pull jenkins
mkdir /home/jenkins
ls -nd jenkins/
chown -R 1000:1000 jenkins/
docker run -itd -p 9090:8080 -p 50000:50000 --name jenkins --privileged=true -v /home/jenkins:/var/jenkins_home jenkins:latest
之后浏览器输入 http://你的ip地址:9090
需要获取密码:cat /home/jenkins/secrets/initialAdminPassword
16、docker安装gitlab
docker search gitlab
sudo docker pull gitlab/gitlab-ce:latest
docker images
docker network create gitlab_net
# 启动镜像
docker run --name='gitlab' -d
--net=gitlab_net
--publish 1443:443 --publish 18080:80
--restart always
--volume /root/docker/gitlab/config:/etc/gitlab
--volume /root/docker/gitlab/logs:/var/log/gitlab
--volume /root/docker/gitlab/data:/var/opt/gitlab
gitlab/gitlab-ce:latest
登录Gitlab,IP为宿主机IP地址
http://192.168.121.129:18080
如果访问上面的地址页面显示502,一般是端口冲突了,需要修改/root/docker/gitlab/config/gitlab.rb文件,重启docker容器即可。
unicorn['port'] = 8084
监控端口开启远程调试:
nohup java -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n -jar jar.jar --spring.profiles.active=prod &