在Linux服务器安装cups打印服务
第一步: 在服务器命令行执行: sudo apt-get install cups
第二步: 安装完cups之后, 到/etc/cups/ 文件夹下, 找到cupsd.conf
1 2 3 |
# Only listen for connections from the local machine. Listen localhost:631 Listen /var/run/cups/cups.sock |
改为:
1 2 3 |
# Only listen for connections from the local machine. Port 631 Listen /var/run/cups/cups.sock |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# Restrict access to the server... <Location /> Order allow,deny </Location> # Restrict access to the admin pages... <Location /admin> Order allow,deny </Location> # Restrict access to configuration files... <Location /admin/conf> AuthType Default Require user @SYSTEM Order allow,deny </Location> |
改为:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# 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> |
第三步: 找到cups-pdf.conf, 找一个服务器上可以正常使用的cups的cups-pdf.conf文件, 复制到/etc/cups/文件夹下, 替换到原来的文件
第四步: 访问 IP:631端口, 查看打印服务

第五步: 将lims_cups_pdf.sh复制到 /usr/local/sbin/ 文件夹下
第六步: 在服务器上安装网络打印机, 然后在Windows电脑测试