TIPS: DS207+

Modifiche software tipo:Telnetting, email server, torrent, .....
Rispondi
davide80
Utente
Utente
Messaggi: 243
Iscritto il: venerdì 23 maggio 2008, 0:54

TIPS: DS207+

Messaggio da davide80 »

Synology DS207+ tips
- Miscellaneous tips on Synology DS207+ NAS
- aMule

How to restart the stock aMuled coming with firmware 2.0:
/usr/syno/etc/rc.d/S25download.sh restart
Cron
The cron daemon

The DS207+ already comes with cron installed.
There are, however, some differences with standard cron usage.
Where is the crontab?

As expected, the system crontab is in /etc/crontab. As far as I know, there is no utility such as the omnipresent crontab -e: this means that the file /etc/crontab must be edited directly, e.g. with vi /etc/crontab.
Once cron is running, the "working copy" of the system crontab can be found in /var/spool/cron/crontabs/root.

There are any special crontab formatting issues?

This is rather controversial. Several posts on Synology wiki and here and there on the web says that entries in the crontab must be separated by tab characters.
On the other hand, row format is standard crontab. I report a remainder here, for clarity's sake:

#minute hour mday month wday who command
0 0 * * * root /usr/sbin/ntpdate -b pool.ntp.org
*/5 * * * * root sh /opt/bin/tps
45 * * * * root /opt/bin/wget -O - -q http://localhost/drupal/cron.php


Dealing with wday 0 and 7 are not the same: more precisely, 0 is Sunday, 7 gives error, making cron die at startup (see /var/log/messages to inspect for potential cron startup errors).
When is the crontab read?

Synology web site, and several other posts on Synology-dedicated forums (or fora?) stress the fact that
The crontab is read only upon booting, so after each change, you'd have to reboot the Synology.

Actually, this is not true. Synology's built-in busybox's cron is obviously read at boot time, but this is accomplished executing a script, which sits in /usr/syno/etc.defaults/rc.d/S04crond.sh.
That means that you can start and stop cron in the (almost) standard way:
/usr/syno/etc.defaults/rc.d/S04crond.sh stop stops cron
/usr/syno/etc.defaults/rc.d/S04crond.sh start starts cron, in this case the crontab is re-read, saving having to reboot the machine.
Mantis bug-tracking system on Synology
But, why Mantis?

Well, looks like trac in Synology is a sort of PITA, FlySpray looks really nice, but its development somehow is lagging... enters Mantis.

For detailed instruction on installation, please see the mantis manual for reference.

Here is a concise summary of what I did to have Mantis installed on my DS207+.

1. Download mantis 1.1.6 from mantisbt.org
2. Untar it in the web server root, (usually /volume1/web/, on Synos) and renamed folder as mantisbt
3. Using phpMyAdmin MySQL web administration interface (you didn't install it on your box already, did you?), create a mantis user, with full privileges on a mantis database[1]
4. Point your favorite browser to /mantisbt/admin/install.php, and fill in the configuration/setup forms using the username/password and database name created before
5. Remember to move out the admin directory once you're done with installation
6. Login as administrator/root, change the administrator password, create a new user, and - why not - a new project

Now, if only we could have svn integration...
Some googling around pointed out that:

* a php scrips exists in the mantis install, suitable to be called in svn post-commit
* alt-tag.com has some ideas
* also on Bonetree Blog there are some directions

I mainly followed Bonetree Blog instructions, and here's what I did.
svn integration

Create an user called svn, give him reporter access level
Notes

[1] I should give postgres a try, but I wonder if Synology's firmware crippled installation of postgres would work. For now, let's stick on MySQL.
Shared volumes
Shared volumes offered by priscilla.prea.net

Our home server offers several volumes, which can be mounted either as CIFS (aka samba, aka "Windows Network Neighborhood") shares or as NFS shares
CIFS shared volumes

NFS shared volumes

FTP service

Shut down PhotoStation Blog!

Synology built-in web server has an URL rewrite rule to point URL such as http://your-synology-box.something/blog to the PhotoStation built-in blog.
I'm afraid, but I prefer drupal blogging interface... which, alas, sits at the same */blog/ URL.
The solution

All is needed is to find out and shut up that rewrite rule:

1. In the Synology Web Administrative Interface, go to Web Services and disable PhotoStation service[1]
2. connect as root, for example using ssh access.
3. open /usr/syno/apache/conf/extra/httpd-autoindex.conf-user
4. find the AliasMatch block shown below:

AliasMatch ^/photo$ "/usr/syno/synoman/phpsrc/photo/"
Alias /photo/ "/usr/syno/synoman/phpsrc/photo/"
Alias /photosrc/ "/var/services/photo/"
Alias /webdefault/ "/usr/syno/synoman/phpsrc/web/"
AliasMatch ^/blog$ "/usr/syno/synoman/phpsrc/blog/"
Alias /blog/ "/usr/syno/synoman/phpsrc/blog/"
RedirectMatch ^/blog/include/v(.*) /blog/include/get_video.php?$1

and comment out the last three lines (maybe, read the Apache Manual to understand what they represent...) like that:

AliasMatch ^/photo$ "/usr/syno/synoman/phpsrc/photo/"
Alias /photo/ "/usr/syno/synoman/phpsrc/photo/"
Alias /photosrc/ "/var/services/photo/"
Alias /webdefault/ "/usr/syno/synoman/phpsrc/web/"
# commented out to let Drupal path work instead of Synology PhotoStation blog
# AliasMatch ^/blog$ "/usr/syno/synoman/phpsrc/blog/"
# Alias /blog/ "/usr/syno/synoman/phpsrc/blog/"
# RedirectMatch ^/blog/include/v(.*) /blog/include/get_video.php?$1

5. restart user (not system!) Apache web server with:

/usr/syno/etc.defaults/rc.d/S97apache-user.sh restart

Now, if you care to point your browser to http://your-synology-box.something/blog you should see Drupal's own blog pages instead of Synology ones.
Acknowledgments

Thanks to a post by itari on Synology.es forum.

[1]Anyway, one could need PhotoStation and Drupal blog together... someone can fgrure out a solution?
hint: make PhotoStation blog point to a diferent URL like this:

AliasMatch ^/synoblog$ "/usr/syno/synoman/phpsrc/blog/"
# Alias /synoblog/ "/usr/syno/synoman/phpsrc/blog/"
# RedirectMatch ^/synoblog/include/v(.*) /blog/include/get_video.php?$1


N.B.
PER INSERIRE COMMENTI ALLE GUIDE CLICCA QUI.
-------------------------------------------------------------------------------
Link: http://home.prea.net/book/export/html/40
Autore del post: Davide80
Modifica post: Parsipal
Synology DS213+
Rispondi

Torna a “Modding Disk Stations”