First, configure the software warehouse
1.yum Introduction
Installation and deployment mechanism based on RPM software package
automatically resolves dependencies for packages
Need to configure the Software warehouse first
2. Configure the Local software repository
A. Insert the Centos7.iso image file into the optical drive to make sure the power is turned on
B. Command operations
# Umount/dev/cdrom
# ls/mnt
# mount/dev/cdrom/mnt
# ls/mnt
# mkdir-p/repo/cos7dvd
# cp-rf/mnt/*/repo/cos7dvd
# du-sh/repo/cos7dvd/mnt
3. Client Configuration Yum File
# ls/etc/yum.repos.d/
# Mkdir/etc/yum.repos.d/oldrepo
# mv/etc/yum.repos.d/*.repo/etc/yum.repos.d/oldrepo/
# ls/etc/yum.repos.d/
# Yum-config-manager--add file:///repo/cos7dvd/
# ls/etc/yum.repos.d/
# vim/etc/yum.conf
...
8 gpgcheck=0//change 1 to 0 disable Gpgcheck test
...
4. Verification
# yum Clean all clear Yum Cache
# yum Repolist Verify the warehouse name, path, number of packages
II. Yum Management application
1. Querying packages
Basic usage
Format: Yum list [software name]. ..
eg
[email protected] ~]# Yum list Firefox httpd
2. Get the description of the package
Basic usage
Format: Yum info [software name]. ..
eg
[email protected] ~]# Yum info httpd
[email protected] ~]# Yum info Firefox
3. query files and commands by which package is generated
Basic usage
Format: Yum privides "*/program or file name". ..
eg
[email protected] ~]# Yum provides "*/vim" | More
Experiment:
A. Listing package names, version information
Check whether the software httpd, Firefox, RAR has been installed
[email protected] ~]# yum list Firefox httpd rar
B. Querying package description information
Understand the purpose of package kernel, bash
[email protected] ~]# Yum info kernel
[[email protected] ~]# Yum Info bash
Understand the purpose of package httpd, Wireshark
[email protected] ~]# Yum info httpd
[email protected] ~]# Yum info wireshark
C. 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 by 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] ~]# Yum 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
Iii. rapid deployment of the Web
1.Web Service Overview
Web server is a kind of web resource communication based on B/S architecture
B Browser
S Server
Web page: With html,htm,jsp,php,asp ... Wait for the end of the file
Web site: A collection of multiple web pages
Programmer (Dev): Development Web page/website (java,.net,python,php)
|
Test Engineer (QA)
|
Operations Engineer (OP): On-line (hosted to server)
Duty:
Installing a Linux Server
Configure the Web server
Deploy Web sites written by programmers to Web servers
Test
2. Quickly build a Web server site
A. Installing the package
[email protected] ~]# Yum repolist
[email protected] ~]# Yum list httpd
[Email protected] ~]# yum-y install httpd
[email protected] ~]# Yum list httpd
B. Create a new default home page
[Email protected] ~]# vim/var/www/html/index.html
This is a test Page!!!
[Email protected] ~]# cat/var/www/html/index.html
This is a test Page!!!
C. Start the service
[[email protected] ~]# systemctl start httpd//Start httpd service
[[email protected] ~]# systemctl enable httpd//Set httpd boot from
D. Testing
[[email protected] ~]# Firefox http://127.0.0.1/index.html actually access the server above the/var/www/html/index.html
Questions:
[Email protected] ~]# mkdir/var/www/html/day04/
[Email protected] ~]# vim/var/www/html/day04/test01.html
Test Page!!!
[Email protected] ~]# cat/var/www/html/day04/test01.html
Test 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.1
C:http://127.0.0.1/test01.html
D:http://127.0.0.1/day04/test01.html
Iv. Rapid deployment of FTP
1.FTP Service Overview
Based on C/s architecture
C Client
S Server
File Upload/Download service
2.ftp Account
Anonymous User: The default access is/VAR/FTP
Local User: The default access is/home/xxx
3. Quickly build an FTP server site
A. Installing the package
[email protected] ~]# Yum repolist
[email protected] ~]# Yum list vsftpd
[Email protected] ~]# yum-y install VSFTPD
[email protected] ~]# Yum list vsftpd
B. Modifying the master configuration file
[Email protected] ~]# Useradd vip2018
[Email protected] ~]# passwd vip2018
C. Start the server
[Email protected] ~]# systemctl start vsftpd
[Email protected] ~]# Systemctl enable VSFTPD
D. Testing
[[email protected] ~]# Firefox ftp://127.0.0.1 //default login is/var/ftp
[[email protected] ~]# Firefox ftp://[email protected]//Login to/home/vip2018
Add:
Windows real machine connection to Linux server
What is required to achieve this function?
1.Windows Real and Linux servers can communicate
The remote Login service (SSH) needs to be configured on the 2.Linux server
3. Need to provide authorization account and password on Linux server
A. Setting the network card for VMware virtual machines to Vmnet1
B. Set the IP of Win Vmnet1 to auto get (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] ~]# ifconfig
d. Ping Linux under Windows to ensure that you can ping the
Start/Run/cmd
Ping 192.168.199.2
Linux Daily notes 4