Mid End Script for Mid End Boxes (Debian 6)
Modified script to run optimally on 1-2GB RAM VPS
- Base software list:
secureto create a new ssh user, change ssh port and disable ssh root logins
- Configured with gzip
- Must have a site installed later as config does not include server params
- Does not assume nginx will definitely be used to serve PHP files
- v5.5+ without InnoDB,
- Configured with query caching
- v5.4+ with APC installed and configured
- Other packages installed:
- PECL packages:
- PECL extensions are added as additional
- Creates a MySQL database and a user from the provided username
- Creates a
- Creates a
- Attempts to prevent image file script execution exploits (e.g.
- Attempts to rewrite URL
/index.php?params (currently for FuelPHP)
Creates the following directories and files:
/var/www/DOMAIN/ listen.sock (automatically created for nginx to connect to php5-fpm) /var/www/DOMAIN/public_html index.php (MySQL database, username and password are in comments) pinfo.php (phpinfo) /var/www/DOMAIN/logs
$ wget --no-check-certificate https://raw.github.com/marsd/midendscript/master/setup-debian.sh $ chmod 744 setup-debian.sh $ ./setup-debian.sh system $ ./setup-debian.sh mysql $ ./setup-debian.sh mongodb $ ./setup-debian.sh nginx $ ./setup-debian.sh php $ ./setup-debian.sh site <example.com> <MySQL username> $ ./setup-debian.sh secure <12345> <New SSH user>
- Disconnect from your current SSH connection and reconnect using the new port and username.
suto switch to root user after logging in
- MySQL root is given a new password which is located in
- MySQL user for each site is located in
/var/www/DOMAIN/public_html/index.phpfile, and should be removed after storing the password in a safe location.
- Delete, move or password protect
/var/www/<DOMAIN>/public_html/pinfo.phpfile, which installed automatically on each new site installation.