debug
This commit is contained in:
parent
8edc9957ab
commit
42d983a04f
@ -8,7 +8,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
echo -e "\033[35;1mThis script has been tested only on Linux Debian 7 \033[0m"
|
echo "\033[35;1mThis script has been tested only on Linux Debian 7 \033[0m"
|
||||||
echo "Please run this script as root"
|
echo "Please run this script as root"
|
||||||
|
|
||||||
echo -n "Should we start? [Y:n] "
|
echo -n "Should we start? [Y:n] "
|
||||||
@ -27,13 +27,13 @@ apt-get upgrade
|
|||||||
# get the current position
|
# get the current position
|
||||||
_cwd="$(pwd)"
|
_cwd="$(pwd)"
|
||||||
|
|
||||||
echo -e "\033[35;1mInstalling harden \033[0m"
|
echo "\033[35;1mInstalling harden \033[0m"
|
||||||
sleep 5
|
sleep 5
|
||||||
apt-get install harden
|
apt-get install harden
|
||||||
echo "Harden instaled"
|
echo "Harden instaled"
|
||||||
echo "* * *"
|
echo "* * *"
|
||||||
|
|
||||||
echo -e "\033[35;1mInstalling ufw and setup firewall (allowing only ssh and http) \033[0m"
|
echo "\033[35;1mInstalling ufw and setup firewall (allowing only ssh and http) \033[0m"
|
||||||
sleep 5
|
sleep 5
|
||||||
apt-get install ufw
|
apt-get install ufw
|
||||||
ufw allow ssh
|
ufw allow ssh
|
||||||
@ -43,7 +43,7 @@ ufw status verbose
|
|||||||
echo "ufw installed and firwall configured"
|
echo "ufw installed and firwall configured"
|
||||||
echo "* * *"
|
echo "* * *"
|
||||||
|
|
||||||
echo -e "\033[35;1mCreate new user (you will be asked a user name and a password) \033[0m"
|
echo "\033[35;1mCreate new user (you will be asked a user name and a password) \033[0m"
|
||||||
sleep 5
|
sleep 5
|
||||||
echo -n "Enter user name: "
|
echo -n "Enter user name: "
|
||||||
read user
|
read user
|
||||||
@ -73,8 +73,8 @@ else
|
|||||||
fi
|
fi
|
||||||
echo "* * *"
|
echo "* * *"
|
||||||
|
|
||||||
echo -e "\033[35;1mInstalling AMP web server \033[0m"
|
echo "\033[35;1mInstalling AMP web server \033[0m"
|
||||||
echo -e "\033[35;1mInstalling Apache2 \033[0m"
|
echo "\033[35;1mInstalling Apache2 \033[0m"
|
||||||
sleep 5
|
sleep 5
|
||||||
apt-get install apache2
|
apt-get install apache2
|
||||||
a2enmod rewrite
|
a2enmod rewrite
|
||||||
@ -82,14 +82,14 @@ service apache2 restart
|
|||||||
echo "Apache2 installed"
|
echo "Apache2 installed"
|
||||||
echo "* * *"
|
echo "* * *"
|
||||||
|
|
||||||
echo -e "\033[35;1minstalling Mysql \033[0m"
|
echo "\033[35;1minstalling Mysql \033[0m"
|
||||||
sleep 5
|
sleep 5
|
||||||
apt-get install mysql-server
|
apt-get install mysql-server
|
||||||
mysql_secure_installation
|
mysql_secure_installation
|
||||||
echo "mysql installed"
|
echo "mysql installed"
|
||||||
echo "* * *"
|
echo "* * *"
|
||||||
|
|
||||||
echo -e "\033[35;1mInstalling PHP \033[0m"
|
echo "\033[35;1mInstalling PHP \033[0m"
|
||||||
sleep 5
|
sleep 5
|
||||||
apt-get install php5 php-pear php5-gd
|
apt-get install php5 php-pear php5-gd
|
||||||
echo "Configuring PHP"
|
echo "Configuring PHP"
|
||||||
@ -111,12 +111,13 @@ apt-get install php5-mysql
|
|||||||
echo "php installed"
|
echo "php installed"
|
||||||
echo "* * *"
|
echo "* * *"
|
||||||
|
|
||||||
echo -e "\033[35;1mInstalling Awstat \033[0m"
|
echo "\033[35;1mInstalling Awstat \033[0m"
|
||||||
sleep 5
|
sleep 5
|
||||||
apt-get install awstats
|
apt-get install awstats
|
||||||
echo "Awstat installed"
|
echo "Awstat installed"
|
||||||
echo "* * *"
|
echo "* * *"
|
||||||
|
|
||||||
|
echo "\033[35;1mVHOST install \033[0m"
|
||||||
while [ "$vh" != "y" ] && [ "$vh" != "n" ]
|
while [ "$vh" != "y" ] && [ "$vh" != "n" ]
|
||||||
do
|
do
|
||||||
echo -n "Should we install a vhost? [y:n] "
|
echo -n "Should we install a vhost? [y:n] "
|
||||||
@ -166,7 +167,7 @@ fi
|
|||||||
echo "* * *"
|
echo "* * *"
|
||||||
|
|
||||||
#installing better prompt and some goodies for root
|
#installing better prompt and some goodies for root
|
||||||
echo -e "\033[35;1mInstalling shell prompt for root \033[0m"
|
echo "\033[35;1mInstalling shell prompt for root \033[0m"
|
||||||
sleep 5
|
sleep 5
|
||||||
git clone git://github.com/bachy/dotfiles-server.git ~/.dotfiles-server && cd ~/.dotfiles-server && ./install.sh && cd -
|
git clone git://github.com/bachy/dotfiles-server.git ~/.dotfiles-server && cd ~/.dotfiles-server && ./install.sh && cd -
|
||||||
source ~/.bashrc
|
source ~/.bashrc
|
||||||
@ -180,7 +181,8 @@ echo "* * *"
|
|||||||
# \____//____/_____/_/ |_|
|
# \____//____/_____/_/ |_|
|
||||||
|
|
||||||
# setup user environment
|
# setup user environment
|
||||||
echo -e "\033[35;1mInstalling shell prompt for $user \033[0m"
|
echo "\033[35;1mInstalling shell prompt for $user \033[0m"
|
||||||
|
su $user
|
||||||
sleep 5
|
sleep 5
|
||||||
cd ~
|
cd ~
|
||||||
git clone git://github.com/bachy/dotfiles-server.git ~/.dotfiles-server && cd ~/.dotfiles-server && ./install.sh && cd -
|
git clone git://github.com/bachy/dotfiles-server.git ~/.dotfiles-server && cd ~/.dotfiles-server && ./install.sh && cd -
|
||||||
@ -190,7 +192,7 @@ echo "done"
|
|||||||
echo "* * *"
|
echo "* * *"
|
||||||
|
|
||||||
# setup bare repositorie to push to
|
# setup bare repositorie to push to
|
||||||
echo -e "\033[35;1msetup git repositories for $_host_name \033[0m"
|
echo "\033[35;1msetup git repositories for $_host_name \033[0m"
|
||||||
sleep 5
|
sleep 5
|
||||||
mkdir ~/git-repositories
|
mkdir ~/git-repositories
|
||||||
mkdir ~/git-repositories/"$_host_name".git
|
mkdir ~/git-repositories/"$_host_name".git
|
||||||
|
Loading…
x
Reference in New Issue
Block a user