系統(tǒng)版本
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 開機(jī)不啟動防火墻
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、運(yùn)行cups
service cups start
10德召、開機(jī)自動啟動
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、允許遠(yuǎn)程訪問CUPS Web
CUPS默認(rèn)只監(jiān)聽localhost氏捞,修改配置文件碧聪,允許any監(jiān)聽TCP 631
#把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密碼
14液茎、添加打印機(jī)
image.png
15逞姿、查看打印錯(cuò)誤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è)置無認(rèn)證共享
vim /etc/samba/smb.conf
[global]
workgroup = MYGROUP
server string = Samba Server Version %v
security = user
map to guest = Bad User
20、測試打印
windows下訪問共享打印機(jī)
\\10.x.x.x
21谒养、通過CUPS WEB查看相關(guān)打印log
查看打印作業(yè)記錄挺狰,已完成一次打印
PRINTServer-10.4.x.x 7 root [21/Mar/2018:20:44:36 +0800] 1 1 - 10.4.x.x smbprn.00000001 Linux - -
PRINTServer-10.4.x.x 7 root [21/Mar/2018:20:44:47 +0800] 1 1 - 10.4.x.x smbprn.00000001 Linux - -