Advertisement
Guest User

Untitled

a guest
Feb 15th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. ## Install dependencies
  4. sudo apt-get install wget unzip
  5.  
  6.  
  7. ## Install XAMPP
  8. wget https://www.apachefriends.org/xampp-files/5.5.30/xampp-linux-x64-5.5.30-6-installer.run -O xampp-installer.run
  9. sudo chmod +x xampp-installer.run
  10. sudo ./xampp-installer.run
  11. sudo /opt/lampp/lampp restart
  12. sudo sed -i "s/memory_limit.*/memory_limit=512M/" /opt/lampp/etc/php.ini
  13.  
  14.  
  15. ## Download Magento
  16. # wget http://.../magento-1.8.1.0-2015-02-10-10-06-27.zip -O magento.zip
  17. 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
  18.  
  19.  
  20. ## Install Magento
  21. sudo unzip -a magento.zip -d /opt/lampp/htdocs/
  22. unzip -a magento-sample-data.zip
  23. mv magento-sample-data-1.6.1.0/media/catalog/ /opt/lampp/htdocs/magento/media/
  24. sudo chown -R www-data /opt/lampp/htdocs/magento/
  25. sudo find /opt/lampp/htdocs/magento/ -type d -exec chmod 700 {} \;
  26. sudo find /opt/lampp/htdocs/magento/ -type f -exec chmod 600 {} \;
  27. sudo chmod 777 -R /opt/lampp/htdocs/magento/
  28.  
  29.  
  30. ## Create magento database, magento user and import sample-data
  31. /opt/lampp/bin/mysql -u root -e "CREATE DATABASE magento"
  32. /opt/lampp/bin/mysql -u root -e "CREATE USER 'magento'@'localhost' IDENTIFIED BY 'magento'"
  33. /opt/lampp/bin/mysql -u root -e "GRANT ALL PRIVILEGES ON magento.* TO 'magento'@'localhost'"
  34. /opt/lampp/bin/mysql -u root -e "FLUSH PRIVILEGES"
  35. /opt/lampp/bin/mysql -u root magento < magento-sample-data-1.6.1.0/magento_sample_data_for_1.6.1.0.sql
  36.  
  37.  
  38. # Removing files
  39. rm xampp-installer.run magento.zip magento-sample-data.zip -rf magento-sample-data-1.6.1.0/
  40.  
  41.  
  42. echo "MySQL user created."
  43. echo "Username: magento"
  44. echo "Password: magento"
  45.  
  46. echo "Installation finished!"
  47. echo "Go to http://localhost/magento and configure your store."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement