DB_ROOT_PASS=terceS debconf-set-selections <<\EOF mysql-server-5.1 mysql-server/root_password_again string ${DB_ROOT_PASS} mysql-server-5.1 mysql-server/root_password string ${DB_ROOT_PASS} EOF # install web server apt-get -y install apache2 php5 mysql-server php5-mysql php5-mcrypt php5-gd php5-curl php5-cli libapache2-mod-auth-mysql bzip2 wget # configure apache modules a2enmod auth_mysql # install ssl http://www.panticz.de/apache2_openssl_certificate # enable url rewrite a2enmod rewrite sed -i 's|AllowOverride None|AllowOverride All|g' /etc/apache2/sites-enabled/*default # old # sed -i '11s|AllowOverride None|AllowOverride All|g' /etc/apache2/sites-available/default # emable ssl a2enmod ssl a2ensite default-ssl sed -i '12s|AllowOverride None|AllowOverride all|g' /etc/apache2/sites-enabled/default-ssl # update memory limit for php cp /etc/php5/apache2/php.ini /etc/php5/apache2/php.ini.org sed -i 's|memory_limit = 16M|memory_limit = 512M|g' /etc/php5/apache2/php.ini cp /etc/php5/cli/php.ini /etc/php5/cli/php.ini.org sed -i 's|memory_limit = 32M|memory_limit = 512M|g' /etc/php5/cli/php.ini # set hostname cp /etc/hosts /etc/hosts.org echo "your_host_name" >> /etc/hostname echo "192.168.1.88 $(hostname).example.com $(hostname)" >> /etc/hosts # restart apache /etc/init.d/apache2 restart # ToDo # enable ssl: a2enmod ssl # See /usr/share/doc/apache2.2-common/README.Debian.gz on how to configure SSL and create self-signed certificates.