The beginning of the storyMany Internet companies, after going through the wild growth of 0-1, must have refined management; especially for their own users, you need to understand your users’ characteristics/needs/like a scumbag to know how to make them happy; only then will they follow you wholeheartedly. If it is for business users, the problem is very simple: visit different partner companies/industry leaders. Everyone has a purpose, and mutual benefit will become clear after a few visits. But for a user-oriented company like us, if we randomly sample users and invite them to the company to conduct questionnaire surveys, let alone a one-time survey, is the sampled user data representative? Are the questions raised by users the current development direction of the team? So my recent work is to add another layer to the original business analysis: user tags. Mark the user's behavior in your application, analyze user characteristics and usage habits Big data is needed in the middle process, so I choose to use docker to build the environment for my own test development. I encountered problems installing vim in the middle. Install vim and edit hadoop-hive.envInstall hive image using docker on centos 7 $ docker ps CONTAINER ID IMAGE COMMAND PORTS NAMES dc387ff5c56d bde2020/hive:2.1.0-postgresql-metastore "entrypoint.sh /bin/…" 0.0.0.0:10000->10000/tcp, 10002/tcp hive-server $ docker exec -it dc387ff5c56d /bin/bash # vim edit hadoop-hive.env /opt# vi hadoop-hive.env bash: vi: command not found # It is understandable that the image is pure, compile and install it./opt# yum install vim bash: yum: command not found /opt#rpm bash: rpm: command not found # curl is still reliable/opt# wget http://yum.baseurl.org/download/3.2/yum-3.2.28.tar.gz bash: wget: command not found /opt# rz bash: rz: command not found /opt# curl curl: try 'curl --help' or 'curl --manual' for more information /opt# curl -o yum-3.2.28.tar.gz http://yum.baseurl.org/download/3.2/yum-3.2.28.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 864k 100 864k 0 0 276k 0 0:00:03 0:00:03 --:--:-- 667k # You are too pure./opt# tar -zxvf yum-3.2.28.tar.gz /opt/yum-3.2.28# ls AUTHORS ChangeLog INSTALL PLUGINS TODO callback.py docs output.py rpmUtils test yum yum.spec yummain.py COPYING FAQ Makefile README bin cli.py etc po shell.py utils.py yum-updatesd.py yumcommands.py /opt/yum-3.2.28# make bash: make: command not found At this time~ bash: make: command not found Hmm? There is not even a make compilation command. Are containers so wild now? I was careless and didn't dodge. It turned out to be Debian.No, maybe the image is not for centos 7? # Check the Linux kernel version /opt/yum-3.2.28# cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 7 (wheezy)" NAME="Debian GNU/Linux" VERSION_ID="7" VERSION="7 (wheezy)" ID=debian ANSI_COLOR="1;31" HOME_URL="http://www.debian.org/" SUPPORT_URL="http://www.debian.org/support/" BUG_REPORT_URL="http://bugs.debian.org/" PRETTY_NAME="Debian GNU/Linux 7 (wheezy)" Oh my goodness, it's Debian. Let me check the apt-get installation command /opt/yum-3.2.28# apt-get install vim Reading package lists... Done Building dependency tree Reading state information... Done E: I know it's not that simple. Unable to locate package vim is usually because the apt-get source used by Debian in China needs to be bypassed. Just configure the domestic mirror. # Back up the original `apt-get` source file and reconfigure it/# mv /etc/apt/sources.list /etc/apt/sources.list.bak deb http://mirrors.163.com/debian/ jessie main non-free contrib /opt/yum-3.2.28# echo "deb http://mirrors.163.com/debian/ jessie main non-free contrib" >/etc/apt/sources.list /opt/yum-3.2.28# echo "deb http://mirrors.163.com/debian/ jessie-proposed-updates main non-free contrib" >>/etc/apt/sources.list /opt/yum-3.2.28# echo "deb-src http://mirrors.163.com/debian/ jessie main non-free contrib" >>/etc/apt/sources.list /opt/yum-3.2.28# echo "deb-src http://mirrors.163.com/debian/ jessie-proposed-updates main non-free contrib" >>/etc/apt/sources.list # Update apt-get, install vim /opt/yum-3.2.28# apt-get update /opt/yum-3.2.28# apt-get install vim Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libc6 vim-common vim-runtime Suggested packages: glibc-doc locales ctags vim-doc vim-scripts The following NEW packages will be installed: vim vim-common vim-runtime The following packages will be upgraded: libc6 1 upgraded, 3 newly installed, 0 to remove and 179 not upgraded. Need to get 10.8 MB of archives. After this operation, 29.6 MB of additional disk space will be used. Do you want to continue [Y/n]? Other methodsIn addition, if it is just a simple configuration file replacement. You can also edit the hadoop-hive.env configuration file on the host machine, docker cp hadoop-hive.env dc387ff5c56d:/opt and copy it to the specified folder of the container. SummarizeWhen installing a docker image, you need to pay attention to the system version kernel; if the version is wrong/the version number does not match the docker container, problems will occur This is the end of this article about solving the problem of installing vim in docker container. For more relevant content about installing vim in docker, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Use image to submit the form instead of using button to submit the form
>>: Detailed explanation of the top ten commonly used string functions in MySQL
Being an operation and maintenance engineer is a ...
Preface The <router-link> tag is a great to...
This article is just to commemorate those CSS que...
Recently, I found that after using the docker loa...
First check the kernel version you are using lin@...
Effect picture (the border color is too light, pu...
This article example shares the specific code of ...
1. Environmental preparation: Operating system: C...
1. Download, I take 8.0 as an example Download ad...
Table of contents Introduction Uses of closures C...
1. MySql Architecture Before introducing the stor...
1. Download the mysql repo source $ wget http://r...
Preface MySQL database lock is an important means...
Table of contents 1. Resources and Construction 1...
This reading note mainly records the operations r...