1. List all software updates
Command: Yum check-Update
2. Install all Update Software
Command: Yum update
3. Only install the specified Software
Command: Yum install <package_name>
4. Update only the specified Software
Command: Yum update <package_name>
5. list all the software that can be installed
Command: Yum list
Use Yum to install and delete Software
It is common to install the system to add and delete software. Yum is also competent for this task, as long as the software is installed by rpm.
The installation command is: Yum install XXX. Yum queries the database to check whether this software package exists. If yes, check its dependency conflict. If no dependency conflict exists, download and install it; if yes, you will receive a prompt asking if you want to install dependencies at the same time or delete conflicting packages. You can make your own judgment.
The DELETE command is yum remove XXX. Like the installation command, yum also queries the database and provides a prompt to solve the dependency.
1. install the software package with yum
Command: Yum install <package_name>
2. Use Yum to delete a software package
Command: Yum remove <package_name>
Use Yum to query Software Information
We often encounter such a situation. To install a software, we only know that it has something to do with it, but we cannot know its name exactly. In this case, the yum query function takes effect. You can use commands such as Yum search keyword to search. For example, if you want to install instant messenger, but you don't know what it is, you can use commands such as Yum search messenger to search, yum searches for all available RPM descriptions and lists all RPM packages related to messeger in the descriptions. We may obtain GAIM, kopete, and so on, and select from them.
Sometimes we install a package without knowing its purpose. We can use the yum info packagename command to obtain information.
1. Use Yum to find the Software Package
Command: Yum search <keyword>
2. List all installable software packages
Command: Yum list
3. list all updatable software packages
Command: Yum list updates
4. list all installed software packages
Command: Yum List Installed
5. list all software packages installed but not in Yum Repository
Command: Yum list extras
6. List the specified software packages
Command: Yum list <package_name>
7. Use Yum to obtain the software package information
Command: Yum info <package_name>
8. list information about all software packages
Command: Yum info
9. list information of all updatable software packages
Command: Yum info updates
10. list information about all installed software packages
Command: Yum info installed
11. list information about all software packages installed but not in Yum Repository
Command: Yum info extras
12. List the files provided by the Software Package
Command: Yum provides <package_name>
Clear Yum Cache
Yum stores the downloaded software package and header in the cache, but does not automatically delete it. If we think they occupy disk space, we can use the yum clean command to clear them. More accurately, we use Yum clean headers to clear the header and Yum clean packages to clear the downloaded RPM package, yum clean all is a brain
1. Clear the software packages under the cache directory (/var/Cache/YUM)
Command: Yum clean packages
2. Clear headers under the cache directory (/var/Cache/YUM)
Command: Yum clean Headers
3. Clear the old headers under the cache directory (/var/Cache/YUM)
Command: Yum clean oldheaders
4. Clear the software packages and old headers in the cache directory (/var/Cache/YUM ).
Command: Yum clean, yum clean all (= Yum clean packages; YUM clean oldheaders)
Install vsftpd in yum
1. Yum-y install vsftpd (automatic Yum installation );
2. Modify vsftpd Configuration:
In the/etc/vsftpd. conf file, modify the default configuration, including the listening address and port, whether to enable the TCP and psav modes, etc.
3. Start the vsftpd service:
Run service vsftpd start, or run/etc/init. d/vsftpd start.
Note:
Create an anonymous user root directory: anon_root =/var/FTP/
Upload files by anonymous users:
Write_enable = Yes
Anon_world_readable_only = No
Anon_upload_enable = Yes
Anon_mkdir_write_enable = Yes
Anon_other_write_enable = Yes
Create a directory for anonymous users to upload files and Set permissions:
# Mkdir/var/FTP/incoming
# Chmod o + w/var/FTP/incoming
File_open_mode = 0777 # Set this value to 0777 if the file to be uploaded can be executed. The default value is 0666.
Restrict users to their directories
1. restrict all local users to their directories
Chroot_local_user = Yes
2. restrict some local users to their directories
Chroot_local_user = No
Chroot_list_enable = Yes
Chroot_list_file =/etc/vsftpd. chroot_list
Add the local user name to be restricted to the/etc/vsftpd. chroot_list file. Pay attention to one username row.
Log Settings:
Xferlog_enable = Yes | No
Xferlog_file =
This option sets the file name for recording the transfer log. The default value is/var/log/vsftpd. log.
You can use setup to choose to run automatically upon startup.
Garbled characters occur when Windows users access the server.
Windows Access vsftp garbled because Windows default encoding is gb2312, Linux uses UTF-8 encoding, so the upload file will have a garbled code, then you can modify the/etc/sysconfig/i18n file, change the second line to this: lang = "zh_cn.gb2312 ".
Vsftp (2) allows virtual accounts to use different home directories with full Permissions
(From http://blog.chinaunix.net/u1/42928/showart_334305.html)
Home Directory of virtual_user:/home/ftp
Add in vsftpd. conf
Guest_username = virtual_user
User_config_dir =/etc/vsftpd_user_config
User_sub_token = $ user
In the/etc/vsftpd_user_config directory, create a configuration file for each user. The file name is the same as the user name, and the content must contain
Local_root =/home/FTP/$ user
Let the virtual account use different home directories with full permissions. Enter the following code in vsftpd. conf: anonymous_enable = No
Local_enable = Yes
Write_enable = Yes
Local_umask = 022
Anon_upload_enable = Yes
Anon_mkdir_write_enable = Yes
Anon_other_write_enable = Yes
Dirmessage_enable = Yes
Xferlog_enable = Yes
Connect_from_port_20 = Yes
Xferlog_std_format = Yes
Pam_service_name = vsftpd
Userlist_enable = Yes
One_process_model = No
Anon_world_readable_only = No
Guest_enable = Yes
Guest_username = nihao
Listen = Yes
Tcp_wrappers = Yes
User_config_dir =/etc/vsftpd_user_config
User_sub_token = $ user
============================================
Create Database Files
Db_load-T-t hash-F/etc/vsftpd/logins.txt/etc/vsftpd/vsftpd_login.db
And set permissions
Chmod 600/etc/vsftpd/vsftpd_login.db
Create a database Pam File
VI vsftpd. Pam contains the following content:
Auth required/lib/security/pam_userdb.so DB =/etc/vsftpd/vsftpd_login
Account required/lib/security/pam_userdb.so DB =/etc/vsftpd/vsftpd_login
And copy it to/etc/PAM. D.
CP vsftpd. PAM/etc/PAM. d
Set the root directory of a virtual user
Useradd-D/home/FTP VFTP
Restrict personal user directories:
User_config_dir =/etc/vsftpd/vsftpd_user_conf
Create a file in this directory with the same name as a specific virtual user
Add the following to the user file:
Local_root =/home/test
You can set the user's directory.
And enable relevant permissions as needed
Anon_world_readable_only = No
Write_enable = Yes
Anon_upload_enable = Yes
Anon_other_write_enable = Yes
Anon_umask =
Umask value of the newly added file for anonymous users. The default value is 077.
VI vsftpd. conf
Anonymous_enable = No
Local_enable = Yes
Local_umask = 022
Anon_umask = 022
Write_enable = No
Anon_upload_enable = No
Anon_mkdir_write_enable = No
Anon_other_write_enable = No
Chroot_local_user = Yes
Guest_enable = Yes
Guest_username = VFTP
Listen = Yes
Pam_service_name = vsftpd. Pam
User_config_dir =/www/servers/vsftpdv/user
Pasv_enable = Yes
Pasv_min_port = 10240
Pasvanderbilt max_port = 10250
Userlist_enable = Yes
Userlist_deny = Yes
Userlist_file =/etc/vsftpd. denyuser