Jump to content

GSTN - Cups documentation: Difference between revisions

From TetraWiki
Praveen (talk | contribs)
No edit summary
Praveen (talk | contribs)
No edit summary
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>


CUPS (Common Unix Printing System)


CUPS (Common Unix Printing System)
Installation and configuration for CUPS  
Installation and configuration for CUPS  
Date : 25.08.2016
Date : 25.08.2016
Document Version : 1.0
Document Version : 1.0






Table of Contents
 
Configure CUPS Printing 3
 
CUPS Web interface (Adding printers). 6
 
Testing printer (Print test page). 9
Table of Contents:[[#RefHeading3061179521510|Configure CUPS Printing3]]
CUPS Integration with Samba. 11
 
Configure CUPS Printing
:[[#RefHeading3091179521510|CUPS Web interface (Adding printers).6]]
 
:[[#RefHeading96093905196|Testing printer (Print test page).9]]
 
:[[#RefHeading96293905196|CUPS Integration with Samba.11]]
 
== Configure CUPS Printing ==
 
1. Login to server, using root user and install CUPS.
1. Login to server, using root user and install CUPS.
# yum install cups*


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




2. Edit cupsd.conf file.
2. Edit cupsd.conf file.
# vi /etc/cups/cupsd.conf
 
''<nowiki># vi /etc/cups/cupsd.conf</nowiki>''
 
 
 
 
[[Image:]]




Line 41: Line 67:
3. Make below entries and save file.
3. Make below entries and save file.


MaxLogSize 1m
 
LogLevel debug
''MaxLogSize 1m''
# Allow remote access
 
Listen localhost:631
''LogLevel debug''
Listen 172.18.101.14:631
 
Listen 2404:a800:1000:d:7800::e:631
''<nowiki># Allow remote access</nowiki>''
Listen /var/run/cups/cups.sock
 
Browsing On
''Listen localhost:631''
BrowseLocalProtocols dnssd
 
DefaultAuthType Basic
''Listen 172.18.101.14:631''
WebInterface Yes
 
<Location />
''Listen 2404:a800:1000:d:7800::e:631''
  # Allow remote administration...
 
  Order allow,deny
''Listen /var/run/cups/cups.sock''
  Allow localhost
 
  Allow 172.18.5.0/24
''Browsing On''
</Location>
 
<Location /admin>
''BrowseLocalProtocols dnssd''
  # Allow remote administration...
 
  Order allow,deny
''DefaultAuthType Basic''
  Allow localhost
 
  Allow 172.18.5.0/24
''WebInterface Yes''
</Location>
 
<Location /admin/conf>
''<Location />''
  AuthType Default
 
  Require user @SYSTEM
<div style="color:#00000a;">''<nowiki># Allow remote administration...</nowiki>''</div>
  # Allow remote access to the configuration files...
 
  Order allow,deny
<div style="color:#00000a;">''Order allow,deny''</div>
  Allow localhost
 
  Allow 172.18.5.0/24
<div style="color:#00000a;">''Allow localhost''</div>
 
<div style="color:#00000a;">''Allow 172.18.5.0/24''</div>
 
''</Location>''
 
''<Location /admin>''
 
<div style="color:#00000a;">''<nowiki># Allow remote administration...</nowiki>''</div>
 
<div style="color:#00000a;">''Order allow,deny''</div>
 
<div style="color:#00000a;">''Allow localhost''</div>
 
<div style="color:#00000a;">''Allow 172.18.5.0/24''</div>
 
''</Location>''
 
''<Location /admin/conf>''
 
<div style="color:#00000a;">''AuthType Default''</div>
 
<div style="color:#00000a;">''Require user @SYSTEM''</div>
 
<div style="color:#00000a;">''<nowiki># Allow remote access to the configuration files...</nowiki>''</div>
 
<div style="color:#00000a;">''Order allow,deny''</div>
 
<div style="color:#00000a;">''Allow localhost''</div>
 
<div style="color:#00000a;">''Allow 172.18.5.0/24''</div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 




Line 87: Line 159:




[[Image:]]


4. Restart cups service.
4. Restart cups service.
# systemctl restart cups.service  
 
''<nowiki># systemctl restart cups.service </nowiki>''




<div style="color:#00000a;">[[Image:]]</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>
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:
== CUPS Web interface (Adding printers). ==


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


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


[[Image:]]


3. Select “AppSocket/HP JetDirect” (here i have Hp Laserjet Pro m202dw printers) and click Continue.
<div style="color:#00000a;">2. Click and “'''''Add Printer”''''' and type root username and password of the cups server:</div>




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




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


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”.
[[Image:]]


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




7. Select the model “Generic PCL Laser Printer(en)” and click on “Add Printer”.
 
 
<div style="color:#00000a;">5. Fill the required information and click on “'''''Share This Printer''''' “ and click on “'''''Continue'''''”.</div>
 
[[Image:]]
 
<div style="color:#00000a;">6. Select the '''“''Generic''”''' print driver and click on '''''“continue”'''''.</div>
 
[[Image:]]
 
 
 
 
 
 
 
 
<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.
Now printer configuration has been done.


Testing printer (Print test page).
[[Image:]]
1. Click on “Printers” tab. Here we can see the installed printers click on printer which we want to test.
 
== Testing printer (Print test page). ==
 
<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:]]
 
 
<div style="color:#00000a;">2. Click on''''' “Maintenance” '''''and select “'''''Print Test Page'''''”.</div>
 
[[Image:]]
 
 
<div style="color:#00000a;">3. Page will say that “''Test page sent:''”</div>
 
 
[[Image:]]
 
 
 
 
 
 
 
 
 
 
== CUPS Integration with Samba. ==
 
<div style="color:#00000a;">To integrate cups with samba we can follow below steps.</div>
 
<div style="color:#00000a;">1. Open “'''''/usr/local/samba/etc/smb.conf'''''” file.</div>
 
''<nowiki># vi /usr/local/samba/etc/smb.conf</nowiki>''
 
[[Image:]]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
<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;">''rpc_daemon:spoolssd = fork''</div>
 
<div style="color:#00000a;">''spoolss: architecture = Windows x64''</div>
 
 
[[Image:]]
 
 
 
 
 




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




3. Page will say that “Test page sent:”




Line 139: Line 304:




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


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


CUPS Integration with Samba.
''<nowiki># mkdir -p /var/spool/samba4/ ; chmod 1777 /var/spool/samba4/</nowiki>''
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




[[Image:]]




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


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


2. Make below entry in smb.conf file in Global section.
<div style="color:#00000a;">''browseable = yes''</div>
      rpc_server:spoolss = external
        rpc_daemon:spoolssd = fork
        spoolss: architecture = Windows x64


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


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




''[ProLaserJet2]''


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


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


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


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


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


3. Create the Samba spool directory and set permission.
# mkdir -p /var/spool/samba4/ ; chmod 1777 /var/spool/samba4/


[[Image:]]




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


[ProLaserJet]
<div style="color:#00000a;"></div>
      comment = ProLaserJet
      path = /var/spool/samba4/
      browseable = yes
      printable = yes
      printer name = ProLaserJet


[ProLaserJet2]
<div style="color:#00000a;"></div>
      comment = ProLaserJet2
      path = /var/spool/samba4/
      browseable = yes
      printable = yes
      printer name = ProLaserJet2


<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;">''<nowiki># systemctl stop samba4.service</nowiki>'' </div>


[[Image:]]






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


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




# systemctl start samba4.service
[[Image:]]

Revision as of 11:56, 31 January 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*


[[Image:]]


2. Edit cupsd.conf file.

# vi /etc/cups/cupsd.conf



[[Image:]]




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

















[[Image:]]

4. Restart cups service.

# systemctl restart cups.service


[[Image:]]


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

[[Image:]]

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


[[Image:]]


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


[[Image:]]

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


[[Image:]]



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

[[Image:]]

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

[[Image:]]





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

Now printer configuration has been done.

[[Image:]]

Testing printer (Print test page).

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

[[Image:]]


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

[[Image:]]


3. Page will say that “Test page sent:


[[Image:]]






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

[[Image:]]









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


[[Image:]]








3. Create the Samba spool directory and set permission.

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


[[Image:]]


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


[[Image:]]


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

[[Image:]]



# systemctl start samba4.service


[[Image:]]