The local setup----of Yum source in Linux and the construction of Web and FTP server

Source: Internet
Author: User
Tags yum repolist

# today simple to introduce the following Yum source construction

#在介绍yum源搭建时, you can think about how we installed the software in Windows, or think about the phone we love all day, how to install the software

#我们一般在windows中安装软件, is downloaded from the Internet to the local, generally download the file name is an. exe executable program, and then double-click the installation

We usually install the software on the phone, is to enter the mobile phone store, or into the AZ market, and so many stores, direct installation, the phone installed in the software store is equivalent to a software warehouse, and Linux as a Yum source

We generally install software in Linux, that is, read the software in the Yum software repository, the Linux repositories are RPM packages, which equals the. exe software program in Windows.

# below I'll give you a simple introduction to the following Yum source construction steps

1. Before mounting the Centeros image, check if there is a mount point

Umount/dev/cdrom//See if there were any previous mount points

2. Mount the Centeros image

mount/dev/cdrom/mnt////MNT general hardware devices are attached to this directory

2. Create a directory that requires the specified Yum source

MKDIR/OPT/ABC//Create a directory ABC under the root opt

3. Copy the Centeros image package to the Yum source directory


As shown:/opt/abc/already has a packages package, which is the RPM package

# The following figure shows the size of this package


# Configure the client below

# All configured files are generally under/etc/

rm-rf/etc/yum.repos.d/*//In order to not affect Yum read, all files under the Yum profile directory are deleted, or moved to a different directory, as long as there is no. repo file is fine.

1. Modify and create a Yum configuration file

Vim/etc/yum.repos.d/yum.repo//Create and modify Yum configuration files



Simply explain the configuration above

[Yum]//Software Warehouse description information

Name=yum//Warehouse identification

baseurl=file:///opt/abc/Path to//yum source

Gpgcheck//Do not check when installing the software

# above indicates that the client is already configured, the following client can install the software

# first clear the Yum cache

Yum Clean All

Yum repolist//Check the number of packages, path, and validation of warehouse names

# Yum list httpd//See if the HTTPD package is already installed

As shown in the following:

# to show that the HTTPD package is already installed

# simply introduce the commands that are commonly used in the next few Linu

Which vim//which generally, if the command is followed, it means finding the path to this vim.

# The above instructions vim is under the root under the User/bin

Yum Provides/usr/bin/vim//view VIM this program, which package is installed

As shown in the following:

#从上面的图示可以看出是装了vim-enhanced-7.4.160-1.el7.x86_64 This software has the VIM program

# Below is an introduction to the construction of the next httpd

1. Installing the HTTPD Package

Yum-y Install httpd

2. Modify and create the system configuration file by default in/var/www/html/


Then write the contents to the inside

3. Restart the service

Systemctl Restart httpd//Restart HTTPD service

Systemctl enabled HTTPD//Set power-on self-start

4. Verification and testing:


As shown in the following:

# above say face Web server is set up to be successful

# Next Create a virtual directory


# Modify Master configuration file


# Validation and testing:


As shown in the following:

# to show that the name test was successful

# Next in the introduction of the FTP Setup

1. Installing the VSFTPD Package

Yum-y Install VSFTPD

2. Modify the configuration file by default in/var/ftp/pub/

Vim/var/ftp/pub/a.txt//Create a a.txt document for the home directory

3. Create a user and set a password if you want to authenticate with the user when you log in

For example:

Useradd tedu

echo 123456 > | passwd--stdin tedu//Permanent Change Password

or with passwd tedu.

Then pop up a dialog box to enter: 123456

4. Restart the service

Systemctl Restart VSFTPD//Restart VSFTPD service

Systemctl enabled VSFTPD//Set power-on self-start

5. Verification and testing:

Anonymous Login


As shown in the following:

# If the user is logged in, the system default directory is the user's home directory/home/tedu/

# Vim/home/tedu/b.txt//Create a b.txt for the user's home directory

# now try to log in with the user



Firefox Ftp://[email protected]

As shown in the following:

# The above experiment illustrates the successful creation of the FTP server


I wrote it first today.




The local setup----of Yum source in Linux and the construction of Web and FTP server

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: 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.