Installing H@H on Debian
Requirements
- Being able to use Google.
- Basic Linux knowledge.
- A running Debian GNU/Linux server.
- PuTTY or any other SSH program to connect to your server. This allows for copying/pasting of commands.
- An “active” H@H client (http://g.e-hentai.org/hentaiathome.php).
A couple things to be aware of before starting:
- Linux IS case sensitive on file names. Therefore, it is best to use lower case names everywhere to make it easier for yourself.
- Commands you should type are given in Green;
- Output from the command prompt is given in Red;
- Text in commands that you'll probably need to change is given in Blue.
- Commands starting with $ are to be run as current user, those starting with # - as root (using su/sudo).
- This manual is based on a virtual server (VPS/VDS). The use of a physical server, home PC or any program other than VMware to virtualize your server may require doing some things differently.
Installing Java
To run the H@H server you will have to have java installed on the server.
Pick Java redaction
Java Virtual Machine (JVM) have some redactions. As written on official download page it is:
- JDK: (Java Development Kit). For Java Developers. Includes a complete JRE plus tools for developing, debugging, and monitoring Java applications.
- Server JRE: (Server Java Runtime Environment) For deploying Java applications on servers. Includes tools for JVM monitoring and tools commonly required for server applications, but does not include browser integration (the Java plug-in), auto-update, nor an installer.
- JRE: (Java Runtime Environment). Covers most end-users needs. Contains everything required to run Java applications on your system.
For our case JDK don't need. So, if you need some monitoring tools - pick Server JRE, else - JRE
Install Java
First download the JDK can be with the following command:
$ wget --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F" "http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jre-7u51-linux-x64.tar.gz"
Create directory for JVM in /opt:
# mkdir /opt/java-oracle
Unpack the downloaded archive in /opt:
# tar -zxf jre-7u51-linux-x64.tar.gz -C /opt/java-oracle
Set-up Java to be used on the system by using higher priority with update-alternatives:
$ Java_Home=/opt/java-oracle/jdk1.7.0_51
# update-alternatives --install /usr/bin/java java ${JHome%*/}/bin/java 20000
# update-alternatives --install /usr/bin/javac javac ${JHome%*/}/bin/javac 20000
Verify (or set) JVM to be used as a default Java on the system:
# update-alternatives --config java
Verify Java version:
$ java -version java version "1.7.0_51" Java(TM) SE Runtime Environment (build 1.7.0_51-b13) Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
Installing H@H
For more security let's create new user for H@H:
# adduser hath
Now login as new user and create directory for H@H client:
$ mkdir hath
Download H@H (check latest version here):
$ wget http://hentaiathome.net/get/HentaiAtHome_1.2.0.zip
Unzip downloaded archive (install unzip if don't do it yet):
$ unzip HentaiAtHome_1.2.0.zip -d hath/
Well done, let's launch it!
$ cd hath $ java –jar HentaiAtHome.jar
You will be prompted for your client ID and Password which you can find on your H@H page
You will need to configure the server settings on the above page before you get you client password. If you have not applied to run a H@H client yet you will have to do so first.
To stop the server, press "Ctrl+C" and wait for a couple seconds.