{"id":233,"date":"2017-03-07T20:57:19","date_gmt":"2017-03-07T23:57:19","guid":{"rendered":"http:\/\/pessoal.ect.ufrn.br\/~rafaelprazeres\/?p=233"},"modified":"2022-05-09T12:43:24","modified_gmt":"2022-05-09T15:43:24","slug":"ltsp-cluster-configurando-servidor-de-aplicacao-no-openvz-7","status":"publish","type":"post","link":"https:\/\/pessoal.ect.ufrn.br\/~rafaelprazeres\/index.php\/2017\/03\/07\/ltsp-cluster-configurando-servidor-de-aplicacao-no-openvz-7\/","title":{"rendered":"Configurando container no OpenVZ 7 como Servidor de Aplica\u00e7\u00e3o do LTSP-Cluster"},"content":{"rendered":"<pre><code># Configurando container no OpenVZ 7 como\n# Servidor de Aplica\u00e7\u00e3o do LTSP-Cluster\n\n# Listando Templates OS EZ para Containers\nvzpkg list -O\n\n# Criando Container:\nprlctl create CT2 --vmtype ct --ostemplate ubuntu-14.04-x86_64\n\n# Listing Virtual Machines and Containers \nprlctl list -a\n<\/code><\/pre>\n<p><!--more--><\/p>\n<pre><code># Configuring Main VSwap Parameters\nprlctl set CT2 --memsize 12G --swappages 6G\n\n# Increasing Disk Capacity\nprl_disk_tool resize --hdd \\\n\/vz\/private\/d9068bc5-085f-47b0-87d3-f82574575eaa\/root.hdd --size 30G\n\n# Listing Virtual Networks\nprlsrvctl net list\n\n# Creating Virtual Networks\nprlsrvctl net add Bridged\n\n# Configuring Virtual Network Parameters\nprlsrvctl net set Bridged -t bridged --ifname eno1 \\\n-d \"This is now a bridged virtual network\"\n\n# Connecting Virtual Networks to Adapters\nprlsrvctl net set Bridged -i eno1\n\n# Creating and Deleting veth Network Adapters\nprlctl set CT2 --netif_add netif2\n\n# Configuring veth Adapter Parameters\nprlctl set CT2 --ifname netif2 --ipadd 10.6.0.219\/22\nprlctl set CT2 --ifname netif2 --dhcp no\nprlctl set CT2 --ifname netif2 --nameserver 10.6.0.98,192.168.1.4\nprlctl set CT2 --ifname netif2 --gw 10.6.0.1\n\n# Connecting Containers to Virtual Networks\nprlctl set CT2 --ifname netif2 --network Bridged\n\n# Container tunig\n# You need to make a character device named \/dev\/fuse \n# and grant your container permissions to it \nvzctl set CT2 --devnodes fuse:rw --save\n\n# Configurando servidor de aplica\u00e7\u00e3o do LTSP-Cluster no\n# container CT2 previamente criado\nprlctl enter CT2\napt-get update\napt-get upgrade\napt-get install ubuntu-gnome-desktop ltsp-server \\\nltsp-cluster-lbagent ltsp-cluster-accountmanager\napt-get install gnome-session-flashback ltspfs\napt-get remove --purge gnome-screensaver compiz\napt-get autoremove &amp;&amp; apt-get autoclean\nupdate-rc.d -f nbd-server remove\nupdate-rc.d -f gdm remove\nupdate-rc.d -f bluetooth remove\nupdate-rc.d -f pulseaudio remove\nchown root.fuse \/dev\/fuse\nchmod 660 \/dev\/fuse\nmkdir -p \/home\/ltsp-cluster-accountmanager\n\nvim \/etc\/ltsp\/accountmanager.conf\n# In\u00edcio d conte\u00fado do arquivo\n# \/etc\/ltsp\/accountmanager.conf\nport=8001\nautologin_root=\/home\/ltsp-cluster-accountmanager\/\nautologin_uidmin=1003000\nautologin_uidmax=1003100\nautologin_groups=autologin,fuse,audio,video\nkey=PUT-A-KEY-HERE\n# Final do conte\u00fado do arquivo\n# \/etc\/xdg\/autostart\/pulseaudio-module-suspend-on-idle.desktop\n\nservice ltsp-cluster-accountmanager restart\n\nvim \/etc\/xdg\/autostart\/pulseaudio-module-suspend-on-idle.desktop\n# In\u00edcio do conte\u00fado do arquivo\n# \/etc\/xdg\/autostart\/pulseaudio-module-suspend-on-idle.desktop\n[Desktop Entry]\nVersion=1.0\nEncoding=UTF-8\nName=PulseAudio Session Management\nComment=Load module-suspend-on-idle into PulseAudio\nExec=pactl load-module module-suspend-on-idle\nTerminal=false\nType=Application\nCategories=\nGenericName=\n# Final do conte\u00fado do arquivo\n# \/etc\/xdg\/autostart\/pulseaudio-module-suspend-on-idle.desktop<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p># Configurando container no OpenVZ 7 como # Servidor de Aplica\u00e7\u00e3o do LTSP-Cluster # Listando Templates OS EZ para Containers vzpkg list -O # Criando Container: prlctl create CT2 &#8211;vmtype ct &#8211;ostemplate ubuntu-14.04-x86_64 # Listing Virtual Machines and Containers prlctl list -a<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/pessoal.ect.ufrn.br\/~rafaelprazeres\/index.php\/wp-json\/wp\/v2\/posts\/233"}],"collection":[{"href":"https:\/\/pessoal.ect.ufrn.br\/~rafaelprazeres\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pessoal.ect.ufrn.br\/~rafaelprazeres\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pessoal.ect.ufrn.br\/~rafaelprazeres\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pessoal.ect.ufrn.br\/~rafaelprazeres\/index.php\/wp-json\/wp\/v2\/comments?post=233"}],"version-history":[{"count":28,"href":"https:\/\/pessoal.ect.ufrn.br\/~rafaelprazeres\/index.php\/wp-json\/wp\/v2\/posts\/233\/revisions"}],"predecessor-version":[{"id":295,"href":"https:\/\/pessoal.ect.ufrn.br\/~rafaelprazeres\/index.php\/wp-json\/wp\/v2\/posts\/233\/revisions\/295"}],"wp:attachment":[{"href":"https:\/\/pessoal.ect.ufrn.br\/~rafaelprazeres\/index.php\/wp-json\/wp\/v2\/media?parent=233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pessoal.ect.ufrn.br\/~rafaelprazeres\/index.php\/wp-json\/wp\/v2\/categories?post=233"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pessoal.ect.ufrn.br\/~rafaelprazeres\/index.php\/wp-json\/wp\/v2\/tags?post=233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}