• linux开荒


    1、新机器申请下来后,关闭系统自带防火墙:


    1 ifconfig 2 iptables -L 3 iptables -F 4 iptables -L 5 ifconfig 6 ifstat 7 ifenslave 8 ifenslave -c 9 man man 10 exit 11 init 0 12 df 13 moun /dev/cdrom /mnt/ 14 df 15 cd mn 16 cd /mnt/ 17 ls 18 cd /dev/cdrom /mnt/ 19 cd /dev/cdrom 20 ls 21 cd /media/ 22 ls 23 qu 24 cd 25 mount /dev/sr0 26 mount /dev/sr0 /media/ 27 df 28 cd /media/ 29 lks 30 ls 31 cd linux/ 32 ls 33 ./CAS_tools_install.sh 34 exit 35 ls 36 java -version 37 wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u181-b13/96a7b8442fe848ef90c96a2fad6ed6d1/jdk-8u181-linux-x64.rpm 38 wget: 未找到命令wget: 未找到命令 39 yum -y install wget 40 curl www.baidu.com 41 curl https://www.baidu.com 42 ping www.baidu.com 43 cd /usr/local/ 44 make software 45 mkdir software 46 ls 47 cd software/ 48 ls 49 rpm -ivh jdk-8u241-linux-x64.rpm 50 cd /usr/java/jdk1.8.0_241-amd64/ 51 vim /etc/profile 52 vi /etc/profile 53 source /etc/profile 54 java -v 55 java -version 56 yum install -y yum-utils device-mapper-persistent-data 1vm2 57 cd /opt 58 cd /usr/local/software/ 59 sudo tar -zxvf ZenTaoPMS.12.0.stable.zbox_64.tar.gz -C /opt 60 cd /opt 61 ls 62 /opt/zbox/zbox start 63 cd zbox/ 64 ls 65 /opt/zbox/zbox stop 66 /opt/zbox/zbox stop 67 /opt/zbox/zbox -ap 8081 -mp 3306 68 /opt/zbox/zbox start 69 curl http://10.74.68.13:8081/ 70 service iptables status 71 firewall-cmd --state 72 systemctl stop firewalld.service //关闭系统防火墙 systemctl disable firewalld.service 73 firewall-cmd --state 74 cd /usr/local/software/ 75 ls 76 sudo tar -zxvf ZenTaoPMS.7.3.stable.zbox_32.tar.gz -C /opt 77 sudo tar -zxvf ZenTaoPMS.12.0.stable.zbox_64.tar.gz -C /opt 78 /opt/zbox/zbox start 79 /opt/zbox/zbox stop 80 /opt/zbox/zbox -ap 8081 -mp 3307 81 /opt/zbox/zbox start 82 cd /opt/zbox/auth/ 83 ./adduser.sh 84 vi /etc/sysconfig/network-scripts/ifcfg-eth0 85 ping www.baidu.com 86 vi /etc/sysconfig/network-scripts/ifcfg-eth0 87 ping www.baidu.com 88 vi /etc/resolv.conf 89 service network restart 90 ping www.baidu.com 91 vi /etc/sysconfig/network-scripts/ifcfg-eth0 92 service network restart 93 ping www.baidu.com 94 history [root@lml7untbeattest auth]#

      2、配置DNS 让其能上网:

    vi /etc/sysconfig/network-scripts/ifcfg-eth0
    

      添加一行:

    DNS1=202.106.0.20

     

    保存后,重启网卡:

      service network restart
     ping www.baidu.com

    可以联网了

    原因是安装CentOS系统的时候安装的最小配置,默认没有安装wget,
    只需要yum -y install wget即可。

    ========配置java环境变量==========

    export JAVA_HOME=/usr/java/jdk1.8.0_241-amd64
    export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
    export PATH=$PATH:$JAVA_HOME/bin
    export JAVA_HOME CLASSPATH PATH
    

      

    ===========开启 springboot jar============== 

    [root@lml7uattest1 sbin]# cd /usr/local/
    [root@lml7uattest1 local]# mkdir scm
    [root@lml7uattest1 local]# cd scm
    [root@lml7uattest1 scm]# ./start.h
    -bash: ./start.h: 没有那个文件或目录
    [root@lml7uattest1 scm]# ./start.sh
    -bash: ./start.sh: 权限不够
    [root@lml7uattest1 scm]# chmod +x start.sh
    [root@lml7uattest1 scm]# ./start.sh
    

      start.sh

    #!/bin/sh
    JAR_NAME=scm-platform-0.0.1-SNAPSHOT.jar
    tpid=`ps -ef|grep $JAR_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
    if [ ${tpid} ]; then
    echo 'Stop Process...'
    fi
    sleep 5
    tpid=`ps -ef|grep $JAR_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
    if [ ${tpid} ]; then
    echo 'Kill Process!'
    kill -9 $tpid
    else
    echo 'Stop Success!'
    fi
    
    tpid=`ps -ef|grep $JAR_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
    if [ ${tpid} ]; then
            echo 'App is running.'
    else
            echo 'App is NOT running.'
    fi
    
    rm -f tpid
    nohup java -jar ./$JAR_NAME 
    echo "$JAR_NAME"
    echo $! > tpid
    echo 'Start Success!'
    

      

    www.beicaiduo.com
  • 相关阅读:
    了解线程和进程
    常见的性能优化方法
    前端构建工具gulp入门教程
    在JS数组指定位置插入元素
    简单对象List自定义属性排序
    js数组排序 reverse()和sort()方法的使用
    JQuery Plugin 开发
    console.dir() 与 console.dirxml() 的使用
    随机生成10-100之间的数
    CSS3 transition过渡
  • 原文地址:https://www.cnblogs.com/hoge66/p/12218201.html
Copyright © 2020-2023  润新知