This is unlikely, but it happens. I was writing a utility to ascertain certain aspects of sshd then give advice about its findings. In the process of deleting temporary files, I accidentally deleted /usr/sbin/sshd itself which gave me no end to trouble as I casually attempted to get along without it (used Quest’s ssh, etc.).
I broke down and tried to impose my original RPM installation, but by a stroke of mind-shattering bizarreness, the one from my original, read-only DVD was bad. So, I found another copy (at rpm.pbone.net) and down-loaded it. Then, I used the following command to reinstall it:
taliesin:/> rpm -Uvh /tmp/openssh-4.4p1-24.i586.rpm
Along the lines of Linux rpm is the Solaris package manager. I have had to use this in writing a super-duper installation script that covers all platforms.
For example, a site-license installation on a Sun box...
russ@taliesin:~> pkginfo | grep vasclnt application vasclnts VAS Client (site)
And the others...
The configuration file is on the path /etc/syslog-ng/syslog-ng.conf. The path to syslog’s output, on SuSE 10 at least, is /var/log/messages. Use the following command to be able to watch it grow at the end:
russ@taliesin:~> tail -f /var/log/messages
Sample entry lines in the SuSE 10, new-generation syslog, as used by VAS:
source s_vas { unix_stream("dev/log"); internal(); }
destination d_russvas { file("/home/russ/vas.$WEEKDAY.$HOUR.$MIN"); }
filter f_vasauth { facility(auth, authpriv); }
log { source(s_sys); filter(f_vasauth); destination(d_russvas); }
I don’t know if the above would work. Here is what I really have in my /etc/syslog-ng/syslog-ng.conf file:
...
filter f_daemon { level(debug) and facility(daemon); };
...
destination daemondebug { file("/var/log/daemon.debug"); };
log { source(src); filter(f_daemon); destination(daemondebug); };
The system log, /var/log/messages, can grow quite large. Delete it, and touch it to start over.
rm /var/log/messages touch /var/log/messages rm /var/log/daemon.debug touch /var/log/daemon.debug /etc/init.d/syslog restart
Once any change to any of this is made, syslog must be restarted:
libroken.a means “broken” and contains all the pseudo-standard stuff missing from the build on any given platform. For example, if GNU stuff getargs and arg_printusage aren’t on the platform, this library supplies them.
Find and stop the ssh dæmon or restart it...
russ@taliesin:~> ps -ef | grep sshd russ@taliesin:~> /etc/init.d/sshd stop russ@taliesin:~> /etc/init.d/syslog restart
On HP-UX and AIX, this works differently...
russ@taliesin:~> /sbin/init.d/sshd stop # (HP=UX) russ@taliesin:~> /etc/rc.d/init.d/ssh restart # (AIX)
ps options are’t exactly uniform from Linux to UNIX to other Unix. Here’s how it can be solved:
int is_daemon_running( const char *daemon_name )
{
char ps_command[ 128 ], buffer[ 256 ];
/* create ps command for the host platform in 'ps_command'... */
cnt = asprintf( &ps_command,
#if defined( SOLARIS )
"ps -e -o comm | grep [%c]%s"
#elif defined( DARWIN )
"ps -ax | grep [%c]%s\\\\\\>"
#else
"ps -e | grep [%c]%s"
#endif
, daemon_name, daemon_name + 1 );
if( ( fp = popen( command, "r" ) ) )
return errno;
while( fgets( buffer, sizeof( buffer ), fp ) )
{
if( strstr( daemon_name, buffer ) == 0 )
return TRUE;
}
...
}
Which libraries does binary sshd link?
russ@taliesin:~> ldd `which sshd`
If you get...
russ@taliesin:~> ldd: missing file arguments
It’s certain that there is no sshd on any of your search paths.
Using the tail of a long, dynamic file (like /var/log/messages):
russ@taliesin:~> tail -f file
...to put yourself into a state in which every directory or file you create will have, by default, certain privileges although the privileges are slightly different depending on whether a file or a directory for the same umask setting. For the bits, 0 gives you the most rights, rwx for a directory and rw- for a file; 1 gives you rwx for a directory and rw- for a file; 2 gives you r-x and r-- for a file; last, 3 gives you r-- only. For example, ...
russ@taliesin:~> umask 0 russ@taliesin:~> touch poop russ@taliesin:~> mkdir poop.d russ@taliesin:~> ls -l -rw-rw-rw- 1 russ users 0 2006-11-01 09:35 poop drwxrwxrwx 2 russ users 48 2006-11-01 09:35 poop.d russ@taliesin:~> rm poop ; rmdir poop.d russ@taliesin:~> umask 0011 russ@taliesin:~> touch poop russ@taliesin:~> mkdir poop.d russ@taliesin:~> ls -l -rw-rw-rw- 1 russ users 0 2006-11-01 09:35 poop drwxrw-rw- 2 russ users 48 2006-11-01 09:35 poop.d russ@taliesin:~> rm poop ; rmdir poop.d russ@taliesin:~> umask 0022 russ@taliesin:~> touch poop russ@taliesin:~> mkdir poop.d russ@taliesin:~> ls -l -rw-r--r-- 1 russ users 0 2006-11-01 09:29 poop drwxr-xr-x 2 russ users 48 2006-11-01 09:29 poop.d russ@taliesin:~> rm poop ; rmdir poop.d russ@taliesin:~> umask 0033 russ@taliesin:~> touch poop russ@taliesin:~> mkdir poop.d russ@taliesin:~> ls -l -rw-r--r-- 1 russ users 0 2006-11-01 09:35 poop drwxr--r-- 2 russ users 48 2006-11-01 09:35 poop.d russ@taliesin:~> rm poop ; rmdir poop.d russ@taliesin:~> umask 0133 russ@taliesin:~> touch poop russ@taliesin:~> mkdir poop.d russ@taliesin:~> ls -l -rw-r--r-- 1 russ users 0 2006-11-01 09:35 poop drw-r--r-- 2 russ users 48 2006-11-01 09:35 poop.d russ@taliesin:~> rm poop ; rmdir poop.d
The usual umask when creating massive numbers of directories (such as for a package installation) is 0022.
Command sudo executes its argument, a command, in superuser mode:
russ@taliesin:~> sudo make
Command sux is a wrapper around su that transfers X credentials. This is useful for running GUI apps as root.
russ@taliesin:~> sux /usr/ConsoleOne/bin/ConsoleOne
The find command, an example:
russ@taliesin:~> find . -name '*.c' -print
russ@taliesin:~> find / -name 'gcc*' -print
russ@taliesin:~> find starting at root
russ@taliesin:~> find . -name '*.c' -exec fgrep -H Usage: {} \;
russ@taliesin:~> find . -name "*.[ch]" -exec fgrep -H Usage: {} \; # both .c and .h files
Find some files matching a template; then, finding them, delete them:
russ@taliesin:~> find . -name '*.tmp' -print
russ@taliesin:~> find . -name '*.tmp' -exec rm {} \;
newgrp creates a new shell running as if with the gid of the specified group, requires a password created using gpasswd.
Linux (Unix) commands affected or interesting in this context:
russ@taliesin:~> newgrp new-group-name russ@taliesin:~> gpasswd russ@taliesin:~> sg # (cf. sudo) russ@taliesin:~> groups # (lists groups from /etc/group)
Documentation for exuberant ctags can be found at http://ctags.sourceforge.net/ctags.html.
How to build the whole project:
russ@taliesin:~> cd project-root russ@taliesin:~> rm -rf tags russ@taliesin:~> ctags -R (from project root)
Pass -I on command line to ctags to help it know that ARGDECL4 (for example) in the following C code isn’t to be interpreted as a function.
int foo ARGDECL4( void *ptr, long number, size_t nbytes )
In order to facilitate lots of the above, create $HOME.ctags to contain the list—will be picked up by ctags when it runs.
In vim, type...
| * | go to nearest caller of identifier under/near cursor (SHIFT-8) | ||
| ^] | go to identifier under/near cursor | ||
| ^t | return to previous position from symbol gone to (undo ^]) | ||
| [^I | go to prototype of function under/near cursor (same thing as [ TAB) | ||
| ^O | return from prototype gone to (previous cursor position and/or file) |
Other movement stuff (I don’t grok yet, but it was in the Vim thread)—some is done in Vim and some in ex. <tag>, here, denotes typing the actual identifier name (a necessity in ex). The first three prompt with a list of possibilities; the rest actually jump to the first in that list. #3 and #6 apparently split off a new window (we’ll have to try this).
| g ^] | |||||||
| :ts <tag> (for tselect) | |||||||
| :sts <tag> | |||||||
^]
|
| :ta <tag> (for tag)
|
| :sta
|
| <tag> ^t
| |
First, why? If you have a header that, during compilation, renames a bunch of functions to something else in order to stave off namespace collisions for whatever reason in your code base, you will find it devilishly frustrating to jump to definitions because of that. It is possible to make ctags ignore any header or source so that its symbol table isn't (similarly) corrupt and ^] will take you to the code just as you’d expect. This can be just a filename or a file listing filenames to be excluded:
ctags -R --exclude=krb5_sym.h ctags -R --exclude=@ctags-exclude # (see this file below) +-- ctags-exclude ----------+ | asn1_sym.h | | ber_sym.h | | com_err_sym.h | | des_sym.h | | gssapi_sym.h | | krb5_sym.h | | ldap_sym.h | | sqlite3_sym.h | | vers_sym.h | | ... | +---------------------------+
How to set up the whole project. Obviously, this could be done at the same time as ctags.
russ@taliesin:~> cd project-root russ@taliesin:~> cscope -R (from project root)
Now, this actually launches cscope on a sort of text file in vi with fields into which you type function or other identifier names, press return, and get listings. You can tab between input sections and arrow-key between fields.
See http://docs.sun.com/source/819-0494/cscope.html for a tutorial.
Find out the name of the OS on the host (Linux, SunOS, HP-UX, AIX, etc.):
russ@taliesin:~> uname -a | awk '{ print $1 }'
Hostname...
russ@taliesin:~> uname -a | awk '{ print $2 }'
The following files exist on some Linux distros...
/etc/SuSE-release /etc/redhat-release
Try pressing...
Control Alt F1 or Control Alt Backspace
It’s because someone is screwing around and what’s in /etc/resolv.conf no longer holds.
First, attempt to see if your adapters are configured:
russ@taliesin:~> ifconfig eth0 Link encap:Ethernet HWaddr 00:10:C6:A2:0A:68 inet addr:10.5.35.165 Bcast:10.5.47.255 Mask:255.255.240.0 inet6 addr: 3ffe:302:11:2:210:c6ff:fea2:a68/64 Scope:Global inet6 addr: fe80::210:c6ff:fea2:a68/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:21040 errors:0 dropped:0 overruns:0 frame:0 TX packets:4662 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:2192482 (2.0 Mb) TX bytes:406559 (397.0 Kb) Interrupt:169 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:195 errors:0 dropped:0 overruns:0 frame:0 TX packets:195 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:14728 (14.3 Kb) TX bytes:14728 (14.3 Kb) vmnet1 Link encap:Ethernet HWaddr 00:50:56:C0:00:01 inet addr:192.168.143.1 Bcast:192.168.143.255 Mask:255.255.255.0 inet6 addr: fe80::250:56ff:fec0:1/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:16 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) vmnet8 Link encap:Ethernet HWaddr 00:50:56:C0:00:08 inet addr:172.16.104.1 Bcast:172.16.104.255 Mask:255.255.255.0 inet6 addr: fe80::250:56ff:fec0:8/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:21 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
That succeeding, ping something like Google:
russ@taliesin:~> ping Google
If that doesn’t work, then see if the cable is connected (good hardware connections) by pinging our gateway:
russ@taliesin:~> ping 10.5.32.1
It’s also possible to view the route taken using (option -n means show the routing table, but don’ try to resolve anything)...
russ@taliesin:~> route -n
Depending on what is learned from these commans, it’s looking like a bad /etc/resolv.conf. See discussion of /etc/resolv.conf and my resolv.sh script for what this looks like.
Create a new subdirectory to be used as a mount point first.
russ@taliesin:~> mkdir /home/russ/vasapi russ@taliesin:~> sudo mount -o loop VAS-site-3.0.0-25.iso /home/russ/vasapi
To undo this...
russ@taliesin:~> sudo umount VAS-site-3.0.0-25.iso
Renae uses this method to test builds as if ISOs.
russ@taliesin:~> mkdir /mnt/jerry russ@taliesin:~> sudo mount -o ro slcflsl01.prod.quest.corp:/data/vas /mnt/jerry
To undo this...
russ@taliesin:~> sudo umount /mnt/jerry
Then just switch to the directory and run...
russ@taliesin:/mnt/jerry/dev-builds/junk> cd /mnt/jerry/dev-builds/junk russ@taliesin:/mnt/jerry/dev-builds/junk> ./install.sh -d 1 -n -a (etc.)
russ@taliesin:~> mount [-t type] /dev/hde /cdromOr, if /etc/fstab contains...
/dev/cdrom/cd iso9660 ro,user,noauto, unhidethen do one of these (must be root)...
russ@taliesin:~> mount /dev/cdrom russ@taliesin:~> mount /cd
Local printer, no auto-detect of Plug’n’Play, new port, TCP/IP at address 10.5.34.1.
To get interesting information on your host hardware (like opening the System details in the Windows control panel), the following is helpful:
russ@taliesin:~> uname -a russ@taliesin:~> cat /proc/cpuinfo russ@taliesin:~> ps ax russ@taliesin:~> top # (gets a screenful of the most active processes)
Paper by engineer at SuSE discussing file system access control lists (ACLs) as implemented in several UNIX-like operating systems, see http://www.suse.de/~agruen/acl/linux-acls/online/
Multihomed means that you have one network interface card (NIC), but two different IP addresses assigned to it. The other option is to have two NICs, each with its own address.
| 0 | Not used. | |
| 1 | Commands that all users can enter. | |
| 1m | Commands related to system maintenance and operation. | |
| 2 | System calls, or program interfaces to the operating system kernel. | |
| 3 | Programming interfaces found in various libraries. | |
| 4 | Include files, program output files, and some system files. | |
| 5 | Miscellaneous topics, such as text-processing macro packages. | |
| 6 | Games. | |
| 7 | Device special files, related driver functions, and networking support. | |
| 8 | Commands related to system maintenance and operation. | |
| 9 | Writing device drivers. |
Links to curses information...
http://www.windofkeltia.com/opensoftware/hyundai.html
...and other fun like updating my NVIDIA driver so I could hook up my new 20" Samsung monitors: http://www.windofkeltia.com/opensoftware/nvidia-update.html
I tried VSE a little bit in an attempt to over-come the paucity of tagging from Vim, but in frustration with its broken Vi emulation, discovered Exuberant ctags and found I didn’t need VSE. Nevertheless, here are random notes on using it...
.slickedit/vunxdefs.e
Steps to remap:
Can also remap ^C, ^V, ^X, etc. as copy-region, paste and cut-region.
The ctag keys in VSe are ^., ^, and ^/ (list reference).
Following are several methods of finding the total memory installed on a Linux host. One, lshw, is something I’ve not seen work nor taken the time to make work, but I put it in here for completeness. top is an executable that takes over your console window until you press 'q' for quit. These examples are taken from my own host which has 1 gigabyte.
russ@taliesin:~> free -m total used free shared buffers cached Mem: 1010 901 108 0 45 157 -/+ buffers/cache: 698 311 Swap: 1027 649 378 russ@taliesin:~> cat /proc/meminfo MemTotal: 1034944 kB MemFree: 103644 kB Buffers: 46312 kB Cached: 166836 kB SwapCached: 121404 kB Active: 831056 kB Inactive: 47484 kB HighTotal: 129984 kB HighFree: 248 kB LowTotal: 904960 kB LowFree: 103396 kB SwapTotal: 1052216 kB SwapFree: 388576 kB Dirty: 836 kB Writeback: 0 kB AnonPages: 626988 kB Mapped: 42512 kB Slab: 35000 kB PageTables: 3760 kB NFS_Unstable: 0 kB Bounce: 0 kB CommitLimit: 1569688 kB Committed_AS: 1798404 kB VmallocTotal: 114680 kB VmallocUsed: 54132 kB VmallocChunk: 55284 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 Hugepagesize: 4096 kB russ@taliesin:~/HEAD/VAS/src/libs/vaslicense> top top - 07:09:07 up 100 days, 13:36, 5 users, load average: 0.00, 0.02, 0.00 Tasks: 121 total, 1 running, 118 sleeping, 0 stopped, 2 zombie Cpu(s): 0.2%us, 0.2%sy, 0.0%ni, 98.0%id, 0.8%wa, 0.3%hi, 0.5%si, 0.0%st Mem: 1034944k total, 932256k used, 102688k free, 46316k buffers Swap: 1052216k total, 663624k used, 388592k free, 166948k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 3685 root 15 0 551m 274m 6792 S 0 27.2 236:31.38 X 1 root 15 0 744 72 44 S 0 0.0 0:04.49 init 2 root RT 0 0 0 0 S 0 0.0 0:00.00 migration/0 3 root 34 19 0 0 0 S 0 0.0 0:00.18 ksoftirqd/0 4 root RT 0 0 0 0 S 0 0.0 0:00.02 migration/1 5 root 34 19 0 0 0 S 0 0.0 0:00.57 ksoftirqd/1 6 root 10 -5 0 0 0 S 0 0.0 0:15.08 events/0 7 root 10 -5 0 0 0 S 0 0.0 0:00.00 events/1 8 root 11 -5 0 0 0 S 0 0.0 0:00.00 khelper 9 root 11 -5 0 0 0 S 0 0.0 0:00.00 kthread 13 root 10 -5 0 0 0 S 0 0.0 0:02.45 kblockd/0 14 root 14 -5 0 0 0 S 0 0.0 0:00.33 kblockd/1 15 root 10 -5 0 0 0 S 0 0.0 0:00.37 kacpid 16 root 16 -5 0 0 0 S 0 0.0 0:00.00 kacpi_notify 110 root 16 -5 0 0 0 S 0 0.0 0:00.00 cqueue/0 111 root 16 -5 0 0 0 S 0 0.0 0:00.00 cqueue/1 112 root 10 -5 0 0 0 S 0 0.0 0:00.01 kseriod 158 root 10 -5 0 0 0 S 0 0.0 3:35.98 kswapd0 159 root 19 -5 0 0 0 S 0 0.0 0:00.00 aio/0 160 root 18 -5 0 0 0 S 0 0.0 0:00.00 aio/1 406 root 12 -5 0 0 0 S 0 0.0 0:00.00 kpsmoused 774 root 10 -5 0 0 0 S 0 0.0 0:00.45 ata/0 775 root 10 -5 0 0 0 S 0 0.0 0:00.37 ata/1 776 root 16 -5 0 0 0 S 0 0.0 0:00.00 ata_aux 788 root 13 -5 0 0 0 S 0 0.0 0:00.01 scsi_eh_0 789 root 10 -5 0 0 0 S 0 0.0 0:00.02 scsi_eh_1 872 root 10 -5 0 0 0 S 0 0.0 0:07.68 reiserfs/0 873 root 10 -5 0 0 0 S 0 0.0 0:06.80 reiserfs/1 906 root 15 0 10024 292 288 S 0 0.0 0:00.69 blogd 921 root 12 -4 1796 252 248 S 0 0.0 0:00.27 udevd 1656 root 10 -5 0 0 0 S 0 0.0 0:00.03 khubd 2511 root 15 0 1668 316 312 S 0 0.0 0:00.00 resmgrd 2557 root 15 0 2036 616 484 S 0 0.1 1:07.70 syslog-ng 2564 root 15 0 1724 460 280 S 0 0.0 0:49.12 klogd 2571 root 15 0 1584 328 324 S 0 0.0 0:00.00 acpid 2573 messageb 15 0 15484 2316 548 S 0 0.2 5:45.20 dbus-daemon 2636 haldaemo 15 0 5668 1496 1112 S 0 0.1 3:44.58 hald 2637 root 17 0 2952 616 612 S 0 0.1 0:00.01 hald-runner 2638 root 15 0 3180 1116 1008 S 0 0.1 0:02.56 polkitd 3061 mdnsd 15 0 1888 564 476 S 0 0.1 0:02.68 mdnsd 3106 nobody 15 0 1632 308 248 S 0 0.0 0:00.02 portmap 3232 root 16 -3 9948 380 364 S 0 0.0 0:00.22 auditd
How to set up a key on a host so that you can get into it via ssh without a password?
russ@taliesin:~/.ssh> ssh-keygen -b 1024 -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/russ/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/russ/.ssh/id_rsa. Your public key has been saved in /home/russ/.ssh/id_rsa.pub. The key fingerprint is: 61:25:8a:15:86:ff:cb:3d:ec:7e:5c:16:2b:6f:73:b3 russ@taliesin russ@taliesin:~/.ssh> ll total 48 -rw-r--r-- 1 russ users 223 2006-06-27 13:10 authorized_keys -rw-r--r-- 1 russ users 116 2007-03-05 11:11 config -rw------- 1 russ users 887 2008-07-29 14:58 id_rsa -rw-r--r-- 1 russ users 223 2008-07-29 14:58 id_rsa.pub -rw-r--r-- 1 russ users 31323 2008-07-28 08:48 known_hosts russ@taliesin:~/.ssh> scp id_rsa.pub root@vasx8664.vintela.com:/home/rbateman/.ssh root@vasx8664.vintela.com's password: id_rsa.pub 100% 223 0.2KB/s 00:00
On the remote host...
russ@taliesin:~/.ssh> ssh rbateman@vasx8664.vintela.com rbateman@vasx8664.vintela.com's password: Last login: Thu Jul 24 10:15:35 2008 from vasx8664.vintela.com [rbateman@slc205613 root]# cd /home/rbateman/.ssh [rbateman@slc205613 .ssh]# ll total 28 -rw-r--r-- 1 rbateman slc 488 Jul 29 14:39 authorized_keys -rwxr-xr-x 1 rbateman slc 2372 Oct 9 2007 equip_all_plats.sh -rw-r--r-- 1 rbateman slc 223 Jul 29 14:53 id_rsa.pub -rw-r--r-- 1 rbateman slc 8865 Oct 9 2007 known_hosts [rbateman@slc205613 .ssh]# cat id_rsa.pub >> authorized_keys [rbateman@slc205613 rbateman]$ ^D Connection to vasx8664.vintela.com closed.
Back on the local host, we can now ssh to the remote host without a password:
russ@taliesin:~/.ssh> ssh rbateman@vasx8664.vintela.com Last login: Tue Jul 29 14:54:05 2008 from taliesin.vintela.com
locate is a great tool—much faster and easier to use than
find. To get it, use YaST->Software->Software
Management, type in “locate” as the filter/search string,
and click findutils-locate if that package has not been installed
already. This is the GNU Findutils Subpackage. Install it if need be.
Once installed, it’s probably on your PATH, so first update its index (database). It searches all your filesystem indexing the files thereon. Later, you’ll want to chron this action to run late at night while you’re asleep.
Then, use man locate to learn how to use it, however, here are a
couple of examples:
russ@taliesin:~/GWAVA> which updatedb /usr/bin/updatedb russ@taliesin:~> updatedb russ@taliesin:~/GWAVA> locate vicheat.gif /home/russ/GWAVA/vicheat.gif /home/russ/Quest/documents/vintela/vicheat.gif /home/russ/Quest/notes/vicheat.gif russ@taliesin:~/GWAVA> locate /web/WEB-INF/cfg | grep ASConfig.cfg /home/russ/dev/svn/retain/RetainServer/web/WEB-INF/cfg/ASConfig.cfg russ@taliesin:~/GWAVA> locate /web/WEB-INF/cfg/.svn/tmp /home/russ/dev/svn/retain/RetainServer/web/WEB-INF/cfg/.svn/tmp /home/russ/dev/svn/retain/RetainServer/web/WEB-INF/cfg/.svn/tmp/prop-base /home/russ/dev/svn/retain/RetainServer/web/WEB-INF/cfg/.svn/tmp/props /home/russ/dev/svn/retain/RetainServer/web/WEB-INF/cfg/.svn/tmp/text-base /home/russ/dev/svn/retain/RetainWorker/web/WEB-INF/cfg/.svn/tmp /home/russ/dev/svn/retain/RetainWorker/web/WEB-INF/cfg/.svn/tmp/prop-base /home/russ/dev/svn/retain/RetainWorker/web/WEB-INF/cfg/.svn/tmp/props /home/russ/dev/svn/retain/RetainWorker/web/WEB-INF/cfg/.svn/tmp/text-base
eth0 must be assigned to a zone in order for VNC to work. Go to
Firewall Configurations->Interfaces.
To examine what repositories are used by Yast, you can launch Yast and choose
Software->Software Repositories or you can do this:
taliesin:/ # zypper sl # | Enabled | Refresh | Type | Alias | Name --+---------+---------+--------+-------------------------------------------------------------------+----------------------------- 1 | Yes | Yes | yast2 | http://download.opensuse.org/repositories/openSUSE:10.3/standard/ | Main Repository (OSS) 2 | Yes | No | yast2 | openSUSE-10.3-OSS-Gnome 10.3 | openSUSE-10.3-OSS-Gnome 10.3 3 | Yes | Yes | yast2 | http://download.opensuse.org/distribution/10.3/repo/debug/ | Main Repository (DEBUG) 4 | Yes | Yes | rpm-md | Mozilla | Mozilla 5 | Yes | Yes | rpm-md | NVIDIA Repository | NVIDIA Repository 6 | Yes | Yes | rpm-md | openSUSE-10.3-Updates | openSUSE-10.3-Updates
This is much faster than the Yast GUI.
This command prints out network connections, routing tables and other network-related information. In particuler, below we are looking to make certain port 5900 is assigned to TCP. In fact, it's going to be used by Tomcat which, for some reason, appears as vino-server. We don't see other programs identified because Tomcat belongs to us, but not the other processes.
russ@taliesin:~> netstat -nltp (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:48005 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:904 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:48009 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:5900 0.0.0.0:* LISTEN 4574/vino-server tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:48080 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN - tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN -
As root, we see:
taliesin:/home/russ # netstat -nltp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:48005 0.0.0.0:* LISTEN 6915/java tcp 0 0 0.0.0.0:904 0.0.0.0:* LISTEN 3851/xinetd tcp 0 0 0.0.0.0:48009 0.0.0.0:* LISTEN 6915/java tcp 0 0 0.0.0.0:5900 0.0.0.0:* LISTEN 4574/vino-server tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 3370/portmap tcp 0 0 0.0.0.0:48080 0.0.0.0:* LISTEN 6915/java tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 3541/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 3976/master
Elsewhere, on host windofkeltia, we see yet different names for Tomcat (jsvc.exec):
windofkeltia:/home/rbateman # netstat -nltp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 2826/portmap tcp 0 0 127.0.0.1:2544 0.0.0.0:* LISTEN 3184/zmd tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2898/cupsd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 3352/master tcp 0 0 :::80 :::* LISTEN 6337/httpd2-prefork tcp 0 0 :::22 :::* LISTEN 3394/sshd tcp 0 0 ::1:631 :::* LISTEN 2898/cupsd tcp 0 0 ::1:25 :::* LISTEN 3352/master windofkeltia:/home/rbateman # /etc/init.d/tomcat start Starting Apache Tomcat Server... done windofkeltia:/home/rbateman # netstat -nltp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 2826/portmap tcp 0 0 127.0.0.1:2544 0.0.0.0:* LISTEN 3184/zmd tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2898/cupsd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 3352/master tcp 0 0 :::8009 :::* LISTEN 601/jsvc.exec tcp 0 0 :::8080 :::* LISTEN 601/jsvc.exec tcp 0 0 :::80 :::* LISTEN 6337/httpd2-prefork tcp 0 0 :::22 :::* LISTEN 3394/sshd tcp 0 0 ::1:631 :::* LISTEN 2898/cupsd tcp 0 0 ::1:25 :::* LISTEN 3352/master
Files that you download and end in .bin are simply self-extracting archives. To extract, change the permissions to add executable and invoke.
oruss@taliesin:~/download> chmod a+x jdk-6u12-linux-i586.bin russ@taliesin:~/download> ./jdk-6u12-linux-i586.bin russ@taliesin:~/download> ll total 78324 drwxr-xr-x 10 russ users 4096 2009-02-11 15:11 jdk1.6.0_12 -rwxr-xr-x 1 russ users 80105323 2009-02-11 15:03 jdk-6u12-linux-i586.bin
Obtain any version of GNU tools from ftp://mirrors.kernel.org/gnu or, likewise, gcc from ftp://mirrors.kernel.org/gnu/gcc.
Here's how to conduct an anonymous ftp session to upload a couple of files. What you type is in bold.
russ@taliesin:~/build/1.7> ftp ftp> open ftp.funtime.com Connected to provo.funtime.com. 220 FTP Server ready. Name (ftp.funtime.com:russ): anonymous 331 Anonymous login ok, send your complete email address as your password Password: russ@windofkeltia.com 230 User anonymous logged in. Remote system type is UNIX. Using binary mode to transfer files. ftp> cd incoming 250 CWD command successful ftp> binary 200 Type set to I ftp> put rs-2009-06-05.zip local: rs-2009-06-05.zip remote: rs-2009-06-05.zip 229 Entering Extended Passive Mode (|||43813|) 150 Opening BINARY mode data connection for rs-2009-06-05.zip 100% |*************************************| 35224 KB 1.00 MB/s 00:00 ETA 226 Transfer complete 36069479 bytes sent in 00:34 (1.00 MB/s) ftp> put rw-2009-06-05.zip local: rw-2009-06-05.zip remote: rw-2009-06-05.zip 229 Entering Extended Passive Mode (|||19475|) 150 Opening BINARY mode data connection for rw-2009-06-05.zip 100% |*************************************| 8836 KB 1.02 MB/s 00:00 ETA 226 Transfer complete 9048118 bytes sent in 00:08 (1.02 MB/s) ftp> quit 221 Goodbye. russ@taliesin:~/build/1.7>
Only on Ubuntu and openSuSE will Firefox make good on installing the missing Flash plug-in. On other Linuces, you have to:
# gunzip -d install_flash_player_10_linux.tar.gz # tar -xvf install_flash_player_10_linux.tar # rm install_flash_player_10_linux.tar
This will leave you with libflashplayer.so in the plug-in subdirectory.
See how here.