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
Bookmarks