Removing old version of R and R studioo from Centos 7 - centos

I am trying do uninstall an old version of R Studio Server in Centos 7:
$ sudo yum list installed | grep 'studio'
rstudio.x86_64 2022.02.3+492-1 #/rstudio-2022.02.3-492-x86_64
rstudio-pm.x86_64 1.1.4-3 #/rstudio-pm-1.1.4-3.x86_64
rstudio-server.x86_64 2022.02.3+492-1 #/rstudio-server-rhel-2022.02.3-492-x86_64
$ sudo yum list installed | grep 'R'
OpenEXR-libs.x86_64 1.7.1-8.el7 #base
R-4.2.1.x86_64 1-1 #/R-4.2.1-1-1.x86_64
R-core.x86_64 4.1.3-1.sdl7 #puias_computational
R-core-devel.x86_64 4.1.3-1.sdl7 #puias_computational
R-devel.x86_64 4.1.3-1.sdl7 #puias_computational
R-java-devel.x86_64 4.1.3-1.sdl7 #puias_computational
libRmath.x86_64 4.1.3-1.sdl7 #puias_computational
libRmath-devel.x86_64 4.1.3-1.sdl7 #puias_computational
openblas-Rblas.x86_64 0.3.3-2.el7 #epel
perl-Compress-Raw-Bzip2.x86_64 2.061-3.el7 #base
perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7 #base
perl-PlRPC.noarch 0.2020-14.el7 #base
perl-TermReadKey.x86_64 2.30-20.el7 #base
perl-Time-HiRes.x86_64 4:1.9725-3.el7 #base
$ yum remove rstudio-server-rhel-2022.02.3-492-x86_64
Loaded plugins: fastestmirror, langpacks
You need to be root to perform this command.
$ sudo yum remove rstudio-server-rhel-2022.02.3-492-x86_64
Loaded plugins: fastestmirror, langpacks
No Match for argument: rstudio-server-rhel-2022.02.3-492-x86_64
No Packages marked for removal
$
Am I missing something
Thanks in advance

I needed to run
sudo yum remove rstudio.x86_64

Related

MongoDB is not installed correctly in Ubuntu 18.04 server

Specs: Ubuntu 18.04 Nginx server, Vestacp control panel.
MongoDB was pre-installed in my server, in 3.6.3 version. It was working but I wanted to upgrade it to version 4.4 (current release).
The problem now is that I can't start the mongo service (community edition).
Steps I followed so far:
Stop MongoDB service, Remove packages and remove Data Directories.
sudo service mongod stop
sudo apt-get purge mongodb-org*
sudo rm -r /var/log/mongodb
sudo rm -r /var/lib/mongodb
Trying to install the new version 4.4 the exact steps from the documentation. Below are the commands with an order:
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
sudo apt-get install gnupg
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
sudo apt-get update
sudo apt-get install -y mongodb-org
echo "mongodb-org hold" | sudo dpkg --set-selections
echo "mongodb-org-server hold" | sudo dpkg --set-selections
echo "mongodb-org-shell hold" | sudo dpkg --set-selections
echo "mongodb-org-mongos hold" | sudo dpkg --set-selections
echo "mongodb-org-tools hold" | sudo dpkg --set-selections
ps --no-headers -o comm 1
sudo systemctl start mongod
sudo systemctl daemon-reload
sudo systemctl enable mongod
mongo
Errors:
sudo apt-get update
It throws an error:
Skipping acquire of configured file 'nginx/binary-i386/Packages' as repository 'http://nginx.org/packages/mainline/ubuntu bionic InRelease' doesn't support architecture 'i386'
On the step:
sudo apt-get install -y mongodb-org
E: Sub-process /usr/bin/dpkg returned an error code (1)
On the step:
sudo systemctl start mongod
Failed to start mongod.service: Unit mongod.service not found.
Directories:
/var/lib/mongodb
and
/var/log/mongodb
are not auto-created after the installation and I can't find them on the above paths.
The port I am trying to begin the server is the default 27017 and I set the rules to ufw.
I am tried to find a solution from similar posts but nothing. I'm stuck for two days now.
Any thought or help?
The problem was in uninstallation of previous MongoDB version 3.6.3.
The command in terminal...
sudo apt-get purge mongodb-org*
...Doesn't uninstall all the packages correctly.
The correct uninstallation was to type in the command line:
sudo apt list --installed | grep mongo
...In order to see if there are any packages left from MongoDB. I had 2 packages left that "purge mongodb-org*" couldn't delete.
So the correct removing executions are the below:
sudo apt remove mongodb
sudo apt purge mongodb
sudo apt autoremove
After that, the installation of the new MongoDB version 4.4 was successfully completed without errors!

check percona-xtrabackup installed?

I installed percona-xtrabackup on my OEL 7 but how to check whether its installed or not
[root#M1 ~]# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
[root#M1 ~]# su - mysql
[mysql] sudo yum install https://repo.percona.com/yum/percona-release-latest.noarch.rpm
[mysql] sudo percona-release enable-only tools release
[mysql] sudo yum install percona-xtrabackup-80
[mysql] rpm -qa | grep xtrabackup
percona-xtrabackup-80-8.0.7-1.el7.x86_64
You can use this command to check whether it's installed or not
[root#tester ~]# yum list installed | grep xtrabackup
if it's installed it will display like this :
[root#tester ~]# yum list installed | grep xtrabackup
percona-xtrabackup-24.x86_64 2.4.18-1.el6 #percona-release-x86_64
or you can just run the software with argument like this :
[root#tester ~]# xtrabackup --version
if it's installed it will display content like this :
xtrabackup version 2.4.18 based on MySQL server 5.7.26 Linux (x86_64) (revision id: 29b4ca5)

MongoDB installation on aws ec2 server

I am trying to install mongoDB on ec2 ubuntu server and following this link
https://optimalbi.com/blog/2017/09/14/how-to-install-mongodb-with-aws-ec2/
but it gives me this error
root#ip-172-31-9-20:~# sudo apt update
E: Malformed entry 1 in list file /etc/apt/sources.list.d/mongodb-org-3.4.list (Component)
E: The list of sources could not be read.
I tried
sudo sed -i -e '1d' /etc/apt/sources.list.d/mongodb-org-3.4.list
But then it gave the following error -
E: Type '“deb' is not known on line 1 in source list /etc/apt/sources.list.d/mongodb-org-3.6.list
E: The list of sources could not be read.
Any help would be appreciated.
If your ubuntu version is 18.04, you need to put a different syntax there. You need to delete the previous file.
echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
Then you can do sudo apt update

Not all pre-reqs install correctly for Hyperledger Composer

I've been following the Hyperledger Composer tutorial. I managed to install Ubuntu 16.04 on Hyper-V on my Windows 10 Enterprise. I then started on the following pre-req installation instructions:
https://hyperledger.github.io/composer/installing/installing-prereqs.html
I ran the prereqs-ubuntu.sh script. It ran fine with no errors. I examined the logs and saw that it had successfully installed npm 5.6.0, node 8.9.4, docker 17.12.x, docker composer 1.13.x, and Python 2.7.12.
However, when I run run $ sudo npm --version
it tells me that the npm command is not found
Same with $ sudo node --version
Not found...?!
Why would that be when the log clearly shows that npm and node where successfuly installed?!
Well, what I did and managed through:
--> install nodejs and npm:
sudo snap install node --classic --channel=8
so you get the latest node8.
--> then to solve "sudo" problem with node specify the npm prefix:
npm config set prefix ~/.node_modules
add the following to .bash_profile
export PATH=$HOME/.node_modules/bin:$PATH
Now the packages will install into your user directory and no permissions will be harmend.
--> install nvm (to get exactly node 8.9 version on the next step):
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
or
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
Verify:
node -v nvm
which should output 'nvm' if the installation was successful.
--> get and set node 8.9 version:
nvm install v8.9.0
nvm use 8.9.0
--> reset PATHs:
echo export PATH="$HOME/npm/bin:$PATH" >> ~/.bashrc
npm config set prefix ~/npm
echo "export NODE_PATH=$NODE_PATH:/home/$USER/npm/lib/node_modules" >> ~/.bashrc && source ~/.bashrc
--> at this stage the docker previous setup shall be destroyed:
docker kill $(docker ps -q)
docker rm $(docker ps -aq)
docker rmi $(docker images dev-* -q)
--> Installing the rest of prereqs:
sudo apt-add-repository -y ppa:git-core/ppa
sudo apt-get update
# install git
sudo apt-get install -y git
# Ensure that CA certificates are installed
sudo apt-get -y install apt-transport-https ca-certificates
# Add Docker repository key to APT keychain
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# Update package lists
sudo apt-get update
# Verifies APT is pulling from the correct Repository
sudo apt-cache policy docker-ce
# Install Docker
echo "# Installing Docker"
sudo apt-get -y install docker-ce
# Add user account to the docker group
sudo usermod -aG docker $(whoami)
# Install docker compose
echo "# Installing Docker-Compose"
sudo curl -L "https://github.com/docker/compose/releases/download/1.13.0/docker-compose-$(uname -s)-$(uname -m)" \
-o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
# Install unzip, required to install hyperledger fabric.
sudo apt-get -y install unzip
--> now you can install Fabric dev. env. (assuming the rest of prereq components stand available):
npm install -g composer-cli
etc.
I think you need to log out and close the shell. And then restart with the new session, as the shell stores your session.
Also, after installation, the use of sudo is not recommended as mentioned on IBM hyperledger website.

How to install mke2fs on centos?

I've tried both virtual box and docker to install centos, latest version, neither has "mke2fs" command. I then tried to use root and type:
yum install mke2fs*
Loaded plugins: fastestmirror, ovl
Setting up Install Process
Loading mirror speeds from cached hostfile
......
No package mke2fs* available.
Why is this? Is it inside another package name other than mke2fs?
You can use yum provides.
Provides=Find what package provides the given value
$ yum provides mke2fs
e2fsprogs-1.42.9-9.el7.x86_64 : Utilities for managing ext2, ext3, and ext4 filesystems
Repo : base
Matched from:
Filename : /usr/sbin/mke2fs
So I installed e2fsprogs (I did it in docker):
FROM centos:7
RUN yum -y update && \
yum -y install e2fsprogs
build it and started my container:
$ docker run -it my-centos bash
[root#1ef2a7d930cf /]# mke2fs
Usage: mke2fs [-c|-l filename] [-b block-size] [-C cluster-size]
[-i bytes-per-inode] [-I inode-size] [-J journal-options]
[-G flex-group-size] [-N number-of-inodes]
[-m reserved-blocks-percentage] [-o creator-os]
[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]
[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]
[-t fs-type] [-T usage-type ] [-U UUID] [-jnqvDFKSV] device [blocks-count]