section id="vserver.hod2" condition="author"
svninfo="$Id: unix.xml,v 1.7 2009-03-07 03:52:40 radek Exp $ $HeadURL$"
rcsinfo="$Header: /home/radek/cvs/unix-book/unix.xml,v 1.7 2009-03-07 03:52:40 radek Exp $"
FIXME:
Instalace serveru hodonin
=========================
omega:~# cat rebuild-hod2
#!/bin/sh
# Rebuild the virtual server hod2 for domain hodonin.cz
NAME=hod2
IP=213.29.4.58
vserver $NAME stop
rm -r /home/vservers/$NAME /etc/vservers/$NAME.conf
newvserver --hostname $NAME --domain hodonin.cz --ip $IP
#EOF
omega:~# ./rebuild-hod2
omega:~# cp /etc/apt/apt.conf.d/10aptitude /etc/vservers/.defaults/vdirbase/hod/etc/apt/apt.conf.d/
omega:~# vserver hod start
omega:~# vserver hod enter
hod:~# aptitude update
hod:~# aptitude upgrade
hod:~# aptitude install less
hod:~# aptitude install ssmtp
Who gets mail for userids < 1000? admin@giga-net.cz
Name of your mailhub? smtp.giga-net.cz
What domain to masquerade as? hodonin.giga-net.cz
Allow override of From: line in email header? <YES>
hod:~# aptitude install postgresql-client
Alternativně apache nebo apache2
hod:~# aptitude install apache
The following packages are RECOMMENDED but will NOT be installed:
debconf-utils file libsasl2-modules perl-doc
Enable su exec <No>
hod:/etc/apache# diff httpd.conf.orig httpd.conf
182c182
< #Listen 12.34.56.78:80
---
> Listen 213.29.4.12:80
190c190
< #BindAddress *
---
> BindAddress 213.29.4.12
260c260
< ServerAdmin webmaster@localhost
---
> ServerAdmin admin@giga-net.cz
273c273
< ServerName localhost
---
> #ServerName localhost
275c275
< #ServerName new.host.name
---
> ServerName hodonin.giga-net.cz
838c838
< AddDefaultCharset on
---
> AddDefaultCharset off
hod:/etc/apache#
hod:~# aptitude install libapache-mod-php4 php4
Oveřit že /etc/apache/modules.conf obsahuje řádku
LoadModule php4_module /usr/lib/apache/1.3/libphp4.so
-------------------
Using Apache2:
---------------
hod:~# aptitude install apache2
The following packages are RECOMMENDED but will NOT be installed:
file libsasl2-modules
hod:/# aptitude install libapache2-mod-php4 php4
--------------
hod:~# aptitude install php4-pgsql
The following packages are RECOMMENDED but will NOT be installed:
debconf-utils perl-doc
hod:/# aptitude install drupal
Automatically create Drupal database? <Yes>
Run database update script? <No>
Database engine to be used with Drupal PostgreSQL
Database server for Drupal's database isql.giga-net.cz
Drupal database name drupal
Remove Drupal database when the package is removed? <No>
Remove former database backups when the package is removed? <No>
Web server(s) that should be configured automatically apache2
Poznámky:
---------
Vytvoření databáze
CREATE USER drupal WITH PASSWORD 'drupal4'
CREATE DATABASE drupal WITH OWNER=druapl TEMPLATE=template0 ENCODING='LATIN2'
aptitude install apache
aptitude install libapache-mod-php4
echo "LoadModule php4_module /usr/lib/apache/1.3/libphp4.so" >> /etc/apache/modules.conf
postgres@isql:/usr/share/doc/postgresql$ createlang plpsql drupal
drupal=> ALTER TABLE sessions ALTER uid SET DEFAULT 0;
Konfigurace apache:
-------------------
Drupal v adresáři, třebas /usr/local/share/drupal4.6 publikujeme v konfiguraci takto:
Alias /drupal4.6 /usr/local/share/drupal4.6
<Directory /usr/local/share/drupal4.6/>
Options +FollowSymLinks
AllowOverride All
order allow,deny
allow from all
</Directory>
soubor .htaccess v adresáři drupalu pak popisuje další konfiguraci