因为实验室有个多余的老服务器,所以近段时间想把老服务器做成打印机服务器,同时因为最近在学习linux,所以就像在CentOS6.3 上安装打印机驱动。因为是新手,所以走了不少弯路,今天终于把打印机安装好了。

网上现在流传各种安装方法,本人试了不少,可惜成功的机会没有,下面就唯一成功的一个写出来,希望有需要的人少走些弯路。

我用的是foo2zjs驱动,它现在支持不少的打印机,其中就包括我的1020.

我是做成打印机服务器,所以选用cups,而不用samba,因为本人不会sanmba。

首先确认机器上是否安装cups

Centos6与RHEL6是基本同样,因此参照HP官方网站对于RHEL的安装方式进行安装。
1. 确认cups有没有安装并启动,可使用
service cups status
或者
rpm -qa|grep cups
如果没有安装请安装
yum install cups

这样就可以

然后打开http://foo2zjs.rkkda.com/网址,查看是否支持你的打印机,按照上面的步骤一步步的走就可以了。

Download and Install

Click the link, or cut and paste the whole command line below to download the driver.

    $ wget -O foo2zjs.tar.gz http://foo2zjs.rkkda.com/foo2zjs.tar.gz

Now unpack it:

Unpack:
$ tar zxf foo2zjs.tar.gz
$ cd foo2zjs

Now compile and install it. The INSTALL file contains more detailed instructions; please read it now.

Compile:
$ make Get extra files from the web, such as .ICM profiles for color correction,
and firmware. Select the model number for your printer:
$ ./getweb P1005 # Get HP LaserJet P1005 firmware file
$ ./getweb P1006 # Get HP LaserJet P1006 firmware file
$ ./getweb P1007 # Get HP LaserJet P1007 firmware file
$ ./getweb P1008 # Get HP LaserJet P1008 firmware file
$ ./getweb P1505 # Get HP LaserJet P1505 firmware file Install driver, foomatic XML files, and extra files:
$ su OR $ sudo make install
# make install (Optional) Configure hotplug (USB; HP LJ P1005/P1006/P1007/P1008/P1505):
# make install-hotplug OR $ sudo make install-hotplug (Optional) If you use CUPS, restart the spooler:
# make cups OR $ sudo make cups

Now create printer entries for your spooler. Create the queues first, then edit them and set the device options as desired. See your operating system documentation for further details on creating a printer queue. Click any hyperlinks below for sample screenshots.

For Redhat 7.2/7.3/8.0/9.0 and Fedora Core 1-5 users:

    # printconf-gui

For Fedora 6/7/.../20, and Ubuntu 7.10/8.x/.../14.x users:

    $ system-config-printer

For Mandrake/Manrivia users:

    # printerdrake

For SUSE 10.x/11.x users:

    # yast2 printer

For Ubuntu 5.10/6.06/6.10/7.04 users:

    $ sudo gnome-cups-manager
$ sudo make cups # IMPORTANT: gnome-cups-manager has a BUG in it

For Debian 3.x, 4.x, and other systems that use CUPS http://localhost:631

    $ firefox http://localhost:631

Command line using CUPS:

    # lpadmin -p "NAME" -v "URI" -E -P /usr/share/cups/model/file.ppd.gz
# lpadmin -d "NAME" # Set the default

For low level testing, you can also create a "raw queue", which will accept "XQX" stream files as-is and send them directly to the printer.

这样打印机的驱动就安装完成了。因为我的机器是1020还要用cups所以最后的选项

make install-hotplug
 make cups	

一起执行即可。

下面添加打印机,之后打印一个测试页试下,可以!!

因为要做成打印服务器,所以用cups共享给其他人,cups的配置文件位于/etc/cups/cups.conf,暂时不要修改该文件,我们可以更加方便的用它自带的管理程序来修改。

本机Firefox打localhost:631,这个是cups的管理地址,点击“Administrator”,用户名root和密码是root的密码,右面有可供选择的选项,选择上共享即可。

如果中间出现什么问题,请详细查看错误原因。还有可以利用

netstat -an |grep  631

命令来查看端口是否正常。

如果谁在安装的过程中有什么问题,请可能的话,在评论中给出问题的截图或者说明,以供其他人相对照,其他人也可以帮助解决该问题,如果问题比较多的话,最后我会在试验过所有的问题后整理出来解决的方法,谢谢!!!

CentOS6 下安装HP-LaserJet 1020打印机的更多相关文章

  1. centos6下安装dedecms

    几经波折,终于安装成功!!! 一.centos6下安装WDCP 1.连接linux 在百度直接搜索下载xshell,通过ssh连接 2.安装wdcp 下载安装wget http://dl.wdlinu ...

  2. Mysql系列三:Centos6下安装Mysql和Mysql主从复制的搭建

    一.Centos6下安装Mysql 检测下系统有没有自带的mysql:yum list installed | grep mysql, 如果已经有的话执行命令yum -y remove mysql-l ...

  3. 【转】CentOS6下安装mysql后,重置root密码方法

    本文转自:CentOS6下安装mysql后,重置root密码方法 centos下安装mysql,居然不知道root用户密码,本想重装,不过还是先度娘了一些,发现这篇文章,刚好解决我的燃眉之急,太赞了. ...

  4. Centos6下安装Hadoop2.6 问题总结

    一. 安装背景:VirtualBox下安装三台Centos6.8虚拟机(一主:master, 两从:slave1,slave2) Centos版本:CentOS-6.8-x86_64 网络配置:三台虚 ...

  5. CentOS6下安装git

    Ubuntu12.04中默认没有安装Git.需要自行安装. 1. 安装Git 1.1 Ubuntu12.04下 可以使用apt-get方式安装,也可以下载源代码安装[1],我们这里使用apt-git安 ...

  6. linux(centos6) 下安装 postgresql-9.3.1.tar.gz

    目录 一. 环境 二.准备工作 三.先安装 make, gcc ,gcc-c++,readline-devel ,zlib-devel .如果已安装,可以忽略 四.开始安装 4.1 解压 tar -z ...

  7. centos6下安装部署hadoop2.2

    环境准备1.操作系统:centos6.0 64位2.hadoop版本:hahadoop-2.2.0 安装和配置步骤具体如下:1.主机和ip分配如下     ip地址                  ...

  8. centos6下安装opencv3

    环境 centos6.5 opencv3.3.0 python3.4.9 下载 opencv可从GitHub下载https://github.com/opencv/opencv/tree/3.4.3可 ...

  9. Centos6下安装Mono和Jexus部署ASP.NET应用程序(纯干货)

    一.服务器 腾讯云VPS,Centos6.6系统 二.安装 1.yum升级 yum –y update 2.安装Mono所需要的库 yum -y install gcc gcc-c++ bison p ...

随机推荐

  1. 第二十课:js中如何操作元素的属性系统

    本章的内容有点复杂,我将用简单的方式来介绍重要的东西,不重要的东西,这里就不讲了,讲了也毛用. 通常我们把对象的非函数成员叫做属性.对元素节点来说,其属性大题分为两大类,固有属性和自定义属性.固有属性 ...

  2. Javascript基础系列之(六)循环语句(do while循环)

    do/while 循环是 while 循环的变体.该循环会执行一次代码块,在检查条件是否为真之前,然后如果条件为真的话,就会重复这个循环. 语法结构如下 do { statement } while ...

  3. 第四章:Javascript表达式和运算符

    表达式是javascript中的一个短语,javascript解释器会将其计算出一个结果.程序中常用量是最简单的一类表达式就是变量.变量名也是一种简单的表达式,它的值就是赋值给变量的值.复杂的表达式是 ...

  4. 用CSS做长度超过长度显示‘...’,当鼠标放上时显示全部内容

    <!DOCTYPE html> <html> <head> <meta name="author" content="Yeeku ...

  5. 给java应用打包

    C:\dollapp\classes> jar -cvf C:\dollapp\deploy\dollapp.jar *.* 上面的jar命令会把 C:\dollapp\classes 下的 所 ...

  6. iOS开发中的错误整理,关于用绑定Tag取控件的注意事项,有时候不绑定也是个错!

    如图:红色框中是个自定义的导航工具条titlesView(没有绑定Tag),工具条中有五个按钮(按钮绑定了Tag)以及一个红色的指示器indicatorView(没有绑定Tag),下面的蓝色是可以滚动 ...

  7. iOS边练边学--GCD的基本使用、GCD各种队列、GCD线程间通信、GCD常用函数、GCD迭代以及GCD队列组

    一.GCD的基本使用 <1>GCD简介 什么是GCD 全称是Grand Central Dispatch,可译为“牛逼的中枢调度器” 纯C语言,提供了非常多强大的函数   GCD的优势 G ...

  8. 【POJ 2096】Collecting Bugs 概率期望dp

    题意 有s个系统,n种bug,小明每天找出一个bug,可能是任意一个系统的,可能是任意一种bug,即是某一系统的bug概率是1/s,是某一种bug概率是1/n. 求他找到s个系统的bug,n种bug, ...

  9. java将一维数组拆分成二维数组

    package staticFactory; public class Array { public static void main(String[] args) { String[] a=new ...

  10. Android Studio学习笔记

    转:http://stormzhang.com/devtools/2014/11/25/android-studio-tutorial1 背景 相信大家对Android Studio已经不陌生了,An ...