Introduction: How to Use Raspberry Pi As a Server
The main reason behind the incredible popularity of Raspberry Pi is its usefulness. The small computer can be used for a number of fun projects that not only satisfy certain needs but also are fantastic educational tools for people of all ages. One of the most popular things to do with the Pi is to turn it into a capable home server. Such server can host a website, give you an easy access to your music and video files, or let you share a printer between different computers. The whole thing can be finished in less than a day for a very low cost.
Why Raspberry Pi?
The price of the Raspberry Pi 2 B or B+ is hard to beat. For around $30, you get to enjoy the best raspberry pi 3 starter kit with built in WiFi, Bluetooth, fast Ethernet connection, full-sized USB ports, HDMI output, and a handful of GPIO pins that greatly extend the scope of what can be accomplished with this device.
What’s more, the unit consumes only a very little power and produces absolutely no noise at all. You won’t have to worry about your electricity bill skyrocketing or problems falling asleep due to high fan noise.
Finally, we cannot forget to mention the fantastic community of enthusiastic users. Pi owners are always very keen to share their projects and inventions with others, and you will never have a problem getting great answers to your questions.
What You’ll Need
Besides the Pi itself, you will also need a class 10 SD card for an operating system, 5V/2A power supply (a quality micro-USB smartphone charger is a great option), and a way to interact with the Pi. You can either plug in mouse, keyboard, and a monitor or use SSH for remote control.
Optionally, it’s not a bad idea to put the Raspberry Pi into a case to prevent any damage from occurring, and you can also think about buying an external hard drive to host all your media files.
Step 1: Install an Operating System
The first thing to do is to install an operating system. Beginners are encouraged to use NOOBS, which is a handy utility that will one of several operating systems for you.
Head over to the Downloads page and download the appropriate file. Simply copy the content of the file to your SD card, insert it into the Raspberry Pi, and follow the instructions. We strongly recommend you to install Raspbian. It’s well optimized, easy-to-use, and compatible with most tutorials out there.
Step 2: Configure Internet Access
The simplest way how to connect to the Internet is using a wired network. Just plug an Ethernet cable leading from a router to your Pi and you are good to go.
Of course, this may not be the most practical solution. To connect via Wi-Fi, you need to purchase a compatible adapter and connect to your home network. But using the raspberry pi 3, there is no need of any wifi adapter.
Step 3: Install Apache and Change the Default Page
Apache is the world's most used web server software and installing apache on your Pi takes just a few minutes. All you need to do is follow the official instructions.
By default, Apache will display the content of a HTML file located at /var/www/html/index.html. You can edit this file directly, but it may be more convenient to change its location to, for example, your home folder. Once again, the official tutorial has you covered.