Overview on modifying the Synology Server, bootstrap, ipkg etc: Difference between revisions

From wiki
Jump to navigation Jump to search
imported>RobinGB
imported>RobinGB
Line 58: Line 58:
#Now run the .xsh script by entering the command "sh syno-x07-bootstrap_1.0-jb_arm.xsh"
#Now run the .xsh script by entering the command "sh syno-x07-bootstrap_1.0-jb_arm.xsh"
#After the script has finished you can delete the script file, i.e. enter the command "rm syno-x07-bootstrap_1.0-jb_arm.xsh"
#After the script has finished you can delete the script file, i.e. enter the command "rm syno-x07-bootstrap_1.0-jb_arm.xsh"
#Update ipkg using the command "ipkg update"
#Update the ipkg list of installed products using the command "ipkg update"
#Update the ipkg installed packages to the latest versions using the command "ipkg upgrade"
#Finished
#Finished



Revision as of 20:19, 17 April 2008

What is a Synology Server

A Synology Server is a powerful linux based device designed for Network Attached Storage (NAS). It is very similar to a Personal Computer running the Linux operating system, just with less RAM, less CPU power and lacking the hardware to directly support a monitor, keyboard and mouse etc.

What can I do by Modifying a Synology Server

Despite not being a PC, using the provided management web interface and the Command Line Interface you can take full control of the device, change the way it operates and install additional software. Much of the software is available free of charge produced by users like you. There can be many advantages to using a device such as a Synology Server rather than a PC, small footprint, low power consumption, dedication to the set tasks.

However, modifying your NAS will invalidate your software support warranty, although not normally your hardware warranty, as described in General Disclaimer on Modifying the Synology Server. Modifying your Synology Server is also not without considerable risk of making it either temporariy unstable or temporarilly unuseable. In virtually all cases the Synology Server can be returned to its former as new condition (in software terms) by fully re-installing the synology firmware. Re-installing the firmware can result in loosing your data, so ensure you have a backup of your data before modifying the NAS.

What do I need to do

This depends on the changes you want to make or the software you want to install. Below are some common application/program types you might install and an overview of the process.

for php applications

php is a powerful server side language that is already installed on your NAS. Web pages can be written to call php scripts (programs) that reside in the web space on your NAS. Examples of common php applications are Wiki's, bulletin boards, media servers, interactive websites etc. Well written php applications are the easiest and safest (in terms of system stability) applications to install on your NAS. Because a php engine is already installed on your Synology NAS you don't normally need to install any additonal packages. php programs are also normally independant of the hardware platform, i.e. they don't need compiling to match your CPU etc. A typical installation routine for a php application would involve starting the web service on the NAS, copying the application files into the "web" folder, and then opening a config.php or <app_name>.php web page in your internet browser. As an example Zina covered in this Wiki at Install Zina Media Server is a php application.

for compiled/binary programs

Compiled/binary programs (compiled from source code programs, see below) are the most powerfull type of program you can install on the Synology Server. They can provide rich content and wide functionality but this comes with increased potential for corrupting the Server compared to php applications. The compiled programs are distributed as binaries (usually with .bin extension but sometimes with no extension at all). Some of these binaries require other programs to be installed on your machine so they can run. If you want to use a binary it must have been compiled specifically for your synology hardware platform, i.e. see Is my NAS an ARM or a PowerPC CPU model. Each of these processors require programs compiled specifically for them, a program compiled for PPC processors will not work on an ARM processor, and vice versa.

To run a binary program:

  1. Drop it in a folder on your NAS e.g. "/volume1/public". If you are using an ftp client (e.g. windows file explorer) you won't see the "/volume1" path, just your shared folder name e.g. "public". Note: this directory ("public") is not created on all NAS's, if you do not have it you can create it in the web management GUI)
  2. Enable and then login using the Command Line Interface as "root"
  3. Change Directory to the folder where you put the file using the cd command, e.g. "cd /volume1/public". Note: when using the Command Line Interface all the shared directories ("music", "web", "video", "photo" etc.) are located in "/volume1"
  4. Make sure the binary file has execute permisions using the command "ls -l" (if it has execute permissions you will see an "x" in the permissions string). If it doesn't have execute permission give it execute permisison using by entering the command "chmod +x XXXX.XXX" where XXXX.XXX is the name of the file
  5. Run the progran by entering "./XXXX.XXX"

You can find compiled programs for the ARM CPU here(If you compile any of your own please add them).

The compiled program "screen" which you can find here (for ARM CPU's) is an example, it has no other dependecies, so you can just copy the single file and imediately run the program. No need for ipkg, bootstrap or anything else.

for source code programs

As stated above compiled/binary programs (compiled from source code programs) are the most powerfull type of program you can install on the Synology Server. They can provide rich content and wide functionality but this comes with increased potential for corrupting the Server compared to php applications. Source code programs are the source of compiled/binary programs (see above) but need compiling into binaries before they can be used. Often the easiest way to do this is using the ipkg package handler. The source code applications are distributed in an uncompiled state so that they can be compiled by the installer to suit the target hardware platform. Consequently you do not need to worry about Is my NAS an ARM or a PowerPC CPU model when selecting a source code program as your compiler (see ipkg below) will handle this for you.

If you take a look at http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/ you will find some 900 packages you can use on ARM based synology products using ipkg to compile and install them.

ipkg

To make the installation, compiling, update and removal process of software easier the computing industry adopted the principle of the Package Management System. ipkg is a dpkg-inspired, very lightweight Package Management System for small Linux systems and embedded devices, such as the Synology Servers. Synology products do not currently come with ipkg installed hence the installation of ipkg is often the first recomended step to install applications that require compilation.

However ipkg is also dependant a few other software bits and pieces that are also not installed on the synology servers. This is where the Bootstrap programs are used as they automate the installation of ipkg and the other packages it needs.

The alternative to using ipkg is to use previously compiled binaries as decribed previously, but for these you are dependant on other Synology users with the same hardware configuration to make these Binaries available to you.

Bootstrap

A bootstrap is a script that installs ipkg and other programs it is dependant on. The bootstraps are specific to the processor in your Synology Server, so make sure you use a compatible one, see Is my NAS an ARM or a PowerPC CPU model.

You are best checking the forum for the latest info on the best bootstrap to use.

However popular ones are:

For PPC models www.nslu2-linux.org/wiki/DS101/DS101BootStrap

For ARM models www.buechse.de/SYNOLOGY/syno-x07-bootstrap_1.0-jb_arm.xsh The feed for this bootstrap is http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/ giving you access to some 900 software packages.

The bootstraps are normally .xsh files. To install a .xsh file (and therefore the bootstrap):

  1. Enable and then Login to the Command Line Interface as user "root", password is the same as for admin.
  2. Change to a directory such as /volume1/public (note this directory is not created on all NAS's, if you dont have it you can create it in the web management GUI), i.e. enter the command "cd /volume1/public"
  3. Get the NAS to download the bootstrap, i.e. enter the command "wget http://www.buechse.de/SYNOLOGY/syno-x07-bootstrap_1.0-jb_arm.xsh"
  4. Now run the .xsh script by entering the command "sh syno-x07-bootstrap_1.0-jb_arm.xsh"
  5. After the script has finished you can delete the script file, i.e. enter the command "rm syno-x07-bootstrap_1.0-jb_arm.xsh"
  6. Update the ipkg list of installed products using the command "ipkg update"
  7. Update the ipkg installed packages to the latest versions using the command "ipkg upgrade"
  8. Finished

Toolchain

Don't take my word on it but apparently a toolchain is a program that allows programmers to develop programs for target systems, in our case the Synology Servers. Can anyone describe what this is in more detail, please?

Other usefull sources of info

This Synology Wiki area and the Synology forum are your main sources, however, other very usefull areas are: