Schlagwort: Synology

Befehle auf der Synology

In ein Verzeichnis wechseln

Wo befinde ich mich?

Verzeichnis erstellen

Verzeichnis anzeigen

bzw.

Größe eines Verzeichnisses mit Unterverzeichnissen anzeigen

Anzahl der Dateien eines Verzeichnisses mit Unterverzeichnissen anzeigen

find listet alle Files auf (- type f), der Output wird in den wc geschickt, der mit -l die Zeilen zählt. Ausgegeben wird nur die Anzahl der Files.

Eine Datei suchen

Löschen einer Datei

Löschen eines Verzeichnisses mit Inhalt

Umbenennen oder Verschieben einer Datei

Datei kopieren

Mehrere Dateien kopieren

Ein Verzeichnis mit Unterverzeichnissen kopieren

tar-Archive (.tar)
Ein nicht-komprimiertes tar-Archiv (.tar) erstellen

Erstellt ein nicht-komprimiertes tar-Archiv aller Dateien und Unterverzeichnisse im aktuellen Verzeichnis:

Ein komprimiertes tar-Archiv (.tgz) erstellen

tar Archive entpacken

Für gzip komprimierte .tar.gz (oder .tgz) Archive:

Neustart der Synology Station

Herunterfahren der Synology Station

Aktuell laufende Prozesse anzeigen

Alle Prozesse anzeigen

Einen Prozess beenden

Ein Programm beenden

System-Logbuch anschauen

Und wenn man das dynamisch haben will, quasi um eine log in realtime zu verfolgen

System-Start-Logbuch anschauen

Ein IPKG-Programm suchen

der Befehl „list“ such nach einem genauen Pattern. Deswegen empfiehlt sich :

Ein IPKG-Programm installieren

Voraussetzung dafür ist eine Installation von IPKG selbst

grundsätzlich davor immer ipkg update

Ein IPKG-Programm deinstallieren

Dienste neu starten

Apache

mysql

Systemspeicher

CPU Infos

Verwendete Interrupts

Verwendete Dateisysteme

Linux Version

Geräte

Umgebungsvariabeln

Physische und logische Partitionen
Für Systeme mit mehreren Laufwerken und erweiterte Infos

oder für alle Systeme

Einen Dump in eine Datenbank importieren

mein-pw, meine-db und mein-dump sind dabei entprechend zu ersetzen. Wenn der Dump utf-8-kodiert ist, kann ein zusätzliches –default-character-set=utf8 notwendig sein.

WordPress aktualisieren / Plugin installieren

Beim aktualisieren/ installieren von Plugins kommt die Fehlermeldung, daß keine Verbindung aufgebaut werden kann (TimeOut).

Das Problem liegt am Nameserver (hier bei einer Installation auf einer Synology). Als Nameserver wird der Router angegeben was zu diesem Problem führt.

Wenn als Nameserver 8.8.8.8 (Google Nameserver) eingetragen wird funktioniert es tadellos. Es kann natürlich auch jeder beliebige öffentliche Nameserver eingetragen werden.

 

Synology Tuning

Synology produces some pretty powerful network storage devices.  These are basically tiny computers optimized to store/serve data and able to run programs to stream music, videos, photos, websites, and more.  By default, WordPress will run relatively slow on a Synology since it is configured to minimize disk, CPU, and memory utilization.  By simply making a few changes, you can make WordPress on your Synology run faster than average website without compromising its ability to run other functions.

Enable PHP Caching

By default, the Synology is configured to enable PHP caching.  Ensure “Enable PHP cache” is still checked under Control Panel | Web Services | PHP Settings.

Synology DSM 5 PHP Caching

Tuning Configurations

Tuning the following configurations will give you the largest performance gain of any of the other recommendations listed in this article.  It is also the most dangerous as you can easily cause an over consumption of resources slowing down parts of all of your Synology or worse yet can break WordPress or your entire Synology.  Before proceeding, ensure you have everything backed up OFF your Synology in case you need to perform a full Synology restore.  Now that we have that gloom and doom over with, on with the tuning…  To perform any of the changes below, you will first need to enable Telnet by checking “Enable Telnet service” under Control Panel | Terminal & SNMP | Terminal.

Synology DSM 5 Enable Telnet

Note: Enabling telnet allows remote command line access to your Synology.  You should only enable it when needed and if your network is adequately secured.

OPCache

OPCode is caching mechanism preinstalled on Synology to cache running PHP code into memory and to recall the code from memory instead of from disk.  To configure the OPCode engine to consume more resources and thus speed up WordPress:

  1. Telnet to your Synology with the root account
  2. Edit and save /etc/php/conf.d/opcache.ini with your desired changes
  3. Restart Apache by running  /usr/syno/etc/rc.d/S97apache-sys.sh restart

Below are some of the change I have implemented with positive results:

PHP Configuration

PHP is the language WordPress is written in.  Synology has the PHP engine preinstalled and preconfigured to consume minimal resources such as memory and CPU.  To configure the PHP engine to consume more resources and thus speed up WordPress:

  1. Telnet to your Synology with the root account
  2. Edit and save /etc/php/php.ini with your desired changes
  3. Restart Apache by running  /usr/syno/etc/rc.d/S97apache-sys.sh restart

Below are some of the change I have implemented with positive results:

Apache Configuration

Apache is the web server preinstalled on the Synology for all web applications (like WordPress).  The Apache configuration is preconfigured to consume minimal resources such as memory and CPU.  To configure Apache to consume more resources and thus speed up WordPress:

  1. Telnet to your Synology with the root account
  2. Edit and save /etc/httpd/conf/extra/httpd-mpm.conf-user with your desired changes
  3. Restart Apache by running  /usr/syno/etc/rc.d/S97apache-sys.sh restart

Below are some of the change I have implemented with positive results:

MariaDB Configuration

MariaDB is the database server you can install to run with Wordpress.  The MariaDB configuration is preconfigured to consume minimal resources such as memory and CPU.  To configure MariaDB to consume more resources and thus speed up WordPress:

  1. Telnet to your Synology with the root account
  2. Edit and save /volume1/@appstore/MariaDB/etc/mysql/my.cnf with your desired changes (note: you may have to change “volume1″ to the location where you installed MariaDB).
  3. Restart MariaDB by running /usr/share/mysql/mysql.server restart

Below are some of the change I have implemented with positive results:

WordPress Tuning

WordPress by default is also not optimized for speed but thankfully there are some great plugins and changes your can make to make your site scream.

Enable Site Caching

Download, activate, and configure the W3 Total Cache plugin.

W3 Total Cache

Basically this plugin caches all the dynamic content on your website while also shrinking down code where possible.  The performance gained because of this plugin is like night and day.  If you are skittish about implementing any of the suggestions within this article, this is the one NOT to skip.

There are tons of settings and tons of articles already on the web on how to optimally configure this plugin.  Here are some quick tips:

  • Enable page, minify, database, object, and browser cache
  • Select “OpCode: Alternative PHP Cache (APC)” as your cache method (if not “Disk: Enhanced”, “Disk: Basic” or just “Disk”)
  • Uncheck all items within the “Debug” section
  • Enable “Late Initialization” on the “Page Cache” options page
  • Update “Pages Per Interval” to 15 on the “Page Cache” options page

Shrink Your Images

Download, activate, and use the WP Smush.it plugin.

WP Smush.it

Basically this plugin performs operations to shrink the size of your website’s images without a loss in quality.

To “smush” images, simply go to your WordPress “Media” section on the admin dashboard and click “Smish.it Now!” or “Remush” next to the desired image.

Smush it now    Re-smush
Or to “smush” a bunch of images at once,  go to your WordPress “Media | Bulk Smush.it” section on the admin dashboard.

Deactivate unneeded plugins

Plugins may add additional code that run every time a page or image is loaded.  That additional code will cause the page to display slower.  Deactivate all plugins that are not needed.

Choose a fast theme

Not all themes are created equal.  Experiment by activating several themes and noting the time each takes to load.  Select the theme that fills your need while also loading the fastest.

Optimize the Database

Download, activate, and use the WP-Optimize plugin.

WP-Optimize

 

Basically this plugin performs a bunch of database optimizes and cleanup routines to speed up your database calls.  Faster database calls means faster web page loading.

To optimize your database, click “WP-Optimize” in the admin dashboard, check everything, and click “Process”.

Conclusion

While the changes above bring huge performance gains, I still have 2 things that quirk me from being completely satisfied.  First, I don’t really know which parts of the configuration changes are truly essential, which are not required, and if they are fine tuned to bring optimal performance.  Second, I don’t see my Synology utilizing noticeable memory despite calling for more memory consumptions in the configuration files.  This causes me to question the value they bring.

But with that aside, I know WordPress on my Synology now runs substantially faster having implemented the changes above.  And in fact, any web application on your Synology should run faster as well (ex. the DSM console).  Let me know if they work well for you too by liking or sharing this page on Facebook.  Feel free as well to send me any performance enhancing tips to make WordPress on Synology run even faster.