Jump to content

GSTN - Cups documentation: Difference between revisions

From TetraWiki
Praveen (talk | contribs)
No edit summary
Praveen (talk | contribs)
No edit summary
 
(9 intermediate revisions by 2 users not shown)
Line 4: Line 4:




<div style="color:#00000a;"></div>


<div style="color:#00000a;"></div>


<div style="color:#00000a;"></div>
<div style="color:#00000a;"></div>


<div style="color:#00000a;"></div>
<div style="color:#00000a;"></div>


<div style="color:#00000a;"></div>
<div style="color:#00000a;"></div>


<div style="color:#00000a;"></div>
<div style="color:#00000a;"></div>


<div style="color:#00000a;"></div>
<div style="color:#00000a;"></div>


<div style="color:#00000a;"></div>
<div style="color:#00000a;"></div>


<div style="color:#00000a;"></div>
CUPS (Common Unix Printing System)


<div style="color:#00000a;"></div>
Installation and configuration for CUPS


CUPS (Common Unix Printing System)
Date : 25.08.2016


Installation and configuration for CUPS
Document Version : 1.0


Date : 25.08.2016


Document Version : 1.0








Table of Contents:[[#RefHeading3061179521510|Configure CUPS Printing3]]


:[[#RefHeading3091179521510|CUPS Web interface (Adding printers).6]]


Table of Contents:[[#RefHeading3061179521510|Configure CUPS Printing3]]
:[[#RefHeading96093905196|Testing printer (Print test page).9]]


:[[#RefHeading3091179521510|CUPS Web interface (Adding printers).6]]
:[[#RefHeading96293905196|CUPS Integration with Samba.11]]


:[[#RefHeading96093905196|Testing printer (Print test page).9]]
== Configure CUPS Printing ==


:[[#RefHeading96293905196|CUPS Integration with Samba.11]]
1. Login to server, using root user and install CUPS.


== Configure CUPS Printing ==
''<nowiki># yum install cups*</nowiki>''


1. Login to server, using root user and install CUPS.


''<nowiki># yum install cups*</nowiki>''
[[Image:GSTNCUPS1.png]]




[[Image:GSTNCUPS1]]
2. Edit cupsd.conf file.


''<nowiki># vi /etc/cups/cupsd.conf</nowiki>''


2. Edit cupsd.conf file.


''<nowiki># vi /etc/cups/cupsd.conf</nowiki>''




[[Image:GSTNCUPS2.png]]




[[Image:GSTNCUPS2]]








3. Make below entries and save file.




3. Make below entries and save file.
''MaxLogSize 1m''


''LogLevel debug''


''MaxLogSize 1m''
''<nowiki># Allow remote access</nowiki>''


''LogLevel debug''
''Listen localhost:631''


''<nowiki># Allow remote access</nowiki>''
''Listen 172.18.101.14:631''


''Listen localhost:631''
''Listen 2404:a800:1000:d:7800::e:631''


''Listen 172.18.101.14:631''
''Listen /var/run/cups/cups.sock''


''Listen 2404:a800:1000:d:7800::e:631''
''Browsing On''


''Listen /var/run/cups/cups.sock''
''BrowseLocalProtocols dnssd''


''Browsing On''
''DefaultAuthType Basic''


''BrowseLocalProtocols dnssd''
''WebInterface Yes''


''DefaultAuthType Basic''
''<Location />''


''WebInterface Yes''
<div style="color:#00000a;">''<nowiki># Allow remote administration...</nowiki>''</div>


''<Location />''
<div style="color:#00000a;">''Order allow,deny''</div>


<div style="color:#00000a;">''<nowiki># Allow remote administration...</nowiki>''</div>
<div style="color:#00000a;">''Allow localhost''</div>


<div style="color:#00000a;">''Order allow,deny''</div>
<div style="color:#00000a;">''Allow 172.18.5.0/24''</div>


<div style="color:#00000a;">''Allow localhost''</div>
''</Location>''


<div style="color:#00000a;">''Allow 172.18.5.0/24''</div>
''<Location /admin>''


''</Location>''
<div style="color:#00000a;">''<nowiki># Allow remote administration...</nowiki>''</div>


''<Location /admin>''
<div style="color:#00000a;">''Order allow,deny''</div>


<div style="color:#00000a;">''<nowiki># Allow remote administration...</nowiki>''</div>
<div style="color:#00000a;">''Allow localhost''</div>


<div style="color:#00000a;">''Order allow,deny''</div>
<div style="color:#00000a;">''Allow 172.18.5.0/24''</div>


<div style="color:#00000a;">''Allow localhost''</div>
''</Location>''


<div style="color:#00000a;">''Allow 172.18.5.0/24''</div>
''<Location /admin/conf>''


''</Location>''
<div style="color:#00000a;">''AuthType Default''</div>


''<Location /admin/conf>''
<div style="color:#00000a;">''Require user @SYSTEM''</div>


<div style="color:#00000a;">''AuthType Default''</div>
<div style="color:#00000a;">''<nowiki># Allow remote access to the configuration files...</nowiki>''</div>


<div style="color:#00000a;">''Require user @SYSTEM''</div>
<div style="color:#00000a;">''Order allow,deny''</div>


<div style="color:#00000a;">''<nowiki># Allow remote access to the configuration files...</nowiki>''</div>
<div style="color:#00000a;">''Allow localhost''</div>


<div style="color:#00000a;">''Order allow,deny''</div>
<div style="color:#00000a;">''Allow 172.18.5.0/24''</div>


<div style="color:#00000a;">''Allow localhost''</div>


<div style="color:#00000a;">''Allow 172.18.5.0/24''</div>




Line 159: Line 159:




[[Image:GSTNCUPS3.png]]


4. Restart cups service.


[[Image:GSTNCUPS3]]
''<nowiki># systemctl restart cups.service </nowiki>''


4. Restart cups service.


''<nowiki># systemctl restart cups.service </nowiki>''
<div style="color:#00000a;">[[Image:GSTNCUPS4.png]]</div>




<div style="color:#00000a;">[[Image:GSTNCUPS4]]</div>
<div style="color:#00000a;"></div>


<div style="color:#00000a;"></div>


<div style="color:#00000a;"></div>
<div style="color:#00000a;"></div>


<div style="color:#00000a;"></div>
<div style="color:#00000a;"></div>


<div style="color:#00000a;"></div>
<div style="color:#00000a;"></div>


<div style="color:#00000a;"></div>
== CUPS Web interface (Adding printers). ==


<div style="color:#00000a;"></div>
<div style="color:#00000a;">1. Now open the web browser and open link <span style="color:#3333ff;">''https://172.18.101.14:631</span>.''</div>


== CUPS Web interface (Adding printers). ==
From here we can add and manage printers. to add a new printer click '''''“Administration”'''''.


<div style="color:#00000a;">1. Now open the web browser and open link <span style="color:#3333ff;">''https://172.18.101.14:631</span>.''</div>
[[Image:GSTNCUPS5.png]]


From here we can add and manage printers. to add a new printer click '''''“Administration”'''''.
<div style="color:#00000a;">2. Click and '''''Add Printer”''''' and type root username and password of the cups server:</div>


[[Image:GSTNCUPS5]]


<div style="color:#00000a;">2. Click and “'''''Add Printer”''''' and type root username and password of the cups server:</div>
[[Image:GSTNCUPS6.png]]




[[Image:GSTNCUPS6]]
<div style="color:#00000a;"></div>


<div style="color:#00000a;">3. Select '''“''AppSocket/HP JetDirect''”''' (here i have Hp Laserjet Pro m202dw printers) and click '''''Continue''. '''</div>


<div style="color:#00000a;"></div>


<div style="color:#00000a;">3. Select '''“''AppSocket/HP JetDirect''”''' (here i have Hp Laserjet Pro m202dw printers) and click '''''Continue''. '''</div>
[[Image:GSTNCUPS7.png]]


<div style="color:#00000a;">4. In connection tab type the '''''ipp://172.18.5.67:631/ipp''''' (172.18.5.67 is printer IP) and click ''Continue''.</div>


[[Image:GSTNCUPS7]]


<div style="color:#00000a;">4. In connection tab type the '''''ipp://172.18.5.67:631/ipp''''' (172.18.5.67 is printer IP) and click ''Continue''.</div>
[[Image:GSTNCUPS8.png]]




[[Image:GSTNCUPS8]]




<div style="color:#00000a;">5. Fill the required information and click on “'''''Share This Printer''''' “ and click on “'''''Continue'''''”.</div>


[[Image:GSTNCUPS9.png]]


<div style="color:#00000a;">5. Fill the required information and click on “'''''Share This Printer''''' and click on '''''Continue'''''.</div>
<div style="color:#00000a;">6. Select the '''''Generic''''' print driver and click on '''''“continue”'''''.</div>


[[Image:GSTNCUPS9]]
[[Image:GSTNCUPS10.png]]


<div style="color:#00000a;">6. Select the '''“''Generic''”''' print driver and click on '''''“continue”'''''.</div>


[[Image:GSTNCUPS10]]




Line 223: Line 223:




<div style="color:#00000a;">7. Select the model '''“''Generic PCL Laser Printer(en)''” '''and click on '''''“Add Printer”.'''''</div>


Now printer configuration has been done.


<div style="color:#00000a;">7. Select the model '''“''Generic PCL Laser Printer(en)''” '''and click on '''''“Add Printer”.'''''</div>
[[Image:GSTNCUPS11.png]]


Now printer configuration has been done.
== Testing printer (Print test page). ==


[[Image:GSTNCUPS11]]
<div style="color:#00000a;">1. Click on ''“'''Printers'''” ''tab''. ''Here we can see the installed printers click on printer which we want to test.</div>


== Testing printer (Print test page). ==
[[Image:GSTNCUPS12.png]]


<div style="color:#00000a;">1. Click on ''“'''Printers'''” ''tab''. ''Here we can see the installed printers click on printer which we want to test.</div>


[[Image:GSTNCUPS12]]
<div style="color:#00000a;">2. Click on''''' “Maintenance” '''''and select “'''''Print Test Page'''''”.</div>


[[Image:GSTNCUPS13.png]]


<div style="color:#00000a;">2. Click on''''' “Maintenance” '''''and select “'''''Print Test Page'''''”.</div>


[[Image:GSTNCUPS13]]
<div style="color:#00000a;">3. Page will say that “''Test page sent:''”</div>




<div style="color:#00000a;">3. Page will say that “''Test page sent:''”</div>
[[Image:GSTNCUPS14.png]]




[[Image:GSTNCUPS14]]




Line 255: Line 255:




== CUPS Integration with Samba. ==


<div style="color:#00000a;">To integrate cups with samba we can follow below steps.</div>


== CUPS Integration with Samba. ==
<div style="color:#00000a;">1. Open “'''''/usr/local/samba/etc/smb.conf'''''” file.</div>


<div style="color:#00000a;">To integrate cups with samba we can follow below steps.</div>
''<nowiki># vi /usr/local/samba/etc/smb.conf</nowiki>''


<div style="color:#00000a;">1. Open “'''''/usr/local/samba/etc/smb.conf'''''” file.</div>
[[Image:GSTNCUPS15.png]]


''<nowiki># vi /usr/local/samba/etc/smb.conf</nowiki>''


[[Image:GSTNCUPS15]]




Line 280: Line 280:




<div style="color:#00000a;">2. Make below entry in '''''smb.conf''''' file in Global section.</div>


<div style="color:#00000a;">''rpc_server:spoolss = external''</div>


<div style="color:#00000a;">2. Make below entry in '''''smb.conf''''' file in Global section.</div>
<div style="color:#00000a;">''rpc_daemon:spoolssd = fork''</div>


<div style="color:#00000a;">''rpc_server:spoolss = external''</div>
<div style="color:#00000a;">''spoolss: architecture = Windows x64''</div>


<div style="color:#00000a;">''rpc_daemon:spoolssd = fork''</div>


<div style="color:#00000a;">''spoolss: architecture = Windows x64''</div>
[[Image:GSTNCUPS16.png]]




[[Image:GSTNCUPS16]]




Line 304: Line 304:




<div style="color:#00000a;"></div>


<div style="color:#00000a;">3. Create the Samba spool directory and set permission. </div>


<div style="color:#00000a;"></div>
''<nowiki># mkdir -p /var/spool/samba4/ ; chmod 1777 /var/spool/samba4/</nowiki>''


<div style="color:#00000a;">3. Create the Samba spool directory and set permission. </div>


''<nowiki># mkdir -p /var/spool/samba4/ ; chmod 1777 /var/spool/samba4/</nowiki>''
[[Image:GSTNCUPS17.png]]




[[Image:GSTNCUPS17]]
<div style="color:#00000a;">4. Open again '''''/usr/local/samba/etc/smb.conf '''''file and make below entries.</div>




<div style="color:#00000a;">4. Open again '''''/usr/local/samba/etc/smb.conf '''''file and make below entries.</div>
''[ProLaserJet]''


<div style="color:#00000a;">''comment = ProLaserJet''</div>


''[ProLaserJet]''
<div style="color:#00000a;">''path = /var/spool/samba4/''</div>


<div style="color:#00000a;">''comment = ProLaserJet''</div>
<div style="color:#00000a;">''browseable = yes''</div>


<div style="color:#00000a;">''path = /var/spool/samba4/''</div>
<div style="color:#00000a;">''printable = yes''</div>


<div style="color:#00000a;">''browseable = yes''</div>
<div style="color:#00000a;">''printer name = ProLaserJet''</div>


<div style="color:#00000a;">''printable = yes''</div>


<div style="color:#00000a;">''printer name = ProLaserJet''</div>
''[ProLaserJet2]''


<div style="color:#00000a;">''comment = ProLaserJet2''</div>


''[ProLaserJet2]''
<div style="color:#00000a;">''path = /var/spool/samba4/''</div>


<div style="color:#00000a;">''comment = ProLaserJet2''</div>
<div style="color:#00000a;">''browseable = yes''</div>


<div style="color:#00000a;">''path = /var/spool/samba4/''</div>
<div style="color:#00000a;">''printable = yes''</div>


<div style="color:#00000a;">''browseable = yes''</div>
<div style="color:#00000a;">''printer name = ProLaserJet2''</div>


<div style="color:#00000a;">''printable = yes''</div>


<div style="color:#00000a;">''printer name = ProLaserJet2''</div>
[[Image:GSTNCUPS18.png]]




[[Image:GSTNCUPS18]]
<div style="color:#00000a;"></div>


<div style="color:#00000a;"></div>


<div style="color:#00000a;"></div>
<div style="color:#00000a;"></div>


<div style="color:#00000a;"></div>
<div style="color:#00000a;"></div>


<div style="color:#00000a;"></div>
<div style="color:#00000a;"></div>


<div style="color:#00000a;"></div>
<div style="color:#00000a;"></div>


<div style="color:#00000a;"></div>
<div style="color:#00000a;">5. Restart samba service.</div>


<div style="color:#00000a;"></div>
<div style="color:#00000a;">''<nowiki># systemctl stop samba4.service</nowiki>'' </div>


<div style="color:#00000a;">5. Restart samba service.</div>
[[Image:GSTNCUPS19.png]]


<div style="color:#00000a;">''<nowiki># systemctl stop samba4.service</nowiki>'' </div>


[[Image:GSTNCUPS19]]




<div style="color:#00000a;">''<nowiki># systemctl start samba4.service</nowiki>'' </div>




<div style="color:#00000a;">''<nowiki># systemctl start samba4.service</nowiki>'' </div>
[[Image:GSTNCUPS20.png]]
 
 
[[Image:GSTNCUPS20]]

Latest revision as of 05:33, 1 February 2019



CUPS (Common Unix Printing System)

Installation and configuration for CUPS

Date : 25.08.2016

Document Version : 1.0




Table of Contents:Configure CUPS Printing3

:CUPS Web interface (Adding printers).6

:Testing printer (Print test page).9

:CUPS Integration with Samba.11

== Configure CUPS Printing ==

1. Login to server, using root user and install CUPS.

# yum install cups*



2. Edit cupsd.conf file.

# vi /etc/cups/cupsd.conf






3. Make below entries and save file.


MaxLogSize 1m

LogLevel debug

# Allow remote access

Listen localhost:631

Listen 172.18.101.14:631

Listen 2404:a800:1000:d:7800::e:631

Listen /var/run/cups/cups.sock

Browsing On

BrowseLocalProtocols dnssd

DefaultAuthType Basic

WebInterface Yes

<Location />

# Allow remote administration...
Order allow,deny
Allow localhost
Allow 172.18.5.0/24

</Location>

<Location /admin>

# Allow remote administration...
Order allow,deny
Allow localhost
Allow 172.18.5.0/24

</Location>

<Location /admin/conf>

AuthType Default
Require user @SYSTEM
# Allow remote access to the configuration files...
Order allow,deny
Allow localhost
Allow 172.18.5.0/24

















4. Restart cups service.

# systemctl restart cups.service



== CUPS Web interface (Adding printers). ==

1. Now open the web browser and open link https://172.18.101.14:631.

From here we can add and manage printers. to add a new printer click “Administration”.

2. Click and “Add Printer” and type root username and password of the cups server:



3. Select AppSocket/HP JetDirect (here i have Hp Laserjet Pro m202dw printers) and click Continue.


4. In connection tab type the ipp://172.18.5.67:631/ipp (172.18.5.67 is printer IP) and click Continue.




5. Fill the required information and click on “Share This Printer “ and click on “Continue”.

6. Select the Generic print driver and click on “continue”.





7. Select the model Generic PCL Laser Printer(en)and click on “Add Printer”.

Now printer configuration has been done.

== Testing printer (Print test page). ==

1. Click on Printerstab. Here we can see the installed printers click on printer which we want to test.


2. Click on “Maintenance” and select “Print Test Page”.


3. Page will say that “Test page sent:







== CUPS Integration with Samba. ==

To integrate cups with samba we can follow below steps.
1. Open “/usr/local/samba/etc/smb.conf” file.

# vi /usr/local/samba/etc/smb.conf









2. Make below entry in smb.conf file in Global section.
rpc_server:spoolss = external
rpc_daemon:spoolssd = fork
spoolss: architecture = Windows x64









3. Create the Samba spool directory and set permission.

# mkdir -p /var/spool/samba4/ ; chmod 1777 /var/spool/samba4/



4. Open again /usr/local/samba/etc/smb.conf file and make below entries.


[ProLaserJet]

comment = ProLaserJet
path = /var/spool/samba4/
browseable = yes
printable = yes
printer name = ProLaserJet


[ProLaserJet2]

comment = ProLaserJet2
path = /var/spool/samba4/
browseable = yes
printable = yes
printer name = ProLaserJet2



5. Restart samba service.
# systemctl stop samba4.service



# systemctl start samba4.service