vim download and configuration installation

vim installation (github download vim)

1. Download https://github.com/vim/vim
2. Upload to the Linux path (I use 10.238.14.142:/home/infa here)
3. Unzip: unzip vim-master.zip
4. Enter the directory: /home /infa/vim-master
5. Configure, compile and install (requires root authority, and you have the corresponding authority)
 ./configure --prefix=/usr/local/vim && make && make install
6. Check vim version
7, Modify the default vim, modify the original vim7.0 version to vim7, add a soft link to set the new vim8.0 as the default vim
which vim
cd /usr/bin/
mv vim vim7
ln -s /usr/local/vim/bin/ vim vim

remarks:
The installation of source code under Linux generally consists of 3 steps: configure (configure), compile (make), and install (make install). The specific installation method is usually given by the author. . Configure is an executable script with many options. Use the command ./configure –help to output a detailed list of options, as follows:
--prefix=PREFIX install architecture-independent files in PREFIX
                [/usr/local]

…….(A few omitted)


        A lot of options, I personally think, you can ignore everything else, but please add --prefix. Here is an example of installing supersparrow-0.0.0. We plan to install it to the directory /usr/local/supersparrow, so execute the script with options in the supersparrow-0.0.0 directory./configure --prefix=/usr/local/ Supersparrow, compile and install (make, make install) after the execution is successful; the directory supersparrow will be automatically generated after the installation is completed, and all the files of the software are copied to this directory. Why specify this installation directory? It is for the convenience of future maintenance. If this option is not used, after the installation process is over, the software required by the software will be copied to different system directories, and it is difficult to figure out which files are copied and where they are copied— Basically a mess.


        Another benefit of using the --prefix option is to uninstall or port software. When a certain installed software is no longer needed, simply delete the installation directory, and the software can be uninstalled cleanly; to migrate software, just copy the entire directory to another machine (same operating system).
A small option has such a convenient role, it is recommended to use it in actual work

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324736743&siteId=291194637