http://oahoa.blogspot.com/2015/02/konfigurasi-squid.html
http://oahoa.blogspot.com/2015/02/instalasi-squid.html
http://oahoa.blogspot.com/2015/02/hierarki-squid.html
Squid
Setelah membuat konfigurasi Squid lewat file squid.conf, selanjutnya kita harus menstart squid agar server itu dapat berjalan dengan baik. Proses squid sebaiknya dijalankan oleh user squid dan bukan oleh root demi keamanan.
- To run Squid server in httpd-accelerator mode, the following files are required and must be created or copied to the appropriate directories on your server.
Copy the squid.conf file in the /etc/squid/ directory.
Copy the squid script file in the /etc/rc.d/init.d/ directory.
Copy the squid file in the /etc/logrotate.d/ directory.
- To run Squid server in proxy-caching mode, the following files are required and must be created or copied to the appropriate directories on your server.
Copy the squid script file in the /etc/rc.d/init.d/ directory.
Copy the squid file in the /etc/logrotate.d/ directory.
Create the squid script file (touch /etc/rc.d/init.d/squid) and add:
- #!/bin/bash
- # squid This shell script takes care of starting and stopping
- # Squid Internet Object Cache
- # chkconfig: - 90 25
- # description: Squid - Internet Object Cache. Internet object caching is \
- # a way to store requested Internet objects (i.e., data available \
- # via the HTTP, FTP, and gopher protocols) on a system closer to the \
- # requesting site than to the source. Web browsers can then use the \
- # local Squid cache as a proxy HTTP server, reducing access time as \
- # well as bandwidth consumption.
- # pidfile: /var/run/squid.pid
- # config: /etc/squid/squid.conf
# squid z
Perintah ini akan membuat direktori cache sebanyak dan sedalam yang telah
dideklarasikan pada file squid.conf. Lalu jalankan program squid :
# /usr/loacl/squid/bin/squid sY &
Perhatikan pesan yang muncul pada console, dan perhatikan juga file
/usr/local/squid/log/cache.log barangkali terjadi suatu kegagalan atau error.
Agar saat sistem direboot program Squid akan langsung berjalan secara
otomatis, tambahkan baris berikut ini pada file /etc/rc.d/rc.local/ :
# pico /etc/rc.d/rc.local
Tambahlah baris-baris berikut ini : /usr/local/squid/bin/squid sY &
No comments:
Post a Comment