Install Tomcat 8.5 on Debian 8

Introduction

Apache Tomcat is a Java Servlet Container which implements several Java EE specifications including JavaServer Pages (JSP), Java Servlet, WebSocket and Java EL. It  also provides an HTTP web server environment in which Java code can run. It’s distributed under the Apache License 2.0.

This tutorial explains how to install and configure Tomcat 8.5.11 on Debian 8.

Getting started

Install Java

The first thing to do is to install python-software-properties, for managing repository:

# apt install python-software-properties -y

Next, add required repository:

# echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee /etc/apt/sources.list.d/webupd8team-java.list
# echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
# apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
# apt update

Now, you can install Java:

# apt install oracle-java8-installer -y

Accept the licence, and then wait for the installation process to complete. Next, check Java version:

# java -version

just to be sure that everything went well.

Configure

Read More


Install Rclone on Debian 8

 

Rclone is a command line program developed to sync files and directories to and from various cloud storage services, like Google Drive, Amazon S3, Dropbox, Microsoft OneDrive and Yandex Disk.
Rclone’s main features are:

  • MD5/SHA1 hashes are checked consistently for file integrity
  • Timestamps are preserved on files
  • Sync to and from the network, e.g: two different cloud accounts
  • Encryption

It is written in Go, and distributed under the MIT licence.
In this tutorial, we will install, configure and test rclone on Debian 8.

Installation

‘Go’ installation

First, you will need to install Go. It is available in the repository, you just need to execute the command:

# apt install golang

Make sure that you check if the $GOPATH is set:

$ echo $GOPATH

If not, set it just like this:

$ export GOPATH="$HOME/gopath/"

Now that you have installed Go, it’s possible to download rclone by

Read More


Install LAMP Stack In Fedora 23/24

Install Apache

Apache is an open-source, multi-platform web server. It provides a full range of web server features including CGI, SSL and virtual domains.

Change to root user using the following command:

su

Enter the following command to install Apache:

In Fedora 24/23/22:

dnf install httpd -y

In Fedora 21 and earlier versions:

yum install httpd -y

Enable the httpd service to start automatically on every reboot:

systemctl enable httpd

Start httpd service using the following command:

systemctl start httpd

If you are encountered with the following error:

Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.

Delete all contents in your /etc/hostname file and add the word “localhost”. Also set localhost to the “Servername” value in/etc/httpd/conf/httpd.conf file and try

Read More


Setup remote and secure connections for MySQL on CentOS 7

In this tutorial we will show you how to login to your  mysql database system remotely and securely using SSL, username and password.

Install MySQL

The latest stable MySQL version is 5.7, so that’s the version we will install and configure in this tutorial.

The package is the first thing you’ll need to add, and it is available in the MySQL repository. Execute the following command to get started:

# yum localinstall -y https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm

This command will add the MySQL repository which can then be used to install the database system:

# yum install -y mysql-community-server

At the end of the installation process, start MySQL using systemd tools:

# systemctl start mysqld

Check MySQL status:

mysqld.service - MySQL Server
 Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
 Active: active (running) ...

MySQL listens on port 3306, as you can see by executing

Read More


7 Must know Linux commands for everyday system administration.

List Top Processes sorted by RAM or CPU Usage in Linux

The following command will show the list of top processes ordered by RAM and CPU use in descendant form (remove the pipeline and head if you want to see the full list):

# ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head
Sample Output
PID  	PPID 	CMD                      	%MEM 	%CPU
2591	2113 	/usr/lib/firefox/firefox    7.3 	43.5
2549   2520 	/usr/lib/virtualbox/Virtual 3.4  	8.2
2288       1 	/home/gacanepa/.dropbox-dis	1.4	0.3
1889   1543	c:\TeamViewer\TeamViewer.ex	1.0	0.2
2113	1801	/usr/bin/cinnamon		0.9	3.5
2254	2252	python /usr/bin/linuxmint/m	0.3	0.0
2245	1801	nautilus -n			0.3	0.1
1645	1595	/usr/bin/X :0 -audit 0 -aut	0.3	2.5

Find Largest Directories in Linux

If you want to display the biggest directories in the current working directory, run:

[root@vpsforums var]# du -a | sort -n -r |															

Read More