CentOS 7.0 installs Python3. X Script

Source: Internet
Author: User

1 #!/bin/sh2 3 #The first Linux script, too many do not understand the place, just according to the online example divert, can run normally4 #Operating Environment CentOS 7.0 version5 6 #The first line specifies the path to the program, and the line that begins with the # number is the comment line7 8 #edit this document in any text editor. Default is Gedit9 #save in the document file, assuming this file is named Test.shTen #Right-click the property to make it executable, or right-click the menu terminal chmod +x test.sh One #because the following command creates a folder that requires higher permissions, execute the command Su-can be manipulated under sudo permissions A #you can also directly, right-click-Terminal command: sudo./test.sh to run -  - #declaring variables, using the $ symbol before thehello="automatically upgrade Python to the new version, note the revision number to be manually modified" - Echo $hello -  -Ver='3.4.3' +Pathname="Python-${ver}" -Filename="${pathname}.tgz" +  A #Delete the original file, MO has the file will prompt, but does not affect the running atRm"${filename}" -  - #Download python3.4.3 installation package - #This type of variable replaces the single quotation mark, otherwise the variable is not recognized -Wget"http://www.python.org/ftp/python/${ver}/$Filename" -  in #Unpacking the installation package -Tar-zxvf"${filename}" to  + #go to unzip directory -Cd"${pathname}" the  * #Create the installation directory $Mkdir"/usr/local/${pathname}"Panax Notoginseng  - #Compiling the installation the./configure--prefix="/usr/local/${pathname}" +  A #Execution theMake && make install

CentOS 7.0 installs Python3. X Script

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.