CentOS configuration data Source and Java environment configuration

Source: Internet
Author: User
Tags gpg

---restore content starts---

A: Preface

Today sent away a colleague, watching others go to remind me of the heart ah, but I know, I can not so capricious, I am men, these days of rare leisure, so I get a Linux, yesterday the network to match, today configure the data source to download Jdk,tomcat and other software, Step-by-step. Go!

Two: Configuration of the data source

The location of the configuration data source is in "/etc/yum.repos.d", so we use CD/ETC/YUM.REPOS.D to enter this directory, with the LS command can be seen as follows:

Among them, Centos-base.repo is the data source that needs to be configured, we re-operate the Linux file is usually first back up, so you can see I have a backup file "Centos-base.repo.bak",

Remove the contents and add the following configuration:

# centos-base.repo## The mirror system uses the connecting IP address of the client and the# update status of each mirror to Pi  CK mirrors that is updated to and# geographically close to the client. Should use This  forCentOS updates# Unless you is manually picking other mirrors.## If the mirrorlist= Does not work forYou, as a fall back canTrythe# remarked out BaseURL=Line Instead.##[base]name=centos-$releasever-base-163. Combaseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/#mirrorlist =http://mirrorlist.centos.org/?release= $releasever &arch= $basearch &repo=osGpgcheck=1Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6#released Updates[updates]name=centos-$releasever-updates-163. Combaseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/#mirrorlist =http://mirrorlist.centos.org/?release= $releasever &arch= $basearch &repo=updatesGpgcheck=1Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6#additional Packages that could be useful[extras]name=centos-$releasever-extras-163. Combaseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/#mirrorlist =http://mirrorlist.centos.org/?release= $releasever &arch= $basearch &repo=extrasGpgcheck=1Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6#additional packages that extend functionality of existing Packages[centosplus]name=centos-$releasever-plus-163. Combaseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/#mirrorlist =http://mirrorlist.centos.org/?release= $releasever &arch= $basearch &repo=centosplusGpgcheck=1enabled=0Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6#contrib-packages by Centos Users[contrib]name=centos-$releasever-contrib-163. Combaseurl=http://mirrors.163.com/centos/$releasever/contrib/$basearch/#mirrorlist =http://mirrorlist.centos.org/?release= $releasever &arch= $basearch &repo=contribGpgcheck=1enabled=0Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6

After configuring these, you can download the JDK and Tomcat.

Use the following command

wget http://download.oracle.com/otn-pub/java/jdk/7u75-b13/jdk-7u75-linux-x64.tar.gz? authparam=1422600482_6166cf9e13056ea25feb3b0057ba49c3-------Download JDK

Find Tomcat's download path on Apache's official website to download Tomcat,

Three: Installation command

I use the SECURECRT to connect the virtual machine, so I need to install the RZ command, not install

(1)rz命令安装: yum install-y lrzsz用yum命令直接进行安装。我是在网上搜了下,看见有先下载在进行安装的,wget http://www.ohse.de/uwe/releases/lrzsz.tar.gz

(2) Tar zxvf jdk-7u75-linux-x64.tar.gz decompression After my decompression directory is/usr/local/soft below, so configure the following

It is configured to execute this command: Source/etc/profile, so that it takes effect immediately, when Java or java-version is executed to see

Four: summary

Today finally out of the first step, the Java environment and data source to configure the good, feel very good, and strive to continue, colleagues at noon, and suddenly less a person, feel as if very how, the world does not leave the feast Ah, this road is really need to be firm AH. Go!

CentOS configuration data Source and Java environment configuration

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.