溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

CUPS Share Printer

發(fā)布時間:2020-06-28 15:13:16 來源:網(wǎng)絡(luò) 閱讀:1125 作者:飛翔土撥鼠 欄目:建站服務(wù)器

系統(tǒng)版本
cat /etc/centos-release
CentOS Linux release 6.0 (Final)

1、安裝yum
mount /dev/cdrom /mnt
rpm -ivh /mnt/Packages/yum-3.2.27-14.el6.centos.noarch.rpm

2、安裝wget
rpm -ivh /mnt/Packages/wget-1.12-1.4.el6.i686.rpm

3、備份yum配置文件
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

4、下載yum源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

5、yum makecache生成緩存
yum makecache

6、關(guān)閉防火墻
service iptables stop
chkconfig iptables off 開機不啟動防火墻
chkconfig --list | grep iptables
iptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off

7、關(guān)閉SELINUX
vim /etc/sysconfig/selinux
SELINUX=disabled

8、安裝Cups
yum install cups
查看安裝的軟件包
rpm -qa |grep cups
cups-1.4.2-78.el6_9.i686
cups-libs-1.4.2-78.el6_9.i686

9、運行cups
service cups start

10、開機自動啟動
chkconfig cups on
chkconfig --list | grep cups
cups 0:off 1:off 2:on 3:on 4:on 5:on 6:off

11、查看cups狀態(tài)
service cups status
cupsd (pid 1817) is running...

12、允許遠程訪問CUPS Web
CUPS默認只監(jiān)聽localhost,修改配置文件,允許any監(jiān)聽TCP 631
vim /etc/cups/cupsd.conf

把Listen localhost:631修改為Listen *:631

允許any訪問CUPS WEB
vim /etc/cups/cupsd.conf

如下增加Allow all字段

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>

重啟服務(wù) service cups restart

13、訪問CUPS WEB
https://IP:631/admin/
登錄賬號使用root密碼

Add print

15、查看打印錯誤log
more /var/log/cups/error_log

16、安裝samba
yum install samba

安裝的軟件包
rpm -qa |grep samba
samba-winbind-clients-3.6.23-46el6_9.i686
samba-3.6.23-46el6_9.i686
samba-winbind-3.6.23-46el6_9.i686
samba-common-3.6.23-46el6_9.i686

17、添加共享打印
vim /etc/samba/smb.conf

[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
guest ok = yes
writable = no
read only = yes
printable = yes

18、重啟smb服務(wù)
service smb status
smbd (pid 2140) is running...

19、設(shè)置無認證共享
vim /etc/samba/smb.conf

[global]
workgroup = MYGROUP
server string = Samba Server Version %v
security = user
map to guest = Bad User

20、測試打印

\10.4.8.249

打印一個文檔,選擇共享打印機,可以打印

21、通過CUPS WEB查看相關(guān)打印log
查看打印作業(yè)記錄,如下,已完成一次打印

22、查看log
Page_log,如下pc-10.4.10.53使用打印機ZD-15F-PRINT-10.4.10.190完成了打印

ZD-15F-PRINT-10.4.10.190 7 root [21/Mar/2018:20:44:36 +0800] 1 1 - 10.4.10.53 smbprn.00000001 Linux - -
ZD-15F-PRINT-10.4.10.190 7 root [21/Mar/2018:20:44:47 +0800] 1 1 - 10.4.10.53 smbprn.00000001 Linux - -

向AI問一下細節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI