虚拟域名与多端口监听及其配置,服务保障变革

2019-09-11 16:05栏目:公司领导
TAG:

CentOS6.8下安装xz命令,centos6.8xz命令

CentOS6.8下安装xz命令
我们有时候会下载到.xz结尾的压缩文件,这时候需要用到xz命令来解压这类文件,而当我们想要用yum -y install xz时,又没有关于xz的安装包,因此就找到一个xz的编译安装包进行编译安装。
例如我在安装ffmpeg时,出现需要安装指定版本之上的包入下:

需要nasm至少是2.13版本,于是乎我就用的yum方式安装但是没有这个版本,只有2.0.7版本,然后我需要下载
指定版本的如图:

但是xz命令不能用所以只能安装相应的工具如下:

xz下载地址:

[root@localhost opt]# tar -zxvf xz-5.2.3.tar.gz
[root@localhost opt]# cd xz-5.2.3
[root@localhost xz-5.2.3]# ./configure --prefix=/opt/gnu/xz      #指定安装目录
[root@localhost xz-5.2.3]# make && make install    #编译并安装
[root@localhost xz-5.2.3]# ln -s /opt/gnu/xz/bin/xz /usr/local/bin/xz     #建立软链接

这是就可以用xz命令解压.xz结尾的安装包了
到此安装完成。

centos解压.tar.xz 文件的方法
需要进行两步操作:

此时该目录下会产生一个node.tar 文件

2.执行解压操作

tar -xvf node.tar

nginx——虚拟域名与多端口监听及其配置,nginx虚拟域名监听

nginx的配置

#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;

    server {
        listen       82;
        server_name  localhost;
        root D:/cardLoan/tuandai-loans/loans-web-admin/src/main/resources/web;
        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root D:/cardLoan/tuandai-loans/loans-web-admin/src/main/resources/web;
            index  index.html index.htm;
        }

        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        #error_page   500 502 503 504  /50x.html;
        #location = /50x.html {
        #    alias   E:/aaa2
        #}

        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ .php$ {
        #    proxy_pass   http://127.0.0.1;
        #}

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        #location ~ .php$ {
        #    root           html;
        #    fastcgi_pass   127.0.0.1:9000;
        #    fastcgi_index  index.php;
        #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
        #    include        fastcgi_params;
        #}

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /.ht {
        #    deny  all;
        #}
    }


    # another virtual host using mix of IP-, name-, and port-based configuration
    #
    #server {
    #    listen       8000;
    #    listen       somename:8080;
    #    server_name  somename  alias  another.alias;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}


    # HTTPS server
    #
    #server {
    #    listen       443 ssl;
    #    server_name  localhost;

    #    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;

    #    ssl_session_cache    shared:SSL:1m;
    #    ssl_session_timeout  5m;

    #    ssl_ciphers  HIGH:!aNULL:!MD5;
    #    ssl_prefer_server_ciphers  on;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}


    server {
        listen       80;
        server_name  dq.aaa.cn;
        #charset koi8-r;
        #access_log  logs/host.access.log  main;
        location / {
                proxy_pass    http://10.100.66.255:9007;
                proxy_redirect default ;              

        } 
      }

    #server {
        #listen       80;
        #server_name  www.aaa.cn;
        #charset koi8-r;
        #access_log  logs/host.access.log  main;
        #location / {
                #proxy_pass    http://127.0.0.1:8081;
                #proxy_redirect default ;              

        #}
      #}

   server {
        listen       80;
        server_name  psjs.aaa.cn;
        #charset koi8-r;
        #access_log  logs/host.access.log  main;
        location /dq {
                alias   E:/psjs.aaa.cn-static/dq;
        #root   E:/td-sail-js;
                index  index.html index.htm;         

        } 
        location /scripts {
                alias   E:/psjs.aaa.cn-static/dq/scripts;
        }

        location /images {
                alias   E:/psjs.aaa.cn-static/dq/images;
        #root   E:/td-sail-js;
                index  index.html index.htm;         

        } 
      }

     server {
        listen       80;
        server_name  js2.aaa.cn;
        #root E:/aaa2/js.aaa.cn;
        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   E:/psjs.aaa.cn-static;
            index  index.html index.htm;
        }
    location /images {
            alias   E:/psjs.aaa.cn-static/images;
            index  index.html index.htm;
        }

        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        #error_page   500 502 503 504  /50x.html;
        #location = /50x.html {
        #    alias   E:/aaa2
        #}

        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ .php$ {
        #    proxy_pass   http://127.0.0.1;
        #}

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        #location ~ .php$ {
        #    root           html;
        #    fastcgi_pass   127.0.0.1:9000;
        #    fastcgi_index  index.php;
        #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
        #    include        fastcgi_params;
        #}

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /.ht {
        #    deny  all;
        #}
    }
}

MP的配置方式
nginx.conf

# 常用命令
# 启动: nginx
# 重启: nginx -s reload
# 关闭: nginx -s stop

# 1 域名+端口 唯一确定一个资源。 nginx 可以同时监听 多个虚拟域名 和 多个端口。可以做方向代理

# 用的帐号和组,windows的直接注释掉就好了
#user  benny staff;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    gzip on;
    gzip_min_length 1k;
    gzip_buffers 16 64k;
    gzip_http_version 1.1;
    gzip_comp_level 6;
    gzip_types text/plain application/x-javascript text/css application/xml application/javascript;
    gzip_vary on;

    # 当你访问localhost时的站点配置,地址默认是d:/wwwroot
    server {
        listen       90;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;


        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;

        location = /50x.html {
            root   html;
        }

        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ .php$ {
        #    proxy_pass   http://127.0.0.1;
        #}

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        #location ~ .php$ {
        #    root           html;
        #    fastcgi_pass   127.0.0.1:9000;
        #    fastcgi_index  index.php;
        #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
        #    include        fastcgi_params;
        #}

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /.ht {
        #    deny  all;
        #}
    }

    # include vhosts/*.conf; # 将vhosts所有东西包含进来
    include vhosts/cardloan.dev.com.conf;

    autoindex on; #开启nginx目录浏览功能
    autoindex_exact_size off; #文件大小从KB开始显示
    autoindex_localtime on; #显示文件修改时间为服务器本地时间


    # another virtual host using mix of IP-, name-, and port-based configuration
    #
    #server {
    #    listen       8000;
    #    listen       somename:8080;
    #    server_name  somename  alias  another.alias;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}


    # HTTPS server
    #
    #server {
    #    listen       443 ssl;
    #    server_name  localhost;

    #    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;

    #    ssl_session_cache    shared:SSL:1m;
    #    ssl_session_timeout  5m;

    #    ssl_ciphers  HIGH:!aNULL:!MD5;
    #    ssl_prefer_server_ciphers  on;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}

}

vhost.conf

# 想建一个新站点?
# 1、复制本文件然后改名
# 2、修改root值,指向你的新站点根目录
# 3、运行nginx -s reload 重新加载配置就行了
server {
    listen  82;
    server_name  cardload.dev.com;
    root   D:/cardLoan/tuandai-loans/loans-web-admin/src/main/resources/web;
    index  index.html index.htm;

    error_page   500 502 503 504  /50x.html;

    location ~ /.ht {
        deny  all;
    }
}

网上找的 如card.dev.com.conf

http {
    include       mime.types;
    default_type  application/octet-stream;

    sendfile        on; 

    keepalive_timeout  65; 

    gzip  on;

    upstream localhost {
        server 127.0.0.1:8080 max_fails=7 fail_timeout=7s;
    }   
    server {
        listen       81; 
        server_name  localhost;
        location / { 
            root html;
            index index.html index.htm;
            proxy_pass http://localhost;
        }   
    }   
    server {
        listen       80; 
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / { 
            root   html;
            index  index.html index.htm;
            proxy_pass http://localhost;
        }
    }
}

如我们所知,行业观察家一直在抱怨 IT 管理。他们预言高科技孤岛的优势、毫无意义的讨论会议以及表现不佳的应用性能,将会为故障排除带来阻碍并导致用户投诉升级。虽然IT运营经理想将重点放在为终端用户或客户提升服务,然而类似于虚拟化、云计算和移动性等技术已经迫使其必须更快地采取服务保障策略。

作为具有超过35年经验的IT 管理软件和解决方案专家,CA Technologies提出以下五个简单步骤,从而让IT经理远离困扰、让IT管理方式高效运营、让应用性能得到优化并最终让终端用户和客户感到满足。

1、改变心态,推进IT

大多数的IT项目初始都涉及到一个思维转变或者文化转换。对于大多数 IT而言,根据不同的域,以往的成果都可以通过服务器响应时间或者网络正常运行时间统计数据来进行衡量。而在现如今的动态环境中,终端用户(无论是内部还是外部客户)的体验和交付的IT服务才是衡量成果的标准。这就意味着 IT 不仅仅需要像以往那样监控整体服务的各个组成部分,还要专注于那些组成部分如何支持服务,服务又如何满足客户需求。

2、集成现有IT工具

下一步就是要集成服务管理生命周期和监控工具的视角。集成以往那些单独的工具,并且调整他们使其为服务目标而服务,这将是技术上的一大挑战。然而当 IT企业做出如此决定之后,并不是所有的工具都可以轻易过渡到服务保障模式。

版权声明:本文由ag真人发布于公司领导,转载请注明出处:虚拟域名与多端口监听及其配置,服务保障变革