Skip to content

Commit

Permalink
Merge branch 'yacy:master' into standalone
Browse files Browse the repository at this point in the history
  • Loading branch information
okybaca authored May 28, 2024
2 parents b960c53 + 38ced2e commit 4201abd
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/download_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ If you don't hava Docker installed, get it from [https://docs.docker.com/get-doc


* <a class="btn btn-success btn" href="https://download.yacy.net/yacy_v1.924_20201214_10042.exe" role="button">Download YaCy for Windows</a> from [https://download.yacy.net/yacy_v1.924_20201214_10042.exe](https://download.yacy.net/yacy_v1.924_20201214_10042.exe)
* <a class="btn btn-success btn" href="https://download.yacy.net/yacy_v1.924_20210209_10069.tar.gz" role="button">Download Yacy for Linux</a> from [https://download.yacy.net/yacy_v1.924_20210209_10069.tar.gz](https://download.yacy.net/yacy_v1.924_20210209_10069.tar.gz)
* <a class="btn btn-success btn" href="https://download.yacy.net/yacy_v1.930_202405130205_59c0cb0f3.tar.gz" role="button">Download Yacy for Linux</a> from [https://download.yacy.net/yacy_v1.930_202405130205_59c0cb0f3.tar.gz](https://download.yacy.net/yacy_v1.930_202405130205_59c0cb0f3.tar.gz)
* <a class="btn btn-success btn" href="https://download.yacy.net/yacy_v1.924_20201214_10042.dmg" role="button">Download YaCy for macOS</a> from [https://download.yacy.net/yacy_v1.924_20201214_10042.dmg](https://download.yacy.net/yacy_v1.924_20201214_10042.dmg)
* <a class="btn btn-success btn" href="https://release.yacy.net/yacy_latest.tar.gz" role="button">Download latest developer release</A> for Linux from [https://release.yacy.net/](https://release.yacy.net/)

Expand Down Expand Up @@ -77,8 +77,8 @@ Installing from start to finish would look something like this, depending on you
sudo apt-get update
sudo dpkg --configure -a
sudo apt-get install -y openjdk-11-jre-headless
wget https://download.yacy.net/yacy_v1.924_20210209_10069.tar.gz
tar xfz yacy_v1.924_20210209_10069.tar.gz
wget https://download.yacy.net/yacy_v1.930_202405130205_59c0cb0f3.tar.gz
tar xfz yacy_v1.930_202405130205_59c0cb0f3.tar.gz
cd yacy
./startYACY.sh
```
Expand Down
85 changes: 85 additions & 0 deletions docs/installation/full-install.md
Original file line number Diff line number Diff line change
@@ -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://release.yacy.net/yacy_latest.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!

0 comments on commit 4201abd

Please sign in to comment.