Author: Vincent Verloop

Ervaren ICT Professional met een bewezen geschiedenis van werken in de IT- en dienstensector. Bekwaam in OS X, Search Engine Optimization (SEO), PHP, WordPress en Domain Name System (DNS). Sterke media- en communicatieprofessional met een diploma MBO niveau 4 gericht op ICT-beheer / ICT-beheerder. Volg Vincent Verloop op Twitter.

Install Java on CentOS 8

Install OpenJDK 11

If you need only JRE, Install only [java-11-openjdk] package,
but if you need compiler, Install [java-11-openjdk-devel] package, too.

dnf -y install java-11-openjdk java-11-openjdk-devel

cat > /etc/profile.d/java.sh <<‘EOF’
export JAVA_HOME=$(dirname $(dirname $(readlink $(readlink $(which java)))))
export PATH=$PATH:$JAVA_HOME/bin
EOF

Don’t forget to source the file or logout and back in.

source /etc/profile.d/java.sh

java –version

# verify to create test program

# cat > java-test.java <<'EOF'
class java_test {
    public static void main(String[] args) {
        System.out.println("Hello Java World !");
    }
}
EOF 

javac java-test.java

java java-test

Hello Java World !

alternatives –config java

alternatives –config javac

java –version

javac –version

$ echo $JAVA_HOME
$ echo $PATH
$ echo $CLASSPATH

PHP Redis Session Handler – WordPress Redis

How to Set Up a Redis Server as a Session Handler:

# nano /usr/local/php74/lib/php.ini
# session.save_handler = redis
# session.save_path = "tcp://127.0.0.1:6379?auth=secretpass123"

Redis Extra Security:

Set a Password for the Redis Server

To add an extra layer of security to your Redis installation, you are encouraged to set a password for accessing the server data. We will edit the same configuration file from the previous step, /etc/redis/redis.conf:

sudo nano /etc/redis/redis.conf

 Copy

Now, uncomment the line that contains requirepass, and set a strong password:/etc/redis/redis.conf

requirepass yourverycomplexpasswordhere

 Copy

Restart the Redis service so the changes take effect:

sudo service redis-server restart

Install HTML Tidy at Centos 8/Directadmin

Requirements:
dnf install libtidy libtidy-devel

1.
To start customizing the compilation parameters, first we need to create a custom compilation file:
cd /usr/local/directadmin/custombuild
mkdir -p custom/php
cp -fp “configure/php/configure.php74” “custom/php/configure.php74”

2.
Open the file:
/usr/local/directadmin/custombuild/custom/php/configure.php74

3.
Add –with-tidy line to the end of the custom/php/configure.php74 file, and make sure the \ character exists at the end of all lines except the last one. The \ character tells the configure line to loop to the next line, making the line easier to read. Without the \ character to trigger the wrap, the next line is incorrectly read as a separate command.

4.
Build PHP:
./build php n

5.
Restart Apache and if necessary, PHP-FPM:
service httpd restart
service php-fpm74 restart

Resources:
https://www.php.net/manual/en/tidy.installation.php
https://docs.directadmin.com/webservices/php/php-extensions.html#add-a-custom-module-to-php-with-custombuild

How to install Kali on Rasperry Pi 3

Step 1 – Download Kali Linux Image for the Raspberry Pi

Head to Offensive Security and download the latest Kali Linux image for the Raspberry Pi. As of this writing, it is “RaspberryPi 2 / 3” on version 2.1.2.

Step 2 – Untar the compressed image file

Step 3 – Flash the Image to the Micro SD Card

You can use a tool like ApplePiBaker for Mac to load your Kali image onto your SD card. If you use Windows, you can use Win32 Disk Imager to put your image on the card.

Step 4 – Boot into Kali Linux

When finished, your SD card is ready to go! Insert the SD card into your Pi, connect it to HDMI, and attach your USB keyboard. Plug in the power source to boot into Kali Linux for the first time. To get to the desktop, your default login is “root” with “toor” being the password.

Step 5 – Install Raspi-config

 

How to install WP-CLI on Directadmin Centos 8

Install WP-CLI

WP-CLI wordt niet voorgeïnstalleerd op je hostingpakket. Daar zijn eigenlijk twee simpele redenen voor. Niet iedereen met een hostingpakket wil per se WordPress gebruiken. Wel WordPress installeren betekent daarnaast niet dat iemand ook meteen WP-CLI wil. Gelukkig is zelf WP-CLI installeren zo gebeurd en daarna ook makkelijk bij te werken wanneer nodig.

Continue reading

How to install mod_brotli on Directadmin CentOS 8

Just like gzip, Brotli is also a compression algorithm. It is developed by Google and serves best for text compression. The reason being, it uses a dictionary of common keywords and phrases on both client and server side and thus gives a better compression ratio. The advantage for Brotli over gzip is that it makes use of a dictionary and thus it only needs to send keys instead of full keywords. It is supported by all major browsers. Fewer bytes transferred not only leads to faster page load but also helps in reducing costs of Content Delivery Network (CDN).

Continue reading

How to install Memcached on CentOS 8

Free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.

Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.

Memcached is simple yet powerful. Its simple design promotes quick deployment, ease of development, and solves many problems facing large data caches. Its API is available for most popular languages.

Continue reading