Difference between revisions of "Node"
From DHVLab
Wiki admin (talk | contribs) |
Wiki admin (talk | contribs) |
||
Line 9: | Line 9: | ||
ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target | ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target | ||
systemctl isolate graphical.target | systemctl isolate graphical.target | ||
+ | </syntaxhighlight> | ||
+ | == Install VNC == | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | yum install tigervnc-server xorg-x11-fonts-Type1 xinetd | ||
+ | nano -w /etc/gdm/custom.conf | ||
+ | </syntaxhighlight> | ||
+ | /etc/gdm/custom.conf | ||
+ | <syntaxhighlight lang="text"> | ||
+ | [daemon] | ||
+ | [security] | ||
+ | AllowRemoteRoot=true | ||
+ | DisallowTCP=false | ||
+ | [xdmcp] | ||
+ | Enable=true | ||
+ | MaxSessions=40 | ||
+ | [greeter] | ||
+ | [chooser] | ||
+ | [debug] | ||
+ | </syntaxhighlight> | ||
+ | === Create Xinetd service === | ||
+ | /etc/xinetd.d/vncserver | ||
+ | <syntaxhighlight lang="text"> | ||
+ | service vncserver | ||
+ | { | ||
+ | flags = IPv4 | ||
+ | disable = no | ||
+ | socket_type = stream | ||
+ | protocol = tcp | ||
+ | group = tty | ||
+ | wait = no | ||
+ | user = nobody | ||
+ | server = /usr/bin/Xvnc | ||
+ | server_args = -inetd -query localhost -geometry 1024x768 -depth 24 -once -fp /usr/share/X11/fonts/Type1 -securitytypes=none | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | <syntaxhighlight lang="bash"> | ||
+ | #create a VNC service | ||
+ | echo "vncserver 5900/tcp # VNC and GDM" >> /etc/services | ||
+ | |||
+ | #restart and enable xinetd | ||
+ | systemctl enable xinetd.service | ||
+ | systemctl restart xinetd.service | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 63: | Line 106: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
systemctl restart tomcat | systemctl restart tomcat | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | == Setup Guacamole == | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | yum install wget | ||
+ | yum install cairo-devel freerdp-devel gcc java-1.8.0-openjdk.x86_64 libguac libguac-client-rdp libguac-client-ssh \ | ||
+ | libguac-client-vnc libjpeg-turbo-devel libpng-devel libssh2-devel libtelnet-devel libvncserver-devel \ | ||
+ | libvorbis-devel libwebp-devel openssl-devel pango-devel pulseaudio-libs-devel terminus-fonts uuid-devel | ||
+ | |||
+ | cd /tmp | ||
+ | wget http://sourceforge.net/projects/guacamole/files/current/source/guacamole-server-0.9.9.tar.gz | ||
+ | tar -xzf guacamole-server-0.9.9.tar.gz && cd guacamole-server-0.9.9 | ||
+ | ./configure --with-init-dir=/etc/init.d | ||
+ | make | ||
+ | make install | ||
+ | ldconfig | ||
+ | mkdir -p /var/lib/guacamole && cd /var/lib/guacamole/ | ||
+ | wget http://sourceforge.net/projects/guacamole/files/current/binary/guacamole-0.9.9.war -O guacamole.war | ||
+ | ln -s /var/lib/guacamole/guacamole.war /opt/tomcat/webapps/ | ||
+ | rm -rf /usr/lib64/freerdp/guacdr.so | ||
+ | ln -s /usr/local/lib/freerdp/guacdr.so /usr/lib64/freerdp/ | ||
+ | |||
+ | #install noauth plugin | ||
+ | mkdir -p /opt/tomcat/.guacamole/extensions/ | ||
+ | wget -O /opt/tomcat/.guacamole/extensions/guacamole-auth-noauth-0.9.9.jar \ | ||
+ | https://sourceforge.net/projects/guacamole/files/current/extensions/guacamole-auth-noauth-0.9.9.tar.gz | ||
+ | |||
+ | #configure guacamole | ||
+ | mkdir -p /etc/guacamole/ | ||
+ | nano -w /etc/guacamole/guacamole.properties | ||
+ | </syntaxhighlight> | ||
+ | <syntaxhighlight lang="text"> | ||
+ | guacd-hostname: localhost | ||
+ | guacd-port: 4822 | ||
+ | lib-directory: /opt/tomcat/webapps/guacamole/WEB-INF/classes | ||
+ | noauth-config: /etc/guacamole/noauth-config.xml | ||
+ | </syntaxhighlight> | ||
+ | /etc/guacamole/noauth-config.xml | ||
+ | <syntaxhighlight lang="text"> | ||
+ | <configs> | ||
+ | <config name="NODE_NAME" protocol="vnc"> | ||
+ | <param name="hostname" value="localhost" /> | ||
+ | <param name="port" value="5900" /> | ||
+ | </config> | ||
+ | </configs> | ||
+ | </syntaxhighlight> | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | ln -s /etc/guacamole/guacamole.properties /opt/tomcat/.guacamole/ | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 19:30, 9 September 2016
Contents
Install Desktop
yum groupinstall "X Window System"
yum groupinstall "Fonts"
yum install kde-workspace
yum install gdm
unlink /etc/systemd/system/default.target
ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target
systemctl isolate graphical.target
Install VNC
yum install tigervnc-server xorg-x11-fonts-Type1 xinetd
nano -w /etc/gdm/custom.conf
/etc/gdm/custom.conf
[daemon]
[security]
AllowRemoteRoot=true
DisallowTCP=false
[xdmcp]
Enable=true
MaxSessions=40
[greeter]
[chooser]
[debug]
Create Xinetd service
/etc/xinetd.d/vncserver
service vncserver
{
flags = IPv4
disable = no
socket_type = stream
protocol = tcp
group = tty
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -geometry 1024x768 -depth 24 -once -fp /usr/share/X11/fonts/Type1 -securitytypes=none
}
#create a VNC service
echo "vncserver 5900/tcp # VNC and GDM" >> /etc/services
#restart and enable xinetd
systemctl enable xinetd.service
systemctl restart xinetd.service
Install Tomcat
yum install java-1.7.0-openjdk-devel
groupadd tomcat
useradd -M -s /bin/nologin -g tomcat -d /opt/tomcat tomcat
wget -O /tmp/tomcat.tar.gz http://mirror.sdunix.com/apache/tomcat/tomcat-8/v8.0.23/bin/apache-tomcat-8.0.23.tar.gz
mkdir /opt/tomcat
tar xvf /tmp/tomcat.tar.gz -C /opt/tomcat --strip-components=1
cd /opt/tomcat
chgrp -R tomcat conf
chmod g+rwx conf
chmod g+r conf/*
sudo chown -R tomcat webapps/ work/ temp/ logs/
nano -w /etc/systemd/system/tomcat.service
/etc/systemd/system/tomcat.service
# Systemd unit file for tomcat
[Unit]
Description=Apache Tomcat Web Application Container
After=syslog.target network.target
[Service]
Type=forking
Environment=JAVA_HOME=/usr/lib/jvm/jre
Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid
Environment=CATALINA_HOME=/opt/tomcat
Environment=CATALINA_BASE=/opt/tomcat
Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC'
Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom'
ExecStart=/opt/tomcat/bin/startup.sh
ExecStop=/bin/kill -15 $MAINPID
User=tomcat
Group=tomcat
[Install]
WantedBy=multi-user.target
systemctl daemon-reload
systemctl start tomcat
systemctl enable tomcat
Setup Tomcat
/opt/tomcat/conf/tomcat-users.xml
<tomcat-users>
<user username="admin" password="password" roles="manager-gui,admin-gui"/>
</tomcat-users>
systemctl restart tomcat
Setup Guacamole
yum install wget
yum install cairo-devel freerdp-devel gcc java-1.8.0-openjdk.x86_64 libguac libguac-client-rdp libguac-client-ssh \
libguac-client-vnc libjpeg-turbo-devel libpng-devel libssh2-devel libtelnet-devel libvncserver-devel \
libvorbis-devel libwebp-devel openssl-devel pango-devel pulseaudio-libs-devel terminus-fonts uuid-devel
cd /tmp
wget http://sourceforge.net/projects/guacamole/files/current/source/guacamole-server-0.9.9.tar.gz
tar -xzf guacamole-server-0.9.9.tar.gz && cd guacamole-server-0.9.9
./configure --with-init-dir=/etc/init.d
make
make install
ldconfig
mkdir -p /var/lib/guacamole && cd /var/lib/guacamole/
wget http://sourceforge.net/projects/guacamole/files/current/binary/guacamole-0.9.9.war -O guacamole.war
ln -s /var/lib/guacamole/guacamole.war /opt/tomcat/webapps/
rm -rf /usr/lib64/freerdp/guacdr.so
ln -s /usr/local/lib/freerdp/guacdr.so /usr/lib64/freerdp/
#install noauth plugin
mkdir -p /opt/tomcat/.guacamole/extensions/
wget -O /opt/tomcat/.guacamole/extensions/guacamole-auth-noauth-0.9.9.jar \
https://sourceforge.net/projects/guacamole/files/current/extensions/guacamole-auth-noauth-0.9.9.tar.gz
#configure guacamole
mkdir -p /etc/guacamole/
nano -w /etc/guacamole/guacamole.properties
guacd-hostname: localhost
guacd-port: 4822
lib-directory: /opt/tomcat/webapps/guacamole/WEB-INF/classes
noauth-config: /etc/guacamole/noauth-config.xml
/etc/guacamole/noauth-config.xml
<configs>
<config name="NODE_NAME" protocol="vnc">
<param name="hostname" value="localhost" />
<param name="port" value="5900" />
</config>
</configs>
ln -s /etc/guacamole/guacamole.properties /opt/tomcat/.guacamole/