vagrant command not running for magento setup - magento

How do I run a command in vagrant?
While using below commands for install magento setup:
vagrant#precise64:~/magento2$ sudo dnf install httpd
I get the following error:
sudo: dnf: command not found
So, how do I run a command in vagrant?

Try using apt for package installation on precise 64 box.
You can do sudo apt-get install apache2
To configure it, you can use vim/nano to modify:
/etc/apache2/apache2.conf
DNF Package manager is not available on hashicorp/Precise64 as it's not .rpm based.
From DNF WIKI:
DNF is a software package manager that installs, updates, and removes
packages on RPM-based Linux distributions

Related

In aws ec2, sudo: apt-get: command not found error

I have created an instance in amazon Linux. and I want to install python-dev. for this I was using
sudo apt-get install python-dev or any other package. but it throws me the command not found error.
instead of apt-get, I was used yum command but that is also not working.
I have created a flask application and I am using FileZilla and putty. I am running application (python files) using putty. I have install pycrypto but then also it is showing no module name. so somewhere I learned that I have install package python-dev. for that purpose I was using apt-get command.
Amazon linux is based on redhat distribution. So you should yum install [package name] instead of apt-get'. the commandapt-getcommand is used indebian` based distribution.
You can use yum search [package name] to search for packages by name.
hope this helps.

How to install Rabbitvcs on centos7?

I'm used to tortoise SVN. But after switching to centos 7 it is very difficult to use it without GUI. Please Help me install RabbitVCS instead.
The below instructions worked for me in May 2019. YMMV.
Install EPEL Release
export http_proxy=http://{proxyhost}:{port}
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install epel-release-latest-7.noarch.rpm
Install Pre-requisites
sudo yum install meld pysvn python-dulwich python-simplejson
Fetch RabbitVCS packages
export ftp_proxy=$http_proxy
wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/hmandevteam/CentOS_7/noarch/rabbitvcs-core-0.17.1-3.2.noarch.rpm
wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/hmandevteam/CentOS_7/noarch/rabbitvcs-cli-0.17.1-3.2.noarch.rpm
wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/hmandevteam/CentOS_7/noarch/python2-rabbitvcs-0.17.1-3.2.noarch.rpm
wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/hmandevteam/CentOS_7/noarch/rabbitvcs-nautilus-0.17.1-3.2.noarch.rpm
Install RabbitVCS packages
sudo yum install rabbitvcs-core-0.17.1-3.2.noarch.rpm
sudo yum install rabbitvcs-cli-0.17.1-3.2.noarch.rpm
sudo yum install python2-rabbitvcs-0.17.1-3.2.noarch.rpm
sudo yum install rabbitvcs-nautilus-0.17.1-3.2.noarch.rpm
Reboot
sudo reboot
Open File Manager and you can see RabbitVCS Menu
If the above rpm ftp locations become stale, goto http://rpm.pbone.net and search for the following packages with Centos 7 filter -
rabbitvcs-core
rabbitvcs-cli
python2-rabbitvcs
rabbitvcs-nautilus
You may find these packages at other locations too
NOTE: You may sometimes require these pre-requisite packages too pygtk, python-configobj, python-gobject, python-gtkspell, python-svn
I had same problem when working with centos7, ended up using thunar instead of nautilus. See stackexchange and github issue.
Update:
I have successfully build rabbitVCS following steps from the github.com and then copied the nautilus extension.

Installing moreutils on EC2 instance

How do I install moreutils on the default image Amazon EC2 instance? The instances are built off of CentOS but presumably have their own packages repo since
sudo yum install moreutils
fails with
No package moreutils available.
What is the yum repo I need to install moreutils?
The epel repo is on the default Amazon server but in not enabled by default. You can use it as follows:
sudo yum --enablerepo epel install moreutils
Note that epel has a very old version of moreutils (0.40 when 0.61 is out), which does not include chronic.
For update amazon linux, you can run following commands
sudo amazon-linux-extras install epel
sudo yum install moreutils
The EPEL repository has it, and other things. It works with Amazon Linux as well as CentOS, Fedora etc. (see http://fedoraproject.org/wiki/EPEL). To install the config that enables that repo, yum install epel-release.

Installation of Rstudio for ubuntu

I want to install Rstudio for ubuntu, so I used the link https://www.rstudio.com/products/rstudio/download/ after that I choosen RStudio 0.99.893 - Ubuntu 12.04+/Debian 8+ (64-bit) then I opened with Ubuntu software center. In that I clicked the install button I got error box like this,
Requires installation of untrusted packages
This requires installing packages from unauthenticated sources.
How to solve this problem?
The unauthenticated package required by RStudio is libjpeg62, so install the package separately and then install rstudio from software center
In the terminal run the following for installing libjpeg62
sudo apt-get install --allow-unauthenticated libjpeg62
Then go back to installing rstudio.
Note: you need to install r interpretor along with rstudio this you can do by following
sudo apt-get install r-base
# Install R and RStudio on Ubuntu 14.04
sudo apt-get update
sudo apt-get install r-base
sudo apt-get install r-base-dev
# Download and Install RStudio
sudo apt-get install gdebi-core
wget https://download1.rstudio.org/rstudio-1.0.44-amd64.deb
sudo gdebi rstudio-1.0.44-amd64.deb
Runs following commands :
In order to install RStudio on Ubuntu 18.04 we will first need to install the r-base package. Open up terminal and enter:
$ sudo apt update
$ sudo apt -y install r-base
To install DEB file on Ubuntu Linux is by using the gdebi command.
In case gdebi is not available on your system you can install it by executing the bellow command:
$ sudo apt install gdebi-core
All Package(builds) are available : in this link or link. You can select different package.
I had download and install : rstudio-xenial-1.1.463-amd64.deb build(package) from above in this link.
$ wget https://s3.amazonaws.com/rstudio-dailybuilds/rstudio-xenial-1.1.463-amd64.deb
$ sudo gdebi rstudio-xenial-1.1.463-amd64.deb
To Start R-Studdio from following command :
$ rstudio

How to install ansible on amazon aws?

Having trouble running Ansible on the latest version of amazon linux.
[root#ip-10-0-0-11 ec2-user]# yum install ansible --enablerepo=epel
[root#ip-10-0-0-11 ec2-user]# ansible-playbook
Traceback (most recent call last):
File "/usr/bin/ansible-playbook", line 44, in <module>
import ansible.playbook
ImportError: No module named ansible.playbook
Using AMI ID: ami-a10897d6.
Any ideas?
It appears that python library files do not have correct permissions by default. Running this fixed it for me.
[root#ip-10-0-0-11 ansible]# pip install ansible
Using pip (alone, not in conjunction with yum) is probably the best option right now on Amazon Linux. I'd suggest getting rid of the yum-installed copy if it's still there.
The RPM specs in epel and epel-testing (as of 1.9.2) currently handle only RHEL, Fedora, and SuSE, and the defaults are installing everything under Python 2.6, where the latest Amazon Linux has default Python 2.7. A bit of work will be required to get the RPM install working under Amazon Linux...
For Amazon Linux2 AMI:
sudo yum update
sudo yum install ansible
or
sudo amazon-linux-extras install ansible2
For Amazon Linux AMI:
sudo yum update
sudo yum install ansible --enablerepo=epel
For Ubuntu 18.04 AMI:
sudo apt-get update
sudo apt-get install ansible
Note: You can install ansible using "pip".
sudo yum install python-pip
sudo pip install ansible
Why not check out the source code from git and and checkout the latest stable version.
git clone git://github.com/ansible/ansible.git --recursive
$ cd ./ansible
$ source ./hacking/env-setup
git checkout <VERSION>
Just enable the below repo from the /etc/yum.repos.d/redhat-rhui.repo file by default is disabled.
rhui-REGION-rhel-server-extras/7Server/x86_64
This article says that you can use sudo amazon-linux-extras install ansible2 to install ansible on Amazon linux.
On Amazon Linux 2 to get the latest version of Ansible do not use yum (currently it won't give you 2.10.x), I recommend you use python3-pip.
sudo yum remove ansible
sudo yum install -y python3-pip
python3 -m pip install --user --upgrade pip # Do not run pip as sudo. Do this instead.
python3 -m pip install ansible
If you don't already have python3 you may need this step before the above:
sudo yum install -y python3.7
In my case, I needed ansible 2.10.x because it has the added benefit of requirements.yml files being able to install collections directly from git repositories.
This answer is based off of #M.Rajput's answer. I wanted to define the details so I wouldn't forget.
Warning: this was only tested on a RHEL 7.7 Community AMI (ami-029c0fbe456d58bd1).
# modify yum repo enabled
sudo vi /etc/yum.repos.d/redhat-rhui.repo
# find entry titled [rhui-rhel-7-server-rhui-extras-rpms]
# change "enabled=0" to "enabled=1"
# save and quit file (vim command is :wq)
sudo yum install ansible

Resources