When Migrating from a Previous PST (2.x) - Setup in PST Manager (3.0.0)

PST (3.x) has changed configuration from the previous PST (2.x). Therefore, a configuration migration is required. You cannot update PST by using "yum update".

Updating from the PST (2.x) Module

Before migrating to PST (3.x), update PST (2.x) to the latest version. Root privileges are necessary to update.

$ sudo yum update kusanagi-prem

or

$ su -
[root@kusanagi8 ~]# yum update kusanagi-prem

Updating PST (2.x) Profiles

Before migrating to PST (3.x), update all PST (2.x) enabled profiles to the latest version. You can find PST enabled profiles in PST Manager. Or, you can find them with the following root privilege commands.

[root@kusanagi8 ~]# for i in /home/kusanagi/*; do test -f $i/wexal/pst.config.yaml && echo $i; done
/home/kusanagi/%PROFILE-NAME%

Update profiles with the PST (2.x) "pst" command. Note, root privileges are required to execute the PST (2.x) "pst" command.

[root@kusanagi8 ~]# cd /home/kusanagi/%PROFILE-NAME%
[root@kusanagi8 %PROFILE-NAME%]# pst -v

When the Profile Version is the same as the Global Version:

No update is required.

When the Profile Version is earlier than v2.4.4:

[root@kusanagi8 %PROFILE-NAME%]# test -f /etc/httpd/conf.d/ssl.conf && mv /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/ssl.conf.bak
[root@kusanagi8 %PROFILE-NAME%]# pst init --rebuildconf

When the Profile Version is v2.4.4 or later

[root@kusanagi8 %PROFILE-NAME%]# pst init

If you use a reverse proxy, "--reverseproxy" and "--origin options" must also be specified in the "pst init" command.

Uninstalling the PST (2.x) Module

First, uninstall the PST (2.x) module. You must have root privileges to uninstall.

[root@kusanagi8 ~]# yum erase kusanagi-prem kusanagi-nodejs-prem kusanagi-lua-prem

Installing the PST (3.x) Module

Install the PST (3.x) module. You must have root privileges to install.

[root@kusanagi8 ~]# yum install kusanagi-prem3

Adding Users for PST Manager

PST Manager is a web administration page for controlling PST functions. You can add users able to login to PST Manager on this page and set their credentials. Adding users is executed with the "pst passwd" command.

The user name must be a combination of lowercase and uppercase letters, numbers, . (period), _ (underscore), and - (hyphen), and at least 3 and no more than 16 characters long.

The password must be lowercase or uppercase letters, numbers, . (period), ! (exclamation), # (sharp), % (percent), + (plus), _ (underscore), and - (hyphen).

To execute the "pst" command,"kusanagi" user or root privileges are required. Note, you can keep users and authentication that were set up in PST Manager (2.x). In that case, you will not need to add users.

[kusanagi@kusanagi8 ~]$ pst passwd add --user %USER-NAME% --pass %PASSWORD%

Configuring Initial Profile Settings

Setup the initial profile settings to all enabled PST (2.x) profiles. The initial settings are executed with the PST (3.x) "pst init" command. The profile is specified at the end of the "pst" command. Or, the command can be executed from the profile directory (as the current directory). Note, "kusanagi" user or root privileges are required to execute the PST (3.x) "pst" command.

[kusanagi@kusanagi8 ~]$ pst init プロファイル名

or

[kusanagi@kusanagi8 ~]$ cd /home/kusanagi/%PROFILE-NAME%
[kusanagi@kusanagi8 %PROFILE-NAME%]$ pst init

Once the initial PST settings are complete, the PST Manager URL will be displayed.

pst watch stopped.
pst watch started.
Info: open WEXAL manager form http://xxx.xxx.xxx.xxx:61000

The following steps can also be performed with PST commands. To set up by PST commands, refer to "When Migrating from a Previous PST (2.x) - PST Commands" for more information.

Opening a Port

By default, PST Manager uses the system's global IP address, port 61000. According to your cloud environment, setup the protocol and port for PST in order to access the server using TCP protocol and port number 61000. Also, set connection restrictions for IP addresses to improve security.

Note, if you use PST (2.x) Manager, this step will not be necessary because the port is already open.

Accessing PST Manager

Access the PST Manager web page (URL) displayed in "Configuring Initial Profile Settings" on your browser. Enter the user name and password set in "Adding Users to PST Manager" or the user name and password used for PST (2.x) Manager at the login page.

Enabling PST

Enable PST for a profile that has completed the initial setup. You can enable PST on the profile dashboard. Turn the PST switch to ON to enable PST. In addition, make sure that the switch for resource monitoring is turned on. If the profile for which you want to enable PST is not on the dashboard, it means the profile has not completed the initial setup. In that case, please refer to "Configuring Initial Profile Settings".

Note, if PST has been enabled in PST (2.x), the settings will be the same.

Modifying PST Configurations

You can change PST settings from profile mode on the PST Manager dashboard. Select from Smart-mode, Expert-mode, or Developer-mode. When you want to change the setting, select a new "mode" and click "Change". The default setting is "Smart-mode".

Changing PST Smart-mode Settings

In Smart-mode, more detailed settings can be selected under "Basic Settings" and "Smart-mode" in the menu pane. Click "Save & Apply" button after making changes.

  • Resource Optimization: These settings allow you to change the types and paths of resources you want to exclude from resource optimization, as well as the compression level of images.
    • Optimization Strategy:
      • Enable/disable by selecting the three check boxes for images, CSS, and JS.
    • Image Compression Level:
      • Enter the image compression level by setting a value between 1 and 100. The lower the value, the more compressed the image and smaller the file size, but the quality of the image will be lower.
    • "Exclude" Directories:
      • Enter directories to be excluded from PST optimization by absolute path from the profile DocumentRoot.
    • "Save" button:
      • Save the above settings.
    • "Optimize Resources" button:
      • Resource Optimization is performed for all resources based on the above settings. Note, if you want to optimize a specific resource on a priority basis, click ON for "Optimize resources with highest priority", specify the path to the folder or file, and execute "Optimize Resources".
  • Remove Optimized Resources: This setting allows you to delete optimized resources by specifying the time period and/or resources.
    • Remove optimized resources for a specified period of time:
      • Specify the year, month, day, hour, and minute.
      • Remove optimized resources older than the specified period by clicking the "Remove Resources Older Than" button.
    • Remove optimized resources in specified directories:
      • Enter the path to the folder or file you want to remove and click "Remove Already Optimized Resources". Note, if you want to remove only the resources excluded from optimization, click ON for "Remove only resources excluded from optimization", and then execute "Remove Already Optimized Resources".
  • Optimization Strategy: This setting allows you to change the optimization strategies generated by Strategic AI "David".
    • Optimization Strategy Settings (Enable/Disable):
      • Enable/disable by selecting the four check boxes "lazy load", "proxy", "webfont", and "engagement delay".
    • "engagement delay" Exclusion Settings:
      • File type, path/needle, Strategic AI "David" status, and exclusion check boxes for each setting will be listed. By checking ON/OFF, set the exclusion settings.
    • "Save & Apply" button:
      • Save the above settings.

Changes in resource optimization settings will be applied the next time PST executes resource optimization. If you want to apply these changes immediately, click the "Optimize Resource" button. If an optimized resource has already been generated for the resource you want to exclude from resource optimization, the resource will not be automatically removed until that resource is updated. If you want to apply these changes immediately, click the "Remove Optimized Resources" button.

Changes to the optimization strategy will be applied the next time a request is made for a web page (URL) and PST generates an optimization strategy. Note, optimization strategies will not be generated again for a certain period of time (1 hour by default.) Therefore, changes will only take effect after the specified amount of time has elapsed and the optimization strategy is generated once again.

Changing PST Expert-mode Settings

In Expert-mode, more detailed settings can be selected under "Basic Settings" and "Expert-mode" in the menu pane. Click "Save & Apply" after making changes.

  • Resource Optimization: These settings allow you to change the types and paths of resources you want to exclude from resource optimization, as well as the compression level of images.
    • Optimization Strategy:
      • Enable/disable by selecting the three check boxes for images, CSS, and JS.
    • Image Compression Level:
      • Enter the image compression level by setting a value between 1 and 100. The lower the value, the more compressed the image and smaller the file size, but the quality of the image will be lower.
    • "Exclude" Directories:
      • Enter directories to be excluded from PST optimization by absolute path from the profile DocumentRoot.
    • "Save" button:
      • Save the above settings.
    • "Optimize Resources" button:
      • Resource Optimization is performed for all resources based on the above settings. Note, if you want to optimize a specific resource on a priority basis, click ON for "Optimize resources with highest priority", specify the path to the folder or file, and execute "Optimize Resources".
  • Remove Optimized Resources: This setting allows you to delete optimized resources by specifying the time period and/or resources.
    • Remove optimized resources for a specified period of time:
      • Specify the year, month, day, hour, and minute.
      • Remove optimized resources older than the specified period by clicking the "Remove Resources Older Than" button.
    • Remove optimized resources in specified directories:
      • Enter the path to the folder or file you want to remove and click "Remove Already Optimized Resources". Note, if you want to remove only the resources excluded from optimization, click ON for "Remove only the resources excluded from optimization", and then execute "Remove Already Optimized Resources".
  • Optimization Strategy: This allows you to change the optimization strategies generated by Strategic AI "David".
    • Optimization Strategy Settings (Enable/Disable):
      • Enable/disable by selecting the four check boxes "lazy load", "proxy", "webfont", and "engagement delay".
    • Settings for Exclude Directives:
      • Configure exclusion settings for directives. Specify the paths to be excluded by regular expressions. The following directives can be configured.
        • defer external js, lazy load, lazy youtube, lazy video, link dns prefetch, link lcp preload, normalize newlines, proxy, reduce script, repair jquery, secure target blank, split inline css webfont, tidy, wp opt genericons, wp remove emoji, wp remove header, wp remove meta, wp shorten url, wp remove wpcf7
    • "engagement delay" Exclusion Settings
      • File type, path/needle, Strategic AI "David" status, and exclusion check boxes for each setting will be listed. By checking ON/OFF, set the apply and exclusion setting.
    • "Save & Apply" button:
      • Save the above settings.

Changes in resource optimization settings will be applied the next time PST executes resource optimization. If you want to apply these changes immediately, click the "Optimize Resource" button. If an optimized resource has already been generated for the resource you want to exclude from resource optimization, the resource will not be automatically removed until that resource is updated. If you want to apply these changes immediately, click the "Remove Optimized Resources" button.

Changes to the optimization strategy will be applied the next time a request is made for a web page (URL) and PST generates an optimization strategy. Note, optimization strategies will not be generated again for a certain period of time (1 hour by default.) Therefore, changes will only take effect after the specified amount of time has elapsed and the optimization strategy is generated once again.

Changing PST Developer-mode Settings

In Developer-mode, settings cannot be changed through PST Manager. Refer to the above "Modifying PST Configurations" for more information.

If you are in Developer-mode because you accidentally edited the PST configuration file, you can initialize the PST configuration file with the "pst config init" command. Refer to "PST Commands" for more information.

Optimizing Resources

PST Resource Monitoring Service ("watch") monitors changes to resources in profiles and generates optimized resource files for images, scripts, and style sheets in response to updates. However, for resources that existed in a profile before executing the initial PST configuration, an optimized resource file will not be generated until the resource is updated. Therefore, it is necessary to generate an optimized resource file for the resources in the profile.

You can optimize resources from the profile dashboard on PST Manager. Resource optimization will take time if the number of resource files is large. By limiting the number of target directories to be optimized, optimization time can be shortened.

Note that optimized resource files from PST (2.x) can be used. If already optimized resource files exist, optimization will not be executed.