Edit the file /etc/wgetrc
in that file find the section that has these settings, un comment them and set to your proxy settings.
http_proxy = http://yourproxyserver:port/
ftp_proxy = http://yourproxyserver:port/
use_proxy = on
now you can use wget through your proxy
also if you need to authenticate you can use these with the wget command
wget --proxy-user=.. --proxy-passwd=..
Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts
Wednesday, January 27, 2010
vi commands
I can never remember them all. here's a vi cheat sheet I found to help me remember them. :D
Window motions
<ctrl>d -- Scroll down (half a screen)
<ctrl>-- Scroll up (half a screen)
<ctrl>f -- Page forward
<ctrl>b -- Page backward
/string -- Search forward
?string -- Search backward
n -- Repeat search
N -- Repeat search reverse
G -- Go to last line
nG -- Go to line n :n -- Go to line n
<ctrl>l -- Redraw screen
<ctrl>g -- File information
--------------------------------------------------------------------------------
Cursor motions
H -- Upper left corner (home)
M -- Middle line
L -- Lower left corner
h -- Back a character
j -- Down a line
k -- Up a line
^ -- Beginning of line
$ -- End of line
l -- Forward a character
w -- Forward one word
b -- Back one word
fc -- Find c
; -- Repeat find (find next c)
--------------------------------------------------------------------------------
Input commands (end with ESC)
a -- Append after cursor
i -- Insert before cursor
o -- Open line below
O -- Open line above
:r file -- Insert file after current line
--------------------------------------------------------------------------------
Changes during insert mode
<ctrl>h -- Back one character
<ctrl>w -- Back one word
<crtl>u -- Back to beginning of insert
--------------------------------------------------------------------------------
Move text from file old to file new
vi old "a10yy -- Yank 10 lines to buffer a
:w -- Write work buffer
:enew -- Edit new file
"ap -- Put text from a after cursor
--------------------------------------------------------------------------------
Delete Commands
dd -- Delete line
ndd -- Delete n lines to general buffer
dw -- Delete word to general buffer
ndw -- Delete n words
d) -- Delete to end of sentence
db -- Delete previous word
D -- Delete to end of line
x -- Delete character
--------------------------------------------------------------------------------
Recovering deletions
p -- Put general buffer after cursor
P -- Put general buffer before cursor
--------------------------------------------------------------------------------
Change Commands
s -- Substitute (ESC) - 1 char with string
cw -- Change word (ESC)
cc -- Change line (ESC) - blanks line
c$ -- Change to end of line
rc -- Replace character with c
R -- Replace (ESC) - typeover
. -- Repeat last change
--------------------------------------------------------------------------------
Undo Commands
u -- Undo last change
U -- Undo all changes on line
--------------------------------------------------------------------------------
Rearrangement Commands
yy or Y -- Yank (copy) line to general buffer
"z6yy -- Yank 6 lines to buffer z
yw -- Yank word to general buffer
"a9dd -- Delete 9 lines to buffer a
"A9dd -- Delete 9 lines; append to buffer a
"ap -- Put text from buffer a after cursor
p -- Put general buffer after cursor
P -- Put general buffer before cursor
J -- Join lines
--------------------------------------------------------------------------------
File management commands
:w name -- Write edit buffer to file name
:wq -- Write to file and quit
:q! -- Quit without saving changes
ZZ -- Same as :wq
:sh -- Execute shell commands (<ctrl>d)
--------------------------------------------------------------------------------
Parameters
:set list -- Show invisible characters
:set nolist -- Don't show invisible characters
:set number -- Show line numbers
:set nonumber -- Don't show line numbers
Window motions
<ctrl>d -- Scroll down (half a screen)
<ctrl>-- Scroll up (half a screen)
<ctrl>f -- Page forward
<ctrl>b -- Page backward
/string -- Search forward
?string -- Search backward
n -- Repeat search
N -- Repeat search reverse
G -- Go to last line
nG -- Go to line n :n -- Go to line n
<ctrl>l -- Redraw screen
<ctrl>g -- File information
--------------------------------------------------------------------------------
Cursor motions
H -- Upper left corner (home)
M -- Middle line
L -- Lower left corner
h -- Back a character
j -- Down a line
k -- Up a line
^ -- Beginning of line
$ -- End of line
l -- Forward a character
w -- Forward one word
b -- Back one word
fc -- Find c
; -- Repeat find (find next c)
--------------------------------------------------------------------------------
Input commands (end with ESC)
a -- Append after cursor
i -- Insert before cursor
o -- Open line below
O -- Open line above
:r file -- Insert file after current line
--------------------------------------------------------------------------------
Changes during insert mode
<ctrl>h -- Back one character
<ctrl>w -- Back one word
<crtl>u -- Back to beginning of insert
--------------------------------------------------------------------------------
Move text from file old to file new
vi old "a10yy -- Yank 10 lines to buffer a
:w -- Write work buffer
:enew -- Edit new file
"ap -- Put text from a after cursor
--------------------------------------------------------------------------------
Delete Commands
dd -- Delete line
ndd -- Delete n lines to general buffer
dw -- Delete word to general buffer
ndw -- Delete n words
d) -- Delete to end of sentence
db -- Delete previous word
D -- Delete to end of line
x -- Delete character
--------------------------------------------------------------------------------
Recovering deletions
p -- Put general buffer after cursor
P -- Put general buffer before cursor
--------------------------------------------------------------------------------
Change Commands
s -- Substitute (ESC) - 1 char with string
cw -- Change word (ESC)
cc -- Change line (ESC) - blanks line
c$ -- Change to end of line
rc -- Replace character with c
R -- Replace (ESC) - typeover
. -- Repeat last change
--------------------------------------------------------------------------------
Undo Commands
u -- Undo last change
U -- Undo all changes on line
--------------------------------------------------------------------------------
Rearrangement Commands
yy or Y -- Yank (copy) line to general buffer
"z6yy -- Yank 6 lines to buffer z
yw -- Yank word to general buffer
"a9dd -- Delete 9 lines to buffer a
"A9dd -- Delete 9 lines; append to buffer a
"ap -- Put text from buffer a after cursor
p -- Put general buffer after cursor
P -- Put general buffer before cursor
J -- Join lines
--------------------------------------------------------------------------------
File management commands
:w name -- Write edit buffer to file name
:wq -- Write to file and quit
:q! -- Quit without saving changes
ZZ -- Same as :wq
:sh -- Execute shell commands (<ctrl>d)
--------------------------------------------------------------------------------
Parameters
:set list -- Show invisible characters
:set nolist -- Don't show invisible characters
:set number -- Show line numbers
:set nonumber -- Don't show line numbers
Tuesday, January 26, 2010
change ubuntu root password
Easier way is to just run the following at the shell..
sudo su
****will ask for the current users passsword
passwd
****follow prompts to pick a password
sudo su
****will ask for the current users passsword
passwd
****follow prompts to pick a password
Tuesday, January 12, 2010
ERROR: Net::LDAP module not installed
Running Debian, I had to run the following command to get the correct package.
apt-get install libnet-ldap-perl
apt-get install libnet-ldap-perl
Tuesday, December 22, 2009
Debian apache2 php5 mysql with nagios and open-audit
ok I threw this box together this morning and to get everything working all together I had to add a few packages. Here is the break down on what got installed.
apt-get install apache2 - if you don't already have it
apt-get install openssh-server
apt-get install build-essential mc vim ntpdate smbfs
apt-get install nagios3
apt-get install libsnmp-perl libsnmp-session-perl
a quick fix after that was
chmod -R g+s /etc/nagios3
dpkg-statoverride --update --add nagios www-data 2710 /var/lib/nagios3/rw
dpkg-statoverride --update --add nagios nagios 751 /var/lib/nagios3
that was enough to get nagios up.. Next php and mysql
apt-get install php5 mysql-server-5.0 mysql-client-5.0 libapache2-mod-php5 php5-mysql php5-curl php5-cli php5-dev make gcc libc6-dev automake
apt-get install libapache2-mod-perl2 php5-common php5-dev php5-gd php5-imap php5-ldap php5-mhash php5-odbc
from there I copied over openaudit to my /var/www directory
/etc/init.d/apache2 restart
pointed browser to http://serveraddress/openaudit/setup.php
I think that is it. hope I didnt miss anything. Of course you have to do some configuration now
apt-get install apache2 - if you don't already have it
apt-get install openssh-server
apt-get install build-essential mc vim ntpdate smbfs
apt-get install nagios3
apt-get install libsnmp-perl libsnmp-session-perl
a quick fix after that was
chmod -R g+s /etc/nagios3
dpkg-statoverride --update --add nagios www-data 2710 /var/lib/nagios3/rw
dpkg-statoverride --update --add nagios nagios 751 /var/lib/nagios3
that was enough to get nagios up.. Next php and mysql
apt-get install php5 mysql-server-5.0 mysql-client-5.0 libapache2-mod-php5 php5-mysql php5-curl php5-cli php5-dev make gcc libc6-dev automake
apt-get install libapache2-mod-perl2 php5-common php5-dev php5-gd php5-imap php5-ldap php5-mhash php5-odbc
from there I copied over openaudit to my /var/www directory
/etc/init.d/apache2 restart
pointed browser to http://serveraddress/openaudit/setup.php
I think that is it. hope I didnt miss anything. Of course you have to do some configuration now
Wednesday, December 16, 2009
nagios setup on debian
Well I just got finished installing nagios on debian. This was my second attempt as I couldn't find a good document on the install. Basically there is a package that will install everything for you. just type apt-get install nagios3
Now after that was done I had a little trouble finding the correct folders. basically here is the breakdown on the folders.
/etc/nagios3 - config files also in /etc/nagios3/conf.d
/usr/share/nagios3 - htdocs, images, etc..
/etc/nagios-plugins - plugin directory
/var/lib/nagios3 - command directories
/usr/lib/nagios/plugins - check command files (can put custom perl scripts here)
I'm pretty sure those are the major folders used.
Now after that was done I had a little trouble finding the correct folders. basically here is the breakdown on the folders.
/etc/nagios3 - config files also in /etc/nagios3/conf.d
/usr/share/nagios3 - htdocs, images, etc..
/etc/nagios-plugins - plugin directory
/var/lib/nagios3 - command directories
/usr/lib/nagios/plugins - check command files (can put custom perl scripts here)
I'm pretty sure those are the major folders used.
Subscribe to:
Posts (Atom)