Centos7 Yum source configuration, Web and FTP server mount

Source: Internet
Author: User
Tags create directory yum repolist

First, configure the Software warehouse 1.yum introduction The installation and deployment mechanism of the RPM package automatically resolves the dependencies of the packages by first configuring the Software Warehouse 2. Configure the local software warehouse a. Insert the Centos7.iso image file into the optical drive and make sure the power is on. B. command operation # umount/dev/ CDROM//Cancel Mount # LS/MNT//view directory/mnt# mount/dev/cdrom/mnt//Disc file mount to/mnt# ls/mnt//view directory/mnt# mkdir-p/REPO/COS7DVD//Create Directory/R epo/cos7dvd# cp-rf/mnt/*/repo/cos7dvd//Copy files to/repo/cos7dvd # Du-sh/repo/cos7dvd/mnt//Compare the file size of two directories 3. Client configuration yum file # ls/ etc/yum.repos.d///view. repo file in/etc/yum.repos.d/directory # Mkdir/etc/yum.repos.d/oldrepo//In/etc/yum.repos.d/ Directory creation Directory oldrepo# mv/etc/yum.repos.d/*.repo/etc/yum.repos.d/oldrepo///Put/etc/yum.repos.d/ Files with the suffix named. Repo are moved to the file Oldrepo # ls/etc/yum.repos.d///view/etc/yum.repos.d/directory # Yum-config-manager--add file:///repo/ cos7dvd///Create Yum source Warehouse File # ls/etc/yum.repos.d///view/etc/yum.repos.d/Directory # vim/etc/yum.conf//Enter etc/yum.conf file ... 8 gpgcheck=0//change 1 to 0 disable Gpgcheck test (turn off GPG verification) ... 4. Verify # Yum Clean all empty yum cache # Yum repolist Verify warehouse name, path, package number two, yum Management application 1. Query package Basic usage format: Yum list [software name]. .. Eg:[[email protected] ~]# Yum list Firefox httpd//query package Firefox and HTTPD2. Get packageDescription Information Basic usage format: Yum info [software name]. .. Eg:[[email protected] ~]# Yum info httpd//Get httpd detailed description [[email protected] ~]# yum info firefox//Get Firefox detailed description 3 . query files and commands by which package generates the basic usage format: Yum provides "*/program or file name". .. Eg:[[email protected] ~]# Yum provides "*/vim" | More//Query the creation package name of VIM in all directories experiment: A. List package name, version information check software httpd, Firefox, RAR is installed [[email protected] ~]# yum list Firefox httpd rarb. Query Package Description information about package kernel, bash usage [[email protected] ~]# yum info kernel[[email protected] ~]# Yum Info Bash understands the use of package httpd, Wireshark [[email protected] ~]# yum info httpd[[email protected] ~]# Yum Info WIRESHARKC. Query which packages can provide the specified program/file Query command program Vim is provided by which package [[email protected] ~]# which vim/usr/bin/vim[[email  Protected] ~]# Yum provides/usr/bin/vim query file/etc/redhat-release which package is provided [[email protected] ~]# yum provides/etc/ Redhat-release 4. Install/Uninstall application Software Installation: Basic usage format: yum [-y] install software name. .. Eg:[[email protected] ~]# yum list httpd[[email protected] ~]# yum-y install httpd[[email protected] ~]# Yum List httpd Delete: Basic usage format: yum [-y] Remove software name. .. Eg:[[email protected] ~]# yum list httpd[[email protected] ~]# yum-y remove httpd[[email protected] ~]# y Um list httpd Reinstall: Basic usage format: yum [-y] Reinstall software name. .. Eg:[[email protected] ~]# vim/etc/passwd[[email protected] ~]# which vim[[email protected] ~]# RM-RF/ Usr/bin/vim[[email protected] ~]# vim/etc/passwd[[email protected] ~]# yum provides/usr/bin/vim[[email  protected] ~]# yum list vim-enhanced[[email protected] ~]# yum-y Reinstall vim-enhanced[[email  Protected] ~]# VIM/ETC/PASSWD Three, rapid deployment Web1.web Service Overview Web server is a b/s architecture of Web resources Communication browser s Server Web page: to html,htm,jsp,php,asp ... End of File site: Collection of multiple Web pages programmer (DEV): Development Web/website (java,.net,python,php) | Test engineer (QA) | Operations Engineer (OP) : On-line (hosted to server) Responsibilities: Install a Linux server Configuration Web server deploy a Web site written by a programmer to a Web server Test 2. Quickly build a Web server site A. Install the package [[email protected] ~]# yum repolist[ [email protected] ~]# yum list httpd[[email protected] ~]# yum-y install httpd[[email protected] ~]# yum l Ist httpdb.New default Home Page [[email protected] ~]# vim/var/www/html/index.htmlthis is a test page!!! [[email protected] ~]# cat/var/www/html/index.htmlthis is a test Page!!! C. Start service [[email protected] ~]# systemctl start httpd//Start httpd service [[email protected] ~]# Systemctl enable httpd// Set httpd boot from Start d. test [[email protected] ~]# Firefox http://127.0.0.1/index.html actually accesses the/var/www/html/on the server index.html question: [[email protected] ~]# mkdir/var/www/html/day04/[[email protected] ~]# vim/var/www/html/ Day04/test01.htmltest Page!!! [[email protected] ~]# cat/var/www/html/day04/test01.htmltest Page!!! What can I enter on the browser to access test01.html??? A:http://127.0.0.1/var/www/html/day04/test01.html b:http://127.0.0.1c:http://127.0.0.1/test01.htmld:http:// 127.0.0.1/day04/test01.html Rapid Deployment Ftp1.ftp Service overview based on C/S architecture, client s server file upload/download service 2.ftp account anonymous User: Default access is/var/ftp Local User: Default access is/ Home/xxx3. Quickly build an FTP server site A. install package [[email protected] ~]# yum repolist[[email protected] ~]# Yum list vsftpd[[ Email protected] ~]# yum-y iNstall vsftpd[[email protected] ~]# yum list vsftpdb. Modifying the Master profile [[email protected] ~]# useradd vip2018[[email  protected] ~]# passwd vip2018c. Start server [[email protected] ~]# systemctl start vsftpd[[email protected] ~] # Systemctl enable VSFTPDD. Test [[email protected] ~]# Firefox ftp://127.0.0.1//default login is/var/ftp[[email  Protected] ~]# Firefox ftp://[email protected]//Login to/home/vip2018 add: What are the requirements for a Windows real-computer connection to a Linux server to implement this feature? Remote Login Service (SSH) 3 needs to be configured on a 2.Linux server that can communicate between a 1.Windows real machine and a Linux server. You need to provide the authorization account and password A on the Linux server. Set the network card for the VMware virtual machine to VMNET1B. Set the IP of the win Vmnet1 to auto get Mode (192.168.199.1) c. Set the IP for Linux to 192.168.199.0/ 24[[email protected] ~]# nmcli Connection modify eno16777736 ipv4.method manual ipv4.addresses 192.168.199.2/24 [[ Email protected] ~]# nmcli connection down eno16777736 [[email protected] ~]# nmcli connection up eno16777736 [[ Email protected] ~]# ifconfigd. Ping Linux under Windows Make sure you can ping the start/run/cmdping 192.168.199.2

Centos7 Yum Source configuration, Web and FTP server mounts

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.