Ubuntu 22.04 Yacy: Difference between revisions
Jump to navigation
Jump to search
m Noob moved page Yacy to Ubuntu 22.04 Yacy without leaving a redirect |
|||
| (5 intermediate revisions by the same user not shown) | |||
| Line 129: | Line 129: | ||
<code>certbot --nginx -d yacy.completenoobs.com</code><br> | <code>certbot --nginx -d yacy.completenoobs.com</code><br> | ||
Now can visit https://yacy.completenoobs.com and site working :)<br> | Now can visit https://yacy.completenoobs.com and site working :)<br> | ||
===systemd=== | |||
Will start YACY at when server reboots.<br> | |||
<code>$EDITOR /etc/systemd/system/yacy.service</code><br> | |||
<pre> | |||
[Unit] | |||
Description =Start yacy | |||
[Service] | |||
Type=forking | |||
ExecStartPre=/bin/sleep 15 | |||
ExecStart=/opt/yacy/yacy/startYACY.sh | |||
[Install] | |||
WantedBy=multi-user.target | |||
</pre> | |||
<br> | |||
<code>systemctl enable yacy</code><br> | |||
<code>reboot</code><br> | |||
Latest revision as of 11:44, 16 May 2023
Installing Yacy on Ubuntu 22.04 Vultr VPS Server
- Spin up ubuntu 22.04 2 vCPUs 4096.00 MB RAM 80 GB SSD Storage
- login
apt-get update && apt upgrade -y
apt-get install openjdk-8-jre-headless nginx -y
mkdir -pv /opt/yacy
Find Latest version https://download.yacy.net/
wget https://download.yacy.net/yacy_v1.924_20210209_10069.tar.gz
tar xvf yacy_v1.924_20210209_10069.tar.gz -C /opt/yacy/
bash /opt/yacy/yacy/startYACY.sh
bash /opt/yacy/yacy/bin/passwd.sh $PASSWORD
ufw allow 80/tcp
ufw allow 443/tcp
ufw allow 8090/tcp
$EDITOR /etc/nginx/sites-available/default
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# https://www.nginx.com/resources/wiki/start/
# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
# https://wiki.debian.org/Nginx/DirectoryStructure
#
# In most cases, administrators will remove this file from sites-enabled/ and
# leave it as reference inside of sites-available where it will continue to be
# updated by the nginx packaging team.
#
# This file will automatically load configuration files provided by other
# applications, such as Drupal or Wordpress. These applications will be made
# available underneath a path with that package name, such as /drupal8.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##
# Default server configuration
#
server {
listen 80 default_server;
listen [::]:80 default_server;
# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
#
# Note: You should disable gzip for SSL traffic.
# See: https://bugs.debian.org/773332
#
# Read up on ssl_ciphers to ensure a secure configuration.
# See: https://bugs.debian.org/765782
#
# Self signed certs generated by the ssl-cert package
# Don't use them in a production server!
#
# include snippets/snakeoil.conf;
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
server_name _;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
#try_files $uri $uri/ =404;
proxy_pass http://127.0.0.1:8090;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 3s;
proxy_send_timeout 10s;
proxy_read_timeout 10s;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
}
# pass PHP scripts to FastCGI server
#
#location ~ \.php$ {
# include snippets/fastcgi-php.conf;
#
# # With php-fpm (or other unix sockets):
# fastcgi_pass unix:/run/php/php7.4-fpm.sock;
# # With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# Virtual Host configuration for example.com
#
# You can move that to a different file under sites-available/ and symlink that
# to sites-enabled/ to enable it.
#
#server {
# listen 80;
# listen [::]:80;
#
# server_name example.com;
#
# root /var/www/example.com;
# index index.html;
#
# location / {
# try_files $uri $uri/ =404;
# }
#}
Domain and https
snap install certbot --classic
After DNS points to server
certbot --nginx -d yacy.completenoobs.com
Now can visit https://yacy.completenoobs.com and site working :)
systemd
Will start YACY at when server reboots.
$EDITOR /etc/systemd/system/yacy.service
[Unit] Description =Start yacy [Service] Type=forking ExecStartPre=/bin/sleep 15 ExecStart=/opt/yacy/yacy/startYACY.sh [Install] WantedBy=multi-user.target
systemctl enable yacy
reboot