GNU/Linux >> Linux Esercitazione >  >> Linux

Servizio del sistema operativo Linux "calamaro"

Squid è un proxy di memorizzazione nella cache per il Web che supporta HTTP, HTTPS, FTP e altro. Squid offre un ricco ambiente di controllo degli accessi, autorizzazione e registrazione per sviluppare proxy Web e applicazioni di content serving. Il server proxy Squid caching può anche essere configurato come proxy inverso per reindirizzare le connessioni http (Porta 80). Quando funge da proxy inverso, il contenuto memorizzato nella cache viene consegnato dal server proxy al client senza esporre l'origine del server Web o i dati sulla rete interna.

Il pacchetto RPM contenente questo servizio:squid

Controllo del servizio

Per ottenere il servizio squid, installa il pacchetto RPM squid usando yum.

# yum install squid

....
Dependencies Resolved

====================================================================================================================
 Package                                                 Arch                                   Version             
====================================================================================================================
Installing:
 squid                                                   x86_64                                 7:3.5.20-10.el7     
Installing for dependencies:
 libecap                                                 x86_64                                 1.0.0-1.el7         
 libtool-ltdl                                            x86_64                                 2.4.2-22.el7_3      
 perl-Compress-Raw-Bzip2                                 x86_64                                 2.061-3.el7         
 perl-Compress-Raw-Zlib                                  x86_64                                 1:2.061-4.el7       
 perl-DBI                                                x86_64                                 1.627-4.el7         
 perl-Data-Dumper                                        x86_64                                 2.145-3.el7         
 perl-Digest                                             noarch                                 1.17-245.el7        
 perl-Digest-MD5                                         x86_64                                 2.52-3.el7          
 perl-IO-Compress                                        noarch                                 2.061-2.el7         
 perl-Net-Daemon                                         noarch                                 0.48-5.el7          
 perl-PlRPC                                              noarch                                 0.2020-14.el7       
 squid-migration-script                                  x86_64                                 7:3.5.20-10.el7     

Transaction Summary
====================================================================================================================
Install  1 Package (+12 Dependent packages)

Total download size: 4.5 M
Installed size: 14 M
Is this ok [y/d/N]: 

Per gestire il servizio squid per futuri arresti e riavvii del sistema, utilizzare lo strumento chkconfig:

# chkconfig squid on
# chkconfig --list squid
squid           0:off   1:off   2:on    3:on    4:on    5:on    6:off
# chkconfig squid off

Per controllare immediatamente il servizio di calamari, utilizza lo strumento di servizio:

# service squid
Usage: /etc/init.d/squid {start|stop|status|reload|restart|condrestart}

Configurazione

Il file di configurazione per squid è /etc/squid/squid.conf :

# cat /etc/squid/squid.conf

#       WELCOME TO SQUID 2.6.STABLE6
#       ----------------------------
#
#       This is the default Squid configuration file. You may wish
#       to look at the Squid home page (http://www.squid-cache.org/)
#       for the FAQ and other documentation.
#
#       The default Squid config file shows what the defaults for
#       various options happen to be.  If you don't need to change the
#       default, you shouldn't uncomment the line.  Doing so may cause
#       run-time problems.  In some cases "none" refers to no default
#       setting at all, while in other cases it refers to a valid
#       option - the comments for that keyword indicate if this is the
#       case.
#


# NETWORK OPTIONS
# -----------------------------------------------------------------------------

#  TAG: http_port
#       Usage:  port [options]
#               hostname:port [options]
#               1.2.3.4:port [options]
http_port 80 # Port of Squid proxy
httpd_accel_host 10.10.1.110 # IP address of web server
httpd_accel_port 80 # Port of web server
httpd_accel_single_host on # Forward uncached requests to single host
httpd_accel_with_proxy on #
httpd_accel_uses_host_header off

Qui,
http_port 80 – La porta 80 è la porta su cui il server squid sarà in ascolto.
httpd_accel_single_host su – Questa opzione informa squid che tutte le richieste devono essere inviate a un unico host.
httpd_accel_host 10.10.1.110 – Questo indirizzo dovrebbe essere cambiato nell'indirizzo del server web.
httpd_accel_uses_host_header disattivato – Questa opzione dice a squid di non aggiungere intestazioni in stile proxy a nessun contenuto che verrà inviato al client.
httpd_accel_port 80 – Questo indirizzo è la porta su cui è in ascolto il server Web remoto.


Linux
  1. Servizio del sistema operativo Linux 'nfs'

  2. Servizio del sistema operativo Linux 'microcode_ctl'

  3. Servizio del sistema operativo Linux "NetFS"

  4. Servizio del sistema operativo Linux 'ldap'

  5. Servizio del sistema operativo Linux 'yppasswdd'

Servizio del sistema operativo Linux "hplip"

Sistema operativo Linux Servizio "smartd"

Servizio del sistema operativo Linux 'irqbalance'

Servizio del sistema operativo Linux 'rpcgssd'

Servizio del sistema operativo Linux 'yum-updatesd'

Servizio del sistema operativo Linux "acpid"