Hetzner - DokuWiki

Installation gängiger Software (Managed Server)/en
(Typos)
Zeile 5: Zeile 5:
  
  
=PEAR=
+
=Software Installer=
Having your own PEAR is sometimes necessary, for example, when you would like to install your own PEAR packages without any fuss or if you would like to use a version of PHP which is does not support the PEAR version on the server.
+
You can install your own software on a managed server via SSH using the "software" program.
  
==Requirements==
+
Usage:
===Pre-Installation===
+
  software install [PACKAGE]
* '''[REQUIRED]''' SSH access (Webhosting Level 19 or all managed servers)
+
  software upgrade [PACKAGE]
 +
  software uninstall [PACKAGE]
  
This guide describes the process using SSH access and assumes that you already are connected via SSH using your access details.
+
List tested packages:
 +
  software list
  
==PEAR Setup:==
+
List all available packages:
 +
  software list all
 +
 
 +
List all installed packages:
 +
  software list installed
 +
 
 +
 
 +
=General Informations and Tips=
 +
 
 +
==Processwatch==
 +
If a process is to run permanently on a managed server, a process release is required.
 +
Such a release is also necessary if the program needs more RAM. Most of the time you also realize that a process release is necessary if your process is terminated with "KILLED".
 +
 
 +
Please write us a support request from konsoleH and tell us the process or the program.
 +
 
 +
==Port releases==
 +
 
 +
If you need incoming or outgoing connections on ports that are not open by default, a port share is required.
 +
Please send us the following information in a support request via konsoleH:
 +
 
 +
1. local account/domain:
 +
2. external IP address:
 +
3. port:
 +
4. protocol (TCP, UDP, or both):
 +
5. direction (IN, OUT or both):
 +
 
 +
----
 +
 
 +
 
 +
=PEAR=
 +
Having your own PEAR is sometimes necessary, for example, when you would like to install your own PEAR packages without any fuss or if you would like to use a version of PHP which is does not support the PEAR version on the server.
 +
 
 +
==Installation==
 
  wget http://pear.php.net/go-pear.phar
 
  wget http://pear.php.net/go-pear.phar
 
  php go-pear.phar
 
  php go-pear.phar
Zeile 46: Zeile 80:
  
 
----
 
----
 +
  
 
=Composer=
 
=Composer=
==Requirements==
 
===Pre-Installation===
 
* '''[REQUIRED]''' SSH access (Level 19 or managed servers)
 
  
This guide describes an approach that uses SSH access and assumes that you already are connected via SSH with your access details.
+
Composer is an application-oriented package manager for the PHP programming language. Composer is executed from the command line and installs dependencies of a PHP program.  
  
==Composer setup:==
+
==Installation==
With the commands below, you can download the newest version and validate the signature. An important parameter on our managed servers is "-d allow_url_fopen=On". Without this, you will get error messages.
+
php -d allow_url_fopen=On -r "readfile('https://getcomposer.org/installer');" > composer-setup.php
+
php -d allow_url_fopen=On composer-setup.php
+
php -r "unlink('composer-setup.php');"
+
  
==Using Composer:==
+
software install composer
  php -d allow_url_fopen=On composer.phar
+
 +
==Usage==
 +
 
 +
  composer install [PACKET]
 +
composer uninstall [PACKET]
 +
 +
More commands:
  
To create a alias for using composer directly, simply use the following command:
+
  composer list
  echo "alias composer='/usr/home/$USER/composer.phar'" >> ~/.bashrc && source ~/.bashrc
+
  
 
==Sources==
 
==Sources==
Zeile 72: Zeile 105:
  
 
----
 
----
 +
  
 
=node.js=
 
=node.js=
==Requirements==
+
 
===Pre-Installation===
+
Node.js ist eine serverseitige Plattform in der Softwareentwicklung zum Betrieb von Netzwerkanwendungen. Insbesondere lassen sich Webserver damit realisieren.
* '''[REQUIRED]''' SSH access (managed servers)
+
===Post-Installation===
+
* '''[OPTIONAL]''' You will also need approval to use "node" if you intend on running a "node" process for an extended period of time. You can request us to provide one of these to you by sending a support request via the user interface KonsoleH.
+
This guide describes an approach that uses SSH access and assumes that you already are connected via SSH with your access details.
+
  
 
==Installation==
 
==Installation==
Create a directory for the installation:
 
mkdir nodejs
 
cd nodejs
 
Download the current binaries (You need to replace the X with the downloaded version number.):
 
wget https://nodejs.org/download/release/latest/node-vX.X.X-linux-x64.tar.gz
 
You need to determine the exact download link by going to the website nodejs.org/download. (For example: https://nodejs.org/download/release/latest/node-v8.1.2-linux-x64.tar.gz)
 
  
Extract binaries:
+
  software install node
  tar -xzf node-vX.X.X-linux-x64.tar.gz
+
 
+
Edit .bashrc:
+
echo "export PATH=/usr/home/$USER/nodejs/node-vX.X.X-linux-x64/bin:${PATH}" >> ~/.bashrc
+
 
+
You can also download and extract automatically
+
link="https://nodejs.org/download/release/latest/"
+
latest=$(curl -s $link | sed -e 's/<[^>]*>//g' | grep "linux-x64.tar.gz" | awk {'print $1'}) &&
+
wget $link/$latest &&
+
tar -xzf $latest &&
+
name=$(echo $latest | sed "s/.tar.gz//"); &&
+
echo "export PATH=/usr/home/$USER/nodejs/$name/bin:${PATH}" >> ~/.bashrc && source ~/.bashrc
+
  
  
 
==Use node.js==
 
==Use node.js==
/usr/home/<''USERNAME''>/node/bin/node ''YourScript.js''
 
or:
 
 
  node ''YourScript.js''
 
  node ''YourScript.js''
The second variant is only possible with entries in the .bashrc file.
 
  
 
==Source==
 
==Source==
Zeile 114: Zeile 123:
  
 
----
 
----
 +
  
 
=Redis=
 
=Redis=
==Requirements==
 
===Pre-Installation===
 
* '''[REQUIRED]''' SSH access (managed servers)
 
* '''[REQUIRED]''' A compiler is required for Redis. You can request us to provide one of these to you by sending a support request via the user interface KonsoleH. Please ask for the Hetzner Development Package (hos-dev)
 
===Post-Installation===
 
* '''[OPTIONAL]''' Request that we add "redis-server" to the configuration of our process monitoring system. Please write a support ticket via the user interface KonsoleH.
 
* '''[OPTIONAL]''' Request an open port (optional; standard port 6379) - Please request an open port by sending a support request via the user interface KonsoleH. If you have changed the port in the file "redis.conf", please enter your port in place of the default value in your support request. '''Please note that additional open ports are generally not necessary and represent a considerable safety risk!'''
 
  
This guide describes an approach that uses SSH access and assumes that you already are connected via SSH with your access details.
+
Redis ist eine In-Memory-Datenbank. Redis kann zum Beispiel als Alternative zu "memcached" verwendet werden.
  
==Download and extract Redis==
+
==Installation==
First, please select the project directory in which you would like to install Redis.
+
wget http://download.redis.io/releases/redis-stable.tar.gz
+
tar xzf redis-stable.tar.gz
+
cd redis-stable
+
  
==Installation==
+
  software install redis
Enter the following commands in this order for the installation:
+
  make
+
make test
+
cd src
+
chmod ug+x redis-server
+
  
 
==Start Redis==
 
==Start Redis==
  ./redis-server
+
  redis-server
 
You can start this in a screen session, or you can start the command in the background:
 
You can start this in a screen session, or you can start the command in the background:
  ./redis-server &
+
  redis-server &
  
 
==Check that Redis is running==
 
==Check that Redis is running==
  ./redis-cli
+
  redis-cli
 
The output of the prompt has now changed to "redis 127.0.0.1:6379>". If you enter a "ping", you should receive a "pong" in return if Redis is running properly.
 
The output of the prompt has now changed to "redis 127.0.0.1:6379>". If you enter a "ping", you should receive a "pong" in return if Redis is running properly.
  
Zeile 172: Zeile 166:
  
 
----
 
----
 +
  
 
=Elasticsearch=
 
=Elasticsearch=
==Requirements==
 
===Pre-Installation===
 
* '''[REQUIRED]''' SSH access (managed servers)
 
===Post-Installation===
 
* '''[OPTIONAL]''' Request that we add "java" to the configuration of our process monitoring system. Please write a support ticket via the user interface KonsoleH.
 
* '''[OPTIONAL]''' Request an open port (standard port 9200) - Please request an open port by sending a support request via the user interface KonsoleH. If you have changed the port, please enter your port in place of the default value in your support request. '''Please note that additional open ports are generally not necessary and represent a considerable safety risk!'''
 
  
This guide describes an approach that uses SSH access and assumes that you already are connected via SSH with your access details.
+
Elasticsearch ist eine Suchmaschine welche in Java geschrieben ist. Das Programm speichert Dokumente in einem NoSQL-Format.
  
==Download and install==
+
==Installation==
  
Download link from: https://www.elastic.co/de/downloads/elasticsearch
+
  software install elasticsearch
 
+
mkdir elasticsearch
+
cd elasticsearch
+
curl -L -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-X.Y.Z.tar.gz
+
  tar xvf elasticsearch-X.Y.Z.tar.gz
+
If necessary, please replace the version number (X.Y.Z) with the number of your preferred version, preferably with the most recent version number. The download URL, path names, and file names may thus vary.
+
  
 
==Start Elasticsearch==
 
==Start Elasticsearch==
  cd elasticsearch-X.Y.Z/bin/
+
  elasticsearch
./elasticsearch
+
  
 
==Test Elasticsearch==
 
==Test Elasticsearch==
Zeile 209: Zeile 191:
  
 
----
 
----
 +
  
 
=GlassFish=
 
=GlassFish=
==Requirements==
 
===Pre-Installation===
 
* '''[REQUIRED]''' SSH access (managed servers)
 
===Post-Installation===
 
* '''[OPTIONAL]''' Request that we add "java" to the configuration of our process monitoring system. Please write a support ticket via the user interface KonsoleH.
 
* '''[OPTIONAL]''' Request an open ports for ports 4848 and 8080 - Please request an open port by sending a support request via the user interface KonsoleH. '''Please note that additional open ports are generally not necessary and represent a considerable safety risk!'''
 
  
This guide describes an approach that uses SSH access and assumes that you already are connected via SSH with your access details.
+
GlassFish is the reference implementation of Java EE.
 +
 
 +
==Installation==
  
==Download and extract==
+
  software install glassfish
  wget http://download.java.net/glassfish/4.1.1/release/glassfish-4.1.1.zip
+
unzip glassfish-4.1.1.zip
+
cd glassfish4
+
wget https://glassfish.java.net/downloads/quickstart/hello.war
+
If necessary, please switch out the download link to obtain the most current version of GlassFish.
+
  
 
==Start GlassFish==
 
==Start GlassFish==
  cd bin
+
  asadmin start-domain
./asadmin start-domain
+
  
 
==GlassFish testen==
 
==GlassFish testen==
  ./asadmin deploy ../hello.war
+
  asadmin deploy ../hello.war
 
You should see the following output:
 
You should see the following output:
 
  Application deployed with name hello.
 
  Application deployed with name hello.
Zeile 241: Zeile 214:
 
The web interface administrator is optional.
 
The web interface administrator is optional.
 
It is deactivated due to security concerns and must be activated when it is required. To do this, you must first create a password (and a user):
 
It is deactivated due to security concerns and must be activated when it is required. To do this, you must first create a password (and a user):
  ./asadmin change-admin-password
+
  asadmin change-admin-password
 
The standard user is "admin", and no password is provided. After the last command, a password is provided, and with that you can access the web interface:
 
The standard user is "admin", and no password is provided. After the last command, a password is provided, and with that you can access the web interface:
  ./asadmin enable-secure-admin
+
  asadmin enable-secure-admin
 
You will be asked to enter the user and password that you have just finished creating.
 
You will be asked to enter the user and password that you have just finished creating.
 
Then you will be able to use the web interface administrator.
 
Then you will be able to use the web interface administrator.
Zeile 251: Zeile 224:
  
 
----
 
----
 +
  
 
=MongoDB=
 
=MongoDB=
==Requirements==
 
===Pre-Installation===
 
* '''[REQUIRED]''' SSH access (managed servers)
 
===Post-Installation===
 
* '''[OPTIONAL]''' Request that we add "mongod" to the configuration of our process monitoring system. Please write a support ticket via the user interface KonsoleH.
 
* '''[OPTIONAL]''' Request an open port/port forwarding (optional) '''Please note that additional open ports are generally not necessary and represent a considerable safety risk!'''
 
  
This guide describes an approach that uses SSH access and assumes that you already are connected via SSH with your access details.
+
MongoDB is a document-oriented database. Since the database is document-oriented, it can manage collections of JSON-like documents.
 +
 
  
 
==Installation==
 
==Installation==
  
  Note: Please replace the version numbers X.Y.Z with the version you want to install.
+
software install mongodb
 
+
curl -O https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-X.Y.Z.tgz
+
tar xvf mongodb-linux-x86_64-X.Y.Z.tgz
+
mv mongodb-linux-x86_64-X.Y.Z mongodb
+
rm -f mongodb-linux-x86_64-X.Y.Z.tgz
+
cd mongodb
+
  
 
==Start MongoDB==
 
==Start MongoDB==
 
You can start MongoDB as a daemon (which will run in the background) using the following command. You can omit the parameter "--port" if the databank will only be used locally.
 
You can start MongoDB as a daemon (which will run in the background) using the following command. You can omit the parameter "--port" if the databank will only be used locally.
  ./bin/mongod --dbpath /usr/home/<''USERNAME''>/mongodb/data/db/ --port 27017 --fork --logpath /usr/home/<''USERNAME''>/mongodb/log.txt
+
  mongod --dbpath /usr/home/<''USERNAME''>/mongodb/data/db/ --port 27017 --fork --logpath /usr/home/<''USERNAME''>/mongodb/log.txt
 
(The command must be all one line.)
 
(The command must be all one line.)
  
 
Alternative:
 
Alternative:
  ./bin/mongod --dbpath /usr/home/<''USERNAME''>/mongodb/data/db/
+
  mongod --dbpath /usr/home/<''USERNAME''>/mongodb/data/db/
  
 
==Test MongoDB==
 
==Test MongoDB==
  ./bin/mongo
+
  mongo
 
If this can be successfully started, then the installation was also performed successfully. You now have a shell similar to what is available with databank systems like MySQL. You can use the command "exit" to leave this program.
 
If this can be successfully started, then the installation was also performed successfully. You now have a shell similar to what is available with databank systems like MySQL. You can use the command "exit" to leave this program.
  
Zeile 295: Zeile 258:
  
 
----
 
----
 +
  
 
=FFmpeg=
 
=FFmpeg=
==Requirements==
 
===Pre-Installation===
 
* '''[OPTIONAL]''' SSH access (managed servers) - SSH access is not entirely necessary. It is possible to also do the installation via FTP.
 
===Post-Installation===
 
* '''[OPTIONAL]''' Request approval - This is only necessary if you plan on processing very large files.
 
  
This guide describes an approach that uses SSH access and assumes that you already are connected via SSH with your access details.
+
FFmpeg consists of a number of free computer programs and program libraries that can record, convert, send and package digital video and audio material in various container formats.
  
==Download and extract FFmpeg==
+
==Installation==
 
+
  Note: Replace X.Y with the version you want to install
+
 
+
wget http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz
+
tar xJf ffmpeg-release-64bit-static.tar.xz
+
mv $(ls | grep ffmpeg-[1-9]*) ffmpeg
+
  
 +
software install ffmpeg
 +
 +
 
==Use FFmpeg==
 
==Use FFmpeg==
 
Examples of command lines/commands:
 
Examples of command lines/commands:
Zeile 329: Zeile 285:
  
 
----
 
----
 +
  
 
=Apache-Tomcat=
 
=Apache-Tomcat=
==Requirements==
 
===Pre-Installation===
 
* '''[REQUIRED]''' SSH access (managed servers)
 
===Post-Installation===
 
* '''[OPTIONAL]''' Request an open port for the port that you have configured - Please request an open port by sending a support request via the user interface KonsoleH. '''Please note that additional open ports are generally not necessary and represent a considerable safety risk!'''
 
* '''[OPTIONAL]''' Request that we add "java" to the configuration of our process monitoring system. Please write a support ticket via the user interface KonsoleH.
 
  
This guide describes an approach that uses SSH access and assumes that you already are connected via SSH with your access details.
+
Apache Tomcat is an open source web server and web container that implements the specification for Java Servlets and JavaServer Pages and thus allows web applications written in Java to be executed on a servlet or JSP basis.
  
==Download und Installation==
+
==Installation==
You need to use binary core code in .tar.gz format because a Linux Debian system will be running. The current download link is available at: http://mirror.netcologne.de/apache.org/tomcat/
+
Please replace <VERSION> in the following steps with the version you have downloaded.
+
wget http://mirror.netcologne.de/apache.org/tomcat/tomcat-<VERSION>/v<VERSION>/bin/apache-tomcat-<VERSION>.tar.gz
+
tar -xzf apache-tomcat-<''VERSION''>.tar.gz
+
mv apache-tomcat-<''VERSION''> tomcat
+
  
You can edit the .bashrc automatically with the following script:
+
  software install tomcat
 
+
 
+
  echo "export CATALINA_HOME=\"/usr/home/$USER/tomcat/\"" >> ~/.bashrc
+
echo "export JAVA_HOME=\"/usr/\"" >> ~/.bashrc
+
source ~/.bashrc
+
echo "alias tomcat_start=\"$CATALINA_HOME/bin/startup.sh\"" >> ~/.bashrc
+
echo "alias tomcat_stop=\"$CATALINA_HOME/bin/shutdown.sh\"" >> ~/.bashrc
+
source ~/.bashrc;
+
  
 
==Start Tomcat==
 
==Start Tomcat==
  tomcat_start
+
  catalina run
 
To test whether Tomcat is running, you just need to go to the website of the account via the selected port. For example: http://ihre-domain.de:8080/
 
To test whether Tomcat is running, you just need to go to the website of the account via the selected port. For example: http://ihre-domain.de:8080/
 
Tomcat also deploys a "Hello world" project that you can go to:
 
Tomcat also deploys a "Hello world" project that you can go to:
Zeile 384: Zeile 322:
  
 
----
 
----
 +
  
 
=Apache-Solr=
 
=Apache-Solr=
==Requirements==
 
===Pre-Installation===
 
* '''[REQUIRED]''' SSH access (managed servers)
 
===Post-Installation===
 
* '''[OPTIONAL]''' Request that we add "java" to the configuration of our process monitoring system. Please write a support ticket via the user interface KonsoleH.
 
* '''[OPTIONAL]''' Request an open port for the port that you have configured - Please request an open port by sending a support request via the user interface KonsoleH. '''Please note that additional open ports are generally not necessary and represent a considerable safety risk!'''
 
  
This guide describes an approach that uses SSH access and assumes that you already are connected via SSH with your access details.
+
Apache Solr is a search platform written in Java.
  
==Download==
+
==Installation==
You will need the newest version of Apache-Solr for the next couple steps of the installation. You can find the newest version here: http://lucene.apache.org/solr/mirrors-solr-latest-redir.html
+
Please select the source of your choice. Each source offers several different downloads; you will need the link address to the ZIP version, which you can find by right-clicking on the link.
+
Insert the link in the following command and run it on the server.
+
wget http://mirror.23media.de/apache/lucene/solr/X.Y.Z/solr-X.Y.Z.zip
+
unzip solr-X.Y.Z.zip
+
mv solr-X.Y.Z solr
+
  
==Add configuration to .bashrc file==
+
  software install solr
You can add a configuration to the .bashrc file by using the following command:
+
  echo "export PATH=/usr/home/$USER/solr/bin:${PATH}" >> ~/.bashrc
+
source ~/.bashrc;
+
  
 
==Use Solr==
 
==Use Solr==
Zeile 429: Zeile 353:
  
 
----
 
----
 +
  
 
=Subversion (SVN)=
 
=Subversion (SVN)=
==Requirements==
 
===Pre-Installation===
 
* '''[REQUIRED]''' SSH access (managed servers)
 
===Post-Installation===
 
* '''[OPTIONAL]''' Request that we add "svnserve" to the configuration of our process monitoring system. Please write a support ticket via the user interface KonsoleH.
 
  
 
This guide describes an approach that uses SSH access and assumes that you already are connected via SSH with your access details.
 
This guide describes an approach that uses SSH access and assumes that you already are connected via SSH with your access details.
Zeile 476: Zeile 396:
  
 
----
 
----
 +
  
 
=Resilio Sync (BTSync)=
 
=Resilio Sync (BTSync)=
==Requirements==
 
===Pre-Installation===
 
* '''[REQUIRED]''' ssh access (managed servers)
 
===Post-Installation===
 
* '''[OPTIONAL]''' Request that we add "btsync" to the configuration of our process monitoring system. Please write a support ticket via the user interface KonsoleH.
 
* '''[OPTIONAL]''' Request an open port for port 8888 - Please request that this port be opened by sending a support request via the user interface KonsoleH. '''Please note that additional open ports are generally not necessary and represent a considerable safety risk!'''
 
 
This guide describes an approach that uses SSH access and assumes that you already are connected via SSH with your access details.
 
  
 
==Installation==
 
==Installation==
  
  mkdir -p ~/rslsync
+
  software install rslsync
wget -O ~/rslsync/ https://download-cdn.resilio.com/stable/linux-x64/resilio-sync_x64.tar.gz
+
tar xzf ~/rslsync/resilio-sync_x64.tar.gz
+
  
 
==Start Resilio Sync / BTSync==
 
==Start Resilio Sync / BTSync==
 
Using the following command, set the IP address for the managed server and then execute it.
 
Using the following command, set the IP address for the managed server and then execute it.
  ./btsync --webui.listen <server_ip>:8888
+
  rslsync --webui.listen <server_ip>:8888
 
Once the port has been opened, you can then access the administration interface via http://<''SERVER-IP''>:8888/gui
 
Once the port has been opened, you can then access the administration interface via http://<''SERVER-IP''>:8888/gui
 
With the following command, you can access Help for all BTSync funcitons:
 
With the following command, you can access Help for all BTSync funcitons:
  ./btsync --help
+
  rslsync --help
 
Normally you need to create a configuration file and one folder in which to save the data.
 
Normally you need to create a configuration file and one folder in which to save the data.
  
Zeile 509: Zeile 420:
  
 
----
 
----
 +
  
 
=wkhtmltopdf=
 
=wkhtmltopdf=
  
 
==Installation without SSH access==
 
==Installation without SSH access==
# Download onto your PC the appropriate package (Debian 9 (stretch) amd64) from the developer's website [http://wkhtmltopdf.org/downloads.html http://wkhtmltopdf.org/downloads.html]
+
# Download onto your PC the appropriate package (Debian 9 (stretch) amd64) from the developer's website [http://wkhtmltopdf.org/downloads.tml http://wkhtmltopdf.org/downloads.html]
 
# Extract the file using the tool of your choice (for example ]http://7-zip.org/ 7-Zip])
 
# Extract the file using the tool of your choice (for example ]http://7-zip.org/ 7-Zip])
 
# Within the archives, or in extraction folder, you will find the necessary program in the path wkhtmltox/bin/.
 
# Within the archives, or in extraction folder, you will find the necessary program in the path wkhtmltox/bin/.
Zeile 521: Zeile 433:
  
 
==Installation with SSH access==
 
==Installation with SSH access==
This guide describes an approach that uses SSH access and assumes that you already are connected via SSH with your access details.
+
 
The provided download link may need to be replaced with a current link. You can find the most current version at: [http://wkhtmltopdf.org/downloads.html http://wkhtmltopdf.org/downloads.html]
+
  software install wkhtmltopdf
  wget https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.stretch_amd64.deb
+
dpkg -x wkhtmltox_0.12.5-1.stretch_amd64.deb wkhtmltopdf
+
You will now find the required program "wkhtmltopdf" at <code>wkhtmltopdf/usr/local/bin/</code> and you can open the tool directly from the application by entering the complete path.
+
  
 
==Source==
 
==Source==
Zeile 531: Zeile 440:
  
 
----
 
----
 +
  
 
=Ruby=
 
=Ruby=
Zeile 571: Zeile 481:
  
 
http://www.binarytides.com/quick-tip-installing-ruby-gems-in-the-users-home-directory/
 
http://www.binarytides.com/quick-tip-installing-ruby-gems-in-the-users-home-directory/
 +
 +
----
  
  
 
=NGINX=
 
=NGINX=
==Requirements==
 
===Pre-Installation===
 
*[REQUIRED] SSH-Access (Managed Server)
 
*[REQUIRED] hos-dev package (via support request)
 
  
===Post-Installation===
+
Nginx is a web server software but also a reverse proxy and email proxy.
*[REQUIRED] Firewall exeption (via Supportanfrage)
+
*[OPTIONAL] You will also need approval to use "nginx" if you intend on running a "nginx" process for an extended period of time. You can request us to provide one of these to you by sending a support request via the user interface KonsoleH.
+
  
This guide describes an approach that uses SSH access and assumes that you already are connected via SSH with your access details and are currently in your Public_html folder.
 
 
==Installation==
 
==Installation==
Create a Install and a Download directory
 
mkdir nginx
 
cd nginx
 
  
Download the Installation File (replace x.y.z with any version that can be found on: https://nginx.org/en/download.html )
+
  software install nginx
  wget https://nginx.org/download/nginx-x.y.z.tar.gz
+
 
+
Extract the Files
+
tar -xvf nginx-x.y.z.tar.gz && cd nginx-x.y.z
+
 
+
Configure the installation directory
+
./configure --prefix=../
+
 
+
Install nginx
+
make && make install
+
 
+
==Configuration==
+
Change your configuration
+
cd ../ && vim conf/nginx.conf
+
 
+
search for the port definition
+
server {
+
    listen      80;
+
replace 80 with any port above 1024
+
  
 
==Usage==
 
==Usage==
 
Start nginx
 
Start nginx
  ./sbin/nginx
+
  nginx
  
 
Check for functionality by opening your domain on the port you chose with a web-browser. (example: example.com:8080)
 
Check for functionality by opening your domain on the port you chose with a web-browser. (example: example.com:8080)
  
 
==Forwarding==
 
==Forwarding==
Forwarding Port 80 to the set Port with the .htacess (Please replace "YourDomain" and "YourPort" with your Domain and the port you set.)
+
Forwarding Port 80 to the set Port with the .htacess (Please replace "YourDomain" with your Domain set.)
  
 
  RewriteEngine On
 
  RewriteEngine On
 
  RewriteCond %{SERVER_PORT} 80
 
  RewriteCond %{SERVER_PORT} 80
  RewriteRule (.*) http://YourDomain:YourPort/
+
  RewriteRule (.*) http://YourDomain:8080/
 +
 
 +
----
 +
 
  
 
=Varnish=
 
=Varnish=
  
==Requirements==
+
Varnish is a cache for dynamic websites with a lot of content. Unlike other reverse proxies, which often originate from client-side proxies or servers, Varnish was designed from the ground up as a reverse proxy.
===Before the installation===
+
*[REQUIRED] SSH Access (Managed Server)
+
*[REQUIRED] hos-dev, pkg-config, python-docutils, python-sphinx and libedit-dev - For the installation of these packages, please create a support request via konsoleH.
+
 
+
These instructions describe the procedure via SSH access and assume that you are already connected with your access data via SSH.
+
  
 
==Installation==
 
==Installation==
Download and extract
 
wget https://varnish-cache.org/_downloads/varnish-6.1.1.tgz && tar xzf varnish-6.1.1.tgz && cd varnish-6.1.1
 
  
Install Varnish
+
software install varnish
  sh autogen.sh && mkdir varnish && sh configure --prefix=mkdir -p /usr/home/<user>/varnish-6.1.1/varnish/ && make
+
 
  mkdir -p /usr/home/<user>/varnish-6.1.1/varnish/var/varnish/<server>.your-server.de/
+
Test Varnish
 +
 
 +
  varnishd -V
 +
  varnishd -a :6081 -T localhost:6082 -b localhost:8080
  
After that, you can start Varnish
+
[[Kategorie:Managed Server]]
bin/varnishd/varnishd -V
+
bin/varnishd/varnishd -a :6081 -T localhost:6082 -b localhost:8080
+
  
 
[[Kategorie:Managed Server]]
 
[[Kategorie:Managed Server]]
 
[[Kategorie:Managed Server]]
 
[[Kategorie:Managed Server]]

Version vom 1. April 2019, 07:25 Uhr


Customers install and use the following programs at their own risk. The user is not granted the right to support services related to these programs. If customers have questions regarding konsoleH or about server configurations, we will be happy to assist them.


Inhaltsverzeichnis

Software Installer

You can install your own software on a managed server via SSH using the "software" program.

Usage:
  software install [PACKAGE]
  software upgrade [PACKAGE]
  software uninstall [PACKAGE]
List tested packages:
  software list
List all available packages:
  software list all
List all installed packages:
  software list installed
  

General Informations and Tips

Processwatch

If a process is to run permanently on a managed server, a process release is required. Such a release is also necessary if the program needs more RAM. Most of the time you also realize that a process release is necessary if your process is terminated with "KILLED".

Please write us a support request from konsoleH and tell us the process or the program.

Port releases

If you need incoming or outgoing connections on ports that are not open by default, a port share is required. Please send us the following information in a support request via konsoleH:

1. local account/domain: 2. external IP address: 3. port: 4. protocol (TCP, UDP, or both): 5. direction (IN, OUT or both):



PEAR

Having your own PEAR is sometimes necessary, for example, when you would like to install your own PEAR packages without any fuss or if you would like to use a version of PHP which is does not support the PEAR version on the server.

Installation

wget http://pear.php.net/go-pear.phar
php go-pear.phar

Change the following entries for the installation (LOGIN = FTP login for the account):

2. Temporary directory for processing            : /usr/home/LOGIN/.tmp
3. Temporary directory for downloads             : /usr/home/LOGIN/.tmp

After the editing, please press "Enter". When you are asked if the php.ini should be changed, choose [n].

Set the PATH variable so you can use the local PEAR

echo 'export PATH="~/pear/bin:$PATH"' >> ~/.bashrc
echo 'export PHP_PEAR_PHP_BIN="/usr/bin/php"' >> ~/.bashrc
source ~/.bashrc

(Note: The path /usr/bin/php always points to the newest version of PHP available on the server. If you would like to use a specific version of PHP, edit the path, for example PHP 5.5 => /usr/bin/php55 )

Use PEAR

pear

List packages

pear list-all

Install new packages

pear install <package>

Using your own PEAR in PHP scripts

Annotate the .htaccess file:

php_value include_path /usr/home/LOGIN/pear/share/pear/:.:/usr/local/lib/php/


Composer

Composer is an application-oriented package manager for the PHP programming language. Composer is executed from the command line and installs dependencies of a PHP program.

Installation

software install composer

Usage

composer install [PACKET]
composer uninstall [PACKET]

More commands:

composer list

Sources

https://getcomposer.org/

https://getcomposer.org/download/



node.js

Node.js ist eine serverseitige Plattform in der Softwareentwicklung zum Betrieb von Netzwerkanwendungen. Insbesondere lassen sich Webserver damit realisieren.

Installation

software install node


Use node.js

node YourScript.js

Source

https://nodejs.org/



Redis

Redis ist eine In-Memory-Datenbank. Redis kann zum Beispiel als Alternative zu "memcached" verwendet werden.

Installation

software install redis

Start Redis

redis-server

You can start this in a screen session, or you can start the command in the background:

redis-server &

Check that Redis is running

redis-cli

The output of the prompt has now changed to "redis 127.0.0.1:6379>". If you enter a "ping", you should receive a "pong" in return if Redis is running properly.

Redis-CLI: Example for how to manually set a key

redis 127.0.0.1:6379> set mykey somevalue
OK
redis 127.0.0.1:6379> get mykey
"somevalue"

@reboot Cronjob

You will need to set up a cronjob so that the daemon will not have to be manually started after the server has been restarted. To do this, go to KonsoleH and select the desired account domain. Then go to the menu "Services"->"Cronjob manager"->"Advanced view". Then insert the following lines at the end and, finally, click on "Save":

@reboot /usr/home/<USERNAME>/redis-stable/src/redis-server

If necessary, adjust the path to match yours.

Hint

As a key value databank (NoSQL), which is used to store data in RAM, Redis can be an good alternative to using "Memcached".

Source and helpful links

http://redis.io

http://devdocs.magento.com/guides/m1x/ce18-ee113/using_redis.html (Use Redis with Magento)

https://github.com/nrk/predis (Redis Client)

https://wordpress.org/plugins/redis-cache/ (Wordpress Plugin - Redis Object Cache)



Elasticsearch

Elasticsearch ist eine Suchmaschine welche in Java geschrieben ist. Das Programm speichert Dokumente in einem NoSQL-Format.

Installation

software install elasticsearch

Start Elasticsearch

elasticsearch

Test Elasticsearch

curl 'localhost:9200/_cat/indices?v'

If Elasticsearch is successfully running, then it will output the following:

health status index pri rep docs.count docs.deleted store.size pri.store.size

This output means that we don't have any indexes in this cluster yet.

Sources

https://www.elastic.co

https://www.elastic.co/guide/en/elasticsearch/reference/



GlassFish

GlassFish is the reference implementation of Java EE.

Installation

software install glassfish

Start GlassFish

asadmin start-domain

GlassFish testen

asadmin deploy ../hello.war

You should see the following output:

Application deployed with name hello.
Command deploy executed successfully.

Alternatively, you can access "<your-domain.tdl>:8080" in your browser, and you will receive a reply when the process is running.

Administrator web interface

The web interface administrator is optional. It is deactivated due to security concerns and must be activated when it is required. To do this, you must first create a password (and a user):

asadmin change-admin-password

The standard user is "admin", and no password is provided. After the last command, a password is provided, and with that you can access the web interface:

asadmin enable-secure-admin

You will be asked to enter the user and password that you have just finished creating. Then you will be able to use the web interface administrator.

Source

https://glassfish.java.net/



MongoDB

MongoDB is a document-oriented database. Since the database is document-oriented, it can manage collections of JSON-like documents.


Installation

software install mongodb

Start MongoDB

You can start MongoDB as a daemon (which will run in the background) using the following command. You can omit the parameter "--port" if the databank will only be used locally.

mongod --dbpath /usr/home/<USERNAME>/mongodb/data/db/ --port 27017 --fork --logpath /usr/home/<USERNAME>/mongodb/log.txt

(The command must be all one line.)

Alternative:

mongod --dbpath /usr/home/<USERNAME>/mongodb/data/db/

Test MongoDB

mongo

If this can be successfully started, then the installation was also performed successfully. You now have a shell similar to what is available with databank systems like MySQL. You can use the command "exit" to leave this program.

Sources

https://docs.mongodb.com/manual/tutorial/install-mongodb-on-linux/

https://docs.mongodb.com/manual/mongo/

https://www.mongodb.com/mongodb-security-best-practices

https://github.com/mongodb/mongo/blob/master/rpm/mongod.conf (Examples of configurations)



FFmpeg

FFmpeg consists of a number of free computer programs and program libraries that can record, convert, send and package digital video and audio material in various container formats.

Installation

software install ffmpeg


Use FFmpeg

Examples of command lines/commands:

./ffmpeg/ffmpeg -i MeinLied.mp3 MeinLied.wav
./ffmpeg/ffmpeg -i MeinVideo.avi MeinVideo.mp4

Installation via FTP (without SSH)

  1. Start downloading the static builds from http://johnvansickle.com/ffmpeg/ (64-bit Linux) onto your local computer.
  2. You need to extract the downloaded file before you do the upload. To extract the .tar.xz file, we recommend that you use the program at 7-Zip.
  3. Using WebFTP (KonsoleH) or another FTP program (for example, FileZilla), upload the necessary binaries (for example, ffmpeg) onto the server.
  4. You need to set the permissions for the uploaded files to "755" using Filezilla or WebFTP, for example.
  5. You can now include the downloaded scripts in your programming.

Source

http://johnvansickle.com/ffmpeg/



Apache-Tomcat

Apache Tomcat is an open source web server and web container that implements the specification for Java Servlets and JavaServer Pages and thus allows web applications written in Java to be executed on a servlet or JSP basis.

Installation

software install tomcat

Start Tomcat

catalina run

To test whether Tomcat is running, you just need to go to the website of the account via the selected port. For example: http://ihre-domain.de:8080/ Tomcat also deploys a "Hello world" project that you can go to: http://ihre-domain.de:8080/examples/servlets/servlet/HelloWorldExample

Additional configuration (optional)

If Tomcat is meant to sit behind an Apache proxy, you will need to adjust the files .htaccess and server.xml. The following must be amended/inserted in the .htaccess in the document root for the account:

RewriteEngine on
RewriteRule   ^(.*)  http://localhost:8080/$1 [P]

The pre-built "connector" must be extended by a few lines in the Tomcat file server.xml (tomcat/conf/server.xml):

URIEncoding="UTF-8"
proxyPort="80"

The block should look like the one below in its entirety:

<Connector port="8080" protocol="HTTP/1.1"
              connectionTimeout="20000"
              URIEncoding="UTF-8"
              proxyPort="80"
              redirectPort="8443" />

Sources

tomcat.apache.org

tomcat.apache.org/download-90.cgi



Apache-Solr

Apache Solr is a search platform written in Java.

Installation

software install solr

Use Solr

Start Aprache-Solr using the following command:

solr start

The monitor output should look like this:

Waiting up to 30 seconds to see Solr running on port 8983 [/]
Started Solr server on port 8983 (pid=19302). Happy searching!

You can now access the Solr admin using your browser via http://IhreDomain.tld:8983. Important note: The port that you use must be opened in advance.

Additional configuration (optional)

If Solr is meant to sit behind an Apache proxy, you will need to adjust the file .htaccess. The following must be amended/inserted in the .htaccess in the document root for the account:

RewriteEngine on
RewriteRule   ^(.*)  http://localhost:8983/$1 [P]

Source and helpful links

http://lucene.apache.org/solr/

http://www.solrtutorial.com/solr-in-5-minutes.html

http://yonik.com/solr-4-tutorial/



Subversion (SVN)

This guide describes an approach that uses SSH access and assumes that you already are connected via SSH with your access details.

SVN is already installed, and therefore it must only be set up and used. SVN can be operated with multiple users, but it cannot be used with multiple SSH users.

Preparation

First, create a main folder for the repositories to help you manage your data in an orderly way. This folder should not be located in the "public_html" directory for security reasons. Create a main folder in the home directory:

mkdir ~/subversion

Create repository

It is recommendable to create a new repository for every new project.

mkdir ~/subversion/testprojekt
svnadmin create ~/subversion/testprojekt

(optional) Create user

To do this, open the configuration folder with the editor of your choice:

nano ~/subversion/testprojekt/conf/svnserve.conf

Write the following lines in this file:

anon-access = none
auth-access = write
password-db = passwd

Now you need to define the user. This user must match the SSH user (FTP main user); the password should also match. For this, you can open the password file with the editor of your choice:

nano ~/subversion/testprojekt/conf/passwd

In the following format, insert your username and password:

<USERNAME> = <PASSWORT>

Start Subversion as a Daemon

svnserve -d

Use SVN

Now you can use SVN as usual via SSH.

svn co svn+ssh://sshhosteintrag/usr/home/<FTP-USERNAME>/subversion/testprojekt

Sources

https://civicactions.com/blog/how-to-set-up-an-svn-repository-in-7-simple-steps/

https://subversion.apache.org/



Resilio Sync (BTSync)

Installation

software install rslsync

Start Resilio Sync / BTSync

Using the following command, set the IP address for the managed server and then execute it.

rslsync --webui.listen <server_ip>:8888

Once the port has been opened, you can then access the administration interface via http://<SERVER-IP>:8888/gui With the following command, you can access Help for all BTSync funcitons:

rslsync --help

Normally you need to create a configuration file and one folder in which to save the data.

Sources

https://getsync.com/

https://wiki.archlinux.org/index.php/BitTorrent_Sync#Configuration

https://wiki.ubuntuusers.de/BitTorrent_Sync/#Manuell



wkhtmltopdf

Installation without SSH access

  1. Download onto your PC the appropriate package (Debian 9 (stretch) amd64) from the developer's website http://wkhtmltopdf.org/downloads.html
  2. Extract the file using the tool of your choice (for example ]http://7-zip.org/ 7-Zip])
  3. Within the archives, or in extraction folder, you will find the necessary program in the path wkhtmltox/bin/.
  4. Tranfer this file (wkhtmltopdf) to the server via FTP.
  5. You will be able to execute the file by assigning it the permission "755". You can change the permission of the file via the FTP program that you used, or you can use the WebFTP interface in KonsoleH.
  6. Now you can open the tool directly from the application by entering the complete path.

Installation with SSH access

software install wkhtmltopdf

Source

http://wkhtmltopdf.org



Ruby

Requirements

Pre-Installation

  • [REQUIRED] SSH access (managed server)

Post-Installation

  • [OPTIONAL] Request that we set the memory limit for "gem" to 500MB for Rails (Ruby On Rails). Please write a support ticket via the user interface KonsoleH.
  • [OPTIONAL] If you would like to use Ruby with FCGI, please request the Debian software package "libfcgi-dev". Please write a support ticket via the user interface KonsoleH.

How to use package management RubyGems (or "Gems")

You will not be able to install additional Gems for Ruby globally. But you can install it in a local environment. For this method you do not need root permissions. The package management "gem" needs to be used like this example:

gem install --user-install <gem-name>

Ruby over FCGI

If you would like to run Ruby with FCGI, the Gem "fcgi" needs to be installed.

gem install --user-install fcgi

You need a FCGI script and settings in your .htaccess file. It is recommended that you store your own Ruby application in a sub-directory of "public_html" and define this one as document root.

FCGI script This script needs do be stored in a directory which is accessable by Apache (e.g.: public_html). That is why your application should be stored in a sub-directory. Insert the following lines into the file "ruby_handler.fcgi" - you need to create this file.

#!/bin/dash
export GEM_HOME="$HOME/.gem/ruby/2.3.0/"
export GEM_PATH="$GEM_HOME:/var/lib/ruby/gems/1.8"
exec /usr/bin/ruby /usr/www/users/<FTP-USER>/<PROJECT-DIRECTORY>/index.rb

With the two "export" settings you define the directory which is indexed by Ruby for searching Gems. In this example it is the default directory for Gems which you have installed with the parameter "--user-install". It allows you to install Gems. In the line "exec" you need to set the path to an executeable script.

.htaccess settings

FcgidWrapper /usr/www/users/<FTP-USER>/ruby_handler.fcgi .rb
  SetHandler fcgid-script

In this example it shows you the settings if your FCGI script is stored in "public_html"

Sources

https://rubygems.org/

http://guides.rubygems.org/faqs/#user-install

http://www.binarytides.com/quick-tip-installing-ruby-gems-in-the-users-home-directory/



NGINX

Nginx is a web server software but also a reverse proxy and email proxy.

Installation

software install nginx

Usage

Start nginx

nginx

Check for functionality by opening your domain on the port you chose with a web-browser. (example: example.com:8080)

Forwarding

Forwarding Port 80 to the set Port with the .htacess (Please replace "YourDomain" with your Domain set.)

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule (.*) http://YourDomain:8080/


Varnish

Varnish is a cache for dynamic websites with a lot of content. Unlike other reverse proxies, which often originate from client-side proxies or servers, Varnish was designed from the ground up as a reverse proxy.

Installation

software install varnish

Test Varnish

varnishd -V
varnishd -a :6081 -T localhost:6082 -b localhost:8080


© 2019. Hetzner Online GmbH. Alle Rechte vorbehalten.