Hetzner - DokuWiki
Installation gängiger Software (Managed Server)/en
![]() |
Languages: |
Deutsch |
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 |
Composer
Requirements:
- 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 setup:
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. You can get the signature for the installer at https://composer.github.io/pubkeys.html . This must be added in the second command.
php -d allow_url_fopen=On -r "readfile('https://getcomposer.org/installer');" > composer-setup.php php -r "if (hash('SHA384', file_get_contents('composer-setup.php')) === '<Installer_Signature>') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" php -d allow_url_fopen=On composer-setup.php php -r "unlink('composer-setup.php');"
Using Composer:
php -d allow_url_fopen=On composer.phar
Sources
https://getcomposer.org/download/
NewRelic Sysmond
Requirements:
- SSH access (managed servers)
- Request approval to use "nrsysmond". Please open a support request via the customer interface KonsoleH to get permission to use "nrsysmond".
- To use Sysmond, you will need a license key, which you can get from the New Relic operators at newrelic.com.
This guide describes an approach that uses SSH access and assumes that you already are connected via SSH with your access details.
Download and extract the installation files (SSH)
First, select the desired directory. This can be the home directory for the account (/usr/home/<USERNAME>/). Insert the version number into the format X.X.X.XXX (for example: 2.3.0.129).
wget -O- https://download.newrelic.com/server_monitor/release/newrelic-sysmond-X.X.X.XXX-linux.tar.gz > newrelic.tar.gz tar xzf newrelic.tar.gz
Structure the package files
mkdir sysmon mkdir sysmon/log touch sysmon/log/nrsysmond.log mv newrelic-sysmond-X.X.X.XXX-linux/daemon/nrsysmond.x64 sysmon/nrsysmond mv newrelic-sysmond-X.X.X.XXX-linux/nrsysmond.cfg sysmon/nrsysmond.cfg
Modify the configuration file nrsysmond.cfg
The lines with "license_key=" and "logfile=" should be modified along the following lines:
license_key=<YOUR LICENSE KEY> logfile=/usr/home/<USERNAME>/sysmon/log/nrsysmond.log
Start daemon
/usr/home/<username>/sysmon/nrsysmond -c /usr/home/<username>/sysmon/nrsysmond.cfg
@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>/sysmon/nrsysmond -c /usr/home/<USERNAME>/sysmon/nrsysmond.cfg
Source
Node.js
Requirements:
- SSH access (managed servers)
- A compiler is required for Node.js. 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).
- First, you will need to request approval to use "cclplus" so that our monitors will ignore it. As above, please request to use it by writing a support request via KonsoleH. The approval to use "cclplus" is only intended for installations. Please send us a quick notice (also via KonsoleH) when you have completed the installation, so that we can remove the approval.
- You will also need approval to use "node" if you intend on running a "node" process for an extended period of time.
This guide describes an approach that uses SSH access and assumes that you already are connected via SSH with your access details.
Download the current binaries
wget https://nodejs.org/dist/latest-vX.x/node-vX.XX.X.tar.gz
You need to determine the exact download link by going to the website nodejs.org/download. (For example: https://nodejs.org/dist/latest-v5.x/node-v5.10.1.tar.gz)
Extract binaries
tar xzf node-vX.XX.X.tar.gz
You need to replace the X with the downloaded version number.
Installation
A directory "node" will be created for the installation. Enter the following in the .bashrc file so that you do not need to always define the exact path to "node".
mkdir node cd node-vX.XX.X ./configure --prefix=/usr/home/<USERNAME>/node echo 'export PATH=/usr/home/<USERNAME>/node/bin:${PATH}' >> .bashrc make make install
Use Node.js
/usr/home/<USERNAME>/node/bin/node YourScript.js
or:
node YourScript.js
The second variant is only possible with entries in the .bashrc file.
Source
Redis
Requirements:
- SSH access (managed servers)
- Request that we add "redis-server" to the configuration of our process monitoring system. Please write a support ticket via the user interface KonsoleH.
- 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)
- 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.
Download and extract Redis
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
Enter the following commands in this order for the installation:
make make test cd src chmod ug+x redis-server
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://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
Requirements:
- SSH access (managed servers)
- Request that we add "redis-server" to the configuration of our process monitoring system. Please write a support ticket via the user interface KonsoleH.
- 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.
Download and install
mkdir elasticsearch cd elasticsearch curl -L -O https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.3.3/elasticsearch-2.3.3.tar.gz tar xvf elasticsearch-2.3.3.tar.gz
If necessary, please replace the version number (2.3.3) 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
cd elasticsearch-2.3.3/bin/ ./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/guide/en/elasticsearch/reference/2.3/_installation.html
GlassFish
Requirements:
- SSH access (managed servers)
- Approval to use "java" - Please request approval to use "java" by writing a support ticket via the user interface KonsoleH.
- Request an open ports for ports 4848 and 8080 - Please request an open port 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.
Download and extract
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
cd bin ./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
MongoDB
Requirements:
- SSH access (managed servers)
- Approval to use "mongod" - Please request approval to use "mongod" by writing a support ticket via the user interface KonsoleH.
- Request an open port/port forwarding (optional)
This guide describes an approach that uses SSH access and assumes that you already are connected via SSH with your access details.
Installation
curl -O https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.2.6.tgz tar xvf mongodb-linux-x86_64-3.2.6.tgz mv mongodb-linux-x86_64-3.2.6 mongodb rm -f mongodb-linux-x86_64-3.2.6.tgz cd 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.
./bin/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:
./bin/mongod --dbpath /usr/home/<USERNAME>/mongodb/data/db/
Test MongoDB
./bin/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
Requirements:
- SSH access (managed servers) - SSH access is not entirely necessary. It is possible to also do the installation via FTP.
- Request approval (optional) - 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.
Download and extract FFmpeg
wget http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz tar xJf ffmpeg-release-64bit-static.tar.xz mv ffmpeg-3.0.2-64bit-static 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)
- Start downloading the static builds from http://johnvansickle.com/ffmpeg/ (64-bit Linux) onto your local computer.
- 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.
- Using WebFTP (KonsoleH) or another FTP program (for example, FileZilla), upload the necessary binaries (for example, ffmpeg) onto the server.
- You need to set the permissions for the uploaded files to "755" using Filezilla or WebFTP, for example.
- You can now include the downloaded scripts in your programming.
Source
http://johnvansickle.com/ffmpeg/
Apache-Tomcat
Requirements:
- SSH access (managed servers)
- Approval to use "java" - Please request approval to use "java" by writing a support ticket via the user interface KonsoleH.
- A compiler is required for Apache-Tomcat. 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)
- 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.
This guide describes an approach that uses SSH access and assumes that you already are connected via SSH with your access details.
Download und 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: tomcat.apache.org/download-90.cgi
wget http://mirror2.shellbot.com/apache/tomcat/tomcat-9/v9.0.0.M8/bin/apache-tomcat-9.0.0.M8.tar.gz tar -xzf apache-tomcat-<VERSION>.tar.gz mv apache-tomcat-<VERSION> tomcat
If you adjust "bashrc", you will prevent long paths. To do this, open the file ".bashrc" with an editor or your choice. For example:
nano .bashrc
Insert the following line and save the file:
export CATALINA_HOME='/usr/home/<USERNAME>/tomcat/' export JAVA_HOME='/usr/' alias tomcat_start='$CATALINA_HOME/bin/startup.sh' alias tomcat_stop='$CATALINA_HOME/bin/shutdown.sh'
In order to implement these changes, you will need to disconnect the SSH connection once (log out) and then start a new connection.
Start Tomcat
tomcat_start
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
Requirements:
- SSH access (managed servers)
- Approval to use "java" - Please request approval to use "java" by writing a support ticket via the user interface KonsoleH.
- A compiler is required for Apache-Solr. 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)
This guide describes an approach that uses SSH access and assumes that you already are connected via SSH with your access details.
Download
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 comman and run it on the server.
wget http://mirror.23media.de/apache/lucene/solr/6.1.0/solr-6.1.0.zip unzip solr-6.1.0.zip mv solr-6.1.0 solr
Add configuration to .bashrc file
You can add a configuration to the .bashrc file by using the following command:
echo 'export PATH=/usr/home/<USERNAME>/solr/bin:${PATH}' >> ~/.bashrc
To activate this setting, disconnect the SSH connection and then log back in.
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.
Source
http://lucene.apache.org/solr/
Subversion (SVN)
Requirements:
- SSH access (managed servers)
- Approval to use "svnserve" (optional) - Please request approval to use "svnserve" by writing 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.
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)
Requirements:
- Approval to use "btsync" - Please request approval to use "btsync" by writing a support ticket via the user interface KonsoleH.
- Request an open port for port 8888 - Please request that this port be opened 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
You can find the download link for the latest version for Linux x64 (glibc 2.3) at: https://getsync.com/platforms/desktop/ Use the following command to download the necessary files and then extract them:
wget https://download-cdn.getsync.com/stable/linux-glibc-x64/BitTorrent-Sync_glibc23_x64.tar.gz
tar xzf BitTorrent-Sync_glibc23_x64.tar.gz
Start Resilio Sync / BTSync
Using the following command, set the IP address for the managed server and then execute it.
./btsync --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:
./btsync --help
Normally you need to create a configuration file and one folder in which to save the data.
Sources
https://wiki.archlinux.org/index.php/BitTorrent_Sync#Configuration
https://wiki.ubuntuusers.de/BitTorrent_Sync/#Manuell
WK<html>TOpdf
Installation without SSH access
- Download onto your PC the appropriate package (Stable LInux 64bit) from the developer's website http://wkhtmltopdf.org/downloads.html
- 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/.
- Tranfer this file (wkhtmltopdf) to the server via FTP.
- 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.
- Now you can open the tool directly from the application by entering the complete path.
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
wget http://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz tar xJvf wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
You will now find the required program "wkhtmltopdf" at wkhtmltox/bin/ and you can open the tool directly from the application by entering the complete path.