Last active
April 4, 2018 08:47
-
-
Save ellipsonic/20442722c805d9a73906 to your computer and use it in GitHub Desktop.
OrangeHRM
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 | |
php_config_file="/etc/php5/apache2/php.ini" | |
#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 | |
sudo a2enmod rewrite | |
sudo service apache2 restart | |
# cd and git clone | |
cd /var/www/html | |
rm -f /usr/share/apache2/default-site/index.html | |
rm -rf index.html | |
# Get into /var/www/html and pull php files | |
cd /var/www/ | |
chmod 777 -R html/ | |
cd html | |
# wget http://liquidtelecom.dl.sourceforge.net/project/orangehrm/stable/3.3.1/orangehrm-3.3.1.12255.zip --no-check-certificate | |
# sudo apt-get install zip | |
# unzip orangehrm-3.3.1.12255.zip | |
# mv orangehrm-3.3.1/* /var/www/html | |
sed -i "s/display_startup_errors = Off/display_startup_errors = On/g" ${php_config_file} | |
sed -i "s/display_errors = Off/display_errors = On/g" ${php_config_file} | |
sed -i "s/AllowOverride None/AllowOverride All/g" /etc/apache2/apache2.conf | |
sed -i "s/var\/www/var\/www\/html/g" /etc/apache2/apache2.conf | |
git clone https://github.com/ellipsonic/orangehrm_app.git . | |
bash ./fix_permissions.sh | |
sudo a2enmod rewrite | |
sudo service apache2 restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment