ow to reinstall the dev server.
***************
Create new vps:
***************
Select configuration type: ‘Typical’
Select os version: ‘Linux’ + ‘Other Linux 2.6.x kernel’
Select name: ‘dev*’
Select network configuration: ‘Use bridged networking’
Select Disk size (GB): ’50’ + uncheck ‘Allocate all disk space now’ + check ‘Split disk into 2 GB files’
Create the vms
Change memory to 512 MB
Load the iso ‘/iso/debian-40r2-i386-netinst.iso’ into cdrom0
Boot the machine
*************************
Do a base Debian install:
*************************
Select language ‘English’
Select country ‘United States’ (fix timezone issue?)
Select keyboard ‘American English’
Wait for the installer to load and setup the network
Select partition method ‘Guided – use entire disk’
Select disk to partition ‘SCSI1’
Select partition scheme ‘All files in one partition’
‘Finish partitioning and write changes to disk’
‘Yes’
Select timezone ‘Easter’ (will be changed later)
Set root pass
Create the first user
Wait for the base install to finish
Use a network mirror: ‘Yes’
Select mirror country: ‘Denmark’
Select one
Setup proxy if needed
Select ‘no’
Uncheck all except ‘Standard system’
Wait for the extra packages to be installed.
Install grub to master boot record: ‘Yes’
Reboot the machine
apt-get install openssh-server
*********************
Setup etch backports:
*********************
echo “deb http://www.backports.org/debian etch-backports main contrib non-free” >> /etc/apt/sources.list
cat >> /etc/apt/preferences << EOF
Package: *
Pin: release a=etch-backports
Pin-Priority: 999
EOF
wget -O – http://backports.org/debian/archive.key | apt-key add –
apt-get update
***********************************
Setup webserver, databases and cvs:
***********************************
apt-get install apache2 mysql-server postgresql-8.2 libapache2-mod-php5 php5-cli php5-mysql php5-pgsql php5-curl cvs stunnel sudo
echo include_path = \”.:/usr/share/php5:/usr/share/php5/Smarty-2.6.19/libs\” >> /etc/php5/apache2/php.ini
wget http://www.smarty.net/do_download.php?download_file=Smarty-2.6.19.tar.gz
cd /usr/share/php5
tar zxf /tmp/Smarty-2.6.19.tar.gz
chown -R root:root Smarty-2.6.19/
**********
Setup PAM:
**********
groupadd wheel
uncomment “# auth sufficient pam_wheel.so trust” in /etc/pam.d/su
************
Setup users:
************
groupadd mcs
usermod -g mcs -a -G wheel,www-data {initial user}
groupadd {secondary user}
useradd -m -g mcs -G users,wheel,www-data,{secondary user} {secondary user}
passwd {secondary user}
**************
Setup webdirs:
**************
chgrp mcs /var/www /etc/apache2/sites-available /etc/apache2/sites-enabled
chmod g+rw /var/www /etc/apache2/sites-available /etc/apache2/sites-enabled
Now each user can create their own webdirs:
mkdir /var/www/{directory}
chgrp www-data /var/www/{directory}
cat > /etc/apache2/sites-available/{directory} << EOF
<VirtualHost *>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/{directory}
<Directory />
Options FollowSymLinks Indexes
AllowOverride None
</Directory>
<Directory /home/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/error.log.{directory}
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log.{directory} combined
ServerSignature On
</VirtualHost>
EOF
ln -s /etc/apache2/sites-available/{directory} /etc/apache2/sites-enabled/020-{directory}
As root, run: /etc/init.d/apache2 reload