|
|
| (41 intermediate revisions by the same user not shown) |
| Line 1: |
Line 1: |
| (draft)
| |
|
| |
|
| ==Prerequisites==
| |
| * Basic familiarity with Linux.
| |
|
| |
| * A Linux server running '''Debian version 9''' (''Stretch'') or newer, or '''Ubuntu version 16''' (''Xenial Xerus'') or newer.<br>To use earlier versions you will need to determine how to install a '''Java 8''' runtime, which may not be a straightforward process and is beyond the scope of this guide.
| |
|
| |
| * Root access to your server (i.e. <code>su</code>/<code>sudo</code>).
| |
|
| |
| * PuTTY or any other SSH program to connect to your server. This allows for copying/pasting of commands.
| |
|
| |
| * An “active” H@H client (https://e-hentai.org/hentaiathome.php).
| |
|
| |
| * An open port through which H@H can accept connections from the internet.<br>You may need to choose a port number greater than 1023 to avoid having to run the H@H client as root.
| |
|
| |
| * This guide assumes a server-style environment, typical of VPS/cloud-hosted systems. Installation on desktop or IoT systems, for example, may require doing some things differently.
| |
|
| |
| ===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 <FONT COLOR="1FD30D">Green</FONT>.
| |
|
| |
| * Output from the command prompt is given in <FONT COLOR="C94649">Red</FONT>.
| |
|
| |
| * Text in commands that you'll probably need to change is given in <FONT COLOR="35A4D6">Blue</FONT>.
| |
|
| |
| * Commands starting with '''$''' are to be run as current user, those starting with '''#''' as root.
| |
|
| |
| * H@H 1.6.0 and above uses SSL certificates. For them to work properly, you need the '''ntp''' package (it syncs the server's date and time). It is normally installed by default, but package updates may make it fail.
| |
|
| |
| ==Installing Java - Using packages==
| |
|
| |
| [[File:Point.png]] '''Don't use Debian 8's repository for H@H 1.6.0 and above.''' The JRE provided in the packages for Debian 8 is Java 7, and H@H 1.6.0 needs Java 8 or above.
| |
| If you are running Debian 8, install Java by using a downloaded archive, like described in the next section.
| |
|
| |
|
| |
| To run the H@H server you will have to have Java installed on the server.
| |
| The best and easiest method is to use the Debian packages.
| |
|
| |
| To do so, connect to your server, and run the following commands either as root, or by prefixing them by sudo (if you have the sudo package installed):
| |
| <pre<includeonly></includeonly> style="overflow: auto;{{{style|}}}"><FONT COLOR="1FD30D"># apt-get update
| |
| # apt-get install default-jre</FONT></pre>
| |
|
| |
| And that's it, you're already done. Simple isn't it?
| |
|
| |
| ==Installing Java - Using a downloaded archive==
| |
| If you can't (or don't want to) use the method that uses the Debian packages, you can download and install your package on the Oracle website.
| |
| Select your Java package on [https://www.oracle.com/technetwork/java/javase/downloads/index.html official download page], accept license and copy download link depending on your OS (32-bit/64-bit).
| |
|
| |
| For our case JDK isn't needed. If you need some monitoring tools (and know how to use them) - pick Server JRE. Otherwise, your choice is JRE.
| |
|
| |
|
| |
| Download the JRE can be with the following command:
| |
| <pre<includeonly></includeonly> style="overflow: auto;{{{style|}}}"><FONT COLOR="1FD30D">$ wget --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" "https://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz"</FONT></pre>
| |
|
| |
| Create directory for JVM in /opt:
| |
| <pre<includeonly></includeonly> style="overflow: auto;{{{style|}}}"><FONT COLOR="1FD30D"># mkdir /opt/java-oracle</FONT></pre>
| |
|
| |
| Unpack the downloaded archive in /opt:
| |
| <pre<includeonly></includeonly> style="overflow: auto;{{{style|}}}"><FONT COLOR="1FD30D"># tar -zxf <FONT COLOR="35A4D6">jre-7u67-linux-x64.tar.gz</FONT> -C /opt/java-oracle</FONT></pre>
| |
|
| |
| Set our JVM to be used as the default Java on the system:
| |
| <pre<includeonly></includeonly> style="overflow: auto;{{{style|}}}"><FONT COLOR="1FD30D">$ Java_Home=/opt/java-oracle/<FONT COLOR="35A4D6">jre1.7.0_67</FONT>
| |
| # update-alternatives --install /usr/bin/java java ${Java_Home%*/}/bin/java 20000
| |
| # update-alternatives --install /usr/bin/javac javac ${Java_Home%*/}/bin/javac 20000
| |
| # update-alternatives --install /usr/bin/javaws javaws ${Java_Home%*/}/bin/javaws 20000</FONT></pre>
| |
|
| |
| Verify (or set) JVM to be used as a default Java on the system:
| |
| <pre<includeonly></includeonly> style="overflow: auto;{{{style|}}}"><FONT COLOR="1FD30D"># update-alternatives --config java
| |
| <FONT COLOR="C94649">There is only one alternative in link group java (providing /usr/bin/java): /opt/java-oracle/jre1.7.0_67/bin/java
| |
| Nothing to configure.</FONT></FONT></pre>
| |
|
| |
| Verify Java version:
| |
| <pre<includeonly></includeonly> style="overflow: auto;{{{style|}}}"><FONT COLOR="1FD30D">$ java -version
| |
| <FONT COLOR="C94649">java version "1.7.0_67"
| |
| Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
| |
| Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)</FONT></FONT></pre>
| |
|
| |
| ==Installing H@H==
| |
|
| |
| For more security let's create new user for H@H:
| |
| <pre<includeonly></includeonly> style="overflow: auto;{{{style|}}}"><FONT COLOR="1FD30D"># adduser <FONT COLOR="35A4D6">hath</FONT></FONT></pre>
| |
|
| |
| Now login as the new user and create a directory for H@H client:
| |
| <pre<includeonly></includeonly> style="overflow: auto;{{{style|}}}"><FONT COLOR="1FD30D"># login <FONT COLOR="35A4D6">hath</FONT>
| |
| $ mkdir <FONT COLOR="35A4D6">hath</FONT></FONT></pre>
| |
|
| |
| Download H@H (check for the latest version [https://e-hentai.org/hentaiathome.php here]):
| |
| <pre<includeonly></includeonly> style="overflow: auto;{{{style|}}}"><FONT COLOR="1FD30D">$ wget https://repo.e-hentai.org/hath/HentaiAtHome_1.4.2.zip</FONT></pre>
| |
|
| |
| Unzip the downloaded archive (install unzip if you haven't yet):
| |
| <pre<includeonly></includeonly> style="overflow: auto;{{{style|}}}"><FONT COLOR="1FD30D">$ unzip HentaiAtHome_1.4.2.zip -d <FONT COLOR="35A4D6">hath/</FONT></FONT></pre>
| |
|
| |
| Well done, let's launch it!
| |
| <pre<includeonly></includeonly> style="overflow: auto;{{{style|}}}"><FONT COLOR="1FD30D">$ cd <FONT COLOR="35A4D6">hath</FONT>
| |
| $ java -jar HentaiAtHome.jar</FONT></pre>
| |
|
| |
| You will be prompted for your client ID and Password which you can find on [https://e-hentai.org/hentaiathome.php your H@H page]
| |
|
| |
| You will need to configure your client settings on the above page before you get your 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.
| |
|
| |
| ==Controlling H@H with the screen utility==
| |
|
| |
| To make it very short and simple, the screen utility is a package available in many Linux distributions, that allows one to run commands in a dedicated environement. It is very useful when it comes to run a H@H client, as you can simply start your H@H client in a "screen" and leave it there to work, allowing you to perform other actions, like closing your SSH connection.
| |
|
| |
| ===Installing the screen utility===
| |
|
| |
| First, download and install the package from the depository:
| |
| <pre<includeonly></includeonly> style="overflow: auto;{{{style|}}}"><FONT COLOR="1FD30D">$ apt-get install screen</FONT></pre>
| |
| And that's all.
| |
|
| |
| ===Using the screen utility to control your H@H client===
| |
|
| |
| First connect to your server using a SSH connection, as the user 'hath'. Then start the screen utility by entering the following command:
| |
| <pre<includeonly></includeonly> style="overflow: auto;{{{style|}}}"><FONT COLOR="1FD30D">$ screen -r</FONT></pre>
| |
|
| |
| You are now "inside" the screen utility, which looks and acts just like the command line. You can control the utility itself with the following key combinations:
| |
| <pre<includeonly></includeonly> style="overflow: auto;{{{style|}}}">'''Ctrl+A, then C''' - Create a new screen window
| |
| '''Ctrl+A, then N''' - Switch to next screen window
| |
| '''Ctrl+A, then P''' - Switch to previous screen window
| |
| '''Ctrl+A, then K''' - Kill the current screen window
| |
| '''Ctrl+A, then D''' - Detach from the screen utility (quit without closing)
| |
| </pre>
| |
|
| |
| To start your H@H client, follow these steps:
| |
| #Create a new window (Ctrl+A, then N)
| |
| #Start your H@H client in the window's command line
| |
| #Detach from the screen utility (Ctrl+A, then D)
| |
| #You can now close your SSH connection, the H@H client will keep running.
| |
|
| |
| [[File:Point.png]] '''Always detach from the screen utility before closing your SSH connection.''' Otherwise, the screen utility and its windows will be killed, which means your H@H client will be shut down improperly.
| |
|
| |
| You can control how your client is performing later on, by connecting to your server and perform the following actions:
| |
| #Start the scren utility (screen -r)
| |
| #Browse through your windows with Ctrl+A, then P (previous) or N (next) until you see your H@H client's command line
| |
| #Again, use Ctrl+A then D to detach once you're done
| |
| #You can close the SSH connection
| |
|
| |
|
| |
| ==See also==
| |
| *[[Hentai@Home]]
| |
| *[[Installing H@H on Ubuntu]]
| |
| *[https://forums.e-hentai.org/index.php?showtopic=19795&st=0&p=797807&#entry797807 Advanced Linux Installation]
| |
|
| |
| [[Category:E-Hentai Galleries]]
| |