Hacking the pogoplug. the definitive guide in progress. [PT3]
[Pt3]
GOAL:
Install the web control panel including Apache/PHP/MySQL and phpMyadmin.
THINGS YOU WILL NEED:
- Pogoplug that has been hacked from Part 2
LETS GET STARTED:
Fire up your terminal program. Where we left off is perfect for setting up the webportal.
Make sure to read the content as not all boxes are copy/paste.
Step 1:
Apache / PHP / MySQL:
Lets start by installing apache, php and mysql.
pacman -S apache php php5 php-apache mysql</strong> ## web stuff
Start Apache by running the following
rc.d start httpd ## Starts Apache
Step 2:
Setting up PHP
To setup PHP Add these lines in /etc/httpd/conf/httpd.conf
:
Place this in the “LoadModule” list anywhere after LoadModule dir_module modules/mod_dir.so
:
LoadModule php5_module modules/libphp5.so
Place this line at the end of the ‘include’ list:
Include conf/extra/php5_module.conf
Make sure that the following line is uncommented in httpd.conf in the section/(after the line)<IfModule mime_module>
:
TypesConfig conf/mime.types
Add this line in /etc/httpd/conf/mime.types
:
application/x-httpd-php php php5
Restart Apache to save changes
rc.d restart httpd
Step 3:
Configuring MySQL
Now we will configure MySQL.
Edit /etc/php/
php.ini
(this is in /usr/etc
on older systems) to uncomment the following lines (By removing ;
):
;extension=mysqli.so ;extension=mysql.so
Start MySQL
rc.d start mysqld
You may need to restart Apache
MySql should now be running,lets change the root password
mysqladmin -u root password 'password' ## replace 'password' with your password do not include (',')
Step 4:
Autostart Apache and MySQL
Finally lets add apache and MySQL to the startup.
nano /etc/rc.conf
Scroll down to the bottom to find the following lines
## BEFORE ## DAEMONS=(ntpd syslog-ng network netfs crond sshd webmin) ## AFTER ## DAEMONS=(ntpd syslog-ng network netfs crond sshd webmin httpd mysqld)
Hit control+’x’, follow by ‘y’, follow by ‘enter’.
You have now successfully installed apache php mysql.
Reboot your Pogoplug.
A longer, more in depth guide can be found HERE
** Basic Commands **
rc.d (start/restart/quit) httpd ## basic apache controls rc.d (start/restart/quit) mysqld ## basic mysql controls</pre>
In the next installment of “Hacking the POGOplug. The definitive guide. Part 4” We will look into additional web server software.
Please let me know of any questions that you may have! Also, if there are any other features in which you would like to explore!
If I helped you out consider buying me a beer 😛
you’re right!
First off, Thanks for such an awesome guide, every step went exactly as stated and there were no problems at all.
I have zero experience using lamp and very little experience with linux so if what I am asking doesn’t completely make sense, that is why. I am basically looking to accomplish the same standard functionality of stock pogo except I couldnt deal with potential consequences of having no control over read/write permissions. I am starting to think I jumped the gun because I have no idea where to start to host my external HD on a web server. Like I said I basically just want my friends and fam to be able to access my media collection, without them having ability to wipe it out remotely.
Is their a relatively easy way for me to do this once I have installed arch linux arm on my pogo? If this is possible in a basic way I think it would be a great resource for everyone that was disappointed in what pogolug really turned out to be. Thanks again for this resource and I will be checking in for any future material you post because this was top notch.
I am not 100% sure what you are trying to do. If your media collection is though your pogoplug you can use apache and map it to those specific folders, and set permission accordingly. I dont think that is what you want to do though. If its hosted on a windows computer you can use a program called HFS+ and easily set permissions and logins for real basic web interface usage. How many friends are we talking here? You could use hamachi or another VPN to allow users with credentials to access your local shares directly. Tell me what exactly you are trying to do, and on what platform and I can give you a fairly good solution hopefully. Maybe it deserves another walk though entirely. =)
Ha awesome man thanks for such quick reply and I think it may be easier for me to list my main objectives. I am using a mac btw.
I have:
-3TB external filled with movies, shows, software, books, etc.
Ideally, I would like to be able to host it in a way that would allow for the following:
-Allow access to browse/download my stuff on my hard drive to my sister, mom, and dad (who live in Cali, NY, and West Virginia respectively). They are not very tech-saavy and they run both Mac and Windows machines collectively.
-Personal access to hard drive remotely so that I can reach my stuff without carrying storage with me.
-I really dont care about being able to remotely change whats on the hard drive, I can do that directly so its more important to me that the files on the hard drive cannot be accidentally modified/deleted by my mom or dad. (Original beef I had with standard pogoplug software.)
Basically, what i picture in my head, is something similar to a private torrent tracker, except obviously instead of torrents it would just be direct download links from my hard drive. Idk if that makes sense at all but it would be great to be able to just give fam and friends an url and user/pass combo that would allow for my hosted hard drive to be accessed through a browser, anywhere that has internet connection.
Clearly I bit off more than I could chew so now I would just be happy with broad advice pointing me in the right direction in terms of what would best accomplish the things listed above. Obviously the less configuration needed on my end, the better, but I am willing to take it on as a project. The people I am trying to share with though would require any process to be relatively simple and straightforward. Thanks again and hope I was more understandable, Im a mechanical engineering major so all this technical coding stuff is pretty foreign to me. =)
You should look at FTP servers. Mac has a built-in one that you can enable (http://www.macinstruct.com/node/152), or use something like this ( http://www.maxum.com/Rumpus/ ) however it is not free. Maybe you could find a copy somewhere =P
If you go the FTP route you can point the server at your main root folder of your external HDD, and then assign different usernames and passwords for each user, or one general user that is allowed multiple simultaneous login-ins. Doing this would allow them to read and write depending on what you set in their permissions.
I have not ever used an FTP server on a MAC, but there are a few open-source softwares that would need to be compiled from the source and run in the terminal.
Let me know if this is what you were looking for.
FTP on your Mac is a very bad idea. It’s been weak for years. Read Wikipedia’s security section on FTP for more info. it’s not too user friendly either (for mom & pop).
Colin, take a look at owncloud.org. I have no idea if the pogoplug will run it well but it could be an option. It looks bad in my iPhone (scales very badly) but if you are sharing with Windows users they may not notice.
I saw it mentioned on this ALARM thread.
http://archlinuxarm.org/forum/viewtopic.php?f=29&t=2023
They also mention OPTWARE too but I don’t know what that is 😉
It couldn’t hurt to ask on the Arch forums.
I suspect there will be lots of config involved (that’s Linux IMO).
I suspect Dropbox or another web based service may cover your needs, if you can wait for it to upload.