Friday, December 20, 2013

Menggunakan YUM dibelakang PROXY di CentOS

Walau trik ini sudah banyak yang tahu, namun saya hanya ingin meramaikan blog mengenai tutoriak/trik mengenai Linux. Bagi yang belum tahu atau sedang asyik-asyiknya bermain Linux berikut trik sederhananya yah.. :)

Konfigurasi 1 (cara pertama) 
Memasangkan proxy di dalam file /etc/yum.conf:

proxy=http://192.168.1.2:1
proxy_username=admin@rijalhanif.net
proxy_password=123password

Konfigurasi 2 (cara kedua)
Memasangkan proxy di variable environment

http_proxy="http://jaya@rijal.com:123456@192.168.1.187:8080"
export http_proxy

Wednesday, December 18, 2013

Ganti nama ethX di CentOS/RHEL

Adakalanya nama ethX anda berubah menjadi ethX dengan urutan yang tidak sesuai atau tidak bermula dari awal.

1. Buka file: /etc/udev/rules.d/70-persistent-net.rules

2. Ganti bagian eth, menjadi eth0 atau disesuaikan dengan keinginan Anda.

SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:50:56:b2:23:e0″, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″

3. Buka file: /etc/sysconfig/network-scripts/ifcfg-eth0
Atau jika tidak ada, rename dari konfigurasi sebelumnya, mungkin dari nama ifcfg-eth3

*Thanks, Semoga bermanfaat.


Tuesday, December 17, 2013

Auto Login User on Ubuntu (Tested 10.04)

Buat file di: /etc/gdm/custom.conf

Isikan dengan:

[daemon]
TimedLoginEnable=true
AutomaticLoginEnable=true
TimedLogin=monitor
AutomaticLogin=monitor
TimedLoginDelay=10
DefaultSession=gnome

Lalu.. restart Ubuntu anda:
# shutdown -r now

Friday, September 6, 2013

Install SquidGuard Manager 1.12 on Red Hat X86_64

Persiapan:
1. Download file http://www.sourceforge.net/projects/squidguardmgr/
2. Kopi filenya ke direktori /usr/local/src/

Compile:
[root@tester src]# tar xfvz squidguardmgr-1.12.tar.gz
[root@tester src]# cd squidguardmgr-1.12
[root@tester squidguardmgr-1.12]# perl -v

This is perl, v5.8.8 built for x86_64-linux-thread-multi

Copyright 1987-2006, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

[root@tester squidguardmgr-1.12]# perl Makefile.PL
Path to squidGuard configuration file? [] /usr/local/squidGuard/squidGuard.conf
Do you use c-icap SquidClamav v6.x services? [no] no
Path to squidclamav program? [off] off
What is the user (uid) running Squid or SquidGuard? [squid] squid
Writing Makefile for squidguardmgr
Done...

Now type 'make && make install'

[root@tester squidguardmgr-1.12]# make && make install
cc -o squid_wrapper/squid_wrapper squid_wrapper/squid_wrapper.c
sh install_all.sh

-----------------------------------------------------------------------------

1. Modify Apache httpd.conf to change the running uid and gid to squid user.
2. Modify your httpd.conf to allow access to CGI scripts like follow:

        Alias /squidguardmgr /var/www/squidguardmgr/
       
            Options +ExecCGI
            AddHandler cgi-script .cgi
            DirectoryIndex squidguardmgr.cgi
            Order deny,allow
            Deny from all
            Allow from 192.168.1.24
       

3. If necessary, set additional grants to Squidguard Manager in httpd.conf.
   Restart and ensure that httpd is running.
4. Browse to http://proxy.host.dom/squidguardmgr/ to ensure that things are
   working properly.
For more information, see http://squidguardmgr.darold.net/.
-----------------------------------------------------------------------------