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 18: Line 18:
To run a binary program drop it in a folder on your NAS (e.g. /volume1/public), use the [[Modifications|Command Line Interface]] and cd to the folder where you put it. Make sure the binary file has execute permisions (using "ls -l"). If it doesn't give it execute permisison using "chmod +x XXXX.XXX" where XXXX.XXX is the name of the file. Then enter "./XXXX.XXX" to run the program.
To run a binary program drop it in a folder on your NAS (e.g. /volume1/public), use the [[Modifications|Command Line Interface]] and cd to the folder where you put it. Make sure the binary file has execute permisions (using "ls -l"). If it doesn't give it execute permisison using "chmod +x XXXX.XXX" where XXXX.XXX is the name of the file. Then enter "./XXXX.XXX" to run the program.


The compiled program "GNU screen" which you can find [[Compiled_programs_for_Marvell_mv5281_ARM-based_Synology_Products|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.
You can find compiled programs for the ARM CPU [[Compiled_programs_for_Marvell_mv5281_ARM-based_Synology_Products|here]](If you compile any of your own please add them).
 
The compiled program "screen" which you can find [[Compiled_programs_for_Marvell_mv5281_ARM-based_Synology_Products|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===
===for source code programs===

Revision as of 21:31, 11 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 software tools may I need

This depends on the changes you want to make or the software you want to install. Below are some common application types you might install and the tools needed for them.

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) hosted on a web server to do things on the server (i.e. the synology NAS). Examples of common php applications are Wiki's, bulletin boards, media servers, interactive websites etc. Well written php applications are the easiest 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. 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 explorer. As an example Zina covered in this Wiki at Install Zina Media Server is a php application.

for compiled/binary programs

Compiled and 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. The compiled programs are distributed as binaries (usually with .bin extension but sometimes with no extension at all). Some times these programs 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.

To run a binary program drop it in a folder on your NAS (e.g. /volume1/public), use the Command Line Interface and cd to the folder where you put it. Make sure the binary file has execute permisions (using "ls -l"). If it doesn't give it execute permisison using "chmod +x XXXX.XXX" where XXXX.XXX is the name of the file. Then enter "./XXXX.XXX" to run the program.

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 and 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 need compiling. 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. As an example in the current Synology range some Servers use the PPC processor (e.g. a DS-207) and others use an ARM processor (e.g. a DS-207+), see Is my NAS an ARM or a PowerPC CPU model. Each of these processors require applications compiled specifically for them, a PPC compiled application will not work on a ARM processor, and vice versa.

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.

There is an alternative to using ipkg, which is to install a previously compiled application, but to work the application must have been compiled for your hardware platform see Is my NAS an ARM or a PowerPC CPU model, hence you are dependant on other Synology users with the same configuration to make these Binaries available.

Bootstrap

As discussed above 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.

To install a .xsh file:

  1. 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), 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 ipkg using the command "ipkg update"
  7. 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: