Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 4194  / 1 Year ago, sun, february 19, 2023, 2:48:56

Recently I've come across the osCommerce, an open-source e-commerce project, and I'd like to try it. Is it packaged in the repository (like Wordpress)? If not, how do I manually install and use it?


More From » webserver

 Answers
6

osCommerce requires PHP and MySQL, in other words, a LAMP stack (Linux (operating system), Apache HTTP Server, MySQL (database software) and PHP). osCommerce need only to be copied to the document root, /var/www/.



Further, we need to create a database and user in MySQL for osCommerce to use.



Install LAMP and osCommerce



sudo tasksel install lamp-server


Now you need to download and "install" osCommerce (get the latest download URL @ osCommerce):



wget http://www.oscommerce.com/get/8 #this is osCommerce 3.0.2 download as of 21/11/2011
unzip oscommerce-3.0.2.zip
sudo cp oscommerce-3.0.2/oscommerce/ /var/www/


In order to avoid permission issues, the above commands downloads to the current shell, unzips and copies osCommerce to /var/www/. Never unzip it directly or move the files to the document root if you don't know the necessary permissions required for a web application to function properly.



osCommerce will now be accessible at http://ipaddress/osommerce/, where ipaddress is the IP address or the domain of your server. If you're installing osCommerce on the system you are currently on, you can replace ipaddress with localhost or 127.0.0.1.



Browsing to the osCommerce page will trigger the initial setup and ask for the details of MySQL database it will use and administrator user set up.





Create a MySQL database



First, you should create a MySQL user for osCommerce to use. It's bad practise to use the root user/pass (setup during LAMP installation) for a web application.



In a shell on the machine with the MySQL on it, do:



mysql -u root -p


Enter the root password you previously specified. This gets you a prompt which has full access to your MySQL server.



Now, pick a database name - it doesn't matter what it is really so long as it's unique on the MySQL server (to see existing ones, SHOW DATABASES;)



CREATE DATABASE dbname;


For example, replacing dbname can be replaced with with oscommerce.



Now you have to give a new user access to that database. Pick a username and password (the username can be oscommerce again, but make a secure password) - replace dbname with the database name (in this example, oscommerce):



GRANT ALL ON dbname.* TO username IDENTIFIED BY 'password';


Done. Now you have the details to put into your webform; the Database Server is just localhost or 127.0.0.1, assuming the webserver is the same machine as the MySQL server, the Username and Password are the ones just created, and the Database Name is whatever you replaced dbname with. Port can be left empty.



Reference




[#41935] Monday, February 20, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ongdiligenc

Total Points: 452
Total Questions: 111
Total Answers: 107

Location: Ukraine
Member since Sun, Dec 13, 2020
3 Years ago
ongdiligenc questions
Wed, Apr 13, 22, 10:34, 2 Years ago
Tue, Jun 7, 22, 00:54, 2 Years ago
Sat, Aug 7, 21, 00:37, 3 Years ago
Sat, May 22, 21, 03:06, 3 Years ago
Tue, Mar 1, 22, 10:05, 2 Years ago
;