Configuration After Imaging

Install Software

Install OpenCart?, and touch up its permissions/ownerships.

mkdir OpenCart
cd OpenCart
unzip ../
mv upload/* /var/www/
cd /var/www/
chown -R www-data.www-data *
chmod 755 admin/config.php
chmod 755 config.php
chmod 755 download/
chmod 755 system/logs
chmod 755 system/cache
chmod 755 image/data
chmod 755 image/cache/
chmod 755 image/

Setup the Database

  • As root, stop the running mysql server:
    /etc/init.d/mysql stop
  • Start a mysql server with the --skip-grant-tables option, backgrounding it. This starts a version of the MYSQL server that does not care about password protection.
    mysqld_safe --skip-grant-tables &
  • Start the mysql client with the -u root option.
    mysql -u root
  • Change root's password (from all networks), and delete the opencart user.
    UPDATE mysql.user SET Password=PASSWORD('fai') WHERE User='root';
    DELETE from mysql.user WHERE User='myopencart';
  • Foreground the mysql thats running, kill it, and launch a mysql we can add a user to.
    /etc/init.d/mysql start
  • Add a myopencart user, and a myopencart database.
    mysql -u root -p
    CREATE USER 'myopencart'@'localhost' IDENTIFIED BY 'fai';
    GRANT ALL PRIVILEGES ON *.* TO 'myopencart'@'localhost' WITH GRANT OPTION;
    CREATE DATABASE myopencart;

Setup PHP

  • Open your php.ini file (at /etc/php5/apache2/php.ini) and add this command:
  • Restart Apache, to make the changes take effect.
    /etc/init.d/apache2 restart

Setup the Software

  • Open your browser, and go to /index.php on the target machine.

Step 1

  • Click the checkbox next to 'I agree to the license', and click the 'Continue' button.

Step 2

  • All the checkmarks should be green, and all the statuses should be writeable. Click the 'Continue' button.

Step 3

  • For 'User:', use the 'myopencart' username, with a password of 'fai' to match the above added user.
  • use the 'myopencart' database name, to match the above added database.
  • use a valid email address for the admin user, along with a password.

Remove Install Directory

rm -rf /var/www/install/

Make OpenCart? Visible

rm /var/www/index.html

Adding Items

  • Click on catalog->products. this brings up the 'Products' page.
  • Click on the 'Insert' button.
  • Fill in 'Product Name' in the general tab.
  • Fill in 'model number' in the data tab.
  • Hit the 'Save' button. this creates the item.
  • Now hit the 'edit' link in the 'action' column, on the right hand side of the item being edited.
  • Click the 'image' tab. hit the 'add image' button, then clik on the picture of a camera. this brings up the 'image manager'.
  • Click 'upload' to open your operating system's file select interface. select a single less than 300K jpg, to represent your item.
  • DoubleClick? an image to select it for the item. (yes, this caught me by surprise)
  • Hit 'Save' to save your item, with picture.
Last modified 10 years ago Last modified on Feb 3, 2012, 4:51:01 PM