
能力说明:
精通JVM运行机制,包括类生命、内存模型、垃圾回收及JVM常见参数;能够熟练使用Runnable接口创建线程和使用ExecutorService并发执行任务、识别潜在的死锁线程问题;能够使用Synchronized关键字和atomic包控制线程的执行顺序,使用并行Fork/Join框架;能过开发使用原始版本函数式接口的代码。
阿里云技能认证
详细说明
一、下载并解压: [root@confluence ~]# cd /usr/local/src [root@confluence ~]#wget https://github.com/prometheus/prometheus/releases/download/v2.8.1/prometheus-2.8.1.linux-amd64.tar.gz [root@confluence src]# tar xf prometheus-2.14.0-rc.0.linux-amd64.tar.gz [root@confluence src]# mv prometheus-2.8.1.linux-amd64/ /usr/local/prometheus [root@confluence src]# cd /usr/local/prometheus 二、修改配置文件并启动、[root@confluence src]# cd /usr/local/prometheus./prometheus --version[root@confluence prometheus]# vim prometheus.yml static_configs: - targets: ['0.0.0.0:9090'] - job_name: 'tomcat1' static_configs: - targets: ['172.16.20.58:30013'] labels: instance: mytest - job_name: 'centos7-machine1' scrape_interval: 10s static_configs: - targets: ['127.0.0.1:9100'] labels: instance: cf 完成修改后,可以直接启动./prometheus[root@localhost ~]# vim /usr/lib/systemd/system/prometheus.service [Unit] Description=Prometheus Documentation=https://prometheus.io/ After=network.target [Service] # Type设置为notify时,服务会不断重启 Type=simple User=prometheus # --storage.tsdb.path是可选项,默认数据目录在运行目录的./dada目录中 ExecStart=/usr/local/prometheus/prometheus --config.file=/usr/local/prometheus/prometheus.yml --storage.tsdb.path=/home/software/prometheus-data Restart=on-failure [Install] WantedBy=multi-user.target # 添加用户, [root@localhost prometheus]# groupadd prometheus [root@localhost prometheus]# useradd -g prometheus -s /sbin/nologin prometheus # 赋权和创建prometheus运行数据目录 [root@localhost prometheus]# cd ~ [root@localhost ~]# chown -R prometheus:prometheus /usr/local/prometheus/ [root@localhost ~]# mkdir -p /home/software/prometheus-data [root@localhost ~]# chown -R prometheus:prometheus /home/software/prometheus-data [root@prometheus ~]# systemctl enable prometheus [root@prometheus ~]# systemctl restart prometheus 访问: http://47.111.32.8:9090/graph http://47.111.32.8:9090/metrics http://47.111.32.8:9090/config
假如有 开发 测试 预发 生产1 生产2服务器 .gitlab-ci.yml stages: - deploy - test - release - master 构建开发环境: stage: deploy script: - /data-ci/eatjoys-front.sh only: - develop tags: - my-erp 构建测试环境: stage: test script: - /data-ci/eatjoys-front.sh only: - test tags: - my-erp 构建预发环境: stage: release script: - /data-ci/eatjoys-front.sh only: - release tags: - my-erp 构建生产环境: stage: master script: - /data-ci/eatjoys-front.sh only: - master tags: - my-erp [root@sannian data-ci]# vim eatjoys-front.sh #!/bin/sh #env if [ $CI_BUILD_REF_SLUG = 'develop' ]; then projectdir="/work/front/${CI_PROJECT_NAME}" echo echo echo "-----------------------------------------------------------------------" echo "发布 主机: $i 项目: $CI_PROJECT_NAME " cd $CI_PROJECT_DIR # yarn # npm run echo scp -r $CI_PROJECT_DIR/* root@47.99.89.247:${projectdir}/ scp -r $CI_PROJECT_DIR/* root@47.99.89.247:${projectdir}/ if [ $? = 0 ]; then echo "mvn 构建成功...." else echo "mvn 构建失败...." exit 100 fi echo echo fi if [ $CI_BUILD_REF_SLUG = 'test' ]; then projectdir="/work/front/${CI_PROJECT_NAME}" echo echo echo "-----------------------------------------------------------------------" echo "发布 主机: $i 项目: $CI_PROJECT_NAME " cd $CI_PROJECT_DIR # yarn # npm run echo scp -r $CI_PROJECT_DIR/* root@47.99.89.247:${projectdir}/ scp -r $CI_PROJECT_DIR/* root@47.99.89.247:/work/front/my-erp-test/ if [ $? = 0 ]; then echo "mvn 构建成功...." else echo "mvn 构建失败...." exit 100 fi echo echo fi if [ $CI_BUILD_REF_SLUG = 'release' ]; then projectdir="/work/front/${CI_PROJECT_NAME}" echo echo echo "-----------------------------------------------------------------------" echo "发布 主机: $i 项目: $CI_PROJECT_NAME " cd $CI_PROJECT_DIR # yarn # npm run echo scp -r $CI_PROJECT_DIR/* root@47.99.89.247:/work/front/my-erp-release/ scp -r $CI_PROJECT_DIR/* root@47.99.89.247:/work/front/my-erp-release/ if [ $? = 0 ]; then echo "mvn 构建成功...." else echo "mvn 构建失败...." exit 100 fi echo echo fi if [ $CI_BUILD_REF_SLUG = 'master' ]; then projectdir="/work/front/${CI_PROJECT_NAME}" echo echo echo "-----------------------------------------------------------------------" echo "发布 主机: $i 项目: $CI_PROJECT_NAME " cd $CI_PROJECT_DIR # yarn # npm run echo scp -r $CI_PROJECT_DIR/* root@47.99.89.247:${projectdir}/ scp -r $CI_PROJECT_DIR/* root@47.99.89.247:/work/front/my-erp-master/ if [ $? = 0 ]; then echo "mvn 构建成功...." else echo "mvn 构建失败...." exit 100 fi echo echo fi
#grep -rnI "联系人" /home/logs/boss/* |grep "是否是店长"|awk '{print $1, $9 ,$10,$11,$12}'|awk -F: '{print $3}'| grep "人" |uniq >contact.txt # grep -rnI . | grep "李" -r,递归查找 -n,搜索结果显示行号 -i,忽略大小写 -v,反向匹配 -w,匹配整个单词 -E,匹配扩展的正则表达式
一、本服务器1核2G,不够用 我先加 swap空间 [root@sannian /]# cd /mnt/swap/ [root@sannian swap]# dd if=/dev/zero of=swapfile bs=1M count=9999 [root@sannian swap]# mkswap swapfile [root@sannian swap]# swapon swapfile 添加开机自动挂 [root@sannian swap]# vim /etc/fstab /mnt/swap/swapfile swap swap defaults 0 0 [root@sannian swap]# top -c 查看 设置让系统积极使用swap空间 [root@sannian swap]# echo 100 > /proc/sys/vm/swappiness [root@sannian swap]# vim /etc/sysctl.conf 加入 vm.swappiness=100 sysctl -p 或者重启生效 [root@sannian swap]# sysctl -p net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 vm.swappiness = 0 net.ipv4.neigh.default.gc_stale_time = 120 net.ipv4.conf.all.rp_filter = 0 net.ipv4.conf.default.rp_filter = 0 net.ipv4.conf.default.arp_announce = 2 net.ipv4.conf.lo.arp_announce = 2 net.ipv4.conf.all.arp_announce = 2 net.ipv4.tcp_max_tw_buckets = 5000 net.ipv4.tcp_syncookies = 1 net.ipv4.tcp_max_syn_backlog = 1024 net.ipv4.tcp_synack_retries = 2 kernel.sysrq = 1 vm.swappiness = 100 二、下载安装gitlab配置yum [root@sannian swap]# vim /etc/yum.repos.d/gitlab-ce.repo [gitlab-ce] name=Gitlab CE Repository baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/ gpgcheck=0 enabled=1 更新 [root@sannian swap]# yum makecache 安装GitLab社区版 [root@sannian swap]# yum install gitlab-ce #自动安装最新版 [root@sannian swap]# yum install gitlab-ce-x.x.x #安装指定版本 GitLab命令gitlab-ctl start # 启动所有 gitlab 组件;gitlab-ctl stop # 停止所有 gitlab 组件;gitlab-ctl restart # 重启所有 gitlab 组件;gitlab-ctl status # 查看服务状态;gitlab-ctl reconfigure # 启动服务;vim /etc/gitlab/gitlab.rb # 修改默认的配置文件;/opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml# 修改默认的配置文件;gitlab-rake gitlab:check SANITIZE=true --trace # 检查gitlab;gitlab-ctl tail # 查看日志;运行并启动: [root@sannian swap]# gitlab-ctl start [root@sannian swap]# gitlab-ctl reconfigure//初始化设置 打开 url 47.99.145.156 更改端口为9999 [root@sannian embedded]# cd /var/opt/gitlab/nginx/conf/ [root@sannian conf]# vim gitlab-http.conf [root@sannian conf]# gitlab-ctl restart 打开url47.99.145.156:9999修改地址 git@gitlab.example.com:front/front-erp.git [root@sannian conf]# vim /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml [root@sannian conf]# gitlab-ctl restart [root@sannian opt]# yum -y install git [root@sannian opt]# git config --global user.name "root" [root@sannian opt]# git config --global user.email "admin@example.com" [root@sannian opt]# ssh-keygen -t rsa -C admin@example.com 复制密钥到gitlab上 [root@sannian front-erp]# vim /root/.ssh/id_rsa.pub [root@sannian opt]# cd front-erp/ [root@sannian front-erp]# git init Initialized empty Git repository in /opt/front-erp/.git/ [root@sannian front-erp]# git remote add origin git@47.99.145.156:front/front-erp.git [root@sannian front-erp]# git add . [root@sannian front-erp]# git commit -m "commit" [root@sannian front-erp]# git push -u origin master 三、安装gitlab-runner安装docker [root@sannian front-erp]# curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun 配置镜像加速器 针对Docker客户端版本大于 1.10.0 的用户 您可以通过修改daemon配置文件/etc/docker/daemon.json来使用加速器mkdir -p /etc/dockertee /etc/docker/daemon.json <<-'EOF'{"registry-mirrors": ["https://v2ltjwbg.mirror.aliyuncs.com"]}EOF [root@sannian front-erp]# systemctl daemon-reload [root@sannian front-erp]# systemctl restart docker [root@sannian front-erp]# docker search gitlab-runner 下载gitlab-runner [root@sannian front-erp]# docker pull gitlab/gitlab-runner 运行gitlab-runner [root@sannian front-erp]# docker images [root@sannian front-erp]# docker run -d -v /data-ci:/data-ci -v /home:/home --name gitlab-runner gitlab/gitlab-runner 246408751beaf0baaf0d0231bbdea8d5ec5f3c78f32e723a9f6d2312e8802a74 [root@sannian front-erp]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 246408751bea gitlab/gitlab-runner "/usr/bin/dumb-init …" 33 seconds ago Up 31 seconds gitlab-runner 注册 runner [root@sannian front-erp]# docker exec -it 246408751bea gitlab-runner --help//帮助 [root@sannian front-erp]# docker exec -it 246408751bea gitlab-runner register Runtime platform arch=amd64 os=linux pid=20 revision=cf91d5e1 version=11.4.2 Running in system-mode. Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/): http://47.99.145.156:9999/ Please enter the gitlab-ci token for this runner: XFomoe1rfzCPx7e6Ng_y Please enter the gitlab-ci description for this runner: [246408751bea]: front-erp-ci Please enter the gitlab-ci tags for this runner (comma separated): front-erp-ci Registering runner... succeeded runner=XFomoe1r Please enter the executor: shell, docker+machine, docker-ssh+machine, kubernetes, docker-ssh, parallels, ssh, virtualbox, docker: shell Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded! 然后查看: 四、配置 .gitlab-ci.yml stages: - test - deploy 构建开发环境: stage: test script: - /data-ci/front-erp.sh only: - develop vim front-erp.sh #!/bin/sh #env if [[ $CI_BUILD_REF_SLUG == 'develop' ]]; then hostlist="" if [[ $CI_JOB_STAGE == 'test' ]]; then hostlist="47.99.89.247" fi if [[ $CI_JOB_STAGE == 'master' ]]; then hostlist="47.99.89.247" fi projectdir="/work/front/${CI_PROJECT_NAME}" for i in $hostlist do echo echo echo "-----------------------------------------------------------------------" echo "发布 主机: $i 项目: $CI_PROJECT_NAME " cd $CI_PROJECT_DIR yarn if [ $? = 0 ];then npm run build echo scp -r $CI_PROJECT_DIR/dist/\* root@${i}:${projectdir}/ rsync -avztH --delete $CI_PROJECT_DIR/dist/ root@${i}:${projectdir}/ else echo "mvn 构建失败...." exit 100 fi echo echo done fi
运行镜像: [root@sannian min]# docker run -d --restart=always --name gitlab -p 9999:80 -p 4422:22 --hostname 47.99.145.156 twang2218/gitlab-ce-zh [root@sannian .ssh]# ssh-keygen -t rsa -C "admin@example.com" [root@sannian .ssh]# vim /root/.gitconfig [root@sannian .ssh]# vim id_rsa.pub 创建并添加密钥 [root@sannian .ssh]# git clone git@47.99.145.156:4422:root/eatjoys-front-min.git Cloning into 'eatjoys-front-min'... git@47.99.145.156's password: Permission denied, please try again. git@47.99.145.156's password: 结果还是要密码 还密码不对,,,整了三天,问了半天说是22端口问题 ################################################## 然后重新来来,把以前的镜像删除: [root@sannian .ssh]# docker rm -f e9c5ee1d394a 改变运行镜像命令
2021年01月
ECS要想更改私网IP,要先关机,然后点更多,更改私网IP按钮。。。就可以了,
使用nginx 虚拟主机配置,2个域名解析同时指向服务器80端口,然后nginx通过域名判定去找个服务。
先telnet ip 端口 是否开放,如没有开放,查看是不是安全组没有开放端口.
一边登陆Linux服务器,tail -f 访问日志,一边在浏览器访问网页,这样就可以看到你仿问的路径了,然后cd 进去 打开index主页 进行修改 就行了,,,或者说直接查看80端口是哪个服务在用,找到配置文件,看一下root路径,然后cd进去 进行修改。
ECS要想更改私网IP,要先关机,然后点更多,更改私网IP按钮。。。就可以了,
使用nginx 虚拟主机配置,2个域名解析同时指向服务器80端口,然后nginx通过域名判定去找个服务。
先telnet ip 端口 是否开放,如没有开放,查看是不是安全组没有开放端口.
一边登陆Linux服务器,tail -f 访问日志,一边在浏览器访问网页,这样就可以看到你仿问的路径了,然后cd 进去 打开index主页 进行修改 就行了,,,或者说直接查看80端口是哪个服务在用,找到配置文件,看一下root路径,然后cd进去 进行修改。
手机上好像不能退哦,用电脑登陆
不明白哦
As soon as they should punch, sure.
你好,学生ECS的活动还是存在的,目前完成学生认证以后可以享受学生优惠,新用户的话,还可以免费领取机器的,这样活动叠加起来比较划算的。具体可以查看阿里云的官网的活动中心。
可以通过管理控制台重置密码,设定新密码后需要重启实例生效。
可以用 百度脑图、prosse on 等参考
个人觉得还是先建网站比较好
毕竟论坛需要有一定的基础
而且大陆个人不让建论坛
这是编程新高度问题。
使用控制台提供的FTP账号密码使用FTP工具把文件传到网站根目录。
暂时不需要。
实名认证可能部分后缀不支持。
希望我提供的答案能够帮助到你,答案满意还请采纳一下,谢谢。
另外,你可以继续留言或者到论坛参与更多的互动。
貌似是价格涨价吧
你可以一次续费多年
做人如果没有梦想那跟咸鱼有什么分别?
文件找不到
MySQL压缩包解压后,你是否要找scripts/mysql_install_db.sh 文件来执行安装?
你可以到解压目录里的 bin 目录里去找,执行如下命令安装:
mysql_install_db --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/
域名购买之后、是没有办法退款的