Common ports management software commands

Source: Internet
Author: User

Common ports management software commands

① Install software

The following uses RPM installation as an example:

[Root @ bsd01 ~] # Cd/usr/ports/archivers/RPM

[Root @ bsd01/usr/ports/archivers/RPM] # make install clean

A large number of temporary files are generated during software installation. These temporary files are recommended to be retained, but sometimes, for example, when using the test server, you can clear the temporary files to save disk space. If you want to clear all temporary files in WWW, CD to/usr/ports/www. To clear all the temporary files, CD them to the/usr/ports root directory:

[Root @ bsd01 ~] # Cd/usr/Ports

[Root @ bsd01/usr/ports] # Make clean

Make clean only clears the temporary files, not the software packages in the folder. What is a temporary file? In fact, it mainly refers to some temporary files generated during the compilation process. In fact, it is also the work folder in the Software Directory. Executing make clean will delete the work folder in the current software directory.

What should I do if I want to delete the software packages in the folder?

[Root @ bsd01 ~] # Cd/usr/ports/www/apache22

[Root @ bsd01/usr/ports/www/apache22] # Make distclean

Make distclean not only clears the software package, but also contains the effect of the make clean command. This will clear the package of apache22 and the work folder in the directory of apache22.

Similarly, if you want to clear all the software packages and temporary files in WWW, CD them to/usr/ports/www. If you want to clear all the packages and temporary files, CD to the ports root directory.

② Uninstall software

Run make deinstall to uninstall the software:

[Root @ bsd01 ~] # Cd/usr/ports/www/apache22

[Root @ bsd01/usr/ports/www/apache22] # Make deinstall

③ Query the software installed with available ports

I always thought, is it good or bad for FreeBSD ports to directly occupy resource space in the system to form a tree directory? If you can query this point, it would be better than apt-Get. When you used apt-get to install software, if you encountered some software that was slightly nonstandard, it is hard to know the name. You often use regular expressions to test what the software name is.

Currently, FreeBSD can directly query available software in the ports tree directory.

[Root @ bsd01 ~] # Cd/usr/Ports

[Root @ bsd01/usr/ports] # Make search key = Apache

However, this can be found out in a lot of ways, but we have noticed that there is a detail: the two keywords port and path, one representing the name and the other representing the path, we can improve + Filtering:

[Root @ bsd01/usr/ports] # Make search key = ^ APACHE-2 | grep-e "port: | path: | info :"

Port: apache-2.0.61_2

Path:/usr/ports/www/apache20

Info: Version 2 of Apache Web Server with prefork MPM.

Port: apache-2.1.9_7

Path:/usr/ports/www/apache21

Info: Version 2.1 of Apache Web Server with prefork MPM.

Port: apache-2.2.6_2

Path:/usr/ports/www/apache22

Info: Version 2.2 of Apache Web Server with prefork MPM.

④ Query installed software

In Linux, how does one use "rpm-Qa | grep Samba" to check whether a software is installed? (Samba is used as an example here). Ports uses "pkg_info ":

[Root @ bsd01 ~] # Pkg_info | grep samba

Samba-3.0.32_1, 1 a free SMB and CIFS client and server for Unix

Samba-libsmbclient-3.0.28 shared libs from the Samba package

[Root @ bsd01 ~] # Pkg_info | grep NFS

Related Article

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.