This guide is built for those looking for a linux WPKG host that can be updated via http. The setup was performed on Suse 11.2 with Gnome WM though this should be similar for most other up-to-date distributions. Feel free to tack on any pointers for others in the comments. I will not cover all the basics of linux in this guide so be prepared!
Download and Extract WPKG and WPKGExpress Packages
First, start off by downloading WPKG and wpkgexpress. I used WPKG v1.1.2 and wpkgexpress v1.0-r12. Extract both files. I did so in my users home download directory (this is just an example, feel free to place whereever!).
tar -jxvf WPKG-1.1.2.tar.bz2 mkdir express mv wpkgexpress_v1.0-r12.tar.gz ./express tar -zxvf wpkgexpress_v1.0-r12.tar.gz
When complete, share the WPKG directory. Below are screenshots of how to do so using Nautilus. Right click WPKG-1.1.2 to get to the sharing options, click Share this folder and hit Create Share. If it denies you sharing, you will need to enter get to the Samba Configuration (Yast -> Samba Server -> Shares Tab) and check “Allow Users to Share Their Directories”.
Support Software Installation
Onto the software installation for supporting wpkgexpress. Open up the software manager and start shopping for the following:
apache2-mod_php5 (not installed by default as a dependency for apache2!)
If you are using another operating system or version, ensure you have PCRE installed (a quick search in your manager should suffice).
Before continuing, ensure your apache is working. If not, troubleshoot (out of scope here but google always helps!). To do so, enter System Services (Yast), enter expert mode, and click apache2. It can then be started with the drop down in the lower left (“Start/Stop/Refresh”). You can also apply it to start at specific runlevels (I used 3 and 5). Hit OK. Try browsing to http://localhost and see if you get something other than the basic “Server not found” error. Apache might complain that there is no file to serve to you, but that means it is at least functioning as it should.
WPKGExpress Web Setup
Time to get the wpkgexpress files served by apache. Unfortunately this isn’t as easy as dropping the files into htdocs. Lets start with that though. Enter the directory with your extracted wpkgexpress files and do the following (adjust to your needs, folders may not be the same for you)mv * /srv/www/htdocs/ mv .htaccess /srv/www/htdocs/
Next, looking at the common issues posted on the wpkgexpress website. If you now goto http://localhost/installer and you see “404 Not Found” chances are you’re going to need to follow this document, as will I. The below instructs how to resolve this issue.
Open up and modify /etc/apache2/default-server.conf as root and edit your file to look like mine below. Simply put, AllowOverride needs to be set to All and Options needs to be set to SymLinksIfOwnerMatch (or All)
Now, run a2enmod -l as root to list the current modules. If rewrite is not in that list, use a2enmod rewrite.
Restart apache2, mysql with System Services (Runlevel) in yast.
SQL Backend Setup
Load up MySQL Administrator and by Login with root (no password by default)
Change the default password seen here and apply, for security. Create a new user, I named mine wpkg. Apply a password, then right click the user (bottom left) and add a host (localhost).
Now set up a blank database for wpkgexpress and apply privledges to wpkg
WPKG Express Web Front End Setup
Check out your local website again and if all is well (so far) you should have a setup/installer window requesting information.
Edit (13/07/10, thanks Justin for feedback): If you get error “Could not open database config file for writing” you will have to adjust file permissions. I took the easy way out and did the following (If anyone knows of the exact file this is complaining about please let me know in comments):chmod -R 777 /srv/www/htdocs
If all goes well you will be treated with this screen
Integrating WPKG with WpkgExpress
Not done yet though! Not if you want to have these values be pulled from wpkg. Load up config.xml in the WPKG directory for editing. We are going to follow this from the wpkgexpress website. If you used some of the more advanced web settings when going through the two step website setup this will not fully apply to you (use the link provided)
Uncomment wpkg_base and enter in your url (I used my servers IP address), then change the web_* values to the following values in the second picture below.
All done, enjoy!
Fatal error: Call to undefined function mysql_connect()
This happens if you did not install php5-mysql! This is usually not installed by default or as a dependency to php. To test if you have this installed, make a page in your htdocs with the following code in it and view it in a browser:
<?php phpinfo() ?>
“WNetAddConnection2->A specified logon session does not exists. It may already have been terminated.”
The client set up is up to you as it is out of the scope for this guide. However I will touch up on an ‘gotcha’. If you get problems with wpkg not working/installing updates always check the event log for the error. If you run accross “WNetAddConnection2->A specified logon session does not exists. It may already have been terminated.” it is because of your wpkg client settings. Make sure the user entered in has WORKSTATION\, WORKGROUP\, or DOMAIN\ before the username!