Senin, 29 November 2010

Ubuntu remote install : Butuh proxy password

Dear Temans,
Jadi ingat pengalaman waktu install ftpd di server Ubuntu, nah karena biasanya kita langsung ke GUI servernya, jadi waktu perintah "apt-get install xx" kita eksekusi dan internet connection failed, maka biasanya kita akan pergi ke browser untuk "pura2 surfing" ke yahoo kek, google kek yang kemudian kita masukkan proxy server password.

Jadi bagi temen2 yang di system network-nya built in proxy authorization,
akan terbentur masalah pada saat kita install package melalui remote console (telnet / ssh). Nah, solusinya ternyata Ubuntu punya bawaan browser text base yang bisa di buka menggunakan telnet atau ssh remote. berikut yang kemarin kita bikin2:

$ ssh remoteaccount@myserver.com

atau

$ telnet remoteaccount@myserver.com

(Masukkan user dan login untuk remote server)

setelah tersambung melalui ssh / telnet

$ sudo su (Masukkan root password untuk install package authorization)


Misalnya saya mau install browser lynx,

# apt-get install lynx
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
lynx-cur
Suggested packages:
lynx-cur-wrapper
The following NEW packages will be installed:
lynx lynx-cur
0 upgraded, 2 newly installed, 0 to remove and 107 not upgraded.
Need to get 1,215kB of archives.
After this operation, 5,083kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
WARNING: The following packages cannot be authenticated!
lynx-cur lynx
Install these packages without verification [y/N]? y
Err http://dl2.foss-id.web.id karmic/main lynx-cur 2.8.7pre6-1
401 Unauthorized
Err http://dl2.foss-id.web.id karmic/main lynx 2.8.7pre6-1
401 Unauthorized
Failed to fetch http://dl2.foss-id.web.id/ubuntu/pool/main/l/lynx-cur/lynx-cur_2.8.7pre6-1_i386.deb 401 Unauthorized
Failed to fetch http://dl2.foss-id.web.id/ubuntu/pool/main/l/lynx-cur/lynx_2.8.7 pre6-1_all.deb 401 Unauthorized
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?


o ow.... error diatas dikarenakan kita belum fetching sambungan ke internet.

maka, harus connect ke internet dulu menggunakan W3M sbb:

# w3m www.yahoo.com (Maka terbukalah text based browser di komputer kita)

kemudian, w3m akan mencoba mengubungi saluran internet dan ... eng ing eng. dia tanya proxy authorization ke kita dulu.

Username for User Authentication: bagus_s
Password for User Authentication: **********

opening socket....
redirecting..... bla bla bla... (berarti dah nyambung deh internetnya)

kalo udah, kita tekan "q" jawab y (yes) untuk keluar dari w3m.

nah, silahkan di test lagi perintah

# apt-get install lynx
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
lynx-cur
Suggested packages:
lynx-cur-wrapper
The following NEW packages will be installed:
lynx lynx-cur
0 upgraded, 2 newly installed, 0 to remove and 107 not upgraded.
Need to get 1,215kB of archives.
After this operation, 5,083kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
WARNING: The following packages cannot be authenticated!
lynx-cur lynx
Install these packages without verification [y/N]? y
Get:1 http://dl2.foss-id.web.id karmic/main lynx-cur 2.8.7pre6-1 [1,200kB]
Get:2 http://dl2.foss-id.web.id karmic/main lynx 2.8.7pre6-1 [15.1kB]
Fetched 1,215kB in 22s (54.9kB/s)
Preconfiguring packages ...
Selecting previously deselected package lynx-cur.
(Reading database ... 121911 files and directories currently installed.)
Unpacking lynx-cur (from .../lynx-cur_2.8.7pre6-1_i386.deb) ...
Selecting previously deselected package lynx.
Unpacking lynx (from .../lynx_2.8.7pre6-1_all.deb) ...
Processing triggers for man-db ...
Processing triggers for doc-base ...
Processing 1 added doc-base file(s)...
Registering documents with scrollkeeper...
Setting up lynx-cur (2.8.7pre6-1) ...
update-alternatives: using /usr/bin/lynx.cur to provide /usr/bin/www-browser (ww
w-browser) in auto mode.
update-alternatives: using /usr/bin/lynx.cur to provide /usr/bin/lynx (lynx) in
auto mode.

Setting up lynx (2.8.7pre6-1) ...


SUKSES!!!

semoga bermanfaat.


Salam Linux is Halal
Saturnus