Compile Apache Tomcat

how to install manually
https://www.tecmint.com/install-apache-tomcat-on-debian-10/

but we want to compile itself and build a deb package

we need java and ant

apt-get install ant

Choose your version as source code https://github.com/apache/tomcat/tags in our example we use 9.0.64

extract the folder and you can run /usr/bin/ant in the extraced tomcat folder after a frew seconds you can find your compiled tomcat under the folder /output/build

apt build-dep tomcat9

dpkg-buildpackage -rfakeroot -b -uc -us

#!/bin/bash -xe
#
# sudo gem install fpm
# sudo apt-get install curl
# # Put this script in a folder called tomcat-packaging
# ./mkdeb.sh 7.0.40
# ./mkdeb.sh 6.0.37
#
VERSION=$1
VERSION_=${VERSION//./}
MAJOR=${VERSION:0:1}
rm -rf ./usr/local/*
mkdir -p ./usr/local/share/
pushd ./usr/local/share/
curl "http://mirror.catn.com/pub/apache/tomcat/tomcat-${MAJOR}/v${VERSION}/bin/apache-tomcat-${VERSION}.tar.gz" | tar -xz
popd
cd ..
rm -f *.deb
fpm -n tomcat${VERSION_} \
-v ${VERSION}-0custom1 \
-d default-jre \
-a all \
–vendor apache \
–license 'Apache Version 2.0' \
-C tomcat-packaging/ \
-m "DSI <dsi@custom.com>" \
-t deb \
-s dir \
–config-files usr/local/share/apache-tomcat-${VERSION}/conf/web.xml \
–config-files usr/local/share/apache-tomcat-${VERSION}/conf/context.xml \
–config-files usr/local/share/apache-tomcat-${VERSION}/conf/catalina.policy \
–config-files usr/local/share/apache-tomcat-${VERSION}/conf/catalina.properties \
–config-files usr/local/share/apache-tomcat-${VERSION}/conf/tomcat-users.xml \
–config-files usr/local/share/apache-tomcat-${VERSION}/conf/logging.properties \
–config-files usr/local/share/apache-tomcat-${VERSION}/conf/server.xml \
–description "Apache Tomcat is an open source software implementation of the Java Servlet and JavaServer Pages technologies." \
–url 'http://tomcat.apache.org/' \
usr
# Add these?
# –pre-install ./tomcat.preinstall \
# –post-install ./tomcat.postinstall \
view raw tomcat-mkdeb.sh hosted with ❤ by GitHub

scaleway rclone s3 example

If you are searching for an alternative for Backblaze Backup. You can try rclone with s3 storage from Scaleway.

In these Blogpost you can find out how to install and configure it. But how to use it? I have some example for you.

https://www.scaleway.com/en/docs/tutorials/encrypt-s3-data-rclone/

https://www.scaleway.com/en/docs/storage/object/api-cli/installing-rclone/

Thats for a Windows machine, on Linux only other path K:test = /home/ubuntu/myfiles

rclone sync --progress K:\test Scaleway:allmybackup

If you want to store your data directly in to the GLACIER storage you can use

rclone sync --progress --s3-storage-class=GLACIER K:\test Scaleway:allmybackup

or you can configre rclone directly to use GLACIER directy without define storage class

Simple example if you are using encryption with rclone

rclone sync --progress K:\test crypt:

Now we have more options for bandwith usage

Attention rclone is using Megabyte not Megabit 1M are 8Mbit

rclone sync --progress --log-file=rclone_log.txt --bwlimit "06:00,2M 23:00,4M" K:\test crypt:

bash script detect os and execute command

If you have multi servers Linux Distribution and should check only Ubuntu. Then you can use this script to select the os and if only match the OS then execute the command.

##!/bin/bash
if [ -e "/etc/issue" ] ;
then
issue=`cat /etc/issue`
set -- $issue
if [ $1 = "Ubuntu" ] ;
then
    nginx -v 2>&1 | grep -o 1.* | cut -c1-6 
fi
fi

apache AH01070: Error parsing script headers

If you are using Magento 2 and you got this 500 error from admin login page. Your Content Security Policy header are too long. Use Nginx or reduce your headers.

Problem is AP_IOBUFSIZE cannot be changed by a conf file it is hardcoded in to the sourcecode. You have only 8192 Bytes and this os offen to low. If you reach this limit your apache will crash and restart.

AP_IOBUFSIZE 8192

Look at the Bugzilla from Apache Webserver

https://bz.apache.org/bugzilla/show_bug.cgi?id=64919

php oauth curl request engine

How to enable php oauth with curl support.

cd/usr/include&& sudoln-s x86_64-linux-gnu/curl

 apt installphp-dev

 apt-installlibpcre3-dev

 apt installphp7.4-dev

apt remove php-oauth php7.4-oauth

apt autoremove

update-alternatives --setphpize /usr/bin/phpize7.4

update-alternatives --setphpdbg /usr/bin/phpdbg7.4

update-alternatives --setphp-config /usr/bin/php-config7.4

pear config-setphp_ini `php7.4 --ini | grep"Loaded Configuration"| sed-e "s|.*:\s*||"` system

pecl installoauth

pecl uninstall oauth

pecl installoauth

printf"; priority=20\nextension=oauth.so\n"> /etc/php/7.4/mods-available/oauth.ini

The Solr *Optimize Now* Button for Sitecore Use Cases

Sitecore Architecture

If you’ve worked with Sitecore and Solr, you’re no stranger to the Solr Admin UI.  There are great aspects to that UI, and some exciting extension points with Sitecore implications too, but I know one element of that Solr UI that causes some head-scratching . . . the “optimize now” feature:

OptimizeNow.JPG

The inclusion of the badcauses people to think “something is wrong . . . red bad . . . must click now!”

What is this Optimize?

I’m writing this for the benefit of Sitecore developers who may not be coming at this from a deep search background: do not worry if your Solr cores show this badicon encouraging you to optimize now.  Fight that instinct.  For standard Sitecore Solr cores that are frequently updating, such as the sitecore_core_index, sitecore_master_index, sitecore_analytics_index, and — depending on your publishing strategy — sitecore_web_index, one may notice these…

View original post 696 more words