Creating a webserver with a raspberry pi

Discussion in 'Web Server' started by RICH_S_WEB, Jul 14, 2013.

  1. RICH_S_WEB

    RICH_S_WEB New Member

    Messages:
    2
    Likes Received:
    1
    Trophy Points:
    1
    Hi,

    My ultimate aim is to learn how to design websites using PHP, MySQL, HTML and CSS.

    I want to do this as cheaply as possible. I have very limited knowledge of computers.


    1. Can someone tell me which would be the best Linux distro to use with the aim of using the raspberry pi as a webserver?

    2. Can someone tell me a step by step guide on how to get my raspberry pi up and running as a webserver and how I can upload files so that I can view any websites I've designed using PHP, MySQL, HTML and CSS?

    I've tried to use the raspian distro with php5, MySQL, lighttpd and FILE ZILLA but I couldn't upload the files to the FILE ZILLA because I didn't know the HOST to use.
    DevynCJohnson likes this.
  2. ryanvade

    ryanvade Administrator Staff Member Staff Writer

    Messages:
    910
    Likes Received:
    290
    Trophy Points:
    63
  3. Pyplate

    Pyplate New Member

    Messages:
    12
    Likes Received:
    4
    Trophy Points:
    3
    I run a web server on my Pi. I used the basic Raspbian distro with Apache.

    I don't use FTP to transfer files. Since the Pi is on my local network, I use Samba to transfer files from my laptop.
  4. MikeyD

    MikeyD Active Member

    Messages:
    184
    Likes Received:
    82
    Trophy Points:
    28
    I haven't used a raspberry pi (wanted one a while ago, saw they were 6 month back-ordered and stopped caring) but if you are looking to play around with web programming you may be better off installing and playing around on your native machine with localhost.

    Just based off of your initial post
    Its going to be a very steep learning curve if you're tackling web server setup, coding/scripting in HTML,CSS,PHP,SQL, potentially data server setup (if you're playing with MySQL. Does a Pi even have enough memory to run a data server?), and working with a new OS (Linux).

    The vast majority of programmers/admins I've spoken with will code debug and test on a separate machine than they use for hosting and this allows you to play with Apache in a more familiar format (assuming your more comfortable with Windows/OSX). I write a lot of servlets and JSP pages through Apache Tomcat and although I'm no Linux expert I'm not a newbie either, but I AM lazy and I'd rather let my IDE of choice (Eclipse or NetBeans) manage the directory structure and then just transfer over the WAR files when I'm ready to deploy.

    You can also go from newbie to pro in both HTML and CSS without even having an internet connection (I wrote most of my first HTML pages in notepad.) Here are a couple good tutorial websites to get started:
    http://www.htmldog.com/guides/
    http://www.w3schools.com/
  5. arochester

    arochester Active Member

    Messages:
    620
    Likes Received:
    193
    Trophy Points:
    43
  6. DevynCJohnson

    DevynCJohnson Super Moderator Staff Member Staff Writer

    Messages:
    973
    Likes Received:
    857
    Trophy Points:
    93
    I would recommend Raspbian. Raspberry Pi is an excellent choice. It is very inexpensive, powerful, and stable. I own one, so I know this from experience.

    As for setting up the Raspberry Pi server, any server-setup tutorial should be sufficient. Just remember one important thing - the Ethernet on the RPi is directly connected to the USB system through the motherboard. So, if you have power-consuming USB devices, this will take power from the Ethernet.

    Although most users do not practice this idea, it may be wise to get a heat sink for the RPi if this is a server that runs 24/7. If this server is for self-teaching/practicing, then you should be fine to not get a heat sink.
  7. Pyplate

    Pyplate New Member

    Messages:
    12
    Likes Received:
    4
    Trophy Points:
    3
    I've found that the learning curve with a Raspberry Pi is not much steeper than with a PC. There's a very enthusiastic community of Raspberry Pi users, so getting help and advice is easy.

    You might find that MySQL is a bit slow on a Pi, but it is usable. If you're working with small test databases, you probably won't have any problems. If you install Wordpress then things slow down a little, but there a caching plugins that reduce speed problems.
    DevynCJohnson likes this.
  8. DevynCJohnson

    DevynCJohnson Super Moderator Staff Member Staff Writer

    Messages:
    973
    Likes Received:
    857
    Trophy Points:
    93
    I agree with Pyplate.

    You can speed up MySQL and Wordpress by making an RPi cluster or overclocking the RPi (be careful with this last option).

Share This Page