Recently, a new server and a printer have been added to the lab. The boss wants to let the server connect to the printer and share it on the network. Others can connect to the shared printer through their own PCs and print files from their own computers. Many people may have encountered such a requirement. I also encountered this incident. After searching a lot on the Internet, I found that everyone's writing is quite messy. After all, it is not a core technology. However, many attempts have been made in the configuration process. Now Record the process in the form of a tutorial, so that I can find it later when I forget it, and it is also convenient for my colleagues to configure it in the same way.
The entire shared configuration is divided into two parts, the server side uses Linux (Ubuntu 16.04) and the PC side (win10):
Server side (Ubuntu16.04)
- Install the printer driver locally
The printer purchased in the laboratory is Brother's DCP-B7500D model, and the latest driver linux-brprinter-installer-2.2.0-1.gz can be downloaded from Brother's official website
The installation steps are clearly explained when downloading. Just follow the steps.
A)mkdir /usr/brother_dcp_b7500d
B)mv /home/exa/Downloads/linux-brprinter-installer-2.2.0-1.gz /usr/ brother_dcp_b7500d
C)cd /usr/brother_dcp_b7500d
D)gunzip linux-brprinter-installer-2.2.0-1.gz
E)bash linux-brprinter-installer-2.2.0-1 DCP-B7500D
After installation follow the steps to enter y or n
Tips: What needs to be explained here is that when you ask: Will you specify the DeviceURI?, you need to pay attention
For USB users, select: N (No)
For Network users, choose: Y (Yes) or DeviceURI number
After the installation is complete, create a word file, try Ctrl+P to print, if you can print out the content of word, the driver installation is complete
- Install CUPS service
A) Using apt-get
apt-get install cups
B) cups configuration
Vim /etc/cups/cupsd.conf
find a row
Add content after:
Listen 0.0.0.0:631
After saving and exiting, check if ok is added:
netstat -tunlp | grep ‘631’
C) Restart the service
/etc/init.d/cups restart
D) Web configuration
Open the browser and open the webpage localhost:631
选择CUPS for Administrators->Adding Printers and Classes
Select Printers->Add Printer
The following screen will appear:
Among them, select Brother DCP-B7500D series (Brother DCP-B7500D series) in Local Printers, which will be different depending on the driver installed before.
Discovered Network Printers and Other Network Printers do not make a choice and continue directly.
Then the following interface will appear
The options such as Name here have been filled in gray by default, we can directly check Share This Printer.
The following pages are as follows:
Select the model in the Model that matches the current printer and click "Add Printer"
Enter the following page below:
Click "Set Default Options" to enter the following page:
Then pull down the Maintain tab and select Print Test Page
If the printer outputs the print task at this time, it means that there is no problem with the installation of CUPS.
- Install samba service
A) Install samba
apt-get install samba
Then you can see a new folder samba in the /etc/ directory
B) Create a folder
mkdir /etc/samba/drivers
mkdir -m 777 /var/spool/samba
C) Modify the configuration file
vim /etc/samba/smb.conf
Modify the information of the following corresponding groups as follows:
[global]
server string = exa server
printcap name = cups
load printers = yes
printing = cups
[printers]
comment = All Printers
browseable = yes
path = / var / spool / samba
printable = yes
guest ok = yes
public = yes
writable = yes
printable = yes
read only = yes
create mask = 0700
load printers = yes
printing = cups
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
browseable = yes
read only = yes
guest ok = yes
write list = root
D) Restart the samba service
/etc/init.d/samba restart
If ok is displayed, it means success
Local PC (win10)
- Local printer driver installation
It stands to reason that this step can be omitted, but if the printer driver is installed later, the driver cannot be obtained from the server by default, so the model list cannot be found in the following list. The printer driver download is compatible with win10 version.
Run the exe file:
Select "Next":
Check "I accept the above license agreement" and "Next":
After a search, after a while, it will appear:
Click "Next"
At this time, there will be no device found, but it doesn't matter, the role of this installation package has been completed here, and the list information will appear in the subsequent configuration, which is enough for us.
- Enter printer settings
Settings -> Devices -> Printers & Scanners
- Click "Add Printer or Scanner"
After searching for a while, "The printer I need is not in the list" will appear, click here, the configuration page of "Add a printer" will appear, as shown below:
- Configure the printer
Select "Select a shared printer by name" and click "Browse"
The host will be automatically searched here, select the name of the server here
Mine is the item of "USER...", click to select
At this time, the name of the printer previously set in cups will appear, as shown in the following figure:
Of course, select the Brother item, and then return to the original page for adding printers
Click "Next", then "No driver found" will appear:
It doesn't matter, don't worry, click "OK" and the "Add Printer Wizard" page will appear:
At this time, you can go to Brother->DCP-B7500D. At this time, because of the first step, you can see this option, otherwise you will not see this item, you need to pay attention.
Then click "OK", wait, agree with the operation, and then the success page will appear:
- Test the printer
Click Next, then the following appears:
Click "Print Test Page" to see if the printer can print.
If it prints normally, the configuration is complete,
Then create a new word, Ctrl+P, print the current word document, there should already be a server printer that was set up in the printer options, and you can print it.