Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2006
    Posts
    20
    Plugin Contributions
    0

    Default Ubuntu Dapper Install howto

    Hi,

    I want to go through and install zen-cart on a ubuntu dapper server, but wanted to document the whole install specific to ubuntu. Im doing this for my own sanity, but also so anyone can just go through this.
    This will create a ssl enabled site without a CA certificate - good for testing. i think it gives you a months usage, if you need longer type "sudo apache2-ssl-certificate --force"

    Whats the best permissions for after install? or are the pre-install ones fine?

    This is what i have for the documentation so far, could you check this and let me know of any errors or additions required:

    This gets you up to the point of logging in to the server and configuring it from there.

    Install ubuntu dapper server with LAMP stack
    Perform updates (sudo apt-get update) (sudo apt-get upgrade)
    make sure server is only contactable by the person installing
    edit hosts to make sure FQDN is correct - second line needs your ip
    sudo vi /etc/hosts
    127.0.0.1 localhost.localdomain localhost
    192.168.0.100 server1.example.com server1

    install some basic apache security measures
    apt-get install libapache2-mod-security
    a2enmod mod-security
    /etc/init.d/apache2 force-reload

    NB: register globals = off & php safe mode = off are set in ubuntu dapper already
    Install openssh (sudo apt-get install openssh-server)
    instal ntpdate to ensure servers time is right and sync time
    sudo apt-get install ntp ntpdate
    sudo ntpdate uk.pool.ntp.org (if in uk)
    using a pc with web browser download zencart - might be worth having a zencart-latest-full.tar.gz so it can be scripted
    extract zencart zip file.
    using sftp client of choice, copy zen cart into home directory
    remove ssh - for security reasons - only if possible
    sudo apt-get remove openssh-sever
    connect directly into server
    Set mysql password (mysqladmin -u root password newrootsqlpassword) (mysqladmin -u root -p -h localhost password newrootsqlpassword)
    create zencart database & user
    mysql -u root -p
    mysql> CREATE DATABASE zencart;
    mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON zencart.* TO 'yourusername'@'localhost' IDENTIFIED BY 'yourpassword';
    mysql> \q
    cd into zencart directory
    move zencart to /var/www (sudo mv * /var/www) (or have this in a sub-directory - your site, your call)
    cd /var/www
    set pre-install permissions & create configure.php files

    sudo chmod -R 777 ./cache
    sudo chmod -R 777 ./pub
    sudo chmod -R 777 ./images
    sudo chmod -R 777 ./includes/languages/english/html_includes
    sudo chmod -R 777 ./media
    sudo chmod -R 777 ./pub
    sudo chmod -R 777 ./admin/backups
    sudo chmod -R 777 ./admin/images/graphs
    sudo touch ./includes/configure.php
    sudo touch ./admin/includes/configure.php
    sudo chmod 777 ./includes/configure.php
    sudo chmod 777 ./admin/includes/configure.php

    enable apache ssl & port 443
    sudo a2enmod ssl
    sudo vi /etc/apache2/ports.conf - add a second line with "Listen 443" without quotes
    sudo /etc/init.d/apache2 force-reload

    The next step will ask you a few questions about the site:
    apache2-ssl-certificate

    sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/site-ssl
    sudo vi /etc/apache2/sites-available/site-ssl
    change NameVirtualHost * to NameVirtualHost *:443
    change <VirtualHost *> to <VirtualHost *:443>
    add the below before </VirtualHost>
    SSLEngine on
    SSLCertificateFile /etc/apache2/ssl/apache.pem
    SSLProtocol all
    SSLCipherSuite HIGH:MEDIUM
    sudo a2ensite site-ssl
    sudo /etc/init.d/apache2 restart

    Post Install
    delete zc_install
    sudo rm -r zc_install
    set /includes/configure.php & admin/includes/configure.php as read only
    sudo chmod 444 ./includes/configure.php
    sudo chmod 444 ./admin/includes/configure.php
    The next few steps make it just a little bit harder to detect what your running
    restrict the apache2 response in apache.conf, add
    ServerSignature Off
    ServerTokens ProductOnly
    change expose_php=On in php.ini to:
    expose_php=Off

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Ubuntu Dapper Install howto

    Here's a couple guides for installing an older version of Zen Cart to a Red Hat server:
    http://www.zen-cart.com/archived_con..._hat_linux.pdf
    or Mandrake:
    http://www.zen-cart.com/archived_con...rake_linux.pdf

    you might glean a few extra tips from them.

    You asked about what the right permissions are post-install. Defaults of folders=755 and files=644 are fine for most files, depending on your needs.
    You may also consider this security article (which is also in the /docs folder of your Zen Cart ZIP contents):
    http://www.zen-cart.com/wiki/index.p...ecommendations
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3

    Default Re: Ubuntu Dapper Install howto

    Quote Originally Posted by brightidea
    move zencart to /var/www (sudo mv * /var/www) (or have this in a sub-directory - your site, your call)
    cd /var/www
    Probably not the wisest of ideas, the Breezy->Dapper upgrade path had a post-install issue (technically not a bug that should happen all the time, but one can't be too careful) that overwrote the /var/www/ directory instead of /var/www/apache2-default one, nuking whatever was in the parent directory automatically.

    A better solution might be to make a copy of /etc/apache2/sites-available/default, call it zencart and then modify it to point to the actual directory instead, then just change the symlinks in sites-enabled/ and reload apache.

    Nice work otherwise, by the way.

    Paul

  4. #4
    Join Date
    Aug 2006
    Posts
    20
    Plugin Contributions
    0

    Default Re: Ubuntu Dapper Install howto

    Hi,

    Thanks for your replies, i will re-go over the documentation and edit acordingly.


    I had a play around with zencart this weekend, it looks really good.


    Is there any zencart hosting solutions in the UK?

    Alan

  5. #5
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Ubuntu Dapper Install howto

    there is one UK host on the Certified Hosts page (see link at top of this page).
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. v154 Blank screen when attempting to install Zen Cart in Ubuntu 14
    By AlanMason in forum Installing on a Linux/Unix Server
    Replies: 8
    Last Post: 7 Apr 2015, 04:44 PM
  2. v139h Fresh install on Ubuntu w/LAMP having cURL setup issues
    By mooseracing in forum Installing on a Linux/Unix Server
    Replies: 4
    Last Post: 8 May 2012, 06:18 AM
  3. Clean install. Own Ubuntu server. Can't login.
    By bogyi in forum General Questions
    Replies: 20
    Last Post: 30 Aug 2010, 01:29 PM
  4. ZC install Ubuntu: getting blank page /var/www/zen/zc_install
    By Adam65 in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 10 Aug 2009, 02:04 PM
  5. cannot send email - local install ubuntu box with exim as mta
    By majikins in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 19 Nov 2008, 09:17 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR