From 2298aad43f4e3db2e71f7abafddc7a3e008b8b58 Mon Sep 17 00:00:00 2001 From: lotigara <105482918+lotigara@users.noreply.github.com> Date: Sun, 12 May 2024 17:12:46 +0300 Subject: [PATCH 1/2] Create full-install.md --- docs/installation/full-install.md | 85 +++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 docs/installation/full-install.md diff --git a/docs/installation/full-install.md b/docs/installation/full-install.md new file mode 100644 index 0000000..4fc1c3f --- /dev/null +++ b/docs/installation/full-install.md @@ -0,0 +1,85 @@ +# Full YaCy installation guide +##### (systemd or runit, nginx, let's encrypt) + +## Prerequisites +- Any UNIX-like system which has Nginx, Certbot and Wget in its repos (assuming your distribution is Debian, but actually you can install it even on StaLI. +- A domain name +- Systemd or Runit-powered UNIX-like system (for using on Runit system, see this: https://aur.archlinux.org/packages/yacy-runit) +- `also, if anyone reading it has some free time, please write services and instructions for their installation for sysvinit, openrc, dinit, etc...` + +## Installation +#### Note: `#` before the command means running as root. +**1.** Install needed packages: +``` +# apt install nginx certbot python3-certbot-nginx wget openjdk-17-jdk-headless +``` + +**2.** Create a user needed for running YaCy +``` +# useradd --system yacydm -m -d /home/yacy +# useradd --system yacy -m -d /home/yacy +``` + +**3.** Download, unpack and fix permissions for YaCy\*, please replace download link with new one **for *"Linux"*** located [here](https://yacy.net/download_installation/#download) +#### `$` here means running as user created later, not your own user. +``` +# su -l yacy + +$ wget https://download.yacy.net/yacy_v1.930_202404051704_de941c6fe.tar.gz +$ tar -xf yacy_v1.930_202404051704_de941c6fe.tar.gz -C .. +$ exit + +# chown -R yacydm:yacydm /home/yacy/ +# chown -R yacy:yacy /home/yacy/DATA/ +``` + +**4.** Install systemd service (runit instructions are missing, so if anyone write it, I would be grateful. Write by editing this page on GitHub.) +``` +# cat > yacy.service << EOF +[Unit] +Description=YaCy P2P Search Server +After=network.target + +[Service] +Type=forking +User=yacy +ExecStart=/home/yacy/startYACY.sh +ExecStop=/home/yacy/stopYACY.sh +ExecRestart=/home/yacy/restartYACY.sh + +[Install] +WantedBy=multi-user.target +EOF + +# cp yacy.service /etc/systemd/system/ +# systemctl enable --now yacy.service +``` + +**5.** Add Nginx site +``` +# cat >> yacy-nginx << EOF +server { + server_name [your domain name]; + access_log /var/log/nginx/search-access.log; + error_log /var/log/nginx/search-error.log; + + location / { + proxy_pass http://127.0.0.1:8090; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Real-IP $remote_addr; + } +} +EOF +# cp yacy-nginx /etc/nginx/sites-available/yacy +# ln -s /etc/nginx/sites-{available,enabled}/yacy +# nginx -t +# nginx -s reload +``` + +**6.** Let's Encrypt! +``` +# certbot --nginx -d [your domain name] +``` + +Now you can visit `https://[your domain name]/` from your phone or whatever you use and see the YaCy search page! From d19d263cd33da6dd2b32fae72f9383ddd759025e Mon Sep 17 00:00:00 2001 From: lotigara <105482918+lotigara@users.noreply.github.com> Date: Sun, 12 May 2024 17:19:21 +0300 Subject: [PATCH 2/2] Update full-install.md Fix wget URL --- docs/installation/full-install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation/full-install.md b/docs/installation/full-install.md index 4fc1c3f..f9823ac 100644 --- a/docs/installation/full-install.md +++ b/docs/installation/full-install.md @@ -25,7 +25,7 @@ ``` # su -l yacy -$ wget https://download.yacy.net/yacy_v1.930_202404051704_de941c6fe.tar.gz +$ wget https://release.yacy.net/yacy_latest.tar.gz $ tar -xf yacy_v1.930_202404051704_de941c6fe.tar.gz -C .. $ exit