Changes

Jump to navigation Jump to search
3,824 bytes added ,  09:19, 24 December 2017
Created page with "=== Install === <syntaxhighlight lang="bash"> yum install virtuoso-opensource virtuoso-opensource-apps virtuoso-opensource-doc virtuoso-opensource-utils virtuoso-opensource-co..."
=== Install ===
<syntaxhighlight lang="bash">
yum install virtuoso-opensource virtuoso-opensource-apps virtuoso-opensource-doc virtuoso-opensource-utils virtuoso-opensource-conductor --enablerepo=epel

</syntaxhighlight>this will install virtuoso-opensource virtuoso-opensource-apps virtuoso-opensource-doc virtuoso-opensource-utils virtuoso-opensource-conductor  and    libiodbc

NB: on centos 6 you can also find the following packages: virtuoso-opensource-apps -conductors-utils -doc

=== startup script ===
this one from : https://gist.github.com/enridaga/5d99eaa48114e11375d1<syntaxhighlight lang="bash">
vim /etc/init.d/virtuoso
</syntaxhighlight><syntaxhighlight lang="bash">
#!/bin/sh

### BEGIN INIT INFO
# Provides: virtuoso
# Required-Start: $syslog $local_fs $network
# Should-Start: $remote_fs
# Required-Stop: $network
# Should-Stop: $remote_fs
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Controls virtuoso7 data server
# Description: Controls virtuoso7 data server
### END INIT INFO

. /etc/init.d/functions

get_pid() {
[ -f "$pid_file" ] && cat "$pid_file" |sed -e 's/[^0-9]//g'
}

is_running() {
[ -f "$pid_file" ] && ps `get_pid` > /dev/null 2>&1
}
# CONFIGURE HERE AS YOU LIKE
name="virtuoso"
virtuoso_bin="/usr/bin/"
virtuoso_db="/var/lib/virtuoso/db"
cmd="$virtuoso_bin/virtuoso-t"
pid_file="$virtuoso_db/virtuoso.lck"
# (END CONF)


case "$1" in
start)
if is_running; then
echo "Already started with pid "$(get_pid)
else
echo "Starting $name"
cd $virtuoso_db
daemon --user virtuoso $cmd
fi
;;

stop)
#kill $(get_pid)
if is_running; then
echo -n "Stopping $name.."
kill `get_pid`
for i in {1..10}
do
if ! is_running; then
break
fi

echo -n "."
sleep 1
done
echo

if is_running; then
echo "Not stopped; may still be shutting down or shutdown may have failed"
exit 1
else
echo "Stopped"
if [ -f "$pid_file" ]; then
rm "$pid_file"
fi
fi
else
echo "Not running"
fi
;;

reload)
/etc/init.d/$name stop
if is_running; then
echo "Unable to stop, will not attempt to start"
exit 1
fi
/etc/init.d/$name start
;;

restart)
/etc/init.d/$name stop
sleep 1
/etc/init.d/$name start
;;

status)

if is_running; then
echo "Running"
else
echo "Stopped"
exit 1
fi
;;

*)
echo "Usage: $0 {start|stop|reload|restart|status}"
exit 1
;;
esac


</syntaxhighlight><syntaxhighlight lang="bash">
chmod +x /etc/init.d/virtuoso
pushd /etc/rc.d/rc7.d/
ln -s /etc/rc.d/init.d/e-smith-service S80virtuoso
popd

db configuration set virtuoso service status enabled access local TCPPort 8890
signal-event remoteaccess-update
</syntaxhighlight><syntaxhighlight lang="bash">
useradd virtuoso -d /var/lib/virtuoso/db
chown virtuoso:virtuoso /var/lib/virtuoso/db -R
</syntaxhighlight>

=== add user and db for your wiki ===

=== TO DO ===
* move log to /var/log
* logrotate
* improve init file for error handling and return when using service virtuoso start

=== Sources ===
* https://gist.github.com/enridaga/5d99eaa48114e11375d1
* http://vos.openlinksw.com/owiki/wiki/VOS/VOSCentosNotes
*
Super Admin, Wiki & Docs Team, Bureaucrats, Interface administrators, Administrators
3,254

edits

Navigation menu