In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
# Today, I would like to briefly introduce the following yum source construction
# when introducing yum source building, you can think carefully about how we install software in windows, or how we install software on mobile phones that we love all day
# We usually install the software in windows, which is downloaded from the Internet to the local executable program with the file name of .exe, and then double-click to install it
We usually install software on a mobile phone by entering the mobile phone store, or entering the Anzhi market, and so on, and install it directly. The store where this kind of software is installed in the mobile phone is equivalent to a software warehouse, just like the yum source in linux.
We usually install software in linux, that is, we read the software in yum software warehouse. Linux software repository is full of rpm software packages, which is equal to .exe software programs in windows.
# Let me briefly introduce the following steps to build a yum source
1. Check whether there is a mount point before mounting the centeros image
Umount / dev/cdrom / / check whether there was a mount point before
two。 Mount the centeros image
Mount / dev/cdrom / mnt/ mnt most hardware devices are mounted to this directory
two。 Is to create a directory where you need to specify the Yum source.
Mkdir / opt/abc / / create a directory abc under the root opt
3. Copy the centeros image package to the yum source directory
Cp-rf / mnt/* / opt/abc/
The following figure shows: / opt/abc/ already has a packages package, and this package is the rpm package
# the figure below shows the size of this package
# above is the erection of server yum source
# configure the client below
# all configuration files are generally under / etc/
Rm-rf / etc/yum.repos.d/* / / in order not to affect the reading of yum, delete all files in the yum configuration file directory, or move them to another directory, as long as there are no .repo files
1. Modify and create a yum configuration file
Vim / etc/yum.repos.d/yum.repo / / create and modify yum configuration files
# as shown in the following figure
Briefly explain the configuration above
[yum] / / Software repository description information
Name=yum / / Warehouse ID
Path to the baseurl= file:///opt/abc/ yum source
Gpgcheck / / does not check when installing the software
# above means that the client has been configured, and the client can install the software below
# first of all, clear the yum cache.
Yum clean all
Yum repolist / / View the number of packages, paths, and verification of warehouse names
# yum list httpd / / check whether the httpd package has been installed
As shown in the following figure:
# the above illustration shows that the httpd package has been installed
# briefly introduce a few commands commonly used in linu
Which vim / / which usually means to find the path to the vim if it receives a command
# above shows that vim is under the root user/bin.
Yum provides / usr/bin/vim / / check the vim program, which software package is installed
As shown in the following figure:
# as can be seen from the diagram above, it is a vim program that is only available with the software vim-enhanced-7.4.160-1.el7.x86_64
# the following describes the construction of httpd
1. Install the httpd package
Yum-y install httpd
two。 Modify and create the system configuration file in / var/www/html/ by default
Vim / var/www/html/index.html
And then write the content into it.
3. Restart the service
Systemctl restart httpd / / restart the httpd service
Systemctl enabled httpd / / set self-boot
4. Verification and testing:
Firefox http://127.0.0.1
As shown in the following figure:
# it is said that the installation of the web server is successful
# next, create a virtual directory
Mkdir / var/www/html/day04/
# modify the main configuration file
Vim / var/wwwl/html/day04/test01.html
# Verification and testing:
Firefox http://127.0.0.1/day04/test01.html
As shown in the following figure:
# the above figure indicates that the name test is successful
# next, let's introduce the construction of ftp.
1. Install the vsftpd package
Yum-y install vsftpd
two。 Modify the configuration file in / var/ftp/pub/ by default
Vim / var/ftp/pub/a.txt / / create an a.txt document in the home directory
3. If you want to use user authentication when logging in, create a user and set the password
For example:
Useradd tedu
Echo 123456 > | passwd-- stdin tedu / / permanently change the password
Or use passwd tedu
Then a dialog box pops up and enters: 123456
4. Restart the service
Systemctl restart vsftpd / / restart the vsftpd service
Systemctl enabled vsftpd / / set self-boot
5. Verification and testing:
Anonymous login
Firefox ftp://127.0.0.1
As shown in the following figure:
# if you log in with a user, the default directory of the system is / home/tedu/ under the user's home directory
# vim / home/tedu/b.txt / / create a b.txt under the user's home directory
# now try to log in with a user
Verify:
Firefox ftp://tedu@127.0.0.1
As shown in the following figure:
# the above experiments show that the ftp server was created successfully
I'll write about it today.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.