Neuen Server aufsetzen
Mkurz (Diskussion | Beiträge) (→Sync Data) |
Mkurz (Diskussion | Beiträge) (→Tomcat) |
||
Zeile 86: | Zeile 86: | ||
== Tomcat == | == Tomcat == | ||
+ | === Install === | ||
<pre> | <pre> | ||
apt-get install tomcat8 | apt-get install tomcat8 | ||
apt-get install openjdk-8-jdk | apt-get install openjdk-8-jdk | ||
</pre> | </pre> | ||
+ | |||
+ | Configute tomcat policies 'etc/tomcat8/policy.d/04webapps.policy': | ||
+ | <pre> | ||
+ | add the permissions shown in tools/info/tomcat/04webapps.policy.fragment.txt | ||
+ | </pre> | ||
+ | |||
+ | === Webapp apemap === | ||
Create a folder 'apemap' within '/var/lib/tomcat8/webapps' | Create a folder 'apemap' within '/var/lib/tomcat8/webapps' | ||
Create a link to this folder from /var/apemap | Create a link to this folder from /var/apemap | ||
Zeile 99: | Zeile 107: | ||
rsync -avz -e "ssh -p SSHPORT" USER@lic.apemap.at:/var/lib/tomcat7/webapps/apemap /var/lib/tomcat8/webapps | rsync -avz -e "ssh -p SSHPORT" USER@lic.apemap.at:/var/lib/tomcat7/webapps/apemap /var/lib/tomcat8/webapps | ||
</pre> | </pre> | ||
− | + | === Logging === | |
Create apemap logging folder for tomcat: | Create apemap logging folder for tomcat: | ||
<pre> | <pre> |
Version vom 3. Oktober 2018, 12:11 Uhr
Inhaltsverzeichnis |
Tools
Copy the server-tools from our repository to the server e.g. to 'root/tools'
Sync Data
tools/rsync_mirror_all.sh &
The progress can be shown via:
tail -f sync_all.log
Manual DNS entries
add to 'etc/hosts':
127.0.0.1 apemapdb # If the license server is running on the same machine. 127.0.0.1 licenseserver
SSH Setup
edit '/etc/ssh/sshd_config': Port {OurPort} ClientAliveInterval 30 ClientAliveCountMax 5
DB Setup
Create apemap DB user:
tools/createdbuser.sh
Apache2
Install
apt-get install apache2
Enable required modules
a2enmod proxy a2enmod proxy_http a2enmod ssl a2enmod rewrite a2enmod headers
Change documents root
'etc/apache2/sites-enabled/000-default.conf', change document root to '/var/www'
Proxy And Header config
'/etc/apache2/apache2.conf' at the end add:
Header add mirrorId "APXX" ProxyPass /apemap http://localhost:8080/apemap ProxyPassReverse /apemap http://localhost:8080/apemap ProxyPass /install2 http://localhost:8080/apemap ProxyPassReverse /install2 http://localhost:8080/apemap ProxyPass /apemap2 http://localhost:8100 ProxyPassReverse /apemap2 http://localhost:8100 ProxyPass /osm http://localhost:7010 ProxyPassReverse /osm http://localhost:7010 ProxyPass /images http://apemap.com/images ProxyPassReverse /images http://apemap.com/images
SSL
a2ensite default-ssl
Edit 'default-ssl':
ServerName lic.apemap.at DocumentRoot /var/www SSLCertificateFile ...apemap/cert/cert_08_2018/server.crt SSLCertificateKeyFile ...apemap/cert/cert_08_2018/server.key SSLCertificateChainFile ...apemap/cert/cert_08_2018/verisign_intermediate.crt
Restart
/etc/init.d/apache2 restart
Tomcat
Install
apt-get install tomcat8 apt-get install openjdk-8-jdk
Configute tomcat policies 'etc/tomcat8/policy.d/04webapps.policy':
add the permissions shown in tools/info/tomcat/04webapps.policy.fragment.txt
Webapp apemap
Create a folder 'apemap' within '/var/lib/tomcat8/webapps' Create a link to this folder from /var/apemap
ln -s /var/lib/tomcat8/webapps/apemap/ /var/apemap
Sync the apemap webapp from the old server to the new one:
rsync -avz -e "ssh -p SSHPORT" USER@lic.apemap.at:/var/lib/tomcat7/webapps/apemap /var/lib/tomcat8/webapps
Logging
Create apemap logging folder for tomcat:
mkdir /var/log/apemap chmod a+rw /var/log/apemap/
PHP 5.6
apt update apt install software-properties-common add-apt-repository -y ppa:ondrej/php apt install php5.6 apt install php5.6-mysql apt clean && sudo apt autoclean a2dismod php7.2 a2enmod php5.6
PHP My Admin
Do not create the phpmyadmin databases the admin is asking for, do no enter any DB passwords.
apt-get install phpmyadmin
Change to a different folder, by editing: '/etc/apache2/conf-available/phpmyadmin.conf' change the alias to the alias currently used for phpmyadmin.