Last active
August 29, 2015 14:24
-
-
Save ellipsonic/cbab187d120fcf1eec72 to your computer and use it in GitHub Desktop.
Magekart - app server
This file contains 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/bash | |
#Instructions to use this script | |
# | |
#chmod +x SCRIPTNAME.sh | |
# | |
#sudo ./SCRIPTNAME.sh | |
echo "###################################################################################" | |
echo "Please be Patient: Installation will start now.......and it will take some time :)" | |
echo "###################################################################################" | |
#Update the repositories | |
apt-get update | |
apt-get -y install sudo | |
apt-get -y install nano | |
sudo apt-get update | |
#Apache, Php, MySQL and required packages installation | |
sudo apt-get -y install apache2 | |
sudo apt-get -y install php5 | |
sudo apt-get -y install libapache2-mod-php5 | |
sudo apt-get -y install php5-mcrypt | |
sudo apt-get -y install php5-curl | |
sudo apt-get -y install php5-mysql | |
sudo apt-get -y install php5-gd | |
sudo apt-get -y install php5-cli | |
sudo apt-get -y install php5-dev | |
sudo apt-get -y install mysql-client | |
sudo apt-get -y install php5enmod | |
sudo apt-get -y install php5-mcrypt | |
sudo apt-get -y install curl | |
sudo apt-get -y install git | |
# Cleanup the default HTML file created by Apache | |
rm -f /usr/share/apache2/default-site/index.html | |
rm -f /var/www/index.html | |
# Git all php files | |
git clone https://github.com/ellipsonic/magekart_app.git . | |
git checkout app_server | |
clear | |
git branch | |
sleep 2s | |
chmod -R o+w media | |
chmod 755 mage | |
cd errors | |
mv local.xml.sample local.xml | |
sudo apt-get -y install php5-gd php5-mysql | |
sudo service apache2 restart | |
cd /var/www/errors | |
mv local.xml local.xml.sample | |
# Publish result | |
a2enmod rewrite | |
sudo service apache2 restart | |
#Restart all the installed services to verify that everything is installed properly | |
echo -e "\n" | |
service apache2 restart > /dev/null | |
echo -e "\n" | |
if [ $? -ne 0 ]; then | |
echo "Please Check the Install Services, There is some $(tput bold)$(tput setaf 1)Problem$(tput sgr0)" | |
else | |
echo "Installed Services run $(tput bold)$(tput setaf 2)Sucessfully$(tput sgr0)" | |
fi | |
clear | |
pubilc_ip=$(curl -s checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//') | |
sudo sed -i ''s/localhost/pubilc_ip/g'' /var/www/app/code/core/Mage/Core/Model/Config.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment