mathz.nu Asterisk Blacklist Hobby webbhotell

2019/01/30

Ubuntu Server

Filed under: Uncategorized — Mathz @ 10:46

To configure a static IP address on your Ubuntu 18.04 server you need to modify a relevant netplan network configuration file within /etc/netplan/ directory. 

For example you might find there a default netplan configuration file called 01-netcfg.yaml or 50-cloud-init.yaml with a following content instructing the networkd deamon to configure your network interface via DHCP:

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    ens160:
      dhcp4: yes

To set your network interface ens160 to static IP address 192.168.1.10 with gateway 192.168.1.1 and DNS server as 192.168.1.1 replace the above configuration with the one below.

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    ens160:
     dhcp4: no
     addresses: [192.168.1.10/24]
     gateway4: 192.168.1.1
     nameservers:
       addresses: [192.168.1.1]

Once ready apply changes with:

$ sudo netplan apply

In case you run into some issues execute:

$ sudo netplan --debug apply

2019/01/10

Catalina.out is emtpy

Filed under: Uncategorized — Mathz @ 19:28

journalctl -u tomcat

Centos – Give Tomcat access to Mysql/MariaDB

Filed under: Server — Mathz @ 14:48

To see all Tomcat options
getsebool -a | grep tomcat

To set Tomcat access to database
setsebool tomcat_can_network_connect_db 1

SELinux workaround

Give Tomcat network access.

Error message
Could not connect to address=(host=)(port=3306)(type=master) : Permission denied (connect failed)

Tomcat have no access to file system

ps -eZ | grep tomcat_t

yum install policycoreutils-python

semanage permissive -a tomcat_t

Powered by WordPress