# install webserver http://www.panticz.de/install_webserver # install email http://www.panticz.de/install-nullmailer # OPTIONAL, remove previous magento instalation echo "drop database magento" | mysql -u root -pterceS rm /var/www/.htaccess* rm -r /var/www/* # configure database echo "CREATE DATABASE magento;" | mysql -u root -pterceS echo "GRANT all ON magento.* TO 'magento'@'localhost' IDENTIFIED BY 'magento';" | mysql -u root -pterceS # install magento URL=http://www.magentocommerce.com/downloads/assets/ URL=http://www.magentocommerce.com/downloads/assets/ URL=http://www.magentocommerce.com/downloads/assets/ wget ${URL} -P /root tar -xjf /root/magento- -C /var/www/ # move magento to server root dir mv /var/www/magento/* /var/www/magento/.htaccess* /var/www/ rm -r /var/www/magento/ # install demo data URL=http://www.magentocommerce.com/downloads/assets/ wget ${URL} -O /tmp/magento-sample-data.tar.gz tar -zxf /tmp/magento-sample-data.tar.gz -C /tmp mysql -u magento -pmagento magento < /tmp/magento-sample-data- cp -a /tmp/magento-sample-data-* /var/www/media/ # set permissions chmod o+w /var/www/var /var/www/var/.htaccess /var/www/app/etc chmod -R o+w /var/www/media # optional, change file owner chown www-data:www-data -R /var/www chmod +x /var/www/mage # run pre install scripts (do we need this?) (BROKEN) #export MAGE_PEAR_PHP_BIN=/usr/local/bin/php5 export MAGE_PEAR_PHP_BIN=/usr/bin/php5 ./pear mage-setup . ./pear install magento-core/Mage_All_Latest-stable cd /var/www chmod +x mage ./mage mage-setup . # optional configure php memory limit (DEP) cat <> php.ini memory_limit = 128M EOF # optional configure php version (DEP) cat <> .htaccess AddType x-mapp-php5 .php AddHandler x-mapp-php5 .php EOF # install from command line php -f install.php -- \ --license_agreement_accepted "yes" \ --locale "de_DE" \ --timezone "Europe/Berlin" \ --default_currency "EUR" \ --db_host "localhost" \ --db_name "magento" \ --db_user "magento" \ --db_pass "magento" \ --url "" \ --skip_url_validation "yes" \ --use_rewrites "yes" \ --use_secure "yes" \ --secure_base_url "" \ --use_secure_admin "yes" \ --admin_firstname "admin" \ --admin_lastname "admin" \ --admin_email "admin@exaple.com" \ --admin_username "admin" \ --admin_password "pass1234" # # OPTIONAL # # install mailer http://www.panticz.de/install-nullmailer # install php accelator http://www.panticz.de/install-php-apc # install magento in a sub directory chmod o+w /var/www/magento/var /var/www/magento/var/.htaccess /var/www/magento/app/etc chmod -R o+w /var/www/magento/media find /var/www/magento -type d -exec chmod 777 {} \; # create goto page cat < /var/www/goto.html Magento EOF