Преглед изворни кода

Add some installation instructions for Arch Linux

Miraty пре 4 година
родитељ
комит
0e2fda0e3f
3 измењених фајлова са 46 додато и 7 уклоњено
  1. 44 5
      README.md
  2. 1 1
      ns/zone.php
  3. 1 1
      top.inc.php

+ 44 - 5
README.md

@@ -9,8 +9,8 @@ This PHP Web interface allow it's users to manage 3 services, that can be used t
 * A domain registry
 * A domain registry
 * A nameserver
 * A nameserver
 * An hypertext service, that allow a directory containing hypertext documents to be accessed with the choice of the protocol and the routing method :
 * An hypertext service, that allow a directory containing hypertext documents to be accessed with the choice of the protocol and the routing method :
-  * HTTP(S) or Gemini
-  * DNS access or Onion (the Tor's system)
+* HTTP(S) or Gemini
+* DNS access or Onion (the Tor's system)
 
 
 ## Setup
 ## Setup
 
 
@@ -24,9 +24,48 @@ Niver will use and need specific configuration for
 
 
 To do root-level actions, Niver will also use a privileged binary, written in Rust, called Maniver.
 To do root-level actions, Niver will also use a privileged binary, written in Rust, called Maniver.
 
 
-The current officiel Niver instance runs with Debian 10, bringing Nginx 1.14.2 and OpenSSH 7.9p1.
+Niver has been deployed on the following distributions :
 
 
-Tor, Knot and Gmnisrv are the latest available version.
+* Debian 10, using Nginx 1.14.2 and OpenSSH 7.9p1, and latest available version of Tor, Knot and gmnisrv using their official release channel.
+* Arch Linux
+
+To provide all features:
+
+`# pacman -S tor knot openssh sudo nginx nginx-mod-headers-more certbot certbot-nginx php-fpm php-sqlite`
+
+To limit users storage:
+
+`# pacman -S quota-tool`
+
+
+### maniver installation
+
+```
+# pacman -S rustup git
+$ rustup default stable
+$ git clone https://code.antopie.org/miraty/maniver-dev
+$ cd maniver-dev
+$ cargo build --release
+```
+
+### gmnisrv installation
+
+```
+# pacman -S make git pkgconf openssl scdoc
+$ git clone https://git.sr.ht/~sircmpwn/gmnisrv # Download gmnisrv sources
+$ mkdir gmnisrv/build
+$ cd gmnisrv/build
+$ ../configure --prefix=/usr # Check gmnisrv dependencies and setup files needed for building
+$ make # Build gmnisrv
+# make install # Install gmnisrv binary and manpages on the system
+```
+
+`# useradd -U -r -s /usr/bin/nologin gmnisrv`
+
+
+Some tools you might find usefull to manage a server:
+
+`# pacman -S vnstat htop nload ufw vim man-db curl`
 
 
 ## Features
 ## Features
 
 
@@ -43,7 +82,7 @@ Tor, Knot and Gmnisrv are the latest available version.
 * SFTP access
 * SFTP access
 * HTTP and Gemini
 * HTTP and Gemini
 * IPv4 and IPv6
 * IPv4 and IPv6
-* TLS 1.2 & 1.3 and TLS 1.3 only
+* TLS 1.2 & 1.3 or TLS 1.3 only
 * DNS (ICANN, OpenNIC or anything) and Onion v3 (through Tor)
 * DNS (ICANN, OpenNIC or anything) and Onion v3 (through Tor)
 * HTTP/1.1 and HTTP/2
 * HTTP/1.1 and HTTP/2
 * Let's Encrypt certificate
 * Let's Encrypt certificate

+ 1 - 1
ns/zone.php

@@ -21,7 +21,7 @@ if (isset($_POST['domain']) AND isset($_SESSION['username'])) {
   $stmt->execute();
   $stmt->execute();
 
 
   exec("cp /var/lib/knot/zones/template /var/lib/knot/zones/" . $_POST['domain'] . "zone");
   exec("cp /var/lib/knot/zones/template /var/lib/knot/zones/" . $_POST['domain'] . "zone");
-  exec("sed -i 's/maison.atope.art./" . $_POST['domain'] . "/g' /var/lib/knot/zones/" . $_POST['domain'] . "zone");
+  exec("sed -i 's/DOMAIN/" . $_POST['domain'] . "/g' /var/lib/knot/zones/" . $_POST['domain'] . "zone");
 
 
   exec(KNOTC_PATH . " conf-begin");
   exec(KNOTC_PATH . " conf-begin");
   exec(KNOTC_PATH . " conf-set 'zone[" . $_POST['domain'] . "]'");
   exec(KNOTC_PATH . " conf-set 'zone[" . $_POST['domain'] . "]'");

+ 1 - 1
top.inc.php

@@ -20,7 +20,7 @@ define("PASSWORD_REGEX", "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9]{8,1024}|
 define("SUBDOMAIN_REGEX", "^[a-z]{4,63}$");
 define("SUBDOMAIN_REGEX", "^[a-z]{4,63}$");
 
 
 define("PREFIX", "/eltrode"); // Prefix in the URL, if any
 define("PREFIX", "/eltrode"); // Prefix in the URL, if any
-define("ROOT_PATH", "/var/www/niver" . PREFIX); // Niver directory
+define("ROOT_PATH", "/srv/http/niver" . PREFIX); // Niver directory
 define("DB_PATH", ROOT_PATH . "/db/niver.db"); // Niver SQLite database
 define("DB_PATH", ROOT_PATH . "/db/niver.db"); // Niver SQLite database
 define("KNOTC_PATH", "/usr/sbin/knotc"); // Binary file
 define("KNOTC_PATH", "/usr/sbin/knotc"); // Binary file
 define("KEYMGR_PATH", "/usr/sbin/keymgr"); // Binary file
 define("KEYMGR_PATH", "/usr/sbin/keymgr"); // Binary file