配置 CUPS
- 安装
sudo apt-get update sudo apt-get install cups cups-client
- 启动软件
sudo /etc/init.d/cups start
- 修改 CUPS 配置文件
/etc/cups/cupsd.conf
在<Location />
,<Location /admin>
和<Location /admin/conf>
段中加入Allow All
,并将Listen localhost:631
改为Listen *:631
- 重启 CUPS
安装打印机驱动
-
下载foo2xqx 打印机驱动:
wget -O foo2zjs.tar.gz http://foo2zjs.rkkda.com/foo2zjs.tar.gz
-
解压:
tar zxf foo2zjs.tar.gz cd foo2zjs
-
编译并安装:
make ./getweb P1005 # Get HP LaserJet P1005 firmware file ./getweb P1006 # Get HP LaserJet P1006 firmware file ./getweb P1007 # Get HP LaserJet P1007 firmware file ./getweb P1008 # Get HP LaserJet P1008 firmware file ./getweb P1505 # Get HP LaserJet P1505 firmware file sudo make install sudo make install-hotplug sudo make cups
CUPS 添加打印机:浏览器输入:ip:631,添加打印机,选择 foo2zjs 驱动。
配置 samba
- 安装 samba:
sudo apt-get install samba
- 修改 samba 配置:
sudo vim /etc/samba/smb.conf
[global] security=share printcap name=cups load printers=yes printing=cups [Printers] comment=All Printers path=/var/samba/printers browseable=yes guest ok=yes writable=yes printable=yes public=yes
- 重启 samba 和 cups:
sudo /etc/init.d/samba restart sudo /etc/init.d/cups restart