In this tutorial we will show you how to install and configuration of Wetty on your CentOS 7 server. For those of you who didn’t know, Wetty is an alternative to ajaxterm/anyterm but much better than them because wetty uses ChromeOS’ terminal emulator (hterm) which is a full fledged implementation of terminal emulation written entirely in Javascript. Also it uses websockets instead of Ajax and hence better response time.
This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple. I will show you through the step by step installation Wetty on CentOS 7 server.
Install Wetty on CentOS 7
Step 1. First, you need to enable EPEL (Extra Packages for Enterprise Linux) on your system.
- CentOS 7 64 Bit
1 2 3 | ## RHEL/CentOS 7 64-Bit ## # wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm # rpm -ivh epel-release-7-5.noarch.rpm |
1 | yuminstallepel-releasegitnodejsnpm |
Step 3. Installing Wetty.
After installing these dependencies, clone the GitHub repository:
1 2 3 | gitclonehttps://github.com/krishnasrinivas/wetty cdwetty npminstall |
Add an user for wetty:
1 2 | useraddidroot passwdidrootwetty |
Step 4. Starting Wetty and Access Linux Terminal from Web Browser.
Start the web interface in local port 8080 for Wetty by running (this assumes your current working directory is /wetty):
1 | nodeapp.js-p8080 |
Accessing Wetty:
1 | http://Your_IP-Address:8080 |
Run Wetty through HTTPS:
1 | opensslreq-x509-newkeyrsa:2048-keyoutkey.pem-outcert.pem-days365-nodes |
Finally, you will need to open the custom HTTPS port where you will want to run Wetty:
1 2 3 4 | firewall-cmd--add-service=https# Run Wetty in the standard HTTPS port (443) firewall-cmd--permanent--add-service=https firewall-cmd--add-port=XXXX/tcp# Run Wetty on TCP port XXXX nohupnodeapp.js--sslkeykey.pem--sslcertcert.pem-p8080& |
Accessing Wetty through HTTPS:
1 | https://Your_IP-Address:8080 |
Congratulation’s! You have successfully installed Wetty. Thanks for using this tutorial for installing Wetty (Web + tty) in CentOS 7 system. For additional help or useful information, we recommend you to check the official Wetty web site.