Hallo zusammen,

nachdem ich mir eine Jiffybox zugelegt habe, mir aber keine Informationen zur 
Verfügung gestellt wurden, wie die IP oder die URL ist und ich mich deshalb 
nicht anmelden konnte, habe ich mich stattdessen bei OVH (www.ovh.com) 
angemeldet und einen Virtual Cloud Server eingerichtet. Das funktioniert gut. 
Ich betreibe ihn mit einem Mate Desktop und x2go als Remote Desktop Lösung.

Ich möchte diesen Server als Maschine für das Ausführen von Analytics, z. B. R 
nutzen. Dafür habe ich schon mal für eine virtuelle Maschine auf Basis von 
VirtualBox und VMWare ein Skript geschrieben, dass die erforderlichen 
Einrichtungen vornimmt.

Jetzt möchte ich das Skript zur Einrichtung des Virtual Cloud Servers nutzen, 
jedoch das Skript nicht im Batch in einem Rutsch ausführen, sondern sukzessiv, 
Abschnitt für Abschnitt, um eine bessere Kontrolle zu haben und Fehler besser 
erkennen und beheben zu können.

Gibt es eine Möglichkeit - in einem Skript-Editor oder etwas ähnlichem - einen 
Teil des bash-Skripts zu markieren, um dann nur den markierten Teil auszuführen?

Ich freue mich über Eure Nachricht.

Viele Grüße

Georg 

PS: Für alle die Interesse haben:

-- schnipp --

# Script: Install Analytics Server Machine
# OS: Debian Jessie 8
# Author: Georg Maubach
# Date: 2016-09-11
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# Licence: CC-BY-NC-SA (additional rights, e.g. commercial use, can be granted 
upon request to g.maub...@gmx.de)

sudo -s

# -- Define download directory for installation files
mkdir -p /home/root/installs
cd /home/root/installs

# -- Add Debian base packages
apt-get install apt-transport-https

# -- Install desktop
# @GMA 2016-09-11
apt-get install task-mate-desktop

# Command issues warning message:
# The following network interfaces were found in /etc/network/interfaces
# - eth0
# If you want to manage those interfaces with NetworkManager instead
# remove their configuration from /etc/network/interfaces.

# -- Install x2go
# http://wiki.x2go.org/doku.php/wiki:repositories:debian
# @GMA 2016-09-11
apt-key adv --recv-keys --keyserver keys.gnupg.net E1F958385BFE2B6E

echo "# X2Go Repository (release builds)" >> /etc/apt/sources.list
echo "deb http://packages.x2go.org/debian jessie main" >> /etc/apt/sources.list
echo "# X2Go Repository (sources of release builds)" >> /etc/apt/sources.list
echo "deb-src http://packages.x2go.org/debian jessie main" >> 
/etc/apt/sources.list

apt-get clean
apt-get update

# apt-cache search x2go

apt-get install x2go-keyring && apt-get update
apt-get install x2goserver x2goserver-xsession x2gobindingsmate

# Fix x2go tty error
# @GMA 2016-09-11
# 
http://unix.stackexchange.com/questions/250945/why-do-i-see-the-error-stdin-is-not-a-tty-when-using-x2go-to-remotely-connect
# Repeat for all users using x2go
echo "if `tty -s` >> /root/.bashrc
echo "then" >> /root/.bashrc
echo "  mesg y"  >> /root/.bashrc
echo "  TTY=`tty`  >> /root/.bashrc
echo "else"  >> /root/.bashrc
echo "  TTY="not a tty"  >> /root/.bashrc
echo "fi"  >> /root/.bashrc

# -- Install "R"
# @GMA 2016-09-11
# https://cran.r-project.org/bin/linux/debian/
# To get higher performance for linear algebra operations
# EITHER
# apt-get install libatlas3-base
# OR
apt-get install libopenblas-base

# @GMA 2016-09-11
# Prepare package management
echo "# R-Project"  >> /etc/apt/sources.list
echo "deb https://cran.uni-muenster.de/bin/linux/debian jessie-cran3/"  >> 
/etc/apt/sources.list
echo "deb-src https://cran.uni-muenster.de/bin/linux/debian jessie-cran3/"  >> 
/etc/apt/sources.list
# Solve apt security issue
# https://cran.r-project.org/bin/linux/debian/
apt-key adv --keyserver keys.gnupg.net --recv-key 
6212B7B7931C4BB16280BA1306F90DE5381BA480
# apt-cache search r-cran | sort

# @GMA 2016-09-11
# R-Project Base Installation
apt-get update
apt-get install r-base r-recommended

# See all available pre-compiled Debian packages type
# apt-cache rdepends r-base-core

# @GMA 2016-09-11
# R-Project Packages for Package Compilation
apt-get install r-base-dev

# -- Install RStudio Desktop
# @GMA 2016-09-11
# https://www.rstudio.com/products/rstudio/download2/
cd /home/root/installs
wget https://download1.rstudio.org/rstudio-0.99.903-amd64.deb
dpkg -i rstudio-0.99.903-amd64.deb

# -- Install RStudio Server
# @GMA 2016-09-11
# https://www.rstudio.com/products/rstudio/download-server/
apt-get install gdebi-core libapparmor1
cd /home/root/installs
wget https://download2.rstudio.org/rstudio-server-0.99.903-amd64.deb
dpkg -i rstudio-server-0.99.903-amd64.deb

# -- Install git
apt-get install git git-doc gitit git-sh gitweb git-extras git-gui git-ftp gitg 
github-backup

-- schnipp --
_______________________________________________
Trolug_trolug.de mailing list
trolug@trolug.de
https://ml01.ispgateway.de/mailman/listinfo/trolug_trolug.de

Antwort per Email an