First of all, the company has a model for the HP LaserJet m1120 MFP printer, because not the network printer is very inconvenient to use, the company boss asked to connect this printer on the company's intranet Linux server (CentOS), and then configure the Samba share printer. The following three major steps to start, such as meet your needs, please continue to read.
The first step is to ensure that your printer will print properly on a Linux server.
1, the company's HP printer port for USB, the printer is plugged into the server, you can see/dev/usb/lp0 is my printer
2. To http://www.linuxprinting.org/printer_list.cgi to see if your printer model is supported, my choice is hp and LaserJet M1120 MFP, click the Show button query, come to HTTP// Www.linuxprinting.org/show_printer.cgi?recnum=HP-LaserJet_M1120_MFP page, my is mostly two small penguins, if your printer is not supported, then completely no longer struggling. The results of the query are divided into four cases:
(1) Perfectly: Full support for Linux printing, and can use all the printer features and print resolution
(2) Mostly: Most features support Linux printing, there are some minor defects
(3) Partially: Only some features support Linux printing, many features can not be implemented, such as color printer can only print black and white images
(4) Paperweight: Linux printing is not supported at all
3, the query page below has recommended driver (recommended driver): Click (Driver Home page) came to your printer driver page http://foo2xqx.rkkda.com/, find download and Install follow the steps to add the driver, mine is:
# wget http://foo2zjs.rkkda.com/foo2zjs.tar.gz
# tar zxf foo2zjs.tar.gz
# CD Foo2zjs
# make
# make Install
# Make Install-hotplug
# Make Cups
4. Verify that your cups are properly installed and that you should have the following two packages:
Cups
Cups-libs
5, in order to carry out the Windows related software from the printing material to be configured as follows:
# Vi/etc/cups/mime.convs
Application/octet-stream Application/vnd.cups-raw 0-Find this line and take off the note
# Vi/etc/cups/mime.types
Application/octet-stream find this line, take out the note
6, start the cups service, the following two ways:
# Service Cups start
#/etc/init.d/cups Start
7, open the management interface of Cups http://localhost:631, my CentOS installed a graphical interface (command mode to add the printer to find it yourself), do the following:
(1) Click on Add Printer, adding a printer, the following content can be filled in freely:
Name (printer name, which will be displayed in client Samba): Hp-printer
Location: localhost
Description (printer description): HP LaserJet m1120 MFP
(2) Select the device location, I chose the one with the USB, specifically forget, according to their actual situation choice, wrong can also retreat, do not tense.
(3) Select printer Manufacturer: HP, Model: LaserJet m1120 MFP
(4) After success, you can see the display page of your printer, select Print test page, and then complete the first step.
The second step, to ensure that your server has been configured with the use of Samba, installation and configuration process can refer to this article http://blog.csdn.net/linglongwunv/archive/2010/01/19/5212875.aspx, Then do the work of printer sharing:
1, in the configuration of Samba plus shared printer configuration, my because it is not set up the intranet administrator and permissions:
# vi/etc/samba/smb.conf
[Global]
Printcap name = Cups
Load printers = yes
printing = Cups
[Printers]
Comment = All Printers
Path =/var/samba/printers
browseable = yes
Guest OK = yes
writable = yes
printable = yes
Public = yes
2. Restart Cups and Samba:
# Service Cups restart
# Service SMB Restart
The third step, the client installs the printer driver, uses the printer
(1) Download the appropriate model for the XP system printer driver, this should be everyone, my m1210-pnp-win32-sc.exe, install this driver
(2) in your samba, you should see the printer Hp-printer (the name you added yourself in step 7) and not use Samba's reference to this article http://blog.csdn.net/linglongwunv/archive/2010/01 /19/5212919.aspx, double-click the printer, first use the request to select the driver, select the corresponding model in your installed driver, my hp LaserJet m1120 MFP, and then print the test page to see if it is successful
(3) Set the printer on Samba to your default printer, which is as easy to use as a local printer Hp-printer
At this point all completed, but the Linux has never imagined so smooth, I do this by the leadership of the strong praise and therefore advance to a positive, in fact, success is when you are on the verge of despair and then step forward to the small steps, must be calm, refueling!
Samba sharing printer under CentOS