Rocket Search Docs – Installation und Konfiguration für SUSE Linux Enterprise Server und OpenSUSE

You are viewing an old revision of this post, from June 29, 2018 @ 11:11:16. See below for differences between this version and the current revision.

ROCKET SEARCH

Installation und Konfiguration für SUSE Linux Enterprise Server und OpenSUSE

/ \
| |
| |
| |
/____\
###
#

rs

Easy Setup mit „setup_rs_self_compiled_with_zypper.sh“ oder wie folgt manuell

 

LibreSSL

lynx https://www.libressl.org/

wget http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.3.0.tar.gz

Integritätsprüfung:

curl –insecure https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/SHA256 | grep -i libressl- 2.5.4.tar.gz

sha256sum libressl-2.5.4.tar.gz

tar -xzf libressl-2.3.0.tar.gz

cd libressl-2.3.0/

./configure –bindir=/usr/bin –sbindir=/usr/sbin –libdir=/usr/lib64 –includedir=/usr/include –enable-windows-ssp –enable-extratests”

make

make install

cp -frv crypto/.libs/* /lib

cp -frv crypto/.libs/* /lib64/

cp -frv include/* /usr/include/

Samba

zypper install libacl-devel python-devel gnutls-devel gnutls libacl-devel openldap2-devel

https://download.samba.org/pub/samba/stable/samba-4.8.2.tar.gz

tar -xzf samba-4.8.2.tar.gz

cd samba-4.8.2/

./configure –bindir=/usr/bin –sbindir=/usr/sbin –sysconfdir=/etc/samba –localstatedir=/var –libdir=/usr/lib64 –includedir=/usr/include

make

mkdir /etc/samba

mkdir /var/log/samba

make install

mkdir /var/locks/usershares

chown -R root:root /var/locks/usershares

chmod -R 600 /var/locks/usershares

chmod -R +t /var/locks/usershares

mount -t cifs //<Windows Server>/<Share> /mnt/smb_share –read-only -o user=<AD user>

Ggf. fortfahren falls mehr Netzwerkverzeichnisse angebunden werden sollen

NFS

zypper install nfs-client nfs-kernel-server

oder manuell kompilieren. Zusätzliche Komponenten.

zypper install libudev-devel

zypper install systemd-devel

LVM2.2.02.177/

gss-1.0.3/

keyutils-1.5.10/

krb5-1.16.1/

libevent-2.1.8-stable/

libgssglue-0.4/

libnfsidmap-0.27/

librpcsecgss-0.19/

libtirpc-1.0.3/

nfs-utils-2.3.2/

rpcbind-0.2.4/

util-linux-2.32/

mount -t nfs <NFS Server>:/<Share> /mnt/nfs_share –read-only -o noacl,nocto,noatime,nodiratime,soft,intr

Block RAM Device (für excel Libreoffice)

256 MB RAM Device

modprobe brd rd_size=256000
ls -al /dev/ram*
mkfs.ext3 /dev/ram0
mount /dev/ram0 /tmp/ram_dev

Timeout

timeout –version

Xargs

xargs –version

Find

find –version

nginx

wget http://nginx.org/download/nginx-1.14.0.tar.gz
tar -xzf nginx-1.14.0.tar.gz
cd nginx-1.14.0/
mkdir -p /usr/local/nginx/sbin
./configure –prefix=/usr/local/nginx –sbin-path=/usr/local/nginx/sbin
make
make install
ln -s /usr/local/nginx/sbin/nginx /usr/sbin/nginx
cp -frv nginx.conf /usr/local/ngingx/conf/

PHP für nginx

libxml2:

wget ftp://xmlsoft.org/libxml2/libxml2-2.7.1.tar.gz

tar -xvzf libxml2-2.7.1.tar.gz

cd libxml2-2.7.1

./configure –bindir=/usr/bin –sbindir=/usr/sbin –libdir=/usr/lib64 –includedir=/usr/include”

make

make install


libxslt:

git clone https://gitlab.gnome.org/GNOME/libxslt.git
cd libxslt
./autogen.sh
./configure –bindir=/usr/bin –sbindir=/usr/sbin –libdir=/usr/lib64 –includedir=/usr/include
make
make install

nginx:

tar -xzf php-7.2.5.tar.gz
cd php-7.2.5
mkdir -p /usr/local/nginx/php
sed -i ‘s/defined (LIBRESSL_VERSION_NUMBER)/(defined(LIBRESSL_VERSION_NUMBER) \&\& LIBRESSL_VERSION_NUMBER < 0x20700000L)/g’ ext/openssl/openssl.c
./configure –with-openssl –with-zlib –enable-calendar –enable-mbstring –enable-zip –with-gd –with-gettext –enable-bcmath –enable-sockets –with-xsl –enable-fpm
make
make test
make install

cp -frv php.ini-production /usr/local/lib64/php.ini

php-cgi -b 127.0.0.1:9000 &

nginx

Test via Browser

http://<IP>/info.php

redis

wget http://download.redis.io/releases/redis-4.0.9.tar.gz
tar -xzf redis-4.0.9.tar.gz
cd redis-4.0.9
make
make install

redis-server &

redis-cli config set save “”

redis-cli config set appendonly no

/usr/local/bin/redis-cli config set protected-mode no

swapoff -a

echo 1 > /proc/sys/vm/overcommit_memory

echo never > /sys/kernel/mm/transparent_hugepage/enabled

echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse

LibreOffice

zypper install libreoffice

wine

zypper install gcc-32bit gcc-c++-32bit gcc-go-32bit gcc7-c++-32bit libX11-devel-32bit libXRes1-32bit libXres-devel-32bit freetype2-devel-32bit libftgl2-32bit libXrender-devel-32bit libxml2-2-32bit libxml2-devel-32bit \

libxml++-2_6-2-32bit libxslt-devel-32bit libgnutls-devel-32bit libjpeg62-32bit libjpeg62-devel-32bit libjpeg62-devel-32bit libtiff5-32bit \

libpng16-devel-32bit libpng12-devel-32bit png++-devel libpng16-compat-devel-32bit libpng16-tools \

libgnutls-devel-32bit Mesa-libGL1-32bit openldap2-devel-32bit libXcursor-devel-32bit libXi-devel-32bit libxshmfence-devel \

libxcb-shape0-32bit libXxf86vm-devel-32bit libXrandr-devel-32bit libXfixes-devel-32bit libXinerama-devel-32bit libXcomposite-devel-32bit \

libXrandr-devel-32bit libglue-devel-32bit libOSMesa-devel-32bit opencl-cpp-headers libclc libpcap-devel-32bit libdbus-c++-1-1-32bit \

libglut3-32bit libOpenCL1 libdbus-c++-glib-1-1-32bit libncurses5-32bit libv4l-devel-32bit

wget https://dl.winehq.org/wine/source/3.0/wine-3.0.tar.xz

tar -xf wine-3.0.tar.xz

cd wine-3.0

./configure –bindir=/usr/bin –sbindir=/usr/sbin –libdir=/usr/lib64 –includedir=/usr/include

make

make install

Boost Libraries

wget https://dl.bintray.com/boostorg/release/1.67.0/source/boost_1_67_0.tar.gz
tar -xzf boost_1_67_0.tar.gz
cd boost_1_67_0
./bootstrap.sh
./b2 install –prefix=/usr/

ICU4C

http://download.icu-project.org/files/icu4c/61.1/icu4c-61_1-src.tgz

tar -xzf icu4c-61_1-src.tgz

cd icu/source

chmod +x runConfigureICU configure install-sh

./runConfigureICU Linux

make

make install

Libmagic (file)

wget ftp://ftp.astron.com/pub/file/file-5.33.tar.gz
tar -xzf file-5.33.tar.gz
cd file-5.33/
./configure –bindir=/usr/bin –sbindir=/usr/sbin –libdir=/usr/lib64 –includedir=/usr/include
make
make install
file –version

gcc/g++

g++ –version

cpp redis

git clone https://github.com/Cylix/cpp_redis.git
cd cpp_redis
git submodule init && git submodule update
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
make install

JsGrid

wget https://github.com/tabalinas/jsgrid/archive/v1.5.3.tar.gz

tar -xzf v1.5.3.tar.gz

cp -frv jsgrid-1.5.3 /usr/local/nginx/html/

cd /usr/local/nginx/html/

mv jsgrid-1.5.3 jsgrid

Rocket Search

mkdir /etc/rs

Alle Rocket Search Binaries nach /usr/bin kopieren

Falls nur der Quellcode zur Verfügung steht, diesen einfach kompilieren

g++-7 -O3 -fPIC -Wall -lpthread wrapper.cpp -o wrapper;

g++-7 -O3 -fPIC -Wall read_file_infos.cpp -lcpp_redis -ltacopie -pthread -lboost_system -lboost_filesystem -lmagic -lssl -lcrypto -licui18n -licuuc -licudata -o read_file_infos;

g++-7 -O3 -Wall -lpthread client_3.cpp -o client_3

cp -frv read_file_info /usr/bin

cp -frv wrapper /usr/bin

cp -frv client_3 /usr/bin

cp -frv get_exe_dll_info_v2.exe /usr/bin

Konfig File

cp -frv config.cfg /etc/rs

html kopieren

cp -frv client.php/usr/local/nginx/html

cp -frv back.css /usr/local/nginx/html

cp -frv button.css /usr/local/nginx/html

cp -frv css-input.css /usr/local/nginx/html

cp -frv text.css /usr/local/nginx/html

jenachdem wo die Datenbank läuft den Code anpassen

sed -i ‘s/172.17.190.78/127.0.0.1/g’ client.php

Rocket Search File Indexer Durchlauf starten.

wrapper <Pfad> <Anzahl Prozesse>

z.B. wrapper /mnt 4

Zusatztips

Bandbreitenbegrenzug


#QoS fuer SMB und NFS
tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 1:0 htb default 10
#upload (OUTPUT)
tc class add dev eth0 parent 1:0 classid 1:123 htb rate 5mbit ceil 5mbit
tc filter add dev eth0 parent 1: prio 0 protocol ip handle 123 fw flowid 1:123
#download (INPUT)
tc class add dev eth0 parent 1:1 classid 1:456 htb rate 5mbit ceil 5mbit
tc filter add dev eth0 parent 1: prio 0 protocol ip handle 456 fw flowid 1:456
#
tc qdisc show dev eth0
tc class show dev eth0
tc filter show dev eth0
tc -s -d qdisc show dev eth0
#
iptables -F -t mangle
iptables -t mangle -A INPUT -d 172.17.190.78 -s 172.17.190.6 -j MARK –set-mark 456
iptables -t mangle -A INPUT -d 172.17.190.78 -s 172.17.190.12 -j MARK –set-mark 456
#

#Traffic Controll für SMB
iptables -t mangle -A OUTPUT -p tcp –dport 445 -j MARK –set-mark 123

#Traffic Controll für NFSv4
iptables -t mangle -A OUTPUT -p tcp –dport 2049 -j MARK –set-mark 123
iptables -L -v -n -t mangle

Status der Datenbank

redis-cli dbsize

redis-cli info memory

redis-cli –stat

redis-cli keys “*“ | tail

Beobachtung der Prozesse

watch -n 1 ‘ ps -ef | grep -iE “timeout|find|xargs|wrapper|read_file” ‘

Master Start

#RAM Filesystem####################################################################

mkdir /tmp/ram_dev

modprobe brd rd_size=256000

mkfs.ext3 -F /dev/ram0
ls -al /dev/ram*
mount /dev/ram0 /tmp/ram_dev
####################################################################################

#

#redis##############################################################################

redis-server &

sleep 10

redis-cli config set save “”

redis-cli config set appendonly no

redis-cli config set protected-mode no

swapoff -a

echo 1 > /proc/sys/vm/overcommit_memory

echo never > /sys/kernel/mm/transparent_hugepage/enabled

echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse

####################################################################################

#

#nginx####################################################################################

nginx

php-cgi -b 127.0.0.1:9000 &

#####################################################################################

Troubleshooting

Fall nicht neu gelinkt wurde die Libs sysmlinken.

ldd read_file_info

ln -s /usr/lib64/libssl.so.45 /usr/lib64/libssl.so.44

ln -s /usr/lib64/libcrypto.so.43 /usr/lib64/libcrypto.so.42

ln -s /usr/lib64/libicui18n.so.60.2 /usr/lib64/libicui18n.so.61

ln -s /usr/lib64/libicudata.so.60.2 /usr/lib64/libicudata.so.61

ln -s /usr/lib64/libboost_system.so.1.66.0 /usr/lib64/libboost_system.so.1.61.0

Post Revisions:

Changes:

There are no differences between the June 29, 2018 @ 11:11:16 revision and the current revision. (Maybe only post meta information was changed.)

Tags: