CentOS7之Jetty安装配置

请尊重他人的劳动成果,转载请务必注明出处.谢谢!

  • 下载安装包

     wget -c http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-distribution/9.2.19.v20160908/jetty-distribution-9.2.19.v20160908.tar.gz
    
  • 解压

    tar jetty-distribution-9.2.19.v20160908.tar.gz 
    
  • 配置

    cd /usr/local/bin/jetty-distribution-9.2.19.v20160908
    vim start.ini 修改端口等
    
  • 服务

    cd /etc/init.d
    vim jetty
    #!bin/bash
    # chkconfig: 35 99 99
    # description: Jetty 9 webserver
    # processname: jetty
    JETTY_HOME=/usr/local/bin/jetty-distribution-9.2.19.v20160908/bin
    
    case $1 in
      start) $JETTY_HOME/jetty.sh start;;
      stop) $JETTY_HOME/jetty.sh stop;;
      status) $JETTY_HOME/jetty.sh status;;
      restart) $JETTY_HOME/jetty.sh restart;;
      *)  echo "require start|stop|status|restart"  ;;
    esac
    service jetty start
    service jetty stop
    
  • 开机启动

    chkconfig --add jetty
    chkconfig jetty on
    

你可能感兴趣的:(linux)