apt-get install libncurses5 libtommath1;
apt-get install curl tar;

/opt/firebird/bin/FirebirdUninstall.sh
mv /opt/firebird /opt/firebird3

cd ~
curl -L https://github.com/FirebirdSQL/firebird/releases/download/v5.0.0/Firebird-5.0.0.1306-0-linux-x64.tar.gz | tar -zxC /tmp
cd /tmp/Firebird-5.0.0.1306-0-linux-x64

curl -L https://github.com/FirebirdSQL/firebird/releases/download/v3.0.11/Firebird-3.0.11.33703-0.amd64.tar.gz | tar -zxC /tmp
cd /tmp/Firebird-3.0.11.33703-0.amd64
sudo ./install.sh
sudo chmod -R 777 /opt/firebird
cd /opt/firebird
mkdir data
sudo chmod -R 777 /opt/firebird


sudo apt update
sudo apt install libtommath1


sudo apt update
sudo apt install libtommath1
ls -l /usr/lib | grep libtommath
sudo find / -name "libtommath.so*"
sudo ln -s /usr/lib/x86_64-linux-gnu/libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0


apt-get install libncurses5 libtommath1;
apt-get install curl tar;

/opt/firebird/bin/FirebirdUninstall.sh
mv /opt/firebird /opt/firebird3

cd ~
curl -L https://github.com/FirebirdSQL/firebird/releases/download/v5.0.0/Firebird-5.0.0.1306-0-linux-x64.tar.gz | tar -zxC /tmp
cd /tmp/Firebird-5.0.0.1306-0-linux-x64

curl -L https://github.com/FirebirdSQL/firebird/releases/download/v3.0.11/Firebird-3.0.11.33703-0.amd64.tar.gz | tar -zxC /tmp
cd /tmp/Firebird-3.0.11.33703-0.amd64
sudo ./install.sh
sudo chmod -R 777 /opt/firebird
cd /opt/firebird
mkdir data
sudo chmod -R 777 /opt/firebird

################################
########### CONF FB ############
################################
#Modo de Compatibilidade
DataTypeCompatibility = 3.0
#Ping para evitar desconectar
DummyPacketInterval = 120

#firebird.conf
DefaultDbCachePages = 50K      		# default cache pages for all databases
FileSystemCacheThreshold = 999M 	# file cache always on
TempCacheLimit = 4682M
LockHashSlots = 49999          		# optimal value for lock table
TempBlockSize = 2M             		# optimimal value to grow TempCacheLimit
MaxUnflushedWrites = -1        		# optimal for databases with intentional Forced Writes Off
MaxUnflushedWriteTime = -1     		# optimal for databases with intentional Forced Writes Off
RemoteServicePort = 3050

#HQbird Ent
ParallelWorkers=1
MaxParallelWorkers = 64
TempSpaceLogThreshold=1000M
SortDataStorageThreshold =16384
DSQLCacheSize = 16
ExtConnPoolSize = 200
ExtConnPoolLifeTime = 36000 

##################- Login -##############
WireCrypt = disabled
AuthServer = Legacy_Auth, Srp, Win_Sspi
UserManager = Legacy_UserManager
#########################################