Setup UFW on Centos (Uncomplicated FireWall)

How to setup UFW First, ensure you’ve enabled the EPEL repo. Install the UFW package using yum: [user@server] sudo yum -y install ufw Check it’s installed successfully: [user@server] sudo ufw status Which should show ‘Status: inactive’ In a basic firewall, denying all incoming traffic and allowing outgoing traffic is a good . . . Read more

Install NVM CentOS

Step #1: Install NVM (Node Version Manager) Use the following curl command to kick-off the install script: curl https://raw.githubusercontent.com/creationix/nvm/v0.25.0/install.sh | bash At the time of publication, NVM v0.25.0 was the most recent version available. You should check the GitHub project page for the latest release of NVM, and adjust the . . . Read more

Sử dụng log4php

First, install Composer if you don’t yet have it: php -r “eval(‘?>’.file_get_contents(‘https://getcomposer.org/installer’));” Create a composer.json file with the following content: { “require”: { “apache/log4php”: “2.3.0” } } Run the Composer install procedure: php composer.phar install This will install Apache log4php in vendor/apache/log4php. To use log4php simply include vendor/autoload.php in your script. require ‘vendor/autoload.php’; $log = . . . Read more