Making a web server with Raspberry Pi!

DaLightz

See ya'll in the afterlife.
May 19, 2012
1,136
262
7513051848_9a6ef2feb8_o.jpeg



Raspberry Pi is a 35$ credit card sized "computer". It uses an SD card as it's primary storage, and boots off of Linux distro's.

Asuming you already have the RPi setup, I'm skipping the general setup bit.

I am going to teach you how to make your Raspberry Pi into a fully functioning web server! This server is know as a LAMP server.

Linux
Apache
MySQL
PHP

Let's start. first you'll want to open up your LXTerminal as shown below.
lgtdf91w.png


Then type this into your console: This will update your download respitories.
Code:
sudo apt-get update

Once that is updated, you can now start installing Apache. Do so by entering this into your console:
Code:
sudo apt-get install apache2
Let it download and when it asks you if you'd like to continue, hit y and [enter].

Now you can install MySQL. Do so by entering this into your console:
Code:
sudo apt-get install mysql-server
Same thing will happen as Apache :)

Finally, you can install PHP(5) and Perl. Do so by entering this into your console:
Code:
sudo apt-get install php5
And once that's done:
Code:
sudo apt-get install php5-mysql
^ Those are the MySQL php libraries.

Installation complete! You've transformed your Pi into a hosting machine!

Notable commands that could come in handy:
Code:
start Apache:
/etc/init.d/apache2 start
 
stop Apache:
/etc/init.d/apache2 stop
 
restart Apache:
/etc/init.d/apache2 restart
 

Heaplink

Developer & Designer
Nov 9, 2011
510
173
While this is a cheap and easy way of setting up your own web server, it is not likely to handle 1000s of concurrent connections. This isn't a stack for sites that you expect a high amount of traffic.
 

DaLightz

See ya'll in the afterlife.
May 19, 2012
1,136
262
While this is a cheap and easy way of setting up your own web server, it is not likely to handle 1000s of concurrent connections. This isn't a stack for sites that you expect a high amount of traffic.

Yeah. I'm only using this to host my portfolio. It does well. With an overclock that is.
 

Macemore

Circumcised pineapples
Aug 26, 2011
1,681
819
This is actually a good tutorial. Using a RPI as a local server is a great way to get into professional web development for a good price. Get used to using Linux, FTP and other stuff almost everyone uses for their websites.
 

Users who are viewing this thread

Top