A, Cento 7 installation environment python3
1.python 3 Runtime Environment installation
centos 7 in the default installation python2 environment, but no python3, if we want to use python3 build environment, you need to install yourself.
Before installing python3, some need to install the library environment, this is very important, do not run python3 installation problems occur.
yum install gcc patch libffi-devel python-devel zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel -y
lrzsz package installation
lrzsz is linux in a kit for transfer files between windows and linux, need to install use, the package management tools installed by yum
Two commands:
-
rz (accept the file)
-
sz (Send file)
In Xshell If you want to transfer files from windows 7, there is a very quick way centos, drag the file directly to the terminal, you can.
2.python3 installation process
Download pyton source packages
URL: https: //www.python.org/downloads/release/python-362/
Download: https: //www.python.org/ftp/python/3.6.2/Python-3.6.2.tgz
Is decompressed by the decompress command downloaded by the above process directly onto the / opt / lower
Trilogy compilation
1.configure
This step is generally used to generate a Makefile, in preparation for the next compilation, you can add parameters to control the installation after configure, such as code:
./configure --prefix=/usr
The above means that the software is installed in / usr below, the executable file will be installed in / usr / bin (instead of the default / usr / local / bin), the resource file will be installed in / usr / share (instead of the default the / usr / local / share).
2make
This step is to compile the source code for most of the packages have been compiling this step (of course, some written in perl or python perl or python software needs to be called to compile).
If the error occurs in the make process, you have to write down the error code (note not just the last line), then you can submit a bugreport to the developer (generally submitted to the address in the INSTALL years), or your system less dependent on a number of libraries, which require careful study of their own error code.
The role of make is to start compiling the source code, and some offer features, these features provide related functions by his Makefile settings file, such as make install general representation of the installation, make uninstall is to uninstall, no arguments is the default location to source code compilation.
make a Linux development kit inside a control program for automated compilation, automated call him by compiling specifications by means of the Makefile written in gcc program, ld and run certain programs need to be compiled. In general, the Makefile control codes used by him, provided the script generated by the configure parameters and the given system environment.
3make install
This command to install (of course, some software you need to run make check or make test carried out some tests), this step generally requires you to have root privileges (because want to write to the file system)
Configuration python environment variables
After installing python3, we still can not be used directly in the cmd python3 anywhere, should not python3 in Linux environment variables.
Remember the role of environmental variables! Environment variable tells the operating system to find executable file path under which the file to go, go to the operating system will find the environment variables in there you execute a command or file, there is executed without error.