AndyL Posted January 26, 2007 Share Posted January 26, 2007 I figured since I just muddled my way through this (took me 3 days and numerous re-installs) I'd post the details here for my (and other's) future reference. This is based on a 'clean' install - I'm no linux expert - no I can't help you with the specific install details; google is great - all the answers can be found in a rather roundabout way there. This is based on a basic pentium computer; no I can't help you configure to your specific system... You'll have to figure that out yourself... *** Downloading / Installing *** First off - Downloading from hell... Expect better part of a day downloading / burning cd's. - Obviously you'll need osCommerce 2.2 (for linux) from oscommerce.com, You're also going to need the register globals v1.5 patch (found in the contributions section) again - grab the tar ball. (Burn these either to a cdrom - or (what I chose) put them on a flash/jump/usb pen drive). These are luckily small. From http://www.slackware.com/ in get slack - you're going to have to download two iso CD images. slackware-11.0-install-d1.iso and slackware-11.0-install-d2.iso each is close to 700mb. While you're downloading - please take the time to read install directions. Obviously there are other choices for installs (like dvds net install etc - you'll have to choose what's best for you) Then you need to burn those images to disk - the install directions from slackware specifically tell you how to do this. Please read them - basic answer nero smart start, copy and backup , burn image to disk. Then following slackware's instructions - partition as needed, configure as needed, do a full install. When you start configuration at the end of the install - ensure you've chosen to start apache, php, mysql, ftpd, ssl Add a user - again follow slackware instructions (group wise - give it everything but wheel and adm) - you don't use the root account except when absolutely necessary. I'm not a security expert - this is what I did and it works; I'm sure there are others out there who'll tell us more specifically what groups they don't need. Configure your network as needed... I can't help you with this. install drivers run netconfig (from root account). *** End of downloading / Installing *** *** PHP *** Out of the box, php doesn't work you're going to have to edit /etc/apache/httpd.conf (google search, learn how to use joe, pico or (Or if you're crazy like me jove)) in theory you can just un-comment (remove the #) the php_module line at the bottom of the httpd.conf file - but that didn't work for me... So do it this way In httpd.conf Look for a long list of LoadModule 's at the bottom of that add: LoadModule php4_module libexec/apache/libphp4.so The next section of httpd.conf has a ton of AddModules - add: AddModule mod_php4.c A little lower down you'll see some of these <IfModule blahblah.c>'s at the top of them, add this code: # This next section adds handlers for .php file. <IfModule mod_php4.c> AddType application/x-httpd-php .php AddType application/x-httpd-php .phtml AddType application/x-httpd-php-source .phps </IfModule> Security note - that second last line - with .phps at the end - some advise not to comment it out as it could be a security issue... Not sure I follow the reasoning - but be aware of it - please do your own research from the command line (as root) apachectl restart - this tells apache (your web server) to restart; reloading with php enabled. *** End of PHP *** *** MySQL *** This one's a royal pain in the... I ended up rebooting / reinstalling 3-4 times to get this up and running correctly, due to various problems & typos and unclear instructions found online. You'll be doing this from your root account - but follow along closely... To avoid the headaches I had - I'm going to set up some details in advance... The mysql password for root will be: rootmysqlpwd The store's account on the system - is called: store The Store's mysql password: storemysqlpwd The database will be called: oscommerce If I write here: values('oscommerce','store',password('rootmysqlpwd')); DO NOT leave out any characters - they are needed just replace the names / values as needed. First - initialize directories etc - with the command: mysql_install_db Next - start up the server - with the command: mysqld_safe --user=mysql & Next - Lets setup this server to be secure - follow the prompts, set the password for the root account on mysql, the rest just hit enter. mysql_secure_installation *** at this point - your servers up and running and mostly secured - now let's get it useable *** From your root command line again: mysql -u root -p <asks you for password> rootmysqlpwd Now you get a new prompt: mysql> I'm going to copy / paste instructions with that in - if it's at the start of a line - DONT TYPE IT! mysql> use mysql; It will tell you database has been changed - now you're editing users/permisions First - lets give localhost (anyone on your computer) access: mysql> insert into -> host(host,db,Select_priv, Insert_priv, Update_priv, -> Delete_priv, Create_priv, Drop_priv) -> values('localhost','%','Y','Y','Y','Y','Y','Y'); *** do not enter the "->" 's - just showing the prompt that mysql will give you after you hit return *** Now lets setup an account for your store: mysql> insert into -> user (host, user, password) -> values('localhost','store',password('storemysqlpwd')); Now let's give the store's account access to the database: mysql> insert into -> db (host,db,user,Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv) -> values ('localhost','oscommerce','store','Y','Y','Y','Y','Y','Y'); Now let's get out before we really screw something up (again): mysql> quit You'll be back to your shell prompt. Let's make that mythical database oscommerce - we gave the store access to: mysqladmin -u root -p create oscommerce <again - will ask you for password> rootmysqlpwd Almost there, time to tell the server to restart - so it updates its passwords, databases and access controls: mysqladmin -u root -p reload *** End of MySQL *** *** Start osCommerce *** Now, remember those oscommerce files? Insert your disk / flash drive / whatever... Mount it (for my flashdrive command is): mount /dev/sda1 /mnt/flash Personally - I decided as this is a test machine - I'd put oscommerce into a sub directory so it's actually at http://127.0.0.1/store/index.php - pretty sure you can link (using the command ln ) that to /var/www/htdocs so it could come up as http://127.0.0.1/index.php . I'm no linux expert - and I'm sticking to what I know worked - so deal with it - or put google to good use :P cp /mnt/flash/* ~ Now you'll have the register_global and oscommerce tarballs in your home directory. While your here you need a new directory: mkdir public_html then lets unpack those files gzip -d *gz tar -xvf oscommerce8.tar tar -xvf register*.tar cd oscom* (ok I'm lazy - but I love how this works in linux!) cd catalog cp -r * ~/public_html/ (-r tells copy that you're copying files + directories maintaining file structure) Now - you've transfered the oscommerce program into your WWW directory! Halfway there... cd ~/regi* cd patch_f* cd files/catalog cp -r * ~/public_html/ cd .. cp -r admin ~/public_html/ *** End osCommerce *** Now the fun part - setting permissions... Personally for now I've got everything setup with chmod 766 - that's not correct - but without I was unable to actually setup the store using any other setting - I'll be going through later and setting them to the correct settings (more searching later). But I figured I'd post this now while all the links were still in history, and things were fresh in my brain. Now startx , load up firefox - and point it at http://127.0.0.1/store/index.php - I accept donations of single malt scotch's :thumbsup: Andy P.S. for linux wizards - feel free to comment telling me what I did wrong - what the correct permissions are etc etc etc... Link to comment Share on other sites More sharing options...
AndyL Posted January 26, 2007 Author Share Posted January 26, 2007 Well if I could edit... I'd fix a few typos - watch for that 8 that's supposed to be a * in the last section installing oscommerce ;) Super handy links if you run into troubles: http://dev.mysql.com/doc/refman/5.0/en/uni...stallation.html For MySQL issues http://www.linuxhelp.net/guides/mysql/ for setting up users/database in MySQL Most of the rest - was found in linux documentation... And in the Monstrous thread here on installing oscommerce. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.