element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Printing using Raspberry Pi  ???
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 26 replies
  • Subscribers 680 subscribers
  • Views 4052 views
  • Users 0 members are here
  • raspberry_pi;
  • print
  • raspberry_pi
Related

Printing using Raspberry Pi  ???

wallarug
wallarug over 13 years ago

Has anyone successfully printed.  I am looking to send a print job from the RPi to a Windows 7 machine that has the printer plug-in to a USB port.  I can set-up this printer on windows but I can't do it on the RPi.  I read this post: http://linuxmafia.com/faq/Debian/printing-setup.html that says to use smbclient or CUPS but they are not installing when using the apt-get.  Can someone help or shead some light on alternatives for printing over a network?

  • Sign in to reply
  • Cancel
Parents
  • Former Member
    Former Member over 10 years ago

    Step 1: Materials


    Picture of Materials

     

    - Raspberry Pi

     

    - SD memory card (4GB or larger)

     

    - Power adapter compatible with the MicroB connector on the Raspberry pi

     

    - Ethernet patch cable

     

    - HDMI compatible monitor and HDMI cable

     

    - USB Keyboard (no mouse is necessary, you can navigate the entire interface via keyboard. Arrow keys,  Enter, ESC, etc.)

     

    Step 2: Preparation


    Picture of Preparation

     

    The Raspberry Pi always needs to boot off of an SD card loaded with an operating system (OS) disk image.

     

    You may buy an SD card that has already been made bootable complete with the Raspberry Pi OS or you may buy a blank card and

     

    There are many OS versions offered for the Raspberry Pi, however, in this example, I have chosen to use Raspbian “Wheezy”.

     

    Download the OS disk image and write it to your memory card. To write the image I used Win32 Disk Imager. Once the image is written to the card, plug the card into the Raspberry Pi's SD card reader and power on the device. (Be sure you have all the proper I/O devices plugged in, i.e., keyboard, Ethernet cable,  HDMI monitor.)

     

    Step 3: Initial Configuration


    Picture of Initial Configuration

     

    Keep in mind, if you mess up anything along the way, just reformat your card, reload the disk image and start again. No harm no foul.

     

    Upon powering the Raspberry Pi with the SD card plugged in, you will see the system automatically listing information about the operating system and peripherals. You do not need to know what it all means for this project, but I absolutely wouldn't discourage you from reading it and learning a little bit about your Raspberry Pi for your own benefit!

     

    After the boot information is complete, you will be prompted with the raspi-config window. Here you should make the following changes:

     

    - Expand root partition so all space on the SD card is usable.
    - Set timezone.
    - Enable SSH server (found in the Advanced Options)
    - Disable boot to desktop, we want to configure this program using only the terminal environment.
    - Update your Raspberry Pi (found in the Advanced Options)
    - Reboot your Raspberry Pi at this time.

     

    Use the following code to reboot your Raspberry Pi:

     

    sudo reboot

     

    * I also do not recommend overclocking your Pi for this project, the default setting works perfectly and overclocking will reduce the overall lifetime of the hardware. In addition, to get to this window any time after the initial configuration, use the following command: sudo raspi-config

     

    Step 4: SSH set up

    Picture of SSH set up

     

    Now you will be able to ssh into your Pi so you can work on it from another computer if you would like. Once the Raspberry Pi reboots, it will prompt you for login information. Where it says "raspberrypi login: " type the default username which is pi and hit enter. Where it says "password: " type the default password which is raspberry

     

    *when typing the password, no characters will be displayed. Don't get freaked out and think your keyboard stopped working. Just type out the password as you normally would and hit enter when you are done. I promise it is receiving your input!

     

    At this point, find the IP address of your raspberry pi with the following command:

     

    ifconfig

     

    In the second line of the output you will see "inet addr: " followed by a number to the effect of 192.168.1.1 (yours will be slightly different, but you get the idea). Write this number down and bring up your SSH client. For this example I am using an application called Putty as my SSH client. Type the IP address that you wrote down from the ifconfig step into the text field that says "Host Name (or IP address)"

     

    It will prompt you for login information, this will be the same as before. Username is pi and the password is raspberry

     

    Once logged in, it is a good security practice to change the default password. Change your password with the following command:

     

    sudo passwd pi

     

    Run the following commands to ensure your OS is up to date (hit enter after each and wait until one runs to completion before starting another):

     

    sudo apt-get update
    sudo apt-get upgrade

     

    Step 5: Installing Apache


    Picture of Installing Apache

     

     

    itworks.png

     

    To install Apache and PHP, use the following command:

     

    sudo apt-get install apache2 php5 libapache2-mod-php5

     

    You will be prompted if you would like to continue, type y for yes and hit enter to continue. This process may take a few minutes.

     

    If you get any errors, run the following commands:

     

    sudo groupadd www-data
    sudo usermod -g www-data www-data

     

    Restart Apache with the following command:

     

    sudo service apache2 restart

     

    Now go to your web browser of choice and type the Raspberry Pi's IP address into the URL bar. (if you cannot remember the IP address, use the ifconfigcommand from earlier in this tutorial.

     

    You should see a web page that says "It works!" like the picture above:

     

    Step 6: Install MySQL


    Picture of Install MySQL

     

    root.png

     

    Install MySQL with the following command:

     

    sudo apt-get install mysql-server mysql-client php5-mysql

     

    You will be asked if you want to continue, type y for yes and hit enter to continue.

     

    During the installation, you will be prompted to set a new password for the MySQL root user.  Type a password of your choice, confirm the password again to continue the installation.

     

    Step 7: Install FTP


    Picture of Install FTP

     

    Install FTP to allow transferring files to and from your Raspberry Pi.

     

    First we have to take ownership of the web root. To do this, use the following command:

     

    sudo chown -R pi /var/www

     

    Next, install vsftpd with the following command:

     

    sudo apt-get install vsftpd

     

    Now we can begin the configuration process. First have to edit the vsftpd.config file. To edit the file use the following command:

     

    sudo nano /etc/vsftpd.conf

     

    Find and edit the following lines as specified:

     

    Change anonymous_enable=YES to anonymous_enable=NO,
    Uncomment local_enable=YES
    Uncomment write_enable=YES
    then go to the bottom of the file and add force_dot_files=YES

     

    *to uncomment, remove the pound sign (#) in front of the specified line

     

    exit the editing interface by pressing ctrl+X, type y to confirm the changes and press enter to save the file path.

     

    Restart the FTP service with the following command:

     

    sudo service vsftpd restart

     

    Step 8: Finalization


    Picture of Finalization

     

    Change the root password of your Raspberry Pi with the following command:

     

    sudo passwd root

     

    Add the user root as a mod with the following command:

     

    sudo usermod -L root

     

    At this point, your server should be up and running and you should be able to transfer files through FTP by using your servers IP address and connecting using port 21.

     

    I will go into detail about how I added an HTML resume to my Pi when I have another spare moment, but for now you all can at least have all the proper components installed on your machines to start exploring the possibilities on your own!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Former Member
    Former Member over 10 years ago

    Step 1: Materials


    Picture of Materials

     

    - Raspberry Pi

     

    - SD memory card (4GB or larger)

     

    - Power adapter compatible with the MicroB connector on the Raspberry pi

     

    - Ethernet patch cable

     

    - HDMI compatible monitor and HDMI cable

     

    - USB Keyboard (no mouse is necessary, you can navigate the entire interface via keyboard. Arrow keys,  Enter, ESC, etc.)

     

    Step 2: Preparation


    Picture of Preparation

     

    The Raspberry Pi always needs to boot off of an SD card loaded with an operating system (OS) disk image.

     

    You may buy an SD card that has already been made bootable complete with the Raspberry Pi OS or you may buy a blank card and

     

    There are many OS versions offered for the Raspberry Pi, however, in this example, I have chosen to use Raspbian “Wheezy”.

     

    Download the OS disk image and write it to your memory card. To write the image I used Win32 Disk Imager. Once the image is written to the card, plug the card into the Raspberry Pi's SD card reader and power on the device. (Be sure you have all the proper I/O devices plugged in, i.e., keyboard, Ethernet cable,  HDMI monitor.)

     

    Step 3: Initial Configuration


    Picture of Initial Configuration

     

    Keep in mind, if you mess up anything along the way, just reformat your card, reload the disk image and start again. No harm no foul.

     

    Upon powering the Raspberry Pi with the SD card plugged in, you will see the system automatically listing information about the operating system and peripherals. You do not need to know what it all means for this project, but I absolutely wouldn't discourage you from reading it and learning a little bit about your Raspberry Pi for your own benefit!

     

    After the boot information is complete, you will be prompted with the raspi-config window. Here you should make the following changes:

     

    - Expand root partition so all space on the SD card is usable.
    - Set timezone.
    - Enable SSH server (found in the Advanced Options)
    - Disable boot to desktop, we want to configure this program using only the terminal environment.
    - Update your Raspberry Pi (found in the Advanced Options)
    - Reboot your Raspberry Pi at this time.

     

    Use the following code to reboot your Raspberry Pi:

     

    sudo reboot

     

    * I also do not recommend overclocking your Pi for this project, the default setting works perfectly and overclocking will reduce the overall lifetime of the hardware. In addition, to get to this window any time after the initial configuration, use the following command: sudo raspi-config

     

    Step 4: SSH set up

    Picture of SSH set up

     

    Now you will be able to ssh into your Pi so you can work on it from another computer if you would like. Once the Raspberry Pi reboots, it will prompt you for login information. Where it says "raspberrypi login: " type the default username which is pi and hit enter. Where it says "password: " type the default password which is raspberry

     

    *when typing the password, no characters will be displayed. Don't get freaked out and think your keyboard stopped working. Just type out the password as you normally would and hit enter when you are done. I promise it is receiving your input!

     

    At this point, find the IP address of your raspberry pi with the following command:

     

    ifconfig

     

    In the second line of the output you will see "inet addr: " followed by a number to the effect of 192.168.1.1 (yours will be slightly different, but you get the idea). Write this number down and bring up your SSH client. For this example I am using an application called Putty as my SSH client. Type the IP address that you wrote down from the ifconfig step into the text field that says "Host Name (or IP address)"

     

    It will prompt you for login information, this will be the same as before. Username is pi and the password is raspberry

     

    Once logged in, it is a good security practice to change the default password. Change your password with the following command:

     

    sudo passwd pi

     

    Run the following commands to ensure your OS is up to date (hit enter after each and wait until one runs to completion before starting another):

     

    sudo apt-get update
    sudo apt-get upgrade

     

    Step 5: Installing Apache


    Picture of Installing Apache

     

     

    itworks.png

     

    To install Apache and PHP, use the following command:

     

    sudo apt-get install apache2 php5 libapache2-mod-php5

     

    You will be prompted if you would like to continue, type y for yes and hit enter to continue. This process may take a few minutes.

     

    If you get any errors, run the following commands:

     

    sudo groupadd www-data
    sudo usermod -g www-data www-data

     

    Restart Apache with the following command:

     

    sudo service apache2 restart

     

    Now go to your web browser of choice and type the Raspberry Pi's IP address into the URL bar. (if you cannot remember the IP address, use the ifconfigcommand from earlier in this tutorial.

     

    You should see a web page that says "It works!" like the picture above:

     

    Step 6: Install MySQL


    Picture of Install MySQL

     

    root.png

     

    Install MySQL with the following command:

     

    sudo apt-get install mysql-server mysql-client php5-mysql

     

    You will be asked if you want to continue, type y for yes and hit enter to continue.

     

    During the installation, you will be prompted to set a new password for the MySQL root user.  Type a password of your choice, confirm the password again to continue the installation.

     

    Step 7: Install FTP


    Picture of Install FTP

     

    Install FTP to allow transferring files to and from your Raspberry Pi.

     

    First we have to take ownership of the web root. To do this, use the following command:

     

    sudo chown -R pi /var/www

     

    Next, install vsftpd with the following command:

     

    sudo apt-get install vsftpd

     

    Now we can begin the configuration process. First have to edit the vsftpd.config file. To edit the file use the following command:

     

    sudo nano /etc/vsftpd.conf

     

    Find and edit the following lines as specified:

     

    Change anonymous_enable=YES to anonymous_enable=NO,
    Uncomment local_enable=YES
    Uncomment write_enable=YES
    then go to the bottom of the file and add force_dot_files=YES

     

    *to uncomment, remove the pound sign (#) in front of the specified line

     

    exit the editing interface by pressing ctrl+X, type y to confirm the changes and press enter to save the file path.

     

    Restart the FTP service with the following command:

     

    sudo service vsftpd restart

     

    Step 8: Finalization


    Picture of Finalization

     

    Change the root password of your Raspberry Pi with the following command:

     

    sudo passwd root

     

    Add the user root as a mod with the following command:

     

    sudo usermod -L root

     

    At this point, your server should be up and running and you should be able to transfer files through FTP by using your servers IP address and connecting using port 21.

     

    I will go into detail about how I added an HTML resume to my Pi when I have another spare moment, but for now you all can at least have all the proper components installed on your machines to start exploring the possibilities on your own!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube