Quick server setup #2

For quick run:

wget -N http://www.nat.li/wp-code/104.1.sh&&bash 104.1.sh
 

Explained:

Install lighttpd along with mysql and some other useful applications.

First of all, some useful/mandatory applications and mysql

1. Installs htop, rcconf, aptitude, vim, dos2unix and mysql

apt-get -y --force-yes update
apt-get -y --force-yes install htop aptitude rcconf vim dos2unix mysql-server

Copy this next part to a new file and name it something.sh, upload it to your server. I use the “/var” directory. “dos2unix thefile.sh” first if you uploaded from windows to make sure line endings are correct. After this, chmod u+x thefile.sh and then run it “./thefile.sh”.

2. Installs lighttpd
3. Installs php5-cgi
4. Configures & restarts lighttpd and php
5. change owner for /var/www2 ‘s subfolders to www-data
6. Install phpmyadmin

#!/bin/bash
apt-get -y --force-yes install lighttpd php5-cgi
echo -e "server.modules += ( \"mod_fastcgi\" )\n fastcgi.server = ( \".php\" =>\n                    ( \"localhost\" =>\n                        (\n                            \"host\" => \"127.0.0.1\",\n                            \"port\" => \"9000\"\n                        )\n                    )\n                 )" > /etc/lighttpd/conf-available/10-fastcgi-fpm.conf
lighty-enable-mod fastcgi 
lighty-enable-mod fastcgi-php
/etc/init.d/lighttpd restart
mkdir /var/www2
chmod 777 /var/www2
chown -R www-data /var/www2/*
apt-get -y --force-yes install phpmyadmin
/etc/init.d/lighttpd restart

Other:

squid:
http://www.nat.li/linux/easy-squid-install

php-fpm instead of cgi:
http://www.nat.li/linux/installing-php-fpm-on-debian-6-squeeze
http://www.nat.li/linux/different-php-fpm-for-each-lighttpd-vhost

lua support to lighttpd:
http://www.nat.li/linux/lighttpd-with-lua-support

usenet posting:
http://www.nat.li/linux/fast-mass-usenet-posting-using-both-windows-and-linux-utilizing-winrar-par2-and-newspost-2

pptp vpn:
http://www.nat.li/linux/easily-install-pptpd-on-debian-with-this-bash-script

Leave a Reply

Your email address will not be published. Required fields are marked *