-
-
Save jaymecd/4475465 to your computer and use it in GitHub Desktop.
Install Magento 1.x with sample data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
db_host=localhost | |
db_name=magento | |
db_user=root | |
db_pass=root | |
if [ ! -f ~/Downloads/magento-1.7.0.2.tar.gz ]; then | |
wget http://www.magentocommerce.com/downloads/assets/1.7.0.2/magento-1.7.0.2.tar.gz -O ~/Downloads/magento-1.7.0.2.tar.gz | |
wget http://www.magentocommerce.com/downloads/assets/1.6.1.0/magento-sample-data-1.6.1.0.tar.gz -O ~/Downloads/magento-sample-data-1.6.1.0.tar.gz | |
fi | |
rm -rf MagentoTest | |
mkdir MagentoTest | |
cd MagentoTest | |
tar -zxf ~/Downloads/magento-1.7.0.2.tar.gz | |
tar -zxf ~/Downloads/magento-sample-data-1.6.1.0.tar.gz | |
mv magento-sample-data-1.6.1.0/media/* magento/media/ | |
mv magento-sample-data-1.6.1.0/magento_sample_data_for_1.6.1.0.sql magento/data.sql | |
mv magento/* magento/.htaccess . | |
chmod g+w var media includes -R | |
chmod 754 mage | |
mysql -h $db_host -u $db_user -p$db_pass -e "DROP SCHEMA IF EXISTS $db_name; CREATE SCHEMA $db_name DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;" | |
mysql -h $db_host -u $db_user -p$db_pass $db_name < data.sql | |
./mage mage-setup . | |
rm -rf magento/ | |
rm -rf magento-sample-data-1.6.1.0/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment