КатегорииLinksUnix Tutorial
Personal Development Ruslan Valiev Solaris Performance Team Damien Farnham Fintan Ryan Nicky Veitch Niall Mullen Sean McGrath DTrace Bryan Cantrill Brendan Gregg ZFS Tim Foster General Ben Rockwood Learning Solaris 10 Privacy policy |
Saturday, April 29. 2006
Using Solaris 10 as DHCP client Posted by Gleb Reys
in SysAdmin at
16:14
Comments (4) Trackbacks (0) Using Solaris 10 as DHCP client
Today I just wanted to document here the quickest and easiest way of setting your Solaris box as a DHCP client.
1) Create the /etc/hostname. For instance: bash-3.00# touch /etc/hostname.skge0 2) Create the /etc/dhcp. It can be an empty file, but you can also use it to specify how long ifconfig should be waiting for a DHCP-server reply before giving up and continuing with Solaris boot. bash-3.00# cat /etc/dhcp.skge0 wait 60 3) Your system name It has to be specified in /etc/nodename. This name is going to be used as your hostname in case your DHCP-server does not return your hostname in reply to your DHCP-request. THat's all. Reboot your system, and it all should work! Enjoy! :) Friday, April 21. 2006
HOW-TO: X11 forwarding using ssh, ... Posted by Gleb Reys
in SysAdmin at
12:37
Comments (19) Trackbacks (0) HOW-TO: X11 forwarding using ssh, putty and Xming
I've been using this combination on a daily basis for more than a year now, and I can't stress enough how really useful it is. I use it both at home and at work, and everything is very easy and - most importantly - absolutely free.
X11 Forwarding with ssh is a wonderful feature which allows you get windows of a remotely started applications shown on your own desktop. For Windows, there are lots of pretty good albeit expensive products like Citrix, GoGlobal and XWin32, which allow you access your remote Unix desktop sessions. But in reality, if you don't need any sessions but only want to remotely start an application and get a window from it on your desktop, you won't need any of these expensive products - the easiest will be to use X11 forwarding and Xming. Xming is an X Windows port for Microsoft Windows. Essentially it's an X-server which starts transparently on top of your MS Windows desktop. It allows you to redirect graphical output of applications you run on remote Unix servers and therefore see these applications windows on your MS Windows desktop. Xming is very simple and easy to use. All you have to do is download its distribution archive from the project's page on SourceForge: XMing @ SourceForge. After you install it, I recommend you have a quickstart panel shortcut created for it, and have your command line altered to something like this: "C:\Program Files\Xming\Xming.exe" :0 -clipboard -multiwindow Now that you have Xming installed, start it and it's time to take care of the ssh side of things. We have to alter the ssh daemon config file: /etc/ssh/sshd_config. Just ensure that it has the following: # X11 tunneling options X11Forwarding yes X11DisplayOffset 10 X11UseLocalhost yes If you already have similar parameters, don't do anything. But if you had to change the config file, it's time to restart ssh: bash-3.00# svcadm restart svc:/network/ssh All that's left now is to download the wonderful free Putty client, that is if you're not using it yet. You can get it here: Putty: a free telnet/ssh client. I won't go into all the Putty configuration details, I'll only mention that for X11 forwarding, you have to do the following: in the main configuration window of Putty (you get it when you start Putty), select Connection section, then SSH, then X11, and make sure you tick the Enable X11 Forwarding option. That's it, you're good to go! Good luck! Thursday, April 13. 2006What would we do without crle?
While compiling some of the stuff I use in 64bit lately, I've had another chance to use the wonderful crle tool and to acknowledge once again just how easier it made my life.
Here's what you can read from man crle: The crle utility provides for the creation and display of a The tool does exactly that - it speficies where ld should look first for the necessary libraries as you start any executable. What would we do without this tool? The answer's simple: 1) we'd have to specify libraries directories implicitly every time we compile something - using -L and -R parameters. 2) we'd probably have to use the good old LD_LIBRARY_PATH environment variable, which again specifies where libraries should first be looked at. Not only it's not cool because you have to waste time, but if you want someone else to use the program you'd get compiled using the tricks above, this someone would have to follow your steps and do the same - set LD_LIBRARY_PATH to the same values. But with crle it's much easier: to look at the current list of directories used by ld just do this: -bash-3.00$ crle Default configuration file (/var/ld/ld.config) not found Default Library Path (ELF): /lib:/usr/lib (system default) Trusted Directories (ELF): /lib/secure:/usr/lib/secure (system default) and for 64-bit objects, do it like this: -bash-3.00$ crle -64 Configuration file [version 4]: /var/ld/64/ld.config Default Library Path (ELF): /lib/64:/usr/lib/64:/usr/sfw/lib/64 Trusted Directories (ELF): /lib/secure/64:/usr/lib/secure/64 (system default) Command line: crle -64 -c /var/ld/64/ld.config -l /lib/64:/usr/lib/64:/usr/sfw/lib/64 As you can see, adding more directories is quite easy. For instance, if I want to add another library directory of my own, /export/soft/lib/64, this command would help me: -bash-3.00$ crle -64 -c /var/ld/64/ld.config -l /lib/64:/usr/lib/64:/usr/sfw/lib/64:/export/soft/lib/64
Monday, April 10. 2006Compiling MySQL for amd64
Yesterday I started compiling all the necessary software on my new server. Naturally, I'm trying to make it all 64bit. For lots of software packages I've used the same set of CFLAGS and LDFLAGS parameters, and everything worked just fine.
So, I've used the same configure script parameters to compile the latest 64-bit version of MySQL - 5.0.19: mysql#MAKE="/usr/sfw/bin/gmake" CFLAGS="-m64" LDFLAGS="-m64 -L/lib/64" ./configure --prefix=/export/soft/mysql-5.0.19 --with-charset=utf8 but during the compilation I've got this error: Making all in sql gmake[2]: Entering directory `/export/dist/mysql-5.0.19/sql' if g++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/export/soft/mysql-5.0.19\"" -DDATADIR="\"/export/soft/mysql-5.0.19/var\"" -DSHAREDIR="\"/export/soft/mysql-5.0.19/share/mysql\"" -DHAVE_CONFIG_H -I. -I. -I.. -I../zlib -I../innobase/include -I../include -I../include -I../regex -I. -O3 -DDBUG_OFF -fno-implicit-templates -fno-exceptions -fno-rtti -DHAVE_RWLOCK_T -MT gen_lex_hash.o -MD -MP -MF ".deps/gen_lex_hash.Tpo" -c -o gen_lex_hash.o gen_lex_hash.cc; \ then mv -f ".deps/gen_lex_hash.Tpo" ".deps/gen_lex_hash.Po"; else rm -f ".deps/gen_lex_hash.Tpo"; exit 1; fi /bin/bash ../libtool --preserve-dup-deps --mode=link g++ -O3 -DDBUG_OFF -fno-implicit-templates -fno-exceptions -fno-rtti -DHAVE_RWLOCK_T -m64 -L/lib/64 -o gen_lex_hash gen_lex_hash.o ../myisam/libmyisam.a ../myisammrg/libmyisammrg.a ../heap/libheap.a ../vio/libvio.a ../mysys/libmysys.a ../dbug/libdbug.a ../regex/libregex.a ../strings/libmystrings.a ../zlib/libz.la -lpthread -lthread -lposix4 -lcrypt -lgen -lsocket -lnsl -lm -lpthread -lthread mkdir .libs g++ -O3 -DDBUG_OFF -fno-implicit-templates -fno-exceptions -fno-rtti -DHAVE_RWLOCK_T -m64 -o .libs/gen_lex_hash gen_lex_hash.o -L/lib/64 ../myisam/libmyisam.a ../myisammrg/libmyisammrg.a ../heap/libheap.a ../vio/libvio.a ../mysys/libmysys.a ../dbug/libdbug.a ../regex/libregex.a ../strings/libmystrings.a ../zlib/.libs/libz.so -lpthread -lthread -lpthread -lthread -lpthread -lthread -lposix4 -lcrypt -lgen -lsocket -lnsl -lm -lpthread -lthread -Wl,-R -Wl,/export/soft/mysql-5.0.19/lib/mysql ld: fatal: file gen_lex_hash.o: wrong ELF class: ELFCLASS32 ld: fatal: File processing errors. No output written to .libs/gen_lex_hash collect2: ld returned 1 exit status gmake[2]: *** [gen_lex_hash] Error 1 gmake[2]: Leaving directory `/export/dist/mysql-5.0.19/sql' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/export/dist/mysql-5.0.19' gmake: *** [all] Error 2 Attentive reader or a seasoned developer will immediately see what my problem was. Turned out, I've forgotten to specify the -m64 parameter for g++. So the following parameters worked for me: mysql#MAKE="/usr/sfw/bin/gmake" CFLAGS="-m64" CXXFLAGS="-m64" LDFLAGS="-m64 -L/lib/64" ./configure --prefix=/export/soft/mysql-5.0.19 --with-charset=utf8 Update: One more error was found at a later stage of MySQL compilation (I've abridged the command output to save space): gmake[3]: Entering directory `/export/dist/mysql-5.0.19/server-tools/instance-manager' ... g++ -DDBUG_OFF -m64 -fno-implicit-templates -fno-exceptions -fno-rtti -DHAVE_RWLOCK_T -m64 -o .libs/mysqlmanager command.o mysqlmanager.o manager.o log.o thread_registry.o listener.o protocol.o mysql_connection.o user_map.o messages.o commands.o instance.o instance_map.o instance_options.o buffer.o parse.o guardian.o parse_output.o -L/lib/64 -L/usr/sfw/lib/amd64 ./.libs/liboptions.a -lpthread -lthread -lpthread -lthread /usr/sfw/lib/amd64/libstdc++.so -lgcc_s libnet.a ../../vio/libvio.a ../../mysys/libmysys.a ../../strings/libmystrings.a ../../dbug/libdbug.a ../../zlib/.libs/libz.so -lpthread -lthread -lpthread -lthread -lpthread -lthread -lposix4 -lcrypt -lgen -lsocket -lnsl -lm -lpthread -lthread -Wl,-R -Wl,/usr/sfw/lib/amd64 -Wl,-R -Wl,/export/soft/mysql-5.0.19/lib/mysql ld: fatal: library -lgcc_s: not found ld: warning: file /usr/sfw/lib/amd64/libstdc++.so: attempted multiple inclusion of file ld: fatal: File processing errors. No output written to .libs/mysqlmanager collect2: ld returned 1 exit status gmake[3]: *** [mysqlmanager] Error 1 gmake[3]: Leaving directory `/export/dist/mysql-5.0.19/server-tools/instance-manager' gmake[2]: *** [all-recursive] Error 1 gmake[2]: Leaving directory `/export/dist/mysql-5.0.19/server-tools' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/export/dist/mysql-5.0.19' gmake: *** [all] Error 2 So I had to go into /usr/sfw/lib/amd64 and do this: ln -s libgcc_s.so.1 libgcc_s.so If I come across anything interesting while compiling 64bit things, I'll be sure to mention it here, but for now I just hope this entry will keep you from making the same mistake. Good luck! Friday, April 7. 2006
Asus A8N-SLI networking in Solaris Posted by Gleb Reys
in SysAdmin at
03:01
Comment (1) Trackbacks (0) Asus A8N-SLI networking in Solaris
Finally, I've found some time to finish off the on-board network adapters configuration in Solaris 10 for my Asus A8N-SLI motherboard.
As I've already told before, this motherboard comes equipped with 2 network adapters:nForce4 and Yukon Gigabit Ethernet 10/100/1000Base-T Adapter. Both adapters are based on Marvell chips - they are Marvell 88E8001-LKJ1 (PCI Gigabit Ethernet) and Marvell 88E1111-RCJ (PHY) respectively. So, the first one of these adapters is properly found and supported in Solaris 10 out of the box. In fact, Solaris 10 even finds and attempts to configure nge0 during the initial OS install. To make the Yukon Gigabit (Marvell) adapter work, you should go to the SysKonnect website and navigate to the drivers downloads page (skge is there as well). What's REALLY cool is that there is a 64bit driver already! So I've got myself this file: skgesol_x64v8.12.1.3.tar.Z After you unpack the archive, you should install the SKGEsolx, and that's it - the pre-install script even allows you to configure skge0 adapter - set its IP and network mask. This is where my two network adapters are found (taken from /etc/path_to_inst): "/pci@0,0/pci10de,5c@9/pci1043,811a@c" 0 "skge" "/pci@0,0/pci1043,8141@a" 0 "nge" Attention: due to unknown reasons, prtconf -vp clearly shows only one of the adapters - skge. That's the one represented by the "Ethernet controller" model name. Don't know why, but nge is called "Bridge device" there. |





