CentOSLinuxTutorials

How To Install Wetty on CentOS 7

Install Wetty on CentOS 7

In this tutorial, we will show you how to install and configuration of Wetty on your CentOS 7. 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 the step-by-step installation of Wetty on the CentOS 7 server.

Prerequisites

  • A server running one of the following operating systems: CentOS 7 or RHEL-based.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • SSH access to the server (or just open Terminal if you’re on a desktop).
  • An active internet connection. You’ll need an internet connection to download the necessary packages and dependencies for Wetty.
  • A non-root sudo useror access to the root user. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

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
## 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

Step 2. Install dependencies.

yum install epel-release git nodejs npm

Step 3. Installing Wetty.

After installing these dependencies, now we clone Wetty from the GitHub repository using the following command below:

git clone https://github.com/krishnasrinivas/wetty
cd wetty
npm install

Add a user for Wetty:

useradd idroot
passwd idrootwetty

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):

node app.js -p 8080

Accessing Wetty:

http://Your_IP-Address:8080

Run Wetty through HTTPS:

openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes

Finally, you will need to open the custom HTTPS port where you will want to run Wetty:

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
nohup node app.js --sslkey key.pem --sslcert cert.pem -p 8080 &

Accessing Wetty through HTTPS:

https://Your_IP-Address:8080

Congratulations! 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 website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is a seasoned Linux system administrator with a wealth of experience in the field. Known for his contributions to idroot.us, r00t has authored numerous tutorials and guides, helping users navigate the complexities of Linux systems. His expertise spans across various Linux distributions, including Ubuntu, CentOS, and Debian. r00t's work is characterized by his ability to simplify complex concepts, making Linux more accessible to users of all skill levels. His dedication to the Linux community and his commitment to sharing knowledge makes him a respected figure in the field.
Back to top button