网站建设资讯

NEWS

网站建设资讯

CUPSSharePrinter

系统版本
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、关闭防火墙
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、关闭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状态
service cups status
cupsd (pid 1817) is running...

12、允许远程访问CUPS Web
CUPS默认只监听localhost,修改配置文件,允许any监听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...


Order allow,deny
Allow all

Restrict access to the admin pages...


Order allow,deny
Allow all

Restrict access to configuration files...


AuthType Default
Require user @SYSTEM
Order allow,deny
Allow all

重启服务 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服务
service smb status
smbd (pid 2140) is running...

19、设置无认证共享
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查看相关打印log
查看打印作业记录,如下,已完成一次打印

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 - -


分享文章:CUPSSharePrinter
文章位置:http://njwzjz.com/article/ggdesg.html