Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
blocks:server:tweaks [2019-03-26 12:34]
admin Finalized 1st release
blocks:server:tweaks [2024-10-08 11:01] (current)
admin Change "orange suitcase"
Line 3: Line 3:
 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.
  
 +
 +===== 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. 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.
  
-To update your server:+  - 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 (password is "pixi" if you haven't changed it). 
 +  - Click the gray A-in-a-circle icon in the toolbar on the left hand side titled "Software Updater"
 +  - If it indicates that software updates are available, consider installing those. 
 +  - Restart the server to make sure the updates take effect.
  
-  - Make sure the server has Internet access (test by opening the pre-installed Firefox browser and going to a web address). +===== Update Java =====
-  - Switch to the pixi-admin user. +
-  - Click the orange "suitcase" icon in the toolbar on the left hand side, titled "Ubuntu Software"+
-  - Select the "Updates" tab. +
-  - If you see "OS updates", click the "Install" button next to it. +
-  - Other items may appear in the list (such as the "Firefox Web Browser" shown in the illustration below). You may choose to also update those, if relevant.+
  
-{{ :blocks:server:tweaks:osupdates.png |}}+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).
  
-Finally, restart the server to make the updates take effect.+  - 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:
  
-:!While most updates are for the better (or at least neutral), they may occasionally cause problemsMake sure to test all important system functions after updating your server.+<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-releasemain" | 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:
  
-===== Updating Blocks =====+<code> 
 +sudo update-alternatives --config java 
 +</code>
  
-To update the Blocks program itselffollow the instructions given [[:blocks#updates|here]].+When prompted, type the number corresponding to "temurin-11-jdk-amd64" in auto mode (likely number 0) and press return. If auto mode is not availablechoose 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 desired, without having to reinstall anything.
  
-===== Updating the Start and Stop scripts =====+Finally, verify that Java 11 is now selected:
  
-The way the Blocks server is started and stopped has been enhanced a few times. This is done by two scripts located in the home folder of the "pixi-server" user. To update those files, do as follows:+<code> 
 +java -version 
 +</code>
  
-  - Download {{ :blocks:server:tweaks:start-stop-scripts.tar |this TAR file}}. +The output should indicate "openjdk version 11.0.15" (where 11 is the important number, following digits may be different).
-  - Move the TAR file to your Linux Blocks server. +
-  - Double click the TAR file on the Linux server. +
-  - Select both files and drag them to the home folder of the pixi-server user.+
  
-{{ :blocks:server:tweaks:startstopscripts.png?nolink |}}+==== Offline Procedure ====
  
-:!: To use these scripts to start and stop the server, you must be running Blocks 2.3 or later.+If your Linux-based Blocks server doesn't have Internet access, or you for some other reason can'use the online method, you can instead proceed as follows:
  
-Once installedyou can start and stop Blocks in either of the following ways:+  - On a computer with internet accessopen 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).
  
-  * By restarting the server, which always launches Blocks. +<code> 
-  * Start using the PIXILAB Blocks icon in the task bar on the left hand side. +sudo apt install  
-  * Stop the server by clicking the Quit button in the Blocks window (not available if started from a non-GUI session – see below). +</code>
-  * Using the start.sh and stop.sh shell scripts from a terminal or SSH session.+
  
-The advantage with the last option is that you can start/stop the server without using the GUIThis is often useful when accessing the server remotelye.gover a VPN connection or similar.+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 commandand type the password for the pixi-admin userThis installs the update from the deb fileYou can now enable the newer java version using the sudo update-alternatives command shown above and finally verify that you have the correct version.
  
-:!: No Blocks window will appear on screen when started from a non-GUI session, such as over SSH. You can check whether the server is running by attempting to log in to it using a web browser. In this case, you must use the stop.sh script to terminate the server.+===== Updating Blocks =====
  
-===== Reducing the Wear on the SSD ===== +To update the Blocks program itselffollow the instructions given [[:blocks#updates|here]].
- +
-During normal operation of Blocks, most disk accesses will be READ operations used to serve media and other data to the display spots. However, due to the default behavior of most Unix-based operating systems, such accesses may still incur a write operation to update the "last accessed" timestamp associated with each file. While this is normal behavior for the operating system, it does incur additional wear on the SSD. +
- +
-Fortunately, this behavior can be turned off, thereby minimizing the wear on the SSD. To do so, log into your Blocks server as the pixi-server userthen click the icon in the top left hand corner, and type //disks//+
- +
-{{ :blocks:server:tweaks:disks.jpg?nolink |}} +
- +
-Click the //Disks// icon, opening a window like the one shown below. Click the large center partition of the disk to select it. Then choose "Edit Mount Options…" on the cogwheel menu below the partitions. +
- +
-{{ :blocks:server:tweaks:editmountoptions.png?nolink |}} +
- +
-At the beginning of the "mount options" field, type +
- +
-<code> +
-noatime, +
-</code> +
- +
-:!: IMPORTANT: Note that there must be a comma separating the word //noatime// from the word //errors// that was already there.+
  
-The result will look like this screenshot. 
  
-{{ :blocks:server:tweaks:noatime.png?nolink |}} 
  
-Click OK to save your changes, then restart the server to make your changes take effect.