Skip to content

Instantly share code, notes, and snippets.

@robert-sh
Last active May 17, 2017 20:49
Show Gist options
  • Save robert-sh/b39ff1a20f80580436567791bec7eb6a to your computer and use it in GitHub Desktop.
Save robert-sh/b39ff1a20f80580436567791bec7eb6a to your computer and use it in GitHub Desktop.
AWS CentOS 7 ZenCart installation notes

Zen Cart on CentOS 7 / AWS notes

AWS AMI instance setup

Setting up the AWS instance:

  1. In EC2 Management Console, launch a new instance:

  2. Use AWS ami CentOS 7 (x86_64) - with Updates HVM

  3. Choose Instance Type - General purpose - t2.micro

  4. Configure Instance Details - use defaults

  5. Tags Ad tag: Name: qa-rpp-test-20170516-002

  6. Security Enable ports:

    • SSH
    • HTTP
    • HTTPS
  7. Review Instance Launch Choose existing keypair - example: robert-sandbox-keypair

Server Setup

Connecting to instance

Under AWS EC2 Dashboard, select instance and Description tab and note the following:

  • Public DNS (IPv4) - ec2-52-43-45-191.us-west-2.compute.amazonaws.com
  • IPv4 Public IP - 52.43.45.191

Connect using ssh:

ssh -A -i ~/Desktop/kp/robert-sandbox-keypair.pem [email protected]

Setup / Update CentOS 7

Update using yum:

sudo setenforce 0
sudo yum -y install epel-release
sudo yum -y update

Install & Configure Database

Install mariadb:

sudo yum -y install mariadb-server

sudo systemctl enable mariadb
sudo systemctl start mariadb

Configure mariadb:

sudo mysql_secure_installation
  • Set root password? [Y/n] - y
  • New password: -
  • Re-enter new password: -
  • Remove anoymous users? [Y/n] - y
  • Disallow root login remotely? [Y/n] - y
  • Reload privilege tables now? [Y/n] - y

Create database/user:

mysql -u root -p
CREATE DATABASE zencart;
CREATE USER 'zencartuser'@'localhost' IDENTIFIED BY '${password}';
GRANT ALL PRIVILEGES ON zencart.* TO 'zencartuser'@'localhost';
FLUSH PRIVILEGES;
  • database - zencart
  • user - zencartuser
  • password - ${zencartuser_password}
sudo systemctl restart mariadb

Install PHP & Tools

sudo yum -y install php php-mysql php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap php-mcrypt php-curl php-xcache curl zlib wget unzip

Install Apache/httpd

sudo yum -y install httpd openssl mod_ssl
 
sudo systemctl enable httpd.service
sudo systemctl restart httpd.service

Test php/httpd setup:

echo "<?php phpinfo(); ?>" >> /var/www/html/phpinfo.php

Download/unpack Zencart

wget https://downloads.sourceforge.net/project/zencart/CURRENT%20-%20Zen%20Cart%201.5.x%20Series/zen-cart-v1.5.5e-03082017.zip
unzip zen-cart-v1.5.5e-03082017.zip
mv zen-cart-v1.5.5e-03082017 /var/www/html/zencart

Set permissions:

chown -R apache: /var/www/html/zencart

sudo chmod 777 /var/www/html/zencart/logs
sudo chmod 777 /var/www/html/zencart/cache
sudo chmod -R 777 /var/www/html/zencart/images
sudo chmod -R 777 /var/www/html/zencart/includes/languages
sudo chmod 777 /var/www/html/zencart/media
sudo chmod 777 /var/www/html/zencart/pub
sudo chmod 777 /var/www/html/zencart/admin/backups
sudo chmod 777 /var/www/html/zencart/admin/images/graphs

Zen Cart setup/configuration (zc_install)

http://ec2-52-43-45-191.us-west-2.compute.amazonaws.com/zencart/zc_install/index.php

System Inspection

Should be no warnings.

Click on Continue

System Setup

Click Continue

Database Setup

Make the following changes:

  • Database User: zencartuser
  • Database Password: ${zencartuser_password}
  • Database Name: zencart
  • Store Prefix: zen_
Basic Settings
  Database Host: localhost
  Database User: zencartuser
  Database Password: ${zencartuser_password}
  Database Name: zencart
Demo Data
  Load Demo Data - unchecked
Advanced Settings
  Database Character Set: UTF8 (default setting)
  Store Prefix: zen_
  SQL Cache Method: No SQL Caching

Click Continue

Observe Database Load Progress

Admin Setup

Enter in the following:

Admin User Settings
  Admin Superuser Name: zencartadmin
  Admin Superuser Email: [email protected]
  Retype email: [email protected]

Save the following:

  • Admin password: ${generated_admin_password}
  • Admin Directory: ${generated_admin_directory}

Click Continue

Finished

Observe instructions - remove zc_install diretory

Links:

Post-install

Remove zc_install

sudo rm -rf /var/www/htm/zencart/zc_install/

Zen Cart Admin Login & Setup

Go to admin directory:

Change Password:

  • Old Password: ${generated_admin_password}
  • New Password: ${new_admin_password}
  • New Password Again: ${new_admin_password}

Click update

Initial Setup Wizard

  • Your Store Name: Store-name
  • Store Ownder: Owner-name
  • Store Ownder Email Address: [email protected]
  • Store Country: United States
  • Store Zone: California
  • Store Address:
    • Store Name
    • Address
    • Country
    • Phone

Click update

References

AWS console:

Links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment