SharePoint Stuff



Installing SSH on the Linkstation

Written by admin. Posted in LinkStation

To install SSH run though the following

useradd sshd
cd <folder_for_compiling>
wget ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-4.3p2.tar.gz
tar xzvf openssh-4.3p2.tar.gz
cd openssh-4.3p2
./configure –without-zlib-version-check
make
make install

Create the following statup script:

=====

#! /bin/sh
# export USER=”root”
# NAME=ssh

start()
{
    if [ ! -d /var/empty ]; then
        mkdir /var/empty
    fi�
    /usr/local/sbin/sshd
}
stop()
{
    killall sshd
}

case “$1” in
    start)
        echo -n “Starting sshd: ”
        start
        ;;
    stop)
        echo -n “Stopping sshd ”
        stop
        ;;
    restart)
        echo -n “Restarting sshd ”
        stop
        start
        ;;
    *)
        echo “Usage: /etc/init.d/$NAME {start|stop|restart}”
        exit 1
        ;;
esac

exit 0
====

save in /etc/init.d/sshd
chmod +x /etc/init.d/sshd
/etc/init.d/sshd
ln -s /etc/init.d/sshd /etc/rc.d/rc2.d/S07sshd

Linux useful tools

Written by admin. Posted in LinkStation

Process management
==================

ps -A = running processes
ps -aux = further running processes
kill = kill a process

Find File Commands
==============

Find a file in all folders with it’s exact name
find . -name “exactname.ini” -print

Find a file in all folders but onlyh know part of the name
find . -name “*partofname*” -print

Find a file but can’t remember the name but know you used it in x about of days -1 (1day) -2 (2days) and so on
find . -mtime -1 -print

CPU Utilisation
===========
top = cpu and memory stats

Hard disk information
============
Get Storage Configuration – also gets HD path
mdadm –detail /dev/md0

disk smart information
smartctl -i /dev/sdb3

Start/Stoping Services
======================
initctl stop xbmc
initctl start vnc
initctl start xbmc

Installing Slimserver on the Linkstation

Written by admin. Posted in LinkStation

After flashing the Drive installing the tools and MySQL your ready to install slim 6.5.1

cd /mnt/hda/opt/
addgroup slimserv
adduser slimserv -g slimserv
passwd slimserv
wget http://www.slimdevices.com/downloads/SlimServer_v6.5.1/SlimServer_v6.5.1.tar.gz
tar -xzvf SlimServer_v6.5.1.tar.gz
mv SlimServer_v6.5.1 /mnt/slimserver
cd /mnt/slimserver/Bin
mkdir mipsel-linux-gnu-thread-multi
cd mipsel-linux-gnu-thread-multi
ln -s /mnt/hda/opt/mysql mysqld
/mnt/slimserver/Bin/build-perl-modules.pl

enter the relevent paths for your install

==
Install /mnt/slimserver
Extract <enter with defaults>
Tmp /mnt/slimserver
==
mkdir /mnt/hda/opt/slim-data
cd /mnt/hda/opt/
chown -R slimserv:slimserv slim-data
cd /mnt/
chown -R slimserv:slimserv slimserver

 

To make it start automatically do this
cd /etc/init.d/
create a file called slimserver containing the following:

====
#!/bin/sh

# slimserver init.d script for Linux
#
# Daemon needs to be your install path
DAEMON=/mnt/slimserver/slimserver.pl
PIDFILE=/var/tmp/slimserver.pid
LOGFILE=/mnt/hda/opt/slim-data/slimserver.log
USER=slimserv
SLIMSERVER_OPTS=””

test -x ${DAEMON} || exit 0

case “$1” in
 start) echo -n “Starting Slimserver: ”
  HOME=/home/$USER
  start-stop-daemon –start –quiet –exec $DAEMON
   –chuid ${USER} — –daemon
   –prefsfile=/mnt/hda/opt/slim-data/slimserver.pref –pidfile=${PIDFILE}
   –cachedir=/mnt/hda/opt/slim-data –pidfile=${PIDFILE}
   –logfile=${LOGFILE} ${SLIMSERVER_OPTS}
  echo “slimserver started”
  ;;

 stop) echo -n “Stopping Slimserver: ”
 start-stop-daemon –stop –quiet –user ${USER} –pidfile ${PIDFILE} –retry 5
 echo “done”
 ;;

  force-reload|restart) $0 stop
   $0 start
   ;;

  *) echo “Usage: $0 {start|stop|restart|force-reload}”
     exit 1;
     ;;

esac

exit 0

 

====
chmod +x /etc/init.d/slimserver
cd /etc/rc.d/rc2.d
ln -s /etc/init.d/slimserver S90slimserver
Slimserver runs well at streaming but the interface can be a bit sluggish – this I need to sort out later ..