Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
blocks:server:tweaks [2019-03-26 11:17]
admin created
blocks:server:tweaks [2023-03-14 20:58] (current)
mattias [Removing Unifi Wifi Support]
Line 1: Line 1:
-====== Linux ServerImprovements ======+====== Linux Server Improvements ======
  
 PIXILAB regularly revisits and improves the Linux server image, resulting in newer releases. The release is indicated by the date shown as part of the filename. However, for a running installation, it's not practical to re-image the server regularly. Instead, we provide important notes here on what you can do to keep up to date with the state of the art, keeping your server working as well as possible. PIXILAB regularly revisits and improves the Linux server image, resulting in newer releases. The release is indicated by the date shown as part of the filename. However, for a running installation, it's not practical to re-image the server regularly. Instead, we provide important notes here on what you can do to keep up to date with the state of the art, keeping your server working as well as possible.
  
 +This article describes how to update server images based on Ubuntu 18. If you're using server image version 200525 or later, based on Ubuntu 20, most of what's described below is already been taken care of. However, you may still want to update your operating system from time to time to keep up-to-date with security patches.
  
-===== Linux Operating Systemn Updates =====+:!: If you're using an older version of server, based on Ubuntu 16, released before 2019-05-28, first follow [[blocks:server:tweaks-ubuntu16|this guide]], then proceed as follows below.
  
-System components are updated regularly. Most updates are not related to Blocks at all, and make no difference. But occasionally, there are security or performance impreovements that may be worthwhile to incorporate. 
  
-To update your server:+===== Operating System Updates ===== 
 +System components are updated regularly. Most updates are not related to Blocks at all, and make no difference. But occasionally, there are security or performance improvements that may be worthwhile to incorporate.
  
-  - Make sure the server has Internet access (test by opening the pre-installed Firefox browser and going to a web address). +  - Make sure the server has Internet access (test by opening the pre-installed web browser and going to a web address). 
-  - Switch to the pixi-admin user.+  - Switch to the pixi-admin user (password is "pixi" if you haven't changed it).
   - Click the orange "suitcase" icon in the toolbar on the left hand side, titled "Ubuntu Software".   - Click the orange "suitcase" icon in the toolbar on the left hand side, titled "Ubuntu Software".
   - Select the "Updates" tab.   - Select the "Updates" tab.
   - If you see "OS updates", click the "Install" button next to it.   - If you see "OS updates", click the "Install" button next to it.
-  - Other items may appear in the list (such as the "Firefox Web Browsershown in the illustration below). You may choose to also update those, if relevant.+  - Restart the server to make the updates take effect. 
 + 
 +===== Update Java ===== 
 + 
 +Blocks 4.1 and later uses a newer version of Java. If your server currently has an older version of Blocks, you need to update Java to version 11 (see below for how to check what version is installed). If your server has internet access, proceed as follows (see below for an off-line alternative). 
 + 
 +  - Switch to the pixi-admin user. 
 +  - Open a terminal window using the terminal icon on the left hand side. 
 +  - Copy and paste the following commands into the terminal window: 
 + 
 +<code> 
 +sudo apt-get update 
 +sudo apt-get install -y wget apt-transport-https 
 +sudo wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | sudo tee /usr/share/keyrings/adoptium.asc 
 +sudo echo "deb [signed-by=/usr/share/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main| sudo tee /etc/apt/sources.list.d/adoptium.list 
 +sudo apt-get update 
 +sudo apt-get install -y temurin-11-jdk 
 +</code> 
 + 
 +Enter the pixi-admin user's password when requested. Then switch to Java 11 using the following command: 
 + 
 +<code> 
 +sudo update-alternatives --config java 
 +</code> 
 + 
 +When prompted, type the number corresponding to "temurin-11-jdk-amd64" in auto mode (likely number 0and press returnIf auto mode is not available, choose manual mode, then run the command again and auto mode should appear. Note that this command can be used to switch back to the older Java version if desiredwithout having to reinstall anything. 
 + 
 +Finally, verify that Java 11 is now selected: 
 + 
 +<code> 
 +java -version 
 +</code> 
 + 
 +The output should indicate "openjdk version 11.0.15" (where 11 is the important number, following digits may be different). 
 + 
 +==== Offline Procedure ==== 
 + 
 +If your Linux-based Blocks server doesn't have Internet access, or you for some other reason can't use the online method, you can instead proceed as follows: 
 + 
 +  - On a computer with internet access, open a web browser and go [[https://packages.adoptium.net/ui/native/deb/pool/main/t/temurin-11/|here]]. 
 +  - Doing so shows a list of files. If you receive an error message, the offline files may have been moved, in which case a google search for "temurin java 11" may help track them down. 
 +  - Download the file named temurin-11-jdk_11.0.15.0.0+10_amd64.deb, or some later version if available. 
 +  - Move the downloaded deb file using a USB stick to your Blocks server. 
 +  - On your Blocks server, log in as the pixi-admin user. 
 +  - Open a terminal window and type the following command (but don't press Enter). 
 + 
 +<code> 
 +sudo apt install  
 +</code> 
 + 
 +Make sure there's a space after the word install, then drag the file transferred using the USB stick into the terminal window, so its path appears at the end of the command (separated by a space). Now press Enter to execute the command, and type the password for the pixi-admin user. This installs the update from the deb file. You can now enable the newer java version using the sudo update-alternatives command shown above and finally verify that you have the correct version. 
 + 
 +===== Updating Blocks =====
  
 +To update the Blocks program itself, follow the instructions given [[:blocks#updates|here]].
  
-===== Updating the Start and Stop scripts ===== 
  
-The way the Blocks server is started and stopped has changed