Asus A6TC
Network
Server basics
Linky kámošov
Linky školy
Linky in-line
Na pobavenie
Tips for linux
These are my tips for configuration in linux
Linux cheat sheet:
#######facl
setfacl
getfacl
################tcpdump
tcpdump -nevi eth0 host www.google.sk
tcpdump -nevi eth0 host 64.233.183.147
tcpdump -i <interface> -s 1500 -w <some-file>
tcpdump -i dcn net 10.24.254.0/24
tcpdump -nevi eth0 -s 1500 host itbox.sk -w ping_to_einstein
a sup do wiresharku :-)
bash-2.05$ ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
bcme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 10.10.12.2 netmask ffffff00 broadcast 10.10.12.255
ether 0:d:9d:97:b1:a5
ash-3.2$ ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:08:02:c7:fc:96 brd ff:ff:ff:ff:ff:ff
inet 80.94.50.198/29 brd 80.94.50.199 scope global eth0
inet6 fe80::208:2ff:fec7:fc96/64 scope link
valid_lft forever preferred_lft forever
3: sit0: <NOARP> mtu 1480 qdisc noop
link/sit 0.0.0.0 brd 0.0.0.0
bash-3.2$
#########setup ip with ifconfig
root@roleta:/# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:18:f3:8f:d7:bc
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:3435 errors:0 dropped:0 overruns:0 frame:0
TX packets:3569 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2900730 (2.7 MB) TX bytes:640443 (625.4 KB)
Interrupt:21 Base address:0xe000
root@roleta:/# ifconfig eth0 192.168.1.38 netmask 255.255.255.0 broadcast 192.168.1.255 up
root@roleta:/# route add default gw 192.168.1.1 eth0
root@roleta:/# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
root@roleta:/# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
ifconfig eth0
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
root@roleta:/# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:18:f3:8f:d7:bc
inet addr:192.168.1.38 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::218:f3ff:fe8f:d7bc/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3455 errors:0 dropped:0 overruns:0 frame:0
TX packets:3649 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2902913 (2.7 MB) TX bytes:651906 (636.6 KB)
Interrupt:21 Base address:0xe000
root@roleta:/# ping www.google.com
PING www.l.google.com (74.125.39.99) 56(84) bytes of data.
64 bytes from fx-in-f99.google.com (74.125.39.99): icmp_seq=1 ttl=245 time=31.7 ms
64 bytes from fx-in-f99.google.com (74.125.39.99): icmp_seq=2 ttl=245 time=32.4 ms
64 bytes from fx-in-f99.google.com (74.125.39.99): icmp_seq=3 ttl=245 time=32.4 ms
64 bytes from fx-in-f99.google.com (74.125.39.99): icmp_seq=4 ttl=245 time=32.1 ms
--- www.l.google.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2999ms
rtt min/avg/max/mdev = 31.766/32.202/32.457/0.302 ms
root@roleta:/#
########setup ip with ip
root@roleta:~# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:18:f3:8f:d7:bc brd ff:ff:ff:ff:ff:ff
inet 192.168.1.33/24 brd 192.168.1.255 scope global eth0
inet6 fe80::218:f3ff:fe8f:d7bc/64 scope link
valid_lft forever preferred_lft forever
3: wmaster0: <BROADCAST,MULTICAST> mtu 1500 qdisc ieee80211 qlen 1000
link/ieee802.11 00:18:f3:66:1d:b3 brd ff:ff:ff:ff:ff:ff
4: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:18:f3:66:1d:b3 brd ff:ff:ff:ff:ff:ff
root@roleta:~# ip addr del 192.168.1.33/24 dev eth0
root@roleta:~# ip addr add 192.168.1.38/255.255.255.0 dev eth0
root@roleta:~# ip route add 0.0.0.0/0 via 192.168.1.1
root@roleta:~# ip addr show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:18:f3:8f:d7:bc brd ff:ff:ff:ff:ff:ff
inet 192.168.1.38/24 scope global eth0
inet6 fe80::218:f3ff:fe8f:d7bc/64 scope link
valid_lft forever preferred_lft forever
root@roleta:~# ip route list
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.38
default via 192.168.1.1 dev eth0
root@roleta:~# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
root@roleta:~# ping www.google.sk
PING www.l.google.com (209.85.129.147) 56(84) bytes of data.
64 bytes from fk-in-f147.google.com (209.85.129.147): icmp_seq=1 ttl=245 time=25.4 ms
64 bytes from fk-in-f147.google.com (209.85.129.147): icmp_seq=2 ttl=245 time=24.3 ms
--- www.l.google.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 24.344/24.899/25.454/0.555 ms
root@roleta:~#
Solaris cheat sheet:
#########################################################
############################################solaris######
#########################################################
#########################################################
############################################nslookup#####
#########################################################
bash-2.05$ nslookup - 213.151.208.162
Default Server: tdns2.orange.sk
Address: 213.151.208.162
> set type=any
> pikeo.sk
Server: tdns2.orange.sk
Address: 213.151.208.162
Non-authoritative answer:
pikeo.sk preference = 10, mail exchanger = modi.orange.sk
pikeo.sk preference = 10, mail exchanger = magni.orange.sk
pikeo.sk preference = 20, mail exchanger = sif.orange.sk
pikeo.sk nameserver = ns1.orange.sk
pikeo.sk nameserver = ns2.orange.sk
pikeo.sk nameserver = tdns1.orange.sk
pikeo.sk nameserver = tdns2.orange.sk
Authoritative answers can be found from:
pikeo.sk nameserver = tdns2.orange.sk
pikeo.sk nameserver = ns1.orange.sk
pikeo.sk nameserver = ns2.orange.sk
pikeo.sk nameserver = tdns1.orange.sk
modi.orange.sk internet address = 213.151.200.41
magni.orange.sk internet address = 213.151.200.40
sif.orange.sk internet address = 213.151.200.42
ns1.orange.sk internet address = 213.151.200.30
ns2.orange.sk internet address = 213.151.200.31
tdns1.orange.sk internet address = 213.151.208.161
tdns2.orange.sk internet address = 213.151.208.162
>
#########################################################
################################################zatazenie
#########################################################
prstat
[root@virus shell]# vmstat 1
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 0 37508 5708 42776 130288 0 0 43 46 6 0 1 4 94 1 0
#########################################################
#######ram###############################################
#########################################################
bash-2.05$ vmstat
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr s0 s1 s2 s4 in sy cs us sy id
0 0 0 3786680 1937004 474 389 1791 142 57 0 21 2 28 0 0 8298 65274 14752 9 10 81
bash-2.05$
#########################################################
######openbootprompt#####################################
#########################################################
#printenv
boot-device disk3 disk net
auto-boot? true true
#setenv diag-device disk
#devalias
# v eeprom
eeprom boot-device=disk3
eeprom auto-boot?=true
#########################################################
############################################add user#####
#########################################################
-d home-directory-path
This is the new user.s home directory, typically /export/home/username
-m
make home directory and copy the default skeleton files (these files are located in /etc/skel directory).
-u uid
The uid (userid) is a number from 0 to 65535 which identifies the user on the system. uid 0 is reserved for root. If you don.t specify one, the next available uid will be used automatically.
-c .User Name.
Comment field which usually contains the name of the user. Make sure you enclose the name in quotes if it contains a space.
-s /path/to/shell
The shell to use. If you don.t specify this, it will default to /bin/sh. Make sure you specify the fully qualified path.
So, putting it together, a typical addition of a user named fred would be:
useradd -d /export/home/fred -m -s /bin/ksh -c "Fred Smith" fred
#########################################################
############################################vmware######
#########################################################
Here is a compete step-by-step notes that i recorded while walking through the installation process.
Before you can start, download the latest Solaris 10 x64 ISO file from sun.com and install Vmware server from vmware.com
1. File .> New .> Virtual Machine
2. Click Next on the first scren.
3. Click Next (i.e. Keep Typica configuration)
4. Choose .4. Sun Soaris. for Guest Operating System.
5. (Optional and only if you have a 64 bit capable machine) choose .Solaris 10 64-bit. for Version.
6. Click Next
7. (Optional) Change Location of the virtual machine by click Browse
8. Click Next
9. Choose .Use network address translation (NAT). and click Next.
10. (Optional) If want to save a little bit of unused space at the expense of slightly slower disk acces speed, uncheck .Allocate all disk space now.
11. Double click on CD-ROM from Devices panel
12. Choose .Use ISO image.
13. Click Browse to choose the DVD ISO file you downloaded earlier.
14. (Optional) Adjust the amount of RAM and number of CPUs you want to allocate to this image.
15. Click .Power on this virtua machine.
16. Enter on BRUB menu for default .Solaris.
17. Enter 1 for .Solaris Interactive (default).
18. Enter 0 for English. Choose a different language if you wish.
19. Click Next
20. Choose Networked and click Next
21. Choose DHCP if non of the applications you use doesn.t require static IP. Click Next.
22. Click Next (i.e. not enabe IPv6)
23. Click Next (i.e. not enable Kerberos)
24. Click Next (i.e. not eanble Name Service)
25. Click Next (i.e. Use default method to define timezone)
26. Choose your geographical location to choose a timezone and click Next.
27. Click Next (i.e. to accept the date and time)
28. Enter a root password.
29. Click Confirm to accept Selection Summary
30. Click Next
31. (Optional) Choose No for .Reboot automatically after software instalation. Since the CD-ROM was .entered. by software configuration and .eject. is better done via VMWare.s configuration. In case you were not watching when the install completed, it is probably better to let it wait for you to manualy reboot and umount CDRom via VMWare.s configuration window. Click Next and click OK on the pop-up window.
32. Click Next to accept the default Media, which is CD/DVD
33. Check Accept and click Next
34. Choose Custom Install and click Next
35. Expand North America, check .English (United States) (en_US). and .English United States, UTF-8)(en_US.UTF-8). and click Next
36. Choose en_US.ISO8859-1 and click Next
37. Click Next (i.e. not install extra software)
38. Click Next (i.e. keep none for no additional software through Web Start)
39. Choose Entire Group Pus OEM and click Next
40. Click Next to accept the default deisk selection
41. Click Next to accept the default disk for partition customization
42. Click Next to accept allocation of all space to Solaris
43. Click Modify to edit partition information
44. Remove slice 7 entry
45. Increase the swap size to the double the amount of RAM you allocated for Solaris in VMWare.
46. Add the remaining disk space to / and click OK
47. Click Next to continue
48. Review the configuration. If everything looks correct, click Install Now. Now you may want to take a break or do something else and check back once in a whie to check on the installation progress.
49. After installation, you should see a Reboot Now Button. Click it.
50. View .> Current View .> Summary
51. Double click on CD-ROM
52. Choose .Use a physical drive:. and click OK
53. If you get an error, just click OK. You probably don.t have a CD/DVD media in your computer at this time.
54. View .> Current View .> Console
55. Press .Enter. key to not override the system.s default NFS version 4 domain name.
56. You should see the login screen once Soalaris completed boot process. Enter root and root password to start using Solaris. Make sure you use JDS 3 by clicking on Options .> Session .> Java Destop System, Release 3 from the boot menu.
APPENDIX A: Install VMWare Tools
1. VM .> Instal VMWare Tools
2. Click install
3. Launch .> Applications .> Utilities .> Terminal
4. cp /cdrom/vmwaretoos/vmware-solaris-tools.tar.gz /tmp/
5. cd /tmp
6. gunzip vmware-solaris-tools.tar.gz
7. tar xvf vmware-solaris-tools.tar
8. cd vmware-tools-distrib
9. ./vmware-install.pl
10. Enter to accept default directory at /usr/bin
11. Enter to accept default directory at /etc
12. Enter to accept default directory at /etc/init.d
13. Enter to accept default directory at /usr/sbin
14. Enter to accept default directory at /usr/lib/vmware-tools
15. Enter to accept creating the directory
16. Enter to accept default documentation directory at /usr/share/doc/vmware-tools
17. Enter to accept creating the directory
18. Enter to accept executing /usr/bin/vmware-cofnig-tools.pl
19. Enter to accept creation of /etc/X11/xorg.conf file
20. Enter the appropriate number that represent the correct resolution for your monitor.
21. Restart X session or reboot
#########################################################
############################################mount fat32##
#########################################################
bash-3.00# cat /etc/vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c1d0s0 /dev/rdsk/c1d0s0 / ufs 1 no -
/devices - /devices devfs - no -
sharefs - /etc/dfs/sharetab sharefs - no -
ctfs - /system/contract ctfs - no -
objfs - /system/object objfs - no -
swap - /tmp tmpfs - yes -
/dev/dsk/c1d0p0:1 - /mnt/win_xp/ pcfs - yes -
/dev/dsk/c1d0p0:2 - /mnt/data/ pcfs - yes -
mkdir /Windows
mount -F pcfs /dev/dsk/c0d0p0:c /Windows
or you can make this mount automatically during boot by adding a line to the /etc/vfstab :
/dev/dsk/c0d0p0:c - /Windows pcfs - yes -
#########################################################
############################################acpi#########
#########################################################
Historically, acpi-user-options=0x2 has been the only publicly documented option, and is used to disable Solaris use of ACPI for CPU enumeration and interrupt routing. Generally speaking, the pattern has historically been to set acpi-user-options=0x2 if there's any problem at all, just to see if the system works better. Changes made in Solaris 10 have made ACPI use in Solaris much more robust, so disabling use of ACPI should not be required as frequently as in previous releases.
Beginning with Newboot, integrated into Solaris source in April (2005), acpi-user-options has changed in a couple of ways:
*
The previous ACPI subsystem did not put the system into .ACPI. mode, but left the system in .Legacy. mode, where the system BIOS retains control of the system. The new Solaris ACPI subsystem based on ACPI CA now places the system in ACPI mode by default.
*
acpi-user-options=0x8 causes the new Solaris ACPI subsystem to leave the system in Legacy mode. This is the first option one should try if ACPI-related issues are suspected.
*
acpi-user-options=0x4 is present in Solaris 10, and causes both the previous Solaris ACPI subsystem and the new subsystem to partially disable use of ACPI . but Hyper-Threaded CPUs are still enumerated using ACPI tables. This is the second option one should use if ACPI-related issues are suspected.
*
acpi-user-options=0x2 is present in Solaris 10, and causes both the previous Solaris ACPI subsystem and the new subsystem to disable the use of ACPI.
from grub:
title Solaris 10 10/08 s10x_u6wos_07b X86
findroot (rootfs0,3,a)
kernel /platform/i86pc/multiboot
module /platform/i86pc/boot_archive
title Solaris 10 10/08 s10x_u6wos_07b X86 obmedzenie acpi
findroot (rootfs0,3,a)
kernel /platform/i86pc/multiboot -B acpi-user-options=0x8
module /platform/i86pc/boot_archive
#########################################################
############################################screen hack##
#########################################################
#else /* USESETENV */
# if defined(linux) || defined(_convex_) || (BSD >= 199103)
setenv(var, value, 1);
# else
//setenv(var, value);
setenv(var, value, 1);
# endif /* linux || convex || BSD >= 199103 */
#endif /* USESETENV */
####################################################################
###################################solaris vmware from ESX #########
####################################################################
I figured this out. Much searching locally and across the internet turned up little info but with what I found and some experimentation I found this to work for migrating a Solaris 10 Update 3 IDE-based VM to ESX, so am posting it so others don't have to go through the same pain I did (maybe a KB article would be appropriate?).
1) Run VMware Converter
2) Boot the Failsafe Kernel under ESX
3) Allow it to mount the root disk (under /a, the default)
4) Run "mount" and note the /devices/... path used for the root disk.
In my case this was /devices/pci@0,0/pci1000,30@10/sd@0,0:a
I don't know if this will vary, it may always be this path after Converter runs.
I'll use XXX to represent your pathname after /devices/ below just in case
(e.g. XXX=/pci@0,0/pci1000,30@10/sd@0,0:a in my case)
5) TERM=sun-color; export TERM
This will make using vi easier.
6) vi /a/boot/solaris/bootenv.rc
update property "bootpath" (from above):
setprop bootpath XXX
in my case it was:
setprop bootpath /pci@0,0/pci1000,30@10/sd@0,0:a
7) cp /etc/path_to_inst /a/etc/path_to_inst
8) rm /a/etc/devices/*
9) update bootarchive:
bootadm update-archive -R /a
10) Edit /etc/vfstab
Find the line for your root disk. Replace the /dev/dsk/??? path with /devices/XXX, and replace the /dev/rdsk/??? path with /devices/XXX,raw (e.g. /devices/pci@0,0/pci1000,30@10/sd@0,0:a,raw)
This is necessary because before device reconfiguration occurs the kernel will try to see if the / filesystem needs checking, by reading /etc/vfstab, but until reconfiguration occurs there is no /dev entry for the / filesystem. So you need to use the absolute /devices path until reconfiguration can be performed and a /dev alias path is created.
11) Reboot
12) At the Grub screen where you choose the kernel you want, select the normal kernel, but press 'e' to edit it.
13) Move down to the 2nd (kernel) line, and type 'e' to edit it
Append "-r -s" to force device reconfiguration and boot single-user, then press Return
to return to the previous screen
14) Type 'b' to boot this temporarily-modified configuration
15) When you enter single-user, do an ls -l /dev/dsk to find the c?txdxsx disk that corresponds to the /devices path you are using. It's probably c2t0d0s0
16) Touch up /etc/vfstab to use the /dev/* paths which correspond to your disk (don't forget to update the swap entry as well, using the same txdxsx with the correct c? value for your disk).
17) Type ^D to go to multi-user
Done! Be careful typing those long /devices path names!
#########################################################
############################################ssh #########
#########################################################
svcadm enable ssh
#########################################################
###########################################disk crc error
#########################################################
boot failsafe
mount automacilly disk to /a
touch /a/etc/system
cd /a [*]
bootadm update-archive -R /a
#########################################################
############################################gani driver##
#########################################################
(1) Install your PCI card and boot Solaris.
(2) Copy source and binary files.
# gunzip -cd gani-x.x.x.tar.gz | tar xf -
(3) Add hostname for the NIC card into /etc/hosts file
(4) Make links to correct binary directory and Makefile according to your
configuration. i386 and gcc are default.
% cd /.../gani-x.x.x
% rm obj Makefile
% ln -s Makefile.${KARCH}_${COMPILER} Makefile
% ln -s ${KARCH} obj
where ${KARCH} is the result of `isainfo -n`, and ${COMPILER} is
"gcc" or "suncc" which you want to use to make the driver.
(5) Making binaries (only for sparc platform)
Gani driver is ready for 64bit and 32bit solaris8 10/00 sparc or
later. (But currently it is unstable on sparc platforms.)
This distribution does not include sparc binaries. To make the binaries,
you need Sun C compiler or gcc version 3, and do the following operations.
% /usr/ccs/bin/make
(6) Making binaries only for OpenSolaris users.
The driver likely work with GLD v3 in OpenSolaris, known as Nemo.
You can enjoy the new functions by recompiling the source code.
% rm Makefile.config
% ln -s Makefile.config_gld3 Makefile.config
% /usr/ccs/bin/make
4. Testing
Testing before installation is strongly recommended.
# cd /.../gani-x.x.x
# /usr/ccs/bin/make install
# ./adddrv.sh
# /usr/ccs/bin/make uninstall (for solaris7, don't remove the file )
# modload obj/gani
# devfsadm -i gani (for solaris7, use drvconfig and reboot with -r )
# ifconfig ganiN plumb ( where N is an instance number, typcally 0 for first card)
# ifconfig -a ( you will see an entry for ganiN)
# ifconfig ganiN YOUR-HOST-NAME
# ifconfig ganiN ( ensure IP address is correct)
# ifconfig ganiN up ( and then you can test with ping, telnet, ftp ...)
5. Installation
After you ensure that the gani driver is fully functional, install it.
(1) install the gani driver into the kernel directory
# cd /.../gani-x.x.x
# /usr/ccs/bin/make install
If you do not test the gani driver yet, execute the following commands:
# ./adddrv.sh
# devfsadm -i gani (for solaris7, use drvconfig and reboot with -r)
(2) Configure the network interface. Create and/or modify the following file:
/etc/hostname.ganiN
(3) Reboot the system.
# init 6
#########################################################
############################################compression
#########################################################
decompression:
gunzip -c file_name.tar.gz |tar xvf -
If you are on a Unix system, to uncompress *.Z or *.tar.Z files, at the shell prompt, enter:
uncompress *.Z
Use the ls command to check the resulting files. If uncompress creates a .tar file, you must extract the files by entering:
tar -xvf *.tar
Alternatively, to do this in one step and avoid creating the intermediate *.tar file, enter:
zcat *.Z | tar -xvf -
zcat filename.tar.Z | tar xvf -
gzcat filename.tar.gz | tar xvf -
compression:
create .tar:
Example
tar -cvf /scratch/myfile_20030617.tar /scratch/mydir/results/stat/*
Popular options and their significance
-c = create
-f = read to/from the named file (instead of the device /tape)
-t = list contents of .tar file
-r = append to a .tar file
-v = verbose (tells you everything its doing)
-x = extract contents of .tar file
-z = compress files (not so useful for minc files)
p permission
To extract files from your file
tar -xf myfile_20030617.tar
append to .tar:
tar rvf /dev/rmt/0 /data2/tprj/alpha1/*
list .tar:
tar tvf /dev/rmt/0 wwwroot
tar tvf /dev/rmt/0
compression usint gzip:
gzip tarfile.tar
Creates:
tarfile.tar.gz
###########################################################
####################################################version
###########################################################
nativna podpora
ish-3.00$ isainfo -n
amd64
bash-3.00$
ostatna podpora
bash-3.00$ isainfo -v
64-bit amd64 applications
tscp cx16 sse3 sse2 sse fxsr amd_3dnowx amd_3dnow amd_mmx mmx cmov amd_sysc
cx8 tsc fpu
32-bit i386 applications
tscp cx16 sse3 sse2 sse fxsr amd_3dnowx amd_3dnow amd_mmx mmx cmov amd_sysc
cx8 tsc fpu
bash-3.00$
###########################################################
################compilovanie###############################
###########################################################
#./configure --disable-glibtest
#make
#make install
sem tam treba robit nejake zmeny do kodu, ak make install nespravi co je treba
, rucne nakopirujeme:
bash-3.00# find / -xdev -name screen
/export/home/rollyboy/Desktop/screen-4.0.3/screen
/export/home/rollyboy/Desktop/screen-4.0.3/bin/screen
/export/home/rollyboy/Desktop/screen-4.0.3/share/screen
bash-3.00# cp /export/home/rollyboy/Desktop/screen-4.0.3/bin/screen /usr/local/bin
bash-3.00# l /usr/local/bin/screen
-rwsr-xr-x 1 root root 720504 Nov 3 16:14 /usr/local/bin/screen
bash-3.00# cp -r /export/home/rollyboy/Desktop/screen-4.0.3/share/screen /usr/local/share/
bash-3.00# l /usr/local/share/screen/
total 6
drwxr-xr-x 3 root root 512 Nov 3 16:16 .
drwxr-xr-x 5 root root 512 Nov 3 16:16 ..
drwxr-xr-x 2 root root 512 Nov 3 16:16 utf8encodings
bash-3.00#
#############################################################
##############################################triky pre notas
#############################################################
pridanie do grubu
title Solaris 10 10/08 s10x_u6wos_07b X86 obmedzenie acpi
findroot (rootfs0,3,a)
kernel /platform/i86pc/multiboot -B acpi-user-options=0x8
module /platform/i86pc/boot_archive
alebo definicia priamo v systeme:
bash-3.00# cat /boot/solaris/bootenv.rc
#
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "@(#)bootenv.rc 1.33 07/03/03 SMI"
#
# bootenv.rc -- boot "environment variables"
#
setprop ata-dma-enabled '1'
setprop atapi-cd-dma-enabled '0'
setprop ttyb-rts-dtr-off 'false'
setprop ttyb-ignore-cd 'true'
setprop ttya-rts-dtr-off 'false'
setprop ttya-ignore-cd 'true'
setprop ttyb-mode '9600,8,n,1,-'
setprop ttya-mode '9600,8,n,1,-'
setprop lba-access-ok '1'
setprop prealloc-chunk-size '0x2000'
setprop bootpath '/pci@0,0/pci-ide@d/ide@1/cmdk@0,0:a'
setprop keyboard-layout 'US-English'
setprop console 'text'
#setprop acpi-user-options '0x8'
##########systemovy subor
bash-3.00# tail -2 /etc/system
set pcplusmp:apic_use_acpi = 0
set pcplusmp:apic_foN-04.vas.orange.sk'
alias bbrs1='telnet BB5-RS-CPE-01.vas.orange.sk'
alias bbrs2='telnet BB5-RS-CPE-02.vas.orange.sk'
alias bapixdmz='ssh MSC3-PIX-01.vas.orange.sk'
alias bapixlan='ssh MSC3-PIX-02.vas.orange.sk'
alias duben='ssh roleta@80.94.50.198'
alias itbox='ssh roleta@194.160.28.136'
alias erixon='ssh marecek@213.151.192.10'
alias syslog='ssh marecek@10.10.12.2'
alias nmis='ssh jmarecek@10.15.128.3'
alias c='cd ~/nw_config/'
alias synchro_bash_all='cat .bash_profile > .profile && scp -r .ssh .bashrc .profile .screenrc inputrc roleta@80.94.50.198:~ && scp -r .ssh .bashrc .profile .screenrc inputrc roleta@194.160.28.136:~ && scp -r .ssh .bashrc .profile .screenrc inputrc marecek@10.10.12.2:~ '
bash-3.00#
#######################################################
###########################################/etc/profile
#######################################################
To change the root shell to bash shell at login if the file /usr/bin/bash exists, add the following lines to the end of the root user.s profile (usually /.profile):
bash-3.00# cat /.profile
# This is the default standard profile provided to a user.
# They are expected to edit it to meet their own needs.
MAIL=/usr/mail/${LOGNAME:?}
##################################
# User specific environment and startup programs
#################################export
PATH=$PATH:/usr/sfw/bin/:/usr/ccs/bin/:/usr/xpg4/bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin/:$HOME/bin
export PATH
##############################nastavenie bash ak je to mozne
if [ -x /usr/bin/bash ]; then
SHELL=/usr/bin/bash
export SHELL
exec /usr/bin/bash
else
echo /usr/bin/bash not found using default shell of $SHELL
fi
############################ Get the aliases and functions, nastavenia bashu
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
bash-3.00# cat /.bashrc
########################nastavenie premennych bashu
if [ $BASH = /usr/bin/bash ]; then
export EDITOR=vi
export HISTSIZE=50000
fi
######################alias
alias l='ls -la'
alias RoletaPixTest='ssh marecek@192.168.100.1'
alias g='egrep -i'
alias bbpixdmz='ssh BB5-FW-DMZ-01.vas.orange.sk'
alias bbpixlan='ssh BB5-FW-LAN-01.vas.orange.sk'
alias bbrsdmz='telnet BB5-RS-DMZ-04.vas.orange.sk'
alias bbrslan='telnet BB5-RS-LAN-04.vas.orange.sk'
alias bbrs1='telnet BB5-RS-CPE-01.vas.orange.sk'
alias bbrs2='telnet BB5-RS-CPE-02.vas.orange.sk'
alias bapixdmz='ssh MSC3-PIX-01.vas.orange.sk'
alias bapixlan='ssh MSC3-PIX-02.vas.orange.sk'
alias duben='ssh roleta@80.94.50.198'
alias itbox='ssh roleta@194.160.28.136'
alias erixon='ssh marecek@213.151.192.10'
alias syslog='ssh marecek@10.10.12.2'
alias nmis='ssh jmarecek@10.15.128.3'
alias c='cd ~/nw_config/'
alias synchro_bash_all='cat .bash_profile > .profile && scp -r .ssh .bashrc .profile .screenrc inputrc roleta@80.94.50.198:~ && scp -r .ssh .bashrc .profile .screenrc inputrc roleta@194.160.28.136:~ && scp -r .ssh .bashrc .profile .screenrc inputrc marecek@10.10.12.2:~ '
bash-3.00#
####################################################
#################################################ip
###################################################
ifconfig gani0 plumb
ifconfig gani0 192.168.1.38 netmask 255.255.255.0 up
route add 0.0.0.0 192.168.1.1 gani0
ifconfig gani0 plumb
ifconfig gani0 dhcp start
#######################################################
############################################reconfig
######################################################
sys-unconfig