zoukankan      html  css  js  c++  java
  • 独立版Jexus

    一:下载资源包

    把 jexus压缩包下载到linux临时文件夹中。
    
    cd /tmp
    wget linuxdot.net
    /down/jexus-5.8.1-x64.tar.gz

    二,解压:

    tar -zxvf jexus-5.8.1-x64.tar.gz

    解压完成后,会在/tmp中得到一个jexus文件夹。

    三,移动:

    把jexus文件夹移动或复制到一个指定的工作位置,这个位置你自己决定,建议大家统一使用/usr路径。
    
    sudo mv jexus /usr
    
    然后清理/tmp中的jexus:
    
    sudo rm -rf /tmp/jexus*
    四,建一个简单的aspx网页用于测试:
    由于jexus的默认的网站配置文件指向的物理路径是/var/www/default,所以,我们在/var下创建www文件夹,在www下创建default文件夹。创建完成后,进入 default文件夹,写一个index.html页面

    五,启动jexus并尝试访问默认网站:

    cd /usr/jexus
    
    sudo ./jws start
    
    curl localhost

    六,Jexus的“卸载”

    Jexus是“绿色软件”,除了jexus文件夹外,它不会在系统的其它地方写入任何文件,也不会注册任意信息,所以,它的卸载很简单:删除 jexus文件夹就行了。

    七,Jexus的常用命令:

    启动:sudo ./jws start
    
    重启:sudo ./jws restart
    
    停止:sudo ./jws stop
    
    启动某个网站: sudo start 网站名
    
    重启某个网站:sudo restart 网站名
    
    停止某个网站:sudo stop 网站名

    八、注意:可能会出现在虚拟机中可以访问,但是在外部访问没反应的情况。这时需要设置一下虚拟机的防火墙。

      (1)修改防火墙

    安装iptables
    # yum install iptables-services

       (2)设置防火墙规则 (增加80端口)

    # vim /etc/sysconfig/iptables
    
    # sample configuration for iptables service
    # you can edit this manually or use system-config-firewall
    # please do not ask us to add additional ports/services to this default configuration
    *filter
    :INPUT ACCEPT [0:0]
    :FORWARD ACCEPT [0:0]
    :OUTPUT ACCEPT [0:0]
    -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
    -A INPUT -p icmp -j ACCEPT
    -A INPUT -i lo -j ACCEPT
    -A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
    -A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
    -A INPUT -j REJECT --reject-with icmp-host-prohibited
    -A FORWARD -j REJECT --reject-with icmp-host-prohibited
    COMMIT
    ~       

    九、默认firewall作为防火墙的设置

     (1)#禁止firewall开机启动

    # systemctl disable firewalld.service

    (2)#设置防火墙开机启动

    # systemctl enable iptables.service 

    (3)停止firewall 

    # systemctl stop firewalld.service

    (4)#重启防火墙使配置生效

    # systemctl restart iptables.service (必须重启)

    (5)查看当前系统打开的端口

    # netstat -lntp

    文章转载:http://www.linuxdot.net/bbsfile-4330 作者:宇内流云




  • 相关阅读:
    Custom Roles Based Access Control (RBAC) in ASP.NET MVC Applications
    How To Display Variable Value In View?
    How do negative margins in CSS work and why is (margin-top:-5 != margin-bottom:5)?
    Async/Await FAQ (Stephen Toub)
    Async and Await (Stephen Cleary)
    Change Assembly Version in a compiled .NET assembly
    C# Under the Hood: async/await (Marko Papic)
    Bootstrap form-group and form-control
    Infralution.Localization.Wpf
    cocos2d-x 图形绘制
  • 原文地址:https://www.cnblogs.com/xiaoyaodijun/p/5674021.html
Copyright © 2011-2022 走看看