User login
Technology
Synology Mailstation with Multiple domains on a DS207+
Synology Mailstation with Multiple domains on a DS207+
Geheugensteuntjes en een aantal niet gedocumenteerde mogelijkheden..
Iedere gebruiker kan verschillende email-adressen toegewezen krijgen.
Vanuit CLI..
vi /usr/syno/mailstation/etc/aliases
Voeg aliases toe op de volgende manier..
info: pietmajoor
webmaster: pietmajoor
etc..
Dus mail gericht aan de volgende adressen komt altijd bij Piet Majoor in het inboxje.
pietmajoor@mijndomein.nl
info@mijndomein.nl
webmaster@mijndomein.nl
Om de aliases door te voeren..
/usr/syno/mailstation/bin/newaliases
/usr/syno/mailstation/sbin/postfix reload
*****************
Voor meerdere domains (eentje is ingegeven in GUI)..
Vanuit CLI..
vi /usr/syno/mailstation/etc/main.cf
Zoek regel..
mydestination = $myhostname (Dit is dus het domein zoals ingegeven in GUI)
Voor meerdere domeinen voeg je ze toe op de volgende manier..
($myhostname laten staan, dit is de variabele die wordt ingevuld door de GUI ingegeven domein)
mydestination = $myhostname mijndomein1.nl mijndomein2.nl
Note: Elke gebruiker ontvangt mail voor alle domein namen,
dus pietmajoor@mijndomein1.nl, pietmajoor@mijndomein2.nl, etc.
/usr/syno/mailstation/sbin/postfix reload
***********************
Maak gebruik van een relayhost aangezien sommige mailservers mijn
mail niet accepteren.. (o.a. gmail)
Dus nu gaat outgoing mail via de relayhost van isp.
vi /usr/syno/mailstation/etc/main.cf
relayhost = smtp.xs4all.nl
Waarschijnlijk hierom dat port 25 niet open hoeft te staan?
/usr/syno/mailstation/sbin/postfix reload
***************
Router.. ports opengooien.
SMTP TCP 25
POP3 TCP 110
IMAP TCP 143
IMAPS TCP 993
POP3S TCP 995
*********************
XS4all (servicecenter) op nivo 2 zetten (weer teruggezet op nivo 3), bij nivo wordt
port 25 (in/out) niet geblokt. Maar is dus niet meer nodig voor mij.
*********************
Voor checken van geblokte ports etc..
http://canyouseeme.org/
Google Wave invites
Who wants or needs an invite?
Send me your email address and the first 8 to respond will get an invite. 
Site plat
Gisteren een foutje gemaakt waardoor de site plat ging..
Moest grijpen naar de backup van de site, keurig teruggezet maar de permissies en de 'ownership' van de mappenstructuur wordt niet teruggezet waardoor de site niet functioneert.
Moest de site opnieuw opzetten, alleen de site dus, de data kun ik natuurlijk gewoon plukken uit een backup van mijn mysqldb.
Permissies en 'ownership' van de mappen-structuur is een grote uitdaging, heb daar nog wat werk te doen.
Taak 1: Site weer functionerend online krijgen.
Taak 2: Een backup-methode zoeken die in staat is de permissies en onwerships weer terug te zetten. Of op zijn minst een beeld heb van de gebruikte permissies en ownerships.
Taak 3: Site meenemen in mijn subversion-server? Kan subversion ook permissies meenemen?
Taak 4: Een manier vinden om snel en makkelijk een beeld te krijgen van hoe ik modules en andere externe-packages gebruik, en of ik ze uberhaupt gebruik. Nu zie ik alleen een hele lijst modules (in mijn backup) waarvaan ik niet (meer) weet of ik ze nodig heb.
Taak 5: Nogmaals permissies en ownerships afwandelen aangezien het essentieel is voor het funtioneren van de site, en ook omdat je te maken hebt met beveiliging van gevoelige data en van de server.
Vraag 1: Hoe kan het dat ik in maintainance-mode geen toegang heb tot de site?
Vraag 2: Hoe maak je een custom theme?
Vraag 3: XML-sitemap?
Inloggen
Vanaf.. nu! Zal een ieder die toegang wil krijgen tot de gezins-gerelateerde berichten moeten inloggen met een eigen account, er zijn 2 mogelijkheden om dat te doen..
Mogelijkheid 1:
Vanuit het inlogmenu maak je een account aan, na bevestiging van onze kant heb je een prachtig nieuw www.labordusjes.nl accountje.
Mogelijkheid 2:
Maak gebruik van een zogenaamd OpenID-account. De meeste mensen hebben (zonder het zelf te weten) al een OpenID-account waarmee je gewoon kunt inloggen op www.labordusjes.nl, nou ja, na bevestiging dan. Enkele voorbeeldjes van hoe dit werkt..
Je hebt een account bij Hyves.nl, je profilenaam is 'annemarie' dan kun je op www.labordusjes.nl inloggen met de volgende inloggegevens:
annemarie.hyves.nl
hyves-wachtwoord
Met een Google-account kan het ook..
Log in op www.labordusjes.nl met de volgende Google-inloggegevens:
<blogname>.blogspot.com
google-wachtwoord
Een Yahoo-account:
<profilename>@yahoo.com
yahoo-wachtwoord
Een myOpenID-account:
http://<openid-username>.myopenid.com/
myopenid-wachtwoord
subversion on a ds207+
| Note from Synology:
Using mods will waive the owners right to online technical support, any form of damage resulting from modifying the server will be at the owners responsibility and risk. Improper manipulation or modification of the Synology server can lead to disabling or bricking the Synology Product. |
My goal is to get some sort of 'Personal Documents Revision System' going, also I want some of these scripts to be publicly viewable. Who knows it will help others have even more fun with there Synology ds207+. Worked for me.. Writing this guide also has proven to be a great method to *try* to understand how things work, writing it down helps. Large portions of this guide are taken from other sources.
Tested with the following setup... (Client) 2.6.28-ARCH (Server) Synology Model: DS207+ // Serial number: 85E1N02634 // Firmware version: DSM 2.0-0803 Subversion (Server): 1.5.5 (r34862) Subversion (Client tools): 1.5.6 (r36142) RapidSVN: 0.9.6 WebSVN: 2.1.0
Contents
Preparations
Enable ssl on the ds..
- Log into the Synology Disk Station Manager (MUI) using the Administration account.
- Open the Terminal Services Menu, from the Network Services Folder
- Enable the Telnet or SSH Service to access the CLI (I'll be using ssh)
Pick your terminal client to access the CLI..
Window users may find Putty there best choice, there is even a Linux version available.
From Linux you can open a terminal window and simply.. ssh <IP of your Diskstation> -l root Enter your Administration account's password to login.
Create a user for svnserve daemon
For security reasons it is a good idea to create a separate user just for the Subversion daemon. Use the MUI under Privileges -> User to create a new user. In this guide I will be using svnowner. Give this user a complicated password, which we actually do not need to remember, as we will just spawn svnserve daemon with this user account from inetd, so just set it to some value (for security reasons to something other than the empty value).
Create a new share for your repositories
Use the MUI (Privileges -> Shared Folder) to create a new shared folder. I'll be using svn. Give admin and svnowner read-write permissions and remove all rights from the rest of the users.
Install the ipkg bootstrap
We need to install the bootstrap to be able to *easily* install the Subversion-Server Package. The bootstrap-script will install ipkg (the Itsy Package Management System), this is a pretty cool package management system that resembles dpkg (Debian Package Management System). It is made to provide for a full fledged package manager on low resource devices, like my little ds207+
Important: For the installation of ipkg (via a bootstrap) you need to know the model of your CPU as detailed right here.
In my case I need to get the bootstrap script for a Marvell mv5281 ARM Processor.
Download the script to the current location.. wget http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/syno-x07-bootstrap_1.2-5_arm.xsh
Now run the script and have it download a hole bunch of packages needed to get ipkg functional.. sh syno-x07-bootstrap_1.2-5_arm.xsh
When it's done you can delete the bootstrap-script, you won't need it anymore.. rm syno-x07-bootstrap_1.2-5_arm.xsh
Update the ipkg list of installed packages.. ipkg update
Update the installed ipkg packages (if any) to the latest versions.. ipkg upgrade
We can now install ipkg packages using the command ipkg install <packagename>
To get a list of all available packages.. ipkg list
Filter your search.. ipkg list | grep <searchstring>
Choose your preferred editor
We will need to edit system-files from the Linux command-line interface (CLI). The editor installed by default is vi (basic vi commands). If you're not familiar with vi you may find yourself in trouble since'll you need to spend some time and effort to be able to work with it. You don't want to crap your system because you can't handle the editor! Instead you can use mcedit, this editor is used as a point-and-click editor. This feels a lot like using Notepad on MS-Windows, can't go wrong here.
For this you need to install mc ipkg install mc So from now on where I speak of "vi" you may replace it with "mcedit".
Installing Subversion
Install the subversion server using ipkg, it will install all dependency packages.. ipkg install svn
Configure inetd daemon to spawn Subversion
There are several methodes to have svnserve run as a daemon, on a full fledged server machine I'd use the more traditional method of running svnserve as a standalone daemon. But since I'm using a device with limited RAM the inetd method is the prefered choice. This method uses RAM only when required. Disadvantage over standalone daemon mode is that it takes a bit more time during client connect, as each time the svnserve first needs to be loaded into RAM.
For adding Subversion to inetd, we need to edit the inetd configuration file /etc/inetd.conf.
Add the following line to the file.. svn stream tcp nowait svnowner /opt/bin/svnserve svnserve -i -r /volume1/svn
Match the username svnowner and the repository directory /volume1/svn to your customizations.
Edit /etc/services to include Subversion data
svn 3690/tcp # Subversion svn 3690/udp # Subversion
Setup your firewall to accept connections through port 3690 (is this needed?)
Now reboot your ds.. reboot
Subversion should be running now!
Using Subversion
Create the repository
Log into your Diskstation with SSH and root account. Change your personality to user svnowner with.. su svnowner
|
Note: If you experience an error like: su:cannot run /sbin/nologin:No such file or directory you have to change the login shell for that user like so.. vi /etc/passwd You'll see a line like this: svnowner:x:1028:100:this is svnowner:/var/services/homes/svnowner:/sbin/nologin Change that line to: svnowner:x:1028:100:this is svnowner:/var/services/homes/svnowner:/bin/ash |
Create under /volume1/svn a new repository.. (I chose scripts as it's name) cd /volume1/svn svnadmin create scripts
Set repository permissions
Under /volume1/svn/scripts/conf you will find repository configuration files, interesting for us at the moment are only passwd and svnserve.conf. For testing edit the passwd file to have following contents.. [users] svnuser = svnpw
Notice that the password will be written in clear-text in this file, so for security reasons you might want NOT to use the same credentials as you use in your system as a login account (although if you make sure with chmod 600 passwd that only the user svnowner can access the file, the risk of someone being able to sneak a peak without administrative account or knowing the svnowner password is minimal).
Edit also the svnserve.conf to have following contents: [general] anon-access = read auth-access = write password-db = passwd realm = My Own Little Scripts Repository This will enable anonymous read access.
If you want to disable anonymous access completely, use following line instead.. anon-access=none
Checkout the repository (using in-place 'import')
Make sure you have the subversion client tools installed.
Since I want to have some of my personal configuration files to be under revision control, I will be doing an in-place 'import' (i.e. add a tree to Subversion such that the original data becomes a working copy directly) of the tree that holds these files, most of them are situated beneath /home/<username>.
Change active directory to the path where you want your working copy to be.. cd /home/<username>
Checkout the empty repository we made earlier into /home/<username>, transforming /home/<username> into a working copy.. svn co svn://<IP of your Diskstation>/scripts .
When asked password for svnowner press just Enter. Input username: svnuser and password: svnpw as defined in file passwd.
Now we need to add directories/files we want to be under revision control. For this I'm going to use RapidSVN. But any client will do.
RapidSVN
There is a big list of clients available for subversion , many offering a comfortable gui. One of those clients is RapidSVN, it is cross platform and does it's job fine, I'm going to use this one.
First enter the program preferences to setup your prefered tools that need to be available for RapidSVN to do it's job.
My choices.. Standard Editor: geany Standard Explorer: worker Diff/Merge: meld
From the mainmenu choose "Bookmarks" en select "Add Existing Working Copy..", now select /home/<username> Now you need to selectively add directories/files to be under revision control, clicking the new bookmark on your treeview shows you all available directories/files. Now you can simply right-click (or INS) to add the selected item. "Add recursive" will add all directories/files beneath the selected directory, this may not be what you want, so a simple "add" will add the selected directory and show this directory to the bookmark item in your treeview (after a refresh), now other individual items may be added beneath this directory. After this you have to commit the hole thing and voila.. your done!
WebSVN
Obviously the webserver needs to be available on your ds. Get the latest websvn from it's download location Unpack en upload to your webserver (/volume1/web) "install.html" in your <PATH_TO_WEBSVN>/doc directory will explain the install-steps but I'll explain how I did it anyway.
WebSVN needs diff available on your server, so first install diff.. ipkg install diffutils
If it isn't already, make sure to chmod the cache directory to 0777. This is used to cache RSS files.
Websvn needs to be configured by editing config.php, we need to base this file on distconfig.php.. cp <PATH_TO_WEBSVN>/include/distconfig.php <PATH_TO_WEBSVN>/include/config.php
Open the file with your editor.. vi <PATH_TO_WEBSVN>/include/config.php Add the following line to Section: "Remote repositories".. $config->addRepository('scripts', 'svn://<IP of your Diskstation>/scripts', NULL, 'svnuser', 'svnpw'); Now use your browser to open the newly created repository.. http://<IP of your Diskstation>/<PATH_TO_WEBSVN>
|
Note: I got the following error at the top of my screen.. (including a bunch of php errors) Error running this command: svn --config-dir /tmp --version sh: svn: not found And some PHP related errors.. As ROOT.. vi /usr/syno/etc/php.ini comment the line: safe_mode = Off empty the line: safe_mode_exec_dir = add ":/opt/bin:" to the line: open_basedir Restart Apache.. /usr/syno/apache/bin/httpd -k restart For some reason "restart" doesn't seem to always work, instead I have to explicitly stop/start the http-daemon. /usr/syno/apache/bin/httpd -k stop /usr/syno/apache/bin/httpd -k start |
Now I can view my repository right here.
Sources
Much credit goes to Synology for making such a great device. And credit goes to a lot of individuals having invested there time and effort in experimenting and sharing there knowledge with the community. http://www.synology.com/wiki/index.php/Overview_on_modifying_the_Synolog... http://www.synology.com/wiki/index.php/Step-by-step_guide_to_installing_... http://www.synology.com/enu/forum/viewforum.php?f=44 http://rob.runtothehills.org/archives/25 http://www.nslu2-linux.org/wiki/Main/HomePage http://svnbook.red-bean.com http://news.e-scribe.com/350 http://subversion.tigris.org/faq.html#in-place-import
To do
- GeSHi (1.0.8.1) doesn't seem to work with WebSVN, have to investigate this.
- Getting a full fledged /home backup in place.
- Find a way to have public as well as hidden documents in subversion. Create a separate repo for hidden stuff? (/etc ?)
- ssl
.htaccess
Typisch toch..
Je zoekt je lam naar een manier om spellling controle aan de praat te krijgen met Wordpress dat is geinstalleerd op een ds207+.
Ik had al begrepen dat ik hiervoor aspell op mijn server (lees: ds207+) geinstalleerd moet hebben, maar ja.. hoe doen wij dat?
Zoeken zoeken en nog eens zoeken, totdat ik ineens een oplossing vond voor <span style="color: #ff0000;">een ander probleem!</span>
Hoe krijg ik werkende permalinks in Wordpress..
Ik voldeed aan de voorwaarden, dacht ik..
1- mod_rewrite module geinstalleerd
2- FileInfo directives allowed (ergo: AllowOverride FileInfo, AllowOverride All)
3- Een .htaccess met filewrite access voor Wordpress.
Als ik 'custom Permalinks' invoerde in Wordpress dan kreeg ik geen werkende blog. Er werdt keurig een .htaccess aangemaakt maar blog bleef onbereikbaar. Als ik de .htaccess hernoemde of verwijderde dan kon ik weer de Wordpress-Admin-Gui in om de Permalinks op 'default' te zetten maar verder kwam ik niet.
Toch iets niet goed met de gegenereerde .htaccess?
Totdat!!
Ik ergens een tip tegenkwam, voeg de volgende regels toe aan .htaccess
[cc lang="html"]
Options +FollowSymlinks
Options +SymlinksIfOwnerMatch
[/cc]
Het werkt!
Heb nu permalinks in de vorm:
1- http://domain/category/gezinsgebeuren/mika/
2- http://domain/2009/02/10/bezoekje-consultatiebureau/
Voordelen? Zoekmachines en leesbaarheid.
P.s: Weet trouwens nog steeds niet hoe je aspell aan de praat krijgt op een ds207+
Hacken van de FritzBox
For personal reference.. voordat ik het vergeet.
<strong>FRITZ!Box Fon WLAN 7170 Annex A
Firmware version 58.04.57</strong>
Hacken van de FritzBox, om de soms hoorbare tikken te voorkomen bij (meestal) binnenkomende gesprekken via XS4ALL voip.
Om de .cfg bestanden in de FritzBox te editen gebruiken we "nvi", dus geen vi. Het zorgt er voor dat de gegevens uit het betreffende bestand worden ingelezen en na het aanpassen in het juiste formaat worden weggeschreven.
(Zoals ook visudo een extra controle doet voor het daadwerkelijk wegschrijven van /etc/sudoers)
Eerst Fritz bellen..
telnetdaemon activeren: <strong>#96*7*</strong>
Putty of zoiets gebruiken om een telnet verbinding naar de fritz!box te leggen.
Het bestand dat aangepast moet worden is /var/flash/voip.cfg
<strong>nvi /var/flash/voip.cfg</strong>
telnetdaemon DEactiveren: <strong>#96*8*</strong>
tx_packetsize_in_ms = 20 aanpassen tot
<strong>tx_packetsize_in_ms = 30</strong>
dit bij ua1 of ua2 (afhankelijk van waar telefoonlijn is ingedeeld)
Waarschijnlijk is een reboot van ons Fritzje wel nodig.
Dit alles zorgt wel voor de melding: "<span style="color: #ff0000;">The modifications to your FRITZ!Box are not supported by the manufacturer.</span>"
Heb ik geen last van.
online applicaties
Ik ben steeds meer gebruik aan het maken van online webapplicaties, heb zo'n vermoeden dat dit te maken heeft met de steeds groter wordende behoefte om mijn systeem te minimaliseren tot terminal geloof ik. Laat het zware werk maar ergens anders gedaan worden (al is het door mijn eigen nasje), dan heb ik des te meer ruimte en resources voor de leuke dingen. De overstap van KDEmod (screenies) naar Awesome zegt genoeg . Hoe vreselijk cool een superlichte windowmanager kan zijn geeft het volgende filmpje aan..
Maar goed, webapplicaties. Waar ik een tijd terug delicious ontdekt heb (en browser-bookmarkmanagers dus ongebruikt blijven), ben ik nu overgestapt op gmail, ik gebruik alleen nog maar Thunderbird met IMAP om een lokale kopie te maken van mijn mailtjes. Een paar howto's... Turn Thunderbird Into The Ultimate Gmail Imap Client Google's howto Ik ga ervan uit dat je ook GMail Drive (win) en/of GmailFS (tux) kunt gebruiken voor het backupen (syncing?) van mails, heb het ooit wel eens gebruikt voor andere dingen. Zal het trouwens wel weer gaan gebruiken aangezien een gmail account al meer dan 7 Gb aan opslag oplevert, toch zonde om niet te gebruiken. Voor de online office-applicaties ben ik nog niet rijp, al ben ik in de loop der tijd wel afgestapt van de bloated office-suits zoals MS-Office of Open Office. Vooralsnog is AbiWord mijn tekstverwerker, gratis, open source, cross platform, bloedstollend snel en logischerwijs biedt het alles wat ik nodig heb en nog veel meer. Datzelfde geldt voor een spreadsheet, niets mis met Gnumeric, gratis, open source, cross platform, bloedstollend snel en logischerwijs biedt het alles wat ik nodig heb en nog veel meer. Voor de liefhebber, al mijn bookmarks ter inzage. In de kantlijn van deze blog zijn trouwens ook een stel willekeurige bookmarks van mij te zien.
