Monthly Server Update – July`19

Server Update

Before you perform your update, delete the pkg from:

sudo nano /etc/pacman.conf
IgnorePkg = python2-urllib3

No need to have this downgraded anymore.
 
Now you can update your entire system.
pikaur -Syu --noconfirm
 
After your update, you have to run few commands:
sudo chmod 755 /var/log/audit/

The package permission has changed.
 
And run
systemctl restart mariadb.service && mariadb-upgrade -u root -p

Type your pwd and follow the info.

Check archlinux.org for more information.
 
Update this package manually:
pikaur -S libsearpc

 

Seafile

More packages:
sudo pacman -S python2-certifi xmlsec ffmpeg
pikaur -S python2-django-formtools python2-flup python2-social-auth-core

Chose default.

 

Raspberry Pi only

Select Y when the error message appears:
:: error: python2-dm.xmlsec.binding can't be built on the current arch (armv7h). Supported: x86_64
Do you want to proceed? [Y/n] Y

 

Arch and Raspberry

Seafile ccnet config

Change you Seafile ccnet config:
sudo nano /srv/seafile/conf/ccnet.conf
SERVICE_URL = http://192.168.1.76:8000

to

SERVICE_URL = http://192.168.1.76:8001

 

Seafile autostart

Also change:
sudo nano /etc/systemd/system/seahub.service
ExecStart=/srv/seafile/seafile-server-latest/seahub.sh start

to
ExecStart=/srv/seafile/seafile-server-latest/seahub.sh start 8001
sudo systemctl daemon-reload

 

UFW

Open the new port 8001 and delete the old one:
sudo ufw allow 8001/tcp && sudo ufw delete allow 8000/tcp

 

Nginx

If necessary, change the _servername (IP).

sudo nano /etc/nginx/sites-available/seafile

server {
        listen 8001;
        server_name 192.168.1.76;
#        return 301 https://your-domain$request_uri;

##################Seafile WSGI mode config##################

location / {
      proxy_pass         http://127.0.0.1:8000;
      proxy_set_header   Host $host;
      proxy_set_header   X-Real-IP $remote_addr;
      proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header   X-Forwarded-Host $server_name;
            proxy_http_version 1.1; # if you use http2 or you get errors in nginx like connection refused ... HTTP/1.1
      proxy_read_timeout  1200s;

     # used for view/edit office file via Office Online Server
     client_max_body_size 0;

     access_log      /var/log/nginx/seahub.access.log;
     error_log       /var/log/nginx/seahub.error.log;
}

   location /seafhttp {
        rewrite ^/seafhttp(.*)$ $1 break;
        proxy_pass http://127.0.0.1:8082;
        client_max_body_size 0;
        # This option is only available for Nginx >= 1.8.0. See more details below.
        proxy_request_buffering off;
    }

############################################seafdav-WSGI
 location /seafdav {
        proxy_pass                http://127.0.0.1:8080;
        proxy_set_header          Host $host;
        proxy_set_header          X-Real-IP $remote_addr;
        proxy_set_header          X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header          X-Forwarded-Host $server_name;
        proxy_set_header          X-Forwarded-Proto https;
        proxy_http_version        1.1;
#####################################################################
        client_max_body_size 0;
        proxy_connect_timeout  36000s;
        proxy_read_timeout  36000s;
        proxy_send_timeout  36000s;
        send_timeout  36000s;

        # This option is only available for Nginx >= 1.8.0. See more details below.
       proxy_request_buffering off;

        access_log      /var/log/nginx/seafdav.access.log;
        error_log       /var/log/nginx/seafdav.error.log;
    }

    location /seafmedia {
        root /srv/seafile/seafile-server-latest/seahub;
    }

}

sudo ln -s /etc/nginx/sites-available/seafile /etc/nginx/sites-enabled/ && sudo systemctl restart nginx.service

 

Pi-hole

Update gravity

pihole -g

 

Keep the system clean

Logs

  1. sudo rm btmp btmp.1 faillog lastlog openvpn.log pacman.log tallylog wtmp fail2ban.log pacman.log nginx/* samba/log.smbd
  2. sudo find /var/log -type f -regex ".*\.gz$" -delete && sudo find /var/log -type f -regex ".*\.[0-9]$" -delete
  3. pihole -f

Caches, history and wget

sudo rm /root/.cache/* /root/.bash_history /root/.wget-hsts ; sudo rm /srv/seafile/.bash_history /srv/seafile/.wget-hsts /srv/seafile/.cache/*

Orphans

sudo pacman -Rns $(pacman -Qtdq)

Pacman & pikaur caches

pikaur -Scc

Journal

sudo journalctl --vacuum-size=1M && sudo journalctl --verify

 

Reboot

sudo reboot now -h
 
 
 
 

Arch Linux x86_64:

Already Downgraded Software:

  • nothing

PwOSS - ISO:

Download

Wiki

 

Raspberry Pi:

Already Downgraded Software:

  • nothing

PwOSS - Image:

Download

Wiki

 

Other ARM devices:

PwOSS - Wiki