Jump to content

Help:Raspberry pi server


Recommended Posts

Hi, 

I recently got a Raspberry Pi to accompany me in my noob adventures through the learning of PHP. However i was wondering wether it would be possible to set my raspberry pi up such that it could run 24/7 as a server which parses php that i have written on other devices. E.g. so that i could write a plain php document on a computer without php or apache installed and then send that document to the pi. The pi would then display the code on a webpage as it was intented to be seen. This would be useful as it would allow me to code in school and on other devices without having to go through the effort of installing apache
+python (i would therefor also appreciate being able to put the documents on the pi without being connected to a local network, e.g. on holiday in another country).

If it is indeed possible to do such a thing i would hugely appreciate advice/a guide as to how i could go about doing it!

Kind regards

Nub Nub Alex

Edited by Alex_noob
Link to comment
Share on other sites

This would be useful as it would allow me to code in school and on other devices without having to go through the effort of installing apache

PHP comes with a server built in (since 5.4). There is no need to install a server for development these days.

 

Having said that however, what your wanting to do is nothing new. All your doing is setting up a server, that you can upload php files to and have them processed.

 

Where exactly are you stuck?

Link to comment
Share on other sites

Raspberry Pi will run normal linux setups so all you need to do is get a distro installed and configure apache/php/mysql in order to get it to parse pages. Determine which distro you want to use and hit tutorials or forums for that distro to get instructions on how exactly to setup that software.

 

When that is done, you need to determine how exactly you want to use your raspi. Do you want to be able to carry it with out and just hook it up to any PC? Or do you want to leave it at home and just access it over the internet?

 

The first option may be a bit difficult because each computer you use will likely have different configurations/restrictions on how you might connect up your raspi. You'd need to get it configured to handle a variety of possibilities such as having to be a dhcp client, dhcp server, static network config, etc.

 

The latter option would be fairly simple, just set it up, plug it into your network somewhere and setup port forwards in your router if necessary. You may need to setup DynamicDNS in order to track the IP if you do not have a static IP assigned to you. This method wouldn't help you if you have no internet access, or for some reason your home connection goes out.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.