How to update git version on RHEL? - redhat

I just created a fresh RHEL VM on GCP to play some Kubernetes on it.
It was not having any git installed on it.
I used yum package manager to install git on it, but it didn't installed the latest version of git.
Current Version: 2.38.0 / 3 October 2022
Version Installed by yum: 1.8.3.1

Create a file:
touch gitupgrade.sh
And add the following to it:
yum -y remove git
yum -y clean packages
mkdir tempgit
cd tempgit
yum install -y autoconf cpio curl-devel expat-devel gcc gettext-devel make openssl-devel perl-ExtUtils-MakeMaker zlib-devel
wget -O v2.24.1.tar.gz https://github.com/git/git/archive/v2.24.1.tar.gz
tar -xzvf ./v2.24.1.tar.gz
cd git-2.24.1/
make configure
./configure --prefix=/usr/local/git
make && make install
ln -sf /usr/local/git/bin/* /usr/bin/
cd ..
rm -fr git-2.24.1
cd ..
rm -fr tempgit
echo "results"
which git
git --version
The run it to upgrade:
sudo sh gitupgrade.sh
And that’s a wrap

Red Hat Enterprise Linux, Oracle Linux, CentOS, Scientific Linux, et al.
RHEL and derivatives typically ship older versions of git. You can download a tarball and build from source, or use a 3rd-party repository such as the IUS Community Project to obtain a more recent version of git.

Related

Setting up a Movesense development environment on Linux

I followed an instruction to set up a Movesense development environment, "Manual setup on Linux", from Suunto / Movesense-community / Movesense-device-lib, README.md
However, I got stuck at sudo apt-get install gcc-arm-embedded:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package gcc-arm-embedded
How can I move forward?
I used Ubuntu 17.10 (Artful Aardvark) as a guest OS.
Try adding the repository:
sudo apt-get remove gcc-arm-none-eabi gdb-arm-none-eabi binutils-arm-none-eabi
sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
sudo apt-get update
I downloaded it directly from ARM IIRC:
https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads
Following the instructions under "GNU/Linux" in the "GNU ARM Embedded Toolchain" section of
https://gnu-mcu-eclipse.github.io/toolchain/arm/install/#gnu-arm-embedded-toolchain
Summarized:
// Get some support dependencies for 32 bit running on 64-bit machines
// Check toolchain README for actual list.
$ sudo apt-get -y install lib32z1 lib32ncurses5 lib32bz2-1.0
// Install the toolchain
$ mkdir -p "${HOME}"/opt
$ cd "${HOME}"/opt
$ tar xjf ~/Downloads/gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2
$ chmod -R -w "${HOME}"/opt/gcc-arm-none-eabi-7-2017-q4-major
You will likely have to modify some of the build files in the Movesense project to point to this location for it to build.
The following might also be helpful: How to install a functional ARM cross-GCC toolchain on Ubuntu 18.04 (Bionic Beaver)
I had some trouble installing it on a Windows machine and tried out Vagrant. This makes the development environment highly movable and in sync if you have multiple developers working on the project.

How can I install MP4Box on CentOS7.3

I can't install MP4Box on CentOS7.3.
CentOS Linux release 7.3.1611 (Core)
I attempted to install with reference to the following URL.
https://www.24x7serversolutions.com/blog/install-mp4box-on-centos/
yum -y install freetype-devel SDL-devel freeglut-devel
wget http://repo.bstack.net/mp4box/gpac-0.4.5.tar.gz
wget http://repo.bstack.net/mp4box/gpac_extra_libs-0.4.5.tar.gz
tar -zxvf gpac-0.4.5.tar.gz
tar -zxvf gpac_extra_libs-0.4.5.tar.gz
cd gpac_extra_libs
cp -r * /usr/local/src/gpac/extra_lib
cd ..
cd gpac
chmod 755 configure
./configure
But, at the time of this command,
make lib
・・・
gcc: エラー: unrecognized command line option ‘-Wl’
gcc: エラー: unrecognized command line option ‘--warn-common’
make[1]: *** [libgpac.so] エラー 1
make[1]: ディレクトリ `/home/source/gpac/src' から出ます
make: *** [lib] エラー 2
I tried to set ln as following.
ln -s /usr/lib64/libglut.so.3 /usr/lib64/libglut.so
But, the same error was displayed.
How do I deal with it?
This is how I installed the latest version of MP4Box from the GitHub. The main purpose of this script is to install the MP4Box to docker centos amazoncorretto container.
yum -y install freetype-devel SDL-devel freeglut-devel ugcc gcc-c++ git libtool make zlib-devel
git clone https://github.com/gpac/gpac gpac_public
cd gpac_public
./configure --static-mp4box
make
make install
This is the combination of two resources:
https://github.com/gpac/gpac/wiki/GPAC-Build-Guide-for-Linux
https://gist.github.com/helpsquad/48ee2baf2eb5ee655e8755618b4c8c75
If you need MP4Box only from GPAC, I recommend that you follow this tutorial.
You need the following packages: git, gcc, make, libpthread-devel.
Execute these command-lines:
git clone https://github.com/gpac/gpac.git
cd gpac
./configure --static-mp4box --use-zlib=no
make -j4
sudo make install
I think there might be a bug in that version of gpac. Try this instead:
yum -y install freetype-devel SDL-devel freeglut-devel
git clone https://github.com/gpac/gpac
cd gpac
git checkout tags/v0.6.1 -b v0.6.1
./configure
make lib
Well it's there on the official "rpmfusion-free" repository.
Just do:
sudo yum install gpac
(Taken from: http://rahul-ghose.blogspot.com/2017/05/install-mp4-box-on-centos.html)
Mp4Box included in gpac, so you must install gpac.
yum install gpac

How to upgrade OpenSSH on Centos

I'm using Centos 6 and openssh 5.3 and I want to upgrade to openssh 7 but I don't know how.
I have tried using google but have not found out how.
To update OpenSSH to the latest version that the CentOS repository has, run the following command:
su -c 'yum update'
This will perform a full system update. At the prompt (from the su part), enter your root password
For future reference, you may find the Unix & Linux Stack Exchange site to also be of use.
yum groupinstall "Development Tools"
yum install zlib-devel openssl-devel
cp /etc/ssh/sshd_config /etc/ssh/sshd_config
wget -c https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.0p1.tar.gz
tar -xzf openssh-9.0p1.tar.gz
cd openssh-9.0p1/
yum install pam-devel libselinux-devel
./configure --with-pam --with-selinux --with-privsep-path=/var/lib/sshd/ --sysconfdir=/etc/ssh
make
make install
ssh -V

IP Messenger for CentOS 7

I'm Using CentOS 7 and trying to install IP messenger in it but not able to install it. Can anyone help me in installing any IP messenger. Any kind of help would be appreciated. Thanks.
You can also compile iptux from source:
Install dependencies
Ubuntu/Debian
sudo apt-get install git libgtk2.0-dev libgconf2-dev g++ make autoconf libtool automake
Fedora/Cent OS
sudo yum install git gtk2-devel GConf2-devel gcc-c++ make autoconf libtool automake
Clone the directory from github
git clone git://github.com/iptux-src/iptux.git
Compile it and install
cd iptux
./configure
make
sudo make install
Execute the program
iptux
iptux seems quite portable. You could compile it from sources and install it locally like for example this tutorial tells you.
Alternatively, you could manually download a packaged version of iptux in rpm format and install it using the CentOS package manager.
rpm -i iptux-0.5.1-alt1_13.i586.rpm OR rpm -i iptux-0.5.1-alt1_13.x86_64.rpm

Installing LuaMongo on Ubuntu 11.10

I have researched and viewed the post to install luamongo- http://groups.google.com/group/luamongo/browse_thread/thread/1eaa56974614dc90/c91c842e241aa4de#c91c842e241aa4de
But the installation will not work. I already have mongodb-10gen version 2.0.3 and lua5.1 version 5.1.4.10 installed.
How do I download luamongo from https://github.com/moai/luamongo and install it and get it working as an import statement in a lua script to be able to write to a mongo db? Any suggestions would be helpful, nothing I have tried so far or read has been able to help. If more information is needed I will post it. Thanks in advance.
I got this script from a friend of mine which should be helpful:
# Download mongodb and driver
wget http://downloads.mongodb.org/cxx-driver/mongodb-linux-x86_64-v2.0-latest.tgz
wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.0.2.tgz
# Extract each
tar xvzf mongodb-linux-x86_64-2.0.2.tgz
tar xvzf mongodb-linux-x86_64-v2.0-latest.tgz
# Add mongo bin to PATH
export PATH=$PATH:~/mongodb-linux-x86_64-2.0.2/bin
# Grab dev tools and dependencies (May need to run apt-get update to download all)
sudo apt-get -y install tcsh scons libpcre++-dev libboost-dev libreadline-dev libboost-program-options-dev libboost-thread-dev libboost-filesystem-dev libboost-date-time-dev gcc g++ git lua5.1-dev make
# Grab latest luamongo (will need to add your github ssh key)
git clone git#github.com:moai/luamongo
# Compile mongo driver
cd mongo-cxx-driver-v2.0
sudo scons install
# Install where lua can load it
sudo cp libmongoclient.* /usr/lib