|
|
@ -1,4 +1,4 @@ |
|
|
|
|
|
|
|
#!/bin/bash |
|
|
|
|
|
|
|
|
|
|
|
# Help Function |
|
|
@ -139,29 +139,9 @@ then |
|
|
|
|| OwnError "Unable To Install Python Software Properties" |
|
|
|
|
|
|
|
# Add Nginx Launchpad Repository |
|
|
|
#echo -e "\033[34m Adding Nginx Launchpad Repository... \e[0m" |
|
|
|
#sudo add-apt-repository ppa:nginx/stable \ |
|
|
|
#|| OwnError "Unable To Add Nginx Launchpad Repository" |
|
|
|
|
|
|
|
# Add Nginx DotDeb Repository |
|
|
|
cat /etc/apt/sources.list | grep dotdeb &> /dev/null |
|
|
|
|
|
|
|
if [ $? -eq 0 ] |
|
|
|
then |
|
|
|
echo -e "\033[34m Nginx DotDeb Repository Already Enabled... \e[0m" |
|
|
|
else |
|
|
|
echo >> /etc/apt/sources.list |
|
|
|
echo "# DotDeb Nginx Repository" >> /etc/apt/sources.list |
|
|
|
echo "deb http://packages.dotdeb.org squeeze all" >> /etc/apt/sources.list \ |
|
|
|
|| OwnError "Ubable To Add Nginx DotDeb Repository" |
|
|
|
|
|
|
|
echo "deb-src http://packages.dotdeb.org squeeze all" >> /etc/apt/sources.list \ |
|
|
|
|| OwnError "Ubable To Add Nginx DotDeb Repository" |
|
|
|
|
|
|
|
# Fetch DotDeb GPG Key |
|
|
|
wget -c wget http://www.dotdeb.org/dotdeb.gpg |
|
|
|
cat dotdeb.gpg | sudo apt-key add - |
|
|
|
fi |
|
|
|
echo -e "\033[34m Adding Brianmercer Nginx Launchpad Repository... \e[0m" |
|
|
|
sudo add-apt-repository ppa:brianmercer/nginx \ |
|
|
|
|| OwnError "Unable To Add Nginx Launchpad Repository" |
|
|
|
|
|
|
|
# Update The APT Cache |
|
|
|
echo -e "\033[34m Updating APT Cache... \e[0m" |
|
|
@ -169,7 +149,7 @@ then |
|
|
|
|
|
|
|
# Install Nginx |
|
|
|
echo -e "\033[34m Installing Nginx... \e[0m" |
|
|
|
sudo apt-get -y install nginx-full || OwnError "Unable To Install Nginx" |
|
|
|
sudo apt-get -y install nginx-custom || OwnError "Unable To Install Nginx" |
|
|
|
|
|
|
|
elif [ "$3" = "php" ] |
|
|
|
then |
|
|
@ -225,29 +205,9 @@ then |
|
|
|
|| OwnError "Unable To Install Python Software Properties" |
|
|
|
|
|
|
|
# Add Nginx Launchpad Repository |
|
|
|
#echo -e "\033[34m Adding Nginx Launchpad Repository... \e[0m" |
|
|
|
#sudo add-apt-repository ppa:nginx/stable \ |
|
|
|
#|| OwnError "Unable To Add Nginx Launchpad Repository" |
|
|
|
|
|
|
|
# Add Nginx DotDeb Repository |
|
|
|
cat /etc/apt/sources.list | grep dotdeb &> /dev/null |
|
|
|
|
|
|
|
if [ $? -eq 0 ] |
|
|
|
then |
|
|
|
echo -e "\033[34m Nginx DotDeb Repository Already Enabled... \e[0m" |
|
|
|
else |
|
|
|
echo >> /etc/apt/sources.list |
|
|
|
echo "# DotDeb Nginx Repository" >> /etc/apt/sources.list |
|
|
|
echo "deb http://packages.dotdeb.org squeeze all" >> /etc/apt/sources.list \ |
|
|
|
|| OwnError "Ubable To Add Nginx DotDeb Repository" |
|
|
|
|
|
|
|
echo "deb-src http://packages.dotdeb.org squeeze all" >> /etc/apt/sources.list \ |
|
|
|
|| OwnError "Ubable To Add Nginx DotDeb Repository" |
|
|
|
|
|
|
|
# Fetch DotDeb GPG Key |
|
|
|
wget -c wget http://www.dotdeb.org/dotdeb.gpg |
|
|
|
cat dotdeb.gpg | sudo apt-key add - |
|
|
|
fi |
|
|
|
echo -e "\033[34m Adding Brianmercer Nginx Launchpad Repository... \e[0m" |
|
|
|
sudo add-apt-repository ppa:brianmercer/nginx \ |
|
|
|
|| OwnError "Unable To Add Nginx Launchpad Repository" |
|
|
|
|
|
|
|
# Add PHP Launchpad Repository |
|
|
|
echo -e "\033[34m Adding PHP5 Launchpad Repository... \e[0m" |
|
|
@ -260,7 +220,7 @@ then |
|
|
|
|
|
|
|
# Install Nginx PHP5 MySQL Postfix |
|
|
|
echo -e "\033[34m Installing Nginx PHP5 MySQL Postfix... \e[0m" |
|
|
|
sudo apt-get -y install nginx-full php5-common php5-mysql php5-xmlrpc \ |
|
|
|
sudo apt-get -y install nginx-custom php5-common php5-mysql php5-xmlrpc \ |
|
|
|
php5-cgi php5-curl php5-gd php5-cli php5-fpm php-apc php-pear \ |
|
|
|
php5-dev php5-imap php5-mcrypt mysql-server mysqltuner postfix \ |
|
|
|
|| OwnError "Unable To Install Nginx PHP5 MySQL Postfix" |
|
|
|