zoukankan      html  css  js  c++  java
  • Linux用户程序配置文件

    在 Linux(和一般的 UNIX)中,有无数的“用户”程序。最常见的一种用户程序配置文件是 /etc/lynx.cfg。这是著名的文本浏览器 lynx 的配置文件。通过这个文件,您可以定义代理服务器、要使用的字符集等等。下面的代码样本展示了 lynx.cfg 文件的一部分,修改这部分代码可以改变 Linux 系统的代理服务器设置。缺省情况下,这些设置适用于在各自的 shell 中运行 lynx 的所有用户,除非某个用户通过指定 --cfg = "mylynx.cfg" 重设了缺省的配置文件。

    /etc/lynx.cfg 中的代理服务器设置

    .h1 proxy

    .h2 HTTP_PROXY

    .h2 HTTPS_PROXY

    .h2 FTP_PROXY

    .h2 GOPHER_PROXY

    .h2 NEWS_PROXY

    .h2 NNTP_PROXY

    # Lynx version 2.2 and beyond supports the use of proxy servers that can act as

    # firewall gateways and caching servers. They are preferable to the older

    # gateway servers. Each protocol used by Lynx can be mapped separately using

    # PROTOCOL_proxy environment variables (see Lynx Users Guide). If you have

    # not set them externally, you can set them at run time via this configuration file.

    # They will not override external settings. The no_proxy variable can be used

    # to inhibit proxying to selected regions of the Web (see below). Note that on

    # VMS these proxy variables are set as process logicals rather than symbols, to

    # preserve lowercasing, and will outlive the Lynx image.

    #

    .ex 15

    http_proxy:http://proxy3.in.ibm.com:80/

    ftp_proxy:http://proxy3.in.ibm.com:80/

    #http_proxy:http://penguin.in.ibm.com:8080

    #ftp_proxy:http://penguin.in.ibm.com:8080/

    .h2 NO_PROXY

    # The no_proxy variable can be a comma-separated list of strings defining

    # no-proxy zones in the DNS domain name space.  If a tail substring of the

    # domain-path for a host matches one of these strings, transactions with that

    # node will not be proxied.

    .ex

    no_proxy:demiurge.in.ibm.com, demiurge

    更改配置文件

    在更改配置文件时,如果程序不是由系统管理员或内核控制的,就要确保重新启动过使用该配置的程序。普通用户通常没有启动或停止系统程序和/或守护进程的权限。

    内核

    更改内核中的配置文件会立即影响到系统。例如,更改 passwd 文件以增加用户将立即使该用户变为可用。而且任何 Linux 系统的 /proc/sys 目录中都有一些内核可调参数。只有超级用户可以得到对所有这些文件的写访问权力;其它用户只有只读访问权力。此目录中文件的分类的方式和 Linux 内核源代码的分类方式一样。此目录中的每个文件都代表一个内核数据结构,这些数据结构可以被动态地修改,从而改变系统性能。

    注意:在更改其中任何文件的任何值之前,您应该确保自己全面了解该文件,以避免对系统造成不可修复的损害。

  • 相关阅读:
    CocoaPods的安装使用和常见问题
    超全iOS面试资料,看完你还担心面试吗?
    IOS--多线程之线程间通讯
    iOS开发网络篇—发送GET和POST请求(使用NSURLSession)
    java之NIO编程
    libthrift0.9.0解析(四)之TThreadPoolServer&ServerContext
    android开发笔记
    rtsp转发服务器设计
    神经网络文献资料
    deep learning in nlp 资料文献
  • 原文地址:https://www.cnblogs.com/fanweisheng/p/11109386.html
Copyright © 2011-2022 走看看