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 😛

Go to the forums and post your results!

CLICK HERE