Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- ## Install dependencies
- sudo apt-get install wget unzip
- ## Install XAMPP
- wget https://www.apachefriends.org/xampp-files/5.5.30/xampp-linux-x64-5.5.30-6-installer.run -O xampp-installer.run
- sudo chmod +x xampp-installer.run
- sudo ./xampp-installer.run
- sudo /opt/lampp/lampp restart
- sudo sed -i "s/memory_limit.*/memory_limit=512M/" /opt/lampp/etc/php.ini
- ## Download Magento
- # wget http://.../magento-1.8.1.0-2015-02-10-10-06-27.zip -O magento.zip
- wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/menswomenswatches/magento-sample-data-1.6.1.0.zip -O magento-sample-data.zip
- ## Install Magento
- sudo unzip -a magento.zip -d /opt/lampp/htdocs/
- unzip -a magento-sample-data.zip
- mv magento-sample-data-1.6.1.0/media/catalog/ /opt/lampp/htdocs/magento/media/
- sudo chown -R www-data /opt/lampp/htdocs/magento/
- sudo find /opt/lampp/htdocs/magento/ -type d -exec chmod 700 {} \;
- sudo find /opt/lampp/htdocs/magento/ -type f -exec chmod 600 {} \;
- sudo chmod 777 -R /opt/lampp/htdocs/magento/
- ## Create magento database, magento user and import sample-data
- /opt/lampp/bin/mysql -u root -e "CREATE DATABASE magento"
- /opt/lampp/bin/mysql -u root -e "CREATE USER 'magento'@'localhost' IDENTIFIED BY 'magento'"
- /opt/lampp/bin/mysql -u root -e "GRANT ALL PRIVILEGES ON magento.* TO 'magento'@'localhost'"
- /opt/lampp/bin/mysql -u root -e "FLUSH PRIVILEGES"
- /opt/lampp/bin/mysql -u root magento < magento-sample-data-1.6.1.0/magento_sample_data_for_1.6.1.0.sql
- # Removing files
- rm xampp-installer.run magento.zip magento-sample-data.zip -rf magento-sample-data-1.6.1.0/
- echo "MySQL user created."
- echo "Username: magento"
- echo "Password: magento"
- echo "Installation finished!"
- echo "Go to http://localhost/magento and configure your store."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement