Difference between revisions of "Install a new server"

From Organic Design wiki
(Setting up the software environment: hostname)
(LAMP configuration: php.ini)
Line 56: Line 56:
 
a2enmod ssl
 
a2enmod ssl
 
a2enmod rewrite  
 
a2enmod rewrite  
 +
</pre>}}
 +
 +
The differences to the default ''php.ini'' file in our servers are as follows:
 +
{{code|<pre>
 +
max_execution_time = 300
 +
memory_limit = 64M
 +
log_errors = On
 +
error_log = syslog
 +
post_max_size = 100M
 +
upload_max_filesize = 100M
 +
extension=domxml
 +
extension=fileinfo.so
 
</pre>}}
 
</pre>}}
  

Revision as of 00:01, 10 January 2009

Procedure.svg Install a new server
Organic Design procedure


Download and install Debian

If the server has no OS then download and install Debian first. Depending on the kind of access you have to the server, the following links may be of interest here:

Setting up the software environment

Ensure that you're using the same package repository for your Debian installation as we are:

deb http://ftp.us.debian.org/debian stable main contrib non-free
deb http://security.debian.org stable/updates main contrib non-free

Bring the system up to date and install the organicdesign-server package:

echo "deb http://packages.organicdesign.co.nz main/" >> /etc/apt/sources.list
apt-get update
apt-get upgrade
apt-get install organicdesign-server

You will have a functioning server and LAMP environment.

Configure any of the following:

  • /etc/hostname, hostname -F /etc/hostname, /etc/hosts
  • tzselect
  • /etc/ssh/sshd_config
  • /etc/crontab
  • /var/www/backup.pl
  • Exim4 (this will need to be configured even for sending mail, see Configure mail server)

Setting up the Wikia file structure

Either copy the /var/www directory structure from an existing wikia installation (excluding the specific content from the domains and wikis directories). Alternatively, unpack a recent www-yyyy-mm-dd.tgz backup into /var/www and remove specific wiki content.

7za x www-yyyy-mm-dd-tgz
tar -xf www.tar /var

You will need to adjust the following items in the structure:

  • /var/www/extensions/wikia.php
  • /var/www/activity.log
  • /var/www/domains
  • /var/www/wikis

LAMP configuration

The easiest way to configure this is to copy the vhosts file which originated from the backup file over the default Apache configuration file, and then make the vhosts file a symlink pointing at the default configuration as usual. Then adjust the file to the wikia's specific needs.

mysqladmin -u root -p password *******
mv /var/www/vhosts /etc/apache2/sites-available/default
ln /etc/apache2/sites-available/default vhosts
a2enmod ssl
a2enmod rewrite 

The differences to the default php.ini file in our servers are as follows:

max_execution_time = 300
memory_limit = 64M
log_errors = On
error_log = syslog
post_max_size = 100M
upload_max_filesize = 100M
extension=domxml
extension=fileinfo.so

Domain names

Adjust the names of the symlinks in the /var/www/domains directory to local domain names and ensure that those names are added to the /etc/hosts file.

Extracting Databases from a Backup

Extract the most recent database backup (this may overwrite existing databases of the same names)

7za x all-yyyy-mm-dd.sql.7z
mysql -u root -p < all.sql
mysqladmin -u root -p flush-privileges

Next steps

See also