• 设置树莓派为打印服务器,开启无线打印


    # 1.开启raspberry的SSH,11月15号发布的版本默认不开启.
    # 2.启动root用户,执行此命令后系统会提示输入两遍的root密码,输入你想设的密码即可,然后在执行
    sudo passwd root
    
    # 解锁root账户
    sudo passwd --unlock root
    
    # 3.更新软件
    sudo apt-get update -y
    sudo apt-get upgrade -y
    
    # 4.安装CPUS以及相关服务
    sudo apt-get install cups -y
    sudo apt-get install samba -y
    
    # 5.将默认pi用户添加到group中
    sudo usermod -a -G lpadmin pi
    
    # 6.停止cups服务并更新配置文件
    sudo service cups stop

    # 7.备份配置文件
    sudo cp /etc/cups/cupsd.conf /etc/cups/cupsd.conf.bak

    设置cupsd.config文件,修改部分如下 :

    #
    # Sample configuration file for the CUPS scheduler.  See "man cupsd.conf" for a
    # complete description of this file.
    #
    
    # Log general information in error_log - change "warn" to "debug"
    # for troubleshooting...
    LogLevel warn
    
    # Deactivate CUPS' internal logrotating, as we provide a better one, especially
    # LogLevel debug2 gets usable now
    MaxLogSize 0
    
    # Only listen for connections from the local machine.
    Listen *:631
    Listen /var/run/cups/cups.sock
    
    # Show shared printers on the local network.
    Browsing On
    BrowseLocalProtocols dnssd
    BrowseAllow all
    
    # Default authentication type, when authentication is required...
    DefaultAuthType Basic
    
    # Web interface setting...
    WebInterface Yes
    
    # Restrict access to the server...
    <Location />
      Order allow,deny
      Allow all
    </Location>
    
    # Restrict access to the admin pages...
    <Location /admin>
      Order allow,deny
      Allow all
    </Location>
    
    # Restrict access to configuration files...
    <Location /admin/conf>
      AuthType Default
      Require user @SYSTEM
      Order allow,deny
      Allow all
    </Location>
    

     

    # 启动printer
    sudo service cups start
    
    # 设置静态ip
    sudo vi /etc/dhcpcd.conf
    
    # 添加如下内容后重启
    interface wlan0
    static ip_address=10.0.0.x/24
    static routers=10.0.0.1
    static domain_name_server=8.8.8.8
    
  • 相关阅读:
    『笔记』数学数论(八)
    『笔记』BSGS
    『笔记』组合数学(六)
    01 分数规划
    高斯消元
    拉格朗日插值法
    洛谷网课数论
    [IOI2013]robots 机器人
    P3530 [POI2012]FES-Festival
    NOIP 2015 day1
  • 原文地址:https://www.cnblogs.com/taojintianxia/p/6160287.html
Copyright © 2020-2023  润新知