Server Installation für Debian 6.0

Aus TecArt-CRM Wiki

Wechseln zu: Navigation, Suche

Inhaltsverzeichnis

Debian Distribution herunterladen

Als erstes müssen Sie die Ihrem System entsprechende Distribution herunterladen unter Debian.org.

Anschließend brennen Sie das Image auf CD und booten damit Ihren Server.

Debian Distribution installieren

Booten Sie die eben erstellte CD in Ihrem Server.

Installer Boot Menu

Debian Install 0.png

Sprache wählen

DScreen02.png

Land wählen

DScreen03.png

Tastaturbelegung wählen

DScreen04.png

Servernamen festlegen

DScreen05.png

Domainnamen festlegen

DScreen06.png

Benutzer und Passwörter einrichten

Root-Passwort festlegen

DScreen41.png

Root-Passwort wiederholen

DScreen42.png

Vollen Namen eingeben

DScreen43.png

Benutzername eingeben

DScreen44.png

Passwort eingeben

DScreen45.png

Festplatten partitionieren

Partitionen manuell erstellen

DScreen07.png

Festplatte wählen

DScreen08.png

Leere Partitionstabelle erstellen

DScreen09.png

Freien Speicher für SWAP Partition wählen

DScreen10.png

Neue Partition erstellen (SWAP)

DScreen11.png

Größe der SWAP-Partition festlegen

Hinweis: Als Faustregel für die Größe des Swap-Speichers können Sie, je nach System, etwa das doppelte bis dreifache des Arbeitspeichers annehmen.


DScreen12.png

Partitionstyp der SWAP Partition festlegen (Primär)

DScreen13.png

Position der SWAP Partition festlegen (Anfang)

DScreen14.png

Benutzen als SWAP

DScreen15.png

Freien Speicher für Root-Partition wählen

DScreen16.png

Neue Partition erstellen (Root)

DScreen17.png

Größe der Root-Partition festlegen

DScreen18.png

Partitionstyp der Root-Partition festlegen

DScreen19.png

Position der Root-Partition festlegen (Anfang)

DScreen20.png

Einhängepunkt (mount point) /

DScreen21.png

Freien Speicher für /usr-Partition wählen

DScreen22.png

Neue Partition erstellen (/usr)

DScreen23.png

Größe der /usr-Partition festlegen

DScreen24.png

Partitionstyp der /usr-Partition festlegen (Logisch)

DScreen25.png

Position der /usr-Partition festlegen (Anfang)

DScreen26.png

Einhängepunkt (mount point) /usr

DScreen27.png

Freien Speicher für /var-Partition wählen

DScreen28.png

Neue Partition erstellen (/var)

DScreen29.png

Größe der /var-Partition festlegen

DScreen30.png

Partitionstyp der /var-Partition festlegen (Logisch)

DScreen31.png

Position der /var-Partition festlegen (Anfang)

DScreen32.png

Einhängepunkt (mount point) /var

DScreen33.png

Freien Speicher für /data-Partition wählen

DScreen34.png

Neue Partition erstellen (/data)

DScreen35.png

Größe der /data-Partition festlegen

DScreen36.png

Partitionstyp der /data-Partition

DScreen37.png

Einhängepunkt (mount point) /data

DScreen38.png

Partitionierung beenden

DScreen39.png

Änderungen speichern

DScreen40.png

Paketmanager konfigurieren

Land des Spiegelservers wählen

DScreen46.png

Paketmanager konfigurieren

Spiegelservers wählen

DScreen47.png

Proxyserver wählen

DScreen48.png

Anonyme Statistiken erstellen

DScreen49.png

Softwareauswahl

DScreen50.png

GRUB-Bootloader auf einer Festplatte installieren

DScreen51.png

Installation beenden

DScreen52.png

Boot Menu

DScreen53.png

Login Prompt

DScreen54.png

Als root einloggen

DScreen55.png

Benötigte Software installieren

[root@crmsrv /]# apt-get install openssh-server lvm2 mc ntpdate spamprobe libytnef0 imageMagick catdoc xpdf clamav
[root@crmsrv /]# apt-get install diff zip openssl elinks gocr aspell aspell-de aspell-en mysql-server memcached

Zusätzliche Pakete Installieren

Ytnef

Wichtig: Je nach Architektur Ihres Systems müssen Sie das folgende Paket wählen und in den wget- und dpkg-Befehl einsetzen:

[root@crmsrv /]# wget http://wiki.clever-crm.de/images/0/07/Ytnef_2.6-1_amd64.deb
[root@crmsrv /]# dpkg --install Ytnef_2.6-1_amd64.deb
[root@crmsrv /]# rm Ytnef_2.6-1_amd64.deb

Nicht benötigte Software deinstallieren

[root@crmsrv /]# /etc/init.d/exim4 stop
[root@crmsrv /]# /etc/init.d/portmap stop
[root@crmsrv /]# /etc/init.d/nfs-common stop
[root@crmsrv /]# apt-get remove exim4 portmap

LVM einrichten

Device herausfinden und in Variable schreiben:

[root@crmsrv /]# export DEV=$(df | grep /data | awk '{print $1}')

Aktuelle Partition umounten:

[root@crmsrv /]# umount $DEV

LVM einrichten mit der volle Größe (im diesem Beispiel 170GB):

[root@crmsrv /]# pvcreate $DEV
[root@crmsrv /]# vgcreate crm_vol $DEV
[root@crmsrv /]# lvcreate -n crm_log -l 100%FREE crm_vol
[root@crmsrv /]# mkfs.ext4 /dev/crm_vol/crm_log

Datei /etc/fstab bearbeiten:

Folgende Zeile enternen: Hinweis: Die Partition /dev/sda6 in diesem Beispiel kann unter Umständen auch über die UUID angesprochen werden. Suchen Sie in jedem Fall nach dem /data-Bezeichner.

/dev/sda6                  /data            ext4    defaults        0       2

Folgende Zeile hinzufügen:

/dev/crm_vol/crm_log       /data            ext4    defaults        0       2

Partition mounten:

[root@crmsrv /]# mount /data

Zend-Server installieren

Bitte laden Sie den Zend-Server für Linux (Zend Server DEB/RPM Installer Script) unter Zend Server herunter. Alternativ können Sie Ihn hier herunterladen: Datei:ZendServer-5.6.0-RepositoryInstaller-linux.tar.gz.

[root@crmsrv /]# cd /usr/src
[root@crmsrv /]# wget http://wiki.clever-crm.de/images/8/8e/ZendServer-5.6.0-RepositoryInstaller-linux.tar.gz
[root@crmsrv /]# tar -xvzf ZendServer-5.6.0-RepositoryInstaller-linux.tar.gz
[root@crmsrv /]# ZendServer-RepositoryInstaller-linux/install_zs.sh 5.3 ce

Anschliessend mit Y bestätigen.

[root@crmsrv /]# apt-get install php-5.3-loader-zend-server php-5.3-memcache-zend-server php-5.3-xmlrpc-zend-server
[root@crmsrv /]# /etc/init.d/apache2 restart

Server konfigurieren

Motd entfernen

[root@crmsrv /]# touch ~/.hushlogin

Uhrzeit mit Zeitserver synchronisieren

[root@crmsrv /]# echo -e '#!/bin/sh\n/usr/sbin/ntpdate ntps1-0.cs.tu-berlin.de ptbtime1.ptb.de de.pool.ntp.org > /dev/null 2>&1' > /etc/cron.daily/netdate
[root@crmsrv /]# chmod +x /etc/cron.daily/netdate

Umask setzen

[root@crmsrv /]# echo 'umask 0' >> /etc/profile

Swapverhalten optimieren

[root@crmsrv /]# echo 'vm.swappiness=0' >> /etc/sysctl.conf


MySQL-Server konfigurieren

Bearbeiten Sie die Datei /etc/mysql/my.cnf:

[client]
port                    = 3306
socket                  = /var/run/mysqld/mysqld.sock

[mysqld_safe]
socket                  = /var/run/mysqld/mysqld.sock
nice                    = 0

[mysqld]
user                    = mysql
port                    = 3306
bind-address            = 127.0.0.1
socket                  = /var/run/mysqld/mysqld.sock
pid-file                = /var/run/mysqld/mysqld.pid
basedir                 = /usr
datadir                 = /var/lib/mysql
tmpdir                  = /tmp
language                = /usr/share/mysql/english

skip-external-locking
skip-locking

key_buffer              = 1024M
max_allowed_packet      = 64M
table_cache             = 500
sort_buffer_size        = 8M
net_buffer_length       = 8K
read_buffer_size        = 4M
read_rnd_buffer_size    = 8M
myisam_sort_buffer_size = 64M
thread_cache_size       = 10
thread_concurrency      = 8
max_connections         = 300
open_files_limit        = 16384
tmp_table_size          = 64M
max_heap_table_size     = 32M

connect_timeout         = 30
wait_timeout            = 300

join_buffer_size        = 1M

query_cache_limit       = 128M
query_cache_size        = 128M
query_cache_type        = 1
query_prealloc_size     = 16384
query_alloc_block_size  = 16384

log_error               = /var/log/mysql/mysql.err

skip-innodb

old_passwords           = false

low_priority_updates    = 1

[mysqldump]
quick
max_allowed_packet      = 64M

[mysql]
no-auto-rehash

[isamchk]
key_buffer              = 256M
sort_buffer_size        = 256M
read_buffer             = 2M
write_buffer            = 2M

[myisamchk]
key_buffer              = 256M
sort_buffer_size        = 256M
read_buffer             = 2M
write_buffer            = 2M

[mysqlhotcopy]
interactive-timeout
[root@crmsrv /]# /etc/init.d/mysql restart

CRM-Datenbank anlegen

[root@crmsrv /]# mysql -u root -p
mysql> CREATE USER 'crmuser'@'%' IDENTIFIED BY 'crmpass';
mysql> GRANT USAGE ON *.* TO 'crmuser'@'%' IDENTIFIED BY 'crmpass' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;
mysql> CREATE DATABASE `crmdb` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
mysql> GRANT ALL PRIVILEGES ON `crmdb`.* TO 'crmuser'@'%';
mysql> FLUSH PRIVILEGES;
mysql> exit

Memcache-Daemon konfigurieren

Bearbeiten Sie die Datei /etc/memcached.conf:

-d                      # Start as Daemon

-m 512                  # Wieviel Megabyte darf Memcached verwenden? Max. RAM/8

-u www-data             # Apache User

-s /tmp/memcached.sock  # Socket
[root@crmsrv /]# /etc/init.d/memcached restart

Zend-Server konfigurieren

[root@crmsrv /]# ln -s /usr/local/zend/bin/php /usr/bin/php

IP-Adresse herausfinden: ( z.B. 192.168.150.182 )

[root@crmsrv /]# ifconfig eth0 | grep 'inet ' | awk '{print $2}'

URL: http://192.168.150.182:10081/ im Browser aufrufen.

Licence Agreement
Set Password
Newsletter Registration

Administration -> License and Password -> Zend Server Feature Content -> No

Werbung deaktivieren

Zend Data Cache und Zend Debugger deaktivieren:

Dashboard

Zu "Server Setup -> Directives" navigieren:

memory_limit auf 256M setzen
post_max_size auf 128M setzen
max_file_uploads auf 1000 setzen
upload_max_filesize auf 128M setzen
PHP neu starten

CRM installieren

CRM herunterladen

Aktuelle CRM-Version für PHP 5.3 hier herunterladen: Downloads.

[root@crmsrv /]# cd /usr/src
[root@crmsrv /]# wget http://wiki.clever-crm.de/images/6/6a/Crm_3.4.5508_53.tar.gz

CRM-Archiv entpacken

[root@crmsrv /]# tar -xvzf Crm_3.4.5508_53.tar.gz
[root@crmsrv /]# mkdir /var/www/crm
[root@crmsrv /]# cp -Rv crm_v34/* /var/www/crm/

Benötigte Verzeichnisse anlegen und Rechte setzen

[root@crmsrv /]# mkdir /var/www/crm/mailtmp
[root@crmsrv /]# mkdir /var/www/crm/config
[root@crmsrv /]# mkdir /data/crm
[root@crmsrv /]# chown -R www-data.www-data /var/www/crm
[root@crmsrv /]# chmod -R 0700 /var/www/crm
[root@crmsrv /]# chown -R www-data.www-data /data/crm
[root@crmsrv /]# chmod -R 0700 /data/crm

Lizenzschlüssel installieren

Host-ID herausfinden

[root@crmsrv /]# ifconfig eth0 | grep 'Hardware Adresse' | awk '{print $6}' | replace ':' ''

Lizenzschlüssel bestellen

http://www.clever-crm.de

Lizenzschlüssel einspielen

[user@workstation:~$] scp Downloads/licence.key root@192.168.150.182:/var/www/crm/config/licence.key

CRM-Setup ausführen

URL: http://192.168.150.182/crm/setup/ im Browser aufrufen.

CRM-Setup 1
CRM-Setup 2
CRM-Setup 3
Fortschritt
CRM-Setup abgeschlossen

Apache-Server konfigurieren

Datei /etc/apache2/sites-enabled/000-default bearbeiten:

<VirtualHost *:80>
        ServerAdmin webmaster@crmsrv

        DocumentRoot /var/www/crm/
        <Directory /var/www/crm/>
                Options -Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        Alias /Microsoft-Server-ActiveSync /var/www/crm/zpush/index.php

        ErrorLog /var/log/apache2/error.log

        LogLevel error

        #Enable if you wish logging, Disable if you want performance
        #CustomLog /var/log/apache2/access.log combined

</VirtualHost>
[root@crmsrv /]# a2dismod auth_basic authn_file authz_default authz_groupfile authz_user autoindex cgi deflate
[root@crmsrv /]# a2dismod env negotiation reqtimeout setenvif rewrite status
[root@crmsrv /]# /etc/init.d/apache2 restart

Apache-Server für SSL konfigurieren

[root@crmsrv /]# a2enmod ssl
[root@crmsrv /]# a2ensite default-ssl

Datei /etc/apache2/sites-enabled/default-ssl bearbeiten:

<IfModule mod_ssl.c>
<VirtualHost _default_:443>
        ServerAdmin webmaster@crmsrv

        DocumentRoot /var/www/crm/
        <Directory /var/www/crm/>
                Options -Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        Alias /Microsoft-Server-ActiveSync /var/www/crm/zpush/index.php

        ErrorLog /var/log/apache2/error.log

        LogLevel error

        #CustomLog /var/log/apache2/ssl_access.log combined

        SSLEngine on

        SSLCertificateFile    /etc/ssl/certs/ssl-cert-snakeoil.pem
        SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

        #SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt

        #SSLCACertificatePath /etc/ssl/certs/
        #SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crt

        <FilesMatch "\.(cgi|shtml|phtml|php)$">
                SSLOptions +StdEnvVars
        </FilesMatch>
        <Directory /usr/lib/cgi-bin>
                SSLOptions +StdEnvVars
        </Directory>

</VirtualHost>
</IfModule>
[root@crmsrv /]# /etc/init.d/apache2 restart

Das vorinstallierte Zertifikat verschlüsselt zwar die Verbindung. Diese wird durch den Browser aber als "nicht vertrauenswürdig" eingestuft. Sie benötigen hierzu ein Zertifikat von einer Zertifizierungsstelle. Das SSL-Zertifikat für Ihre Domain können Sie unter http://www.clever-crm.de/de/tecart-kontakt-anfrage bestellen.

Ins CRM einloggen

Rufen Sie die URL http://192.168.150.182 (IP Ihres Servers) in Ihrem Browser auf:

Einloggen mit 'root' ohne Kennwort
Eingeloggt
Persönliche Werkzeuge
Namensräume
Varianten
Aktionen
Themen
Navigation
Werkzeuge