Press "Enter" to skip to content

Posts published in “Linux”

Connect to GNOME desktop environment via XRDP on Ubuntu 18 and CentOS 7

0

It might not make sense to use RDP to remote linux machines. The speed and performance all are not that good from my point to view. But in certain situation, you might need to use desktop on your remote Linux, then here comes this post.

1. CentOS 7

Commands to check system version:

uname -r
cat /proc/version
cat /etc/os-release
lsb_release -a
Note: lsb_release command sometimes does not work on CentOS

Linux CentOS/Ubuntu Firewall and SELinux

0

The Linux kernel includes the Netfilter subsystem, which is used to manipulate or decide the fate of network traffic headed into or through your server. All modern Linux firewall solutions use this system for packet filtering.


Security-Enhanced Linux (SELinux) is a Linux kernel security module that provides a mechanism for supporting access control security policies, including mandatory access controls (MAC). SELinux is a set of kernel modifications and user-space tools that have been added to various Linux distributions.

This post summarizes how to configure a basic usage for Firewall and SElinux on two most popular linux distribution : CentOS and Ubuntu.

Linux System Performance Analytics

0

This post is going to use an java code example to show the process how to analysis linux system performance issue using all kinds of Linux internal commands without other third party tools.

System: Top

Here is a java code for an example
public class JavaDemo2 {
    public static void main(String[] args) {
        while (true){
            System.out.println(new java.util.Random().nextInt(77778888));
        }
    }
}

top check system resource usage

[[email protected] ~]# top
top - 11:28:50 up 7 min, 2 users, load average: 0.73, 0.39, 0.18
Tasks: 230 total, 1 running, 229 sleeping, 0 stopped, 0 zombie
Cpu(s): 1.0%us, 2.3%sy, 0.0%ni, 96.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 1906280k total, 649948k used, 1256332k free, 21164k buffers
Swap: 2097148k total, 0k used, 2097148k free, 203820k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3672 root 20 0 3158m 94m 11m S 15.6 5.1 0:13.67 java
3397 root 20 0 100m 5388 3396 S 9.3 0.3 0:09.00 sshd
39 root 20 0 0 0 0 S 1.7 0.0 0:00.25 events/4
37 root 20 0 0 0 0 S 1.0 0.0 0:00.39 events/2
35 root 20 0 0 0 0 S 0.3 0.0 0:01.27 events/0
36 root 20 0 0 0 0 S 0.3 0.0 0:00.34 events/1
41 root 20 0 0 0 0 S 0.3 0.0 0:00.24 events/6
[[email protected] ~]# uptime
11:29:09 up 7 min, 2 users, load average: 0.52, 0.36, 0.18

Deploy Zabbix Agent into CentOS and Add into Zabbix Server

0

Zabbix Agent is required to install on all remote systems needs to be monitor through Zabbix server. The Zabbix Agent collects resource utilization data and applications data on the client system and provides such information to the Zabbix server on their requests.

There are two types of checks between Zabbix Server and Client.

  • Passive Check – Zabbix Agent sent data to server on their request.
  • Active Check – Zabbix Agent sends data periodically to server.

Quickly Deploy Zabbix in CentOS7

0
Zabbix is a mature and effortless enterprise-class open source monitoring solution for network monitoring and application monitoring of millions of metrics. This post is going to install zabbix4.0 into a brand new Centos7.x system environment, including default installation of mariab5.5, php5.4, apache2.4 as well. 

All configurations are almost default, the ultimate goal is to  install the zabbix system in a fastest way.

You cannot copy content from 51sec.org.