7.04.2014 г.

Plex media server

Радакция на /etc/init.d фаила на plexmediaserver

### BEGIN INIT INFO
# Provides:          plexmediaserver
# Required-Start:    $remote_fs $syslog $all
# Required-Stop:     
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Plex Media Server
# Description:       Plex Media Server for Linux,
#                    More information at http://www.plexapp.com
#                    Many thanks to the great PlexApp team for his wonderfull job !
# Author:            Cedric Quillevere / origin@killy.net
# Version:           1.0a
### END INIT INFO

test -f "/usr/lib/plexmediaserver/Plex Media Server" || exit 0

export PMS_RUN_USER="plex"

plex_running=`ps ax | grep "\./Plex Media Server" | awk '{ print $1 }' | wc -l`

case "$1" in
    start)
 if [ "$plex_running" -gt 1 ]; then
  echo "Plex already running..."
  exit 0
 fi
 echo -n "Starting Plex Media Server: "
 su -l $PMS_RUN_USER -c "/usr/sbin/start_pms &" >/dev/null 2>&1
 sleep 1
 echo "done"
 ;;
    stop)
 if [ "$plex_running" -eq 1 ]; then
  echo "Plex Media Server is not running (no process found)..."
  exit 0
 fi
        # Trying to kill the Plex Media Server itself but also the Plug-ins
 echo -n "Killing Plex Media Server: "
 ps ax | grep "Plex Media Server" | awk '{ print $1 }' | xargs kill -9 >/dev/null 2>&1
 sleep 1
 echo "done"
 ;;
    restart)
 sh $0 stop
 sh $0 start
 ;;
    status)
        if [ "$plex_running" -gt 1 ]; then
                echo "Plex Media Server process running."
 else
  echo "It seems that Plex Media Server isn't running (no process found)."
        fi
 ;;
    *)
 echo "Usage: $0 {start|stop|restart|status}"
 exit 1
 ;;
esac

exit 0
 
 
 
- make a chmod +x /etc/init.d/plexmediaserver
- make a "update-rc.d plexmediaserver enable"
Стартира се на порт 32400. 

26.02.2014 г.

Маунтване на windows7 share в centos

Заради премахването на: smbmount

yim install cifs-utils samba-client samba-common
mkdir /mnt/windows7

mount -t cifs //192.168.1.5/share /mnt/windows7 -o username=user,password=password

За листване на шеринга:
smbclient //ip/share -U username

20.02.2014 г.

Инсталиране на vmware в linux

Инсталират се:

su -c "apt-get install open-vm-tools open-vm-tools-dev open-vm-dkms open-vm-toolbox gcc build-essential linux-headers-$(uname -r)"

vmware след като се свали и разархивира: 

./vmwarte.bundle