3.19 NOVNC WEB访问配置
· 编辑/etc/nova/nova.conf文件,添加如下内容:
novncproxy_base_url=http://$my_ip:6080/vnc_auto.html
vnc_enabled=true
vnc_keymap=en-us
vncserver_listen=$my_ip
vncserver_proxyclient_address=$my_ip
· 将NOVNC执行程序添加到环境变量中
ln -sv /opt/noVNC/utils/nova-novncproxy /usr/bin/
· 在/etc/init.d/下建立名为nova-novncproxy的NOVNC服务启动脚本,内容如下:
#!/bin/sh
#
# openstack-nova-novncproxy OpenStack Nova VNC Web Console
#
# chkconfig: - 20 80
# description: OpenStack Nova VNC Web Console
### BEGIN INIT INFO
# Provides:
# Required-Start: $remote_fs $network $syslog
# Required-Stop: $remote_fs $syslog
# Default-Stop: 0 1 6
# Short-Description: OpenStack Nova VNC Web Console
# Description: OpenStack Nova VNC Web Console
### END INIT INFO
. /etc/rc.d/init.d/functions
suffix=novncproxy
prog=openstack-nova-$suffix
web="/opt/noVNC"
exec="/usr/bin/nova-$suffix"
config="/etc/nova/nova.conf"
pidfile="/var/run/nova/nova-$suffix.pid"
logfile="/var/log/nova/$suffix.log"
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
lockfile=/var/lock/nova/$prog
start() {
[ -x $exec ] || exit 5
[ -f $config ] || exit 6
echo -n $"Starting $prog: "
daemon --user nova --pidfile $pidfile "$exec --config-file=$config --web $web --logfile=$logfile --daemon &>/dev/null & echo \$! > $pidfile"
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop() {
echo -n $"Stopping $prog: "
killproc -p $pidfile $prog
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}
restart() {
stop
start
}
reload() {
restart
}
force_reload() {
restart
}
rh_status() {
status -p $pidfile $prog
}
rh_status_q() {
rh_status >/dev/null 2>&1
}
case "$1" in
start)
rh_status_q && exit 0
$1
;;
stop)
rh_status_q || exit 0
$1
;;
restart)
$1
;;
reload)
rh_status_q || exit 7
$1
;;
force-reload)
force_reload
;;
status)
rh_status
;;
condrestart|try-restart)
rh_status_q || exit 0
restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
exit 2
esac
exit $?
· 在/etc/init.d/下建立名为nova-consoleauth的控制台认证启动脚本,内容如下:
#!/bin/sh
#
# openstack-nova-novncproxy OpenStack Nova Console Auth
#
# chkconfig: - 20 80
# description: OpenStack Nova Console Auth
### BEGIN INIT INFO
# Provides:
# Required-Start: $remote_fs $network $syslog
# Required-Stop: $remote_fs $syslog
# Default-Stop: 0 1 6
# Short-Description: OpenStack Nova Console Auth
# Description: OpenStack Nova Console Auth
### END INIT INFO
. /etc/rc.d/init.d/functions
suffix=consoleauth
prog=openstack-nova-$suffix
exec="/usr/bin/nova-$suffix"
config="/etc/nova/nova.conf"
pidfile="/var/run/nova/nova-$suffix.pid"
logfile="/var/log/nova/$suffix.log"
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
lockfile=/var/lock/nova/$prog
start() {
[ -x $exec ] || exit 5
[ -f $config ] || exit 6
echo -n $"Starting $prog: "
daemon --user nova --pidfile $pidfile "$exec --config-file=$config --logfile=$logfile &>/dev/null & echo \$! > $pidfile"
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop() {
echo -n $"Stopping $prog: "
killproc -p $pidfile $prog
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}
restart() {
stop
start
}
reload() {
restart
}
force_reload() {
restart
}
rh_status() {
status -p $pidfile $prog
}
rh_status_q() {
rh_status >/dev/null 2>&1
}
case "$1" in
start)
rh_status_q && exit 0
$1
;;
stop)
rh_status_q || exit 0
$1
;;
restart)
$1
;;
reload)
rh_status_q || exit 7
$1
;;
force-reload)
force_reload
;;
status)
rh_status
;;
condrestart|try-restart)
rh_status_q || exit 0
restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
exit 2
esac
exit $?
· 配置启动脚本
chmod 755 /etc/init.d/nova-novncproxy
chmod 755 /etc/init.d/nova-consoleauth
· 启动GLANCE-API和GLANCE-REGISTRY服务
/etc/init.d/nova-novncproxy start
/etc/init.d/nova-consoleauth start
· 检测服务是否正常启动
通过netstat -ltunp查看是否有tcp 6080端口监听
如果没有正常启动请查看/var/log/nova目录下相关文件排错
目录 上一篇 4.5 NOVA 计算服务安装 下载源码包 wget https://launchpad.net/nova/essex/2012.1/+download/nova-2012.1.tar.gz -P /opt 安装依赖包 yum install -y python-amqplib python-carrot python-lockfile python-gflags python-netaddr python-suds
“我来见您啦!”一年后,火爆全网的方舱考研女孩再续前缘。
3月31日世界备份日来临之际,备份是前提,恢复是目的,经得起考验的产品才是网络安全的保护盾!
随着网络威胁、恶意软件等的演化,网络安全防护方案也须更新迭代。
数腾科技一位祝姓销售经理向记者表示,他们有自己特殊渠道去拿取一些数据。其中最为主要的渠道就是通过第三方SDK获取数据。
工业机器人的总体成本中,核心零部件的比例接近于70%,其中减速器占据最大的比重。