This shows you the differences between two versions of the page.
os:solaris:sysadm [2009/02/18 22:41] admin |
os:solaris:sysadm [2009/02/28 15:21] (current) |
||
---|---|---|---|
Line 2: | Line 2: | ||
====== System administration ====== | ====== System administration ====== | ||
- | |||
===== SMF ===== | ===== SMF ===== | ||
+ | ==== Enable/disable services ==== | ||
Since Solaris 10, the old (but nice ?) start/stop script in rc?.d have been replaced by SMF, the **Service Management Facility**. | Since Solaris 10, the old (but nice ?) start/stop script in rc?.d have been replaced by SMF, the **Service Management Facility**. | ||
^ svcs ^ ^ | ^ svcs ^ ^ | ||
- | | <code>svcs -x</code> | lists services encountering problems | | + | | svcs -x | lists services encountering problems | |
- | | <code>svcs -a</code> | lists all services including disabled ones | | + | | svcs -a | lists all services including disabled ones | |
- | | <code>svcs -l <service></code> | provides information concerning a specific service | | + | | svcs -l <service> | provides information concerning a specific service | |
^ svcadm ^ ^ | ^ svcadm ^ ^ | ||
| svcadm enable <service> | to enable a service. e.g svcadm enable svc:/network/samba:default | | | svcadm enable <service> | to enable a service. e.g svcadm enable svc:/network/samba:default | | ||
Line 18: | Line 18: | ||
OpenSolaris uses the SMF too. It (unfortunately ?) ships with many services and will probably need some tuning if your host is a bit slow. A nice reading on that behalf: [[http://www.sun.com/security/docs/CIS_Solaris_10_Benchmark_v4.pdf|Solaris 10 Benchmark v4.0]]. | OpenSolaris uses the SMF too. It (unfortunately ?) ships with many services and will probably need some tuning if your host is a bit slow. A nice reading on that behalf: [[http://www.sun.com/security/docs/CIS_Solaris_10_Benchmark_v4.pdf|Solaris 10 Benchmark v4.0]]. | ||
+ | |||
+ | ==== Useful services ==== | ||
^ Name ^ Service Name ^ Comments ^ | ^ Name ^ Service Name ^ Comments ^ | ||
Line 25: | Line 27: | ||
| Fiber Channel | svc:/system/device/fc-fabric:default | Keep enabled or the system won't reboot | | | Fiber Channel | svc:/system/device/fc-fabric:default | Keep enabled or the system won't reboot | | ||
| GDM | Solaris: svc:/application/gdm2-login:default, OpenSolaris: svc:/application/graphical-login/gdm:default | enabled | | | GDM | Solaris: svc:/application/gdm2-login:default, OpenSolaris: svc:/application/graphical-login/gdm:default | enabled | | ||
- | | GSS API | gss:default | Disable. //The GSS API is a security abstraction layer that is designed to make it easier for developers to integrate with different authentication schemes. It is most commonly used in applications for sites that use Kerberos for network authentication, though it can | + | | GSS API | gss:default | Disable. //The GSS API is a security abstraction layer that is designed to make it easier for developers to integrate with different authentication schemes. It is most commonly used in applications for sites that use Kerberos for network authentication, though it can also allow applications to interoperate with other authentication schemes// (quoted from [[http://www.sun.com/security/docs/CIS_Solaris_10_Benchmark_v4.pdf|Solaris 10 Benchmark v4.0]]). | |
- | also allow applications to interoperate with other authentication schemes// (quoted from [[http://www.sun.com/security/docs/CIS_Solaris_10_Benchmark_v4.pdf|Solaris 10 Benchmark v4.0]]). | | + | |
| IPFilter's service | ipmon | Enabled. used for zones | | | IPFilter's service | ipmon | Enabled. used for zones | | ||
| IPv6 neighbour discovery daemon | svc:/network/routing/ndp:default | Disabled. I don't use IPv6 at home ! | | | IPv6 neighbour discovery daemon | svc:/network/routing/ndp:default | Disabled. I don't use IPv6 at home ! | | ||
Line 41: | Line 42: | ||
| VNC Configuration | svc:/system/xvm/vnc-config:default | disable | | | VNC Configuration | svc:/system/xvm/vnc-config:default | disable | | ||
- | Currently, the list of online services on my host are: | + | ==== List of online services ==== |
+ | |||
+ | Currently, the list of online services on my OpenSolaris host are: | ||
<code> | <code> | ||
STATE STIME FMRI | STATE STIME FMRI | ||
Line 141: | Line 144: | ||
The host can be graphically administered using: | The host can be graphically administered using: | ||
- | * SMC (Solaris Management Console): user management, hosts editing, cron batches, SMF. Launch **/usr/sadm/bin/smc**. | + | * SMC (Solaris Management Console): user management, hosts editing, cron batches, SMF. Launch **/usr/sadm/bin/smc**. On Solaris only (not OpenSolaris). |
- | * [[http://www.opensolaris.org/os/project/vpanels/|Visual Panels ]]: this is an additional piece of software | + | * [[http://www.webmin.com/|Webmin]]: web-based administration. Pretty good. |
- | * [[http://www.webmin.com/|Webmin]]: web-based administration. Additional piece of software. | + | * [[http://www.opensolaris.org/os/project/vpanels/|Visual Panels]]: this is an additional piece of software. I'm not a fan, but it's there if you want it. |
- | ===== User management ===== | + | ===== How to add a new user ===== |
To add a new user, | To add a new user, | ||
* use the graphical Solaris Management Console (smc&) | * use the graphical Solaris Management Console (smc&) | ||
- | * or make sure the home dir exists and is readable by the group, and then type: useradd -d /export/home/axelle -g staff -s /usr/bin/bash axelle | + | * or manually: |
+ | * make sure the home dir exists and is readable by the group, | ||
+ | * then type: | ||
+ | <code> | ||
+ | useradd -d <homedir> -g <group> -s /usr/bin/bash <username> | ||
+ | </code> | ||
===== Authentication ===== | ===== Authentication ===== | ||
- | * to log failed logins, set SYSLOG_FAILED_LOGINS in **/etc/default/login** | + | ==== Log failed logins ===== |
- | * the password policy is configured in **/etc/default/passwd**. The default settings are reasonable. Several parameters are commented out, but they have a default value. On the contrary, an unsecure setting could be as follows: | + | |
+ | Set SYSLOG_FAILED_LOGINS in **/etc/default/login** | ||
+ | |||
+ | ==== Password policy ===== | ||
+ | |||
+ | The password policy is configured in **/etc/default/passwd**. The default settings are reasonable. Several parameters are commented out, but they have a default value. On the contrary, an unsecure setting could be as follows: | ||
<code> | <code> | ||
MAXWEEKS= | MAXWEEKS= | ||
Line 165: | Line 178: | ||
See more information [[http://www2.petervg.nl/cgi-bin/docs.cgi?a=read&doc=81|here]]. | See more information [[http://www2.petervg.nl/cgi-bin/docs.cgi?a=read&doc=81|here]]. | ||
+ | |||
+ | ==== Automatic login ===== | ||
+ | |||
+ | On Solaris 10, to have the host automatically log in as a given user: | ||
+ | <code> | ||
+ | # gdmsetup & --> set up for user you wish to log in | ||
+ | # vi /etc/X11/gdm/gdm.conf | ||
+ | ... | ||
+ | SystemMenu=true | ||
+ | # /etc/init.d/dtlogin stop | ||
+ | # /usr/dt/bin/dtconfig -d | ||
+ | # svcadm enable gdm2-login | ||
+ | </code> | ||
+ | Now, automatic login is a bit disappointing, because you still have to provide user's **password**... :-( | ||
+ | |||
+ | On OpenSolaris 2008.11, no such issue ! Use gdmsetup and it works. | ||
+ | |||
+ | |||
+ | |||
+ | |||
===== System Path ===== | ===== System Path ===== | ||
Line 204: | Line 237: | ||
* To add a new computer, use the Solaris Management Console, Computers & Network, Computers, then selection Action / Add Computer. This basically adds an entry to /etc/hosts. | * To add a new computer, use the Solaris Management Console, Computers & Network, Computers, then selection Action / Add Computer. This basically adds an entry to /etc/hosts. | ||
- | * Check out files /etc/hostname, /etc/hostname.hme0, /etc/nodename, /etc/inet/hosts, /etc/inet/ipnodes. | + | * Check out files /etc/hostname, /etc/hostname.<SOMETHING> (hme0, yukonx...), /etc/nodename, /etc/inet/hosts, /etc/inet/ipnodes. |
* List possible interfaces: ifconfig -a plumb, then ifconfig | * List possible interfaces: ifconfig -a plumb, then ifconfig | ||
* List routes: routeadm | * List routes: routeadm | ||
* GUI: network-admin | * GUI: network-admin | ||
- | |||
- | ===== Rlogin ===== | + | ===== Static IP address ===== |
- | To add the rlogin network service: | + | Specifying a static IP address consists in: |
- | <code> | + | |
- | svcs -l rlogin | + | |
- | svcadm enable network/login:rlogin | + | |
- | </code> | + | |
- | + | ||
- | Note that svcadm enable -t network/login:rlogin only performs a temporary enable of rlogin (won't persist over reboot). | + | |
- | + | ||
- | ===== Static IP address ===== | + | |
- | * Name your ethernet interface. In my case, I used the default name, yukonx0. | + | * ethernet interface: an ether interface must exist and be named. I use the default name for mine: yukonx0 |
- | * Make sure the service physical:default is enabled | + | * make sure the networking service is enabled: either physical:default or physical:nwam. The former is the most 'basic' networking service. The latter is a networking daemon that automatically configures your host. It's worth a try: on my OpenSolaris host, it worked straight out of the box and I consequently did not have to configure networking manually. On Solaris u5, however, I add to do it manually. |
- | * Create a file /etc/hostname.<INTERFACE NAME> and inside, specify your host's name: | + | * configure a few files (with nwam, most of these steps should be automatically done): |
+ | * /etc/hostname.<INTERFACE NAME>: specify your host's name:cify your host's name: | ||
<code> | <code> | ||
$ more /etc/hostname.yukonx0 | $ more /etc/hostname.yukonx0 | ||
boureautic | boureautic | ||
</code> | </code> | ||
- | * In /etc/hosts, set the loopback address and your static IP address: | + | * /etc/hosts: set the loopback address and your static IP address: |
<code> | <code> | ||
- | $ more /etc/hosts | + | $ cat /etc/hosts |
# | # | ||
# Internet host table | # Internet host table | ||
Line 239: | Line 264: | ||
192.168.0.2 boureautic | 192.168.0.2 boureautic | ||
</code> | </code> | ||
- | + | * /etc/resolv.conf: set the appropriate DNS servers (those are the ones used by Free): | |
- | * In /etc/resolv.conf, set the appropriate DNS server (those are the ones used by Free): | + | |
<code> | <code> | ||
- | domain sweethome.fr | + | nameserver 212.27.40.240 |
- | nameserver 212.27.54.252 | + | nameserver 212.27.40.241 |
- | nameserver 212.27.53.252 | + | |
</code> | </code> | ||
- | + | * /etc/nsswitch.conf: make sure the line hosts sets "files" before "dns". | |
- | * In /etc/nsswitch.conf, make sure the line hosts sets "files" before "dns". | + | |
<code> | <code> | ||
hosts: files dns | hosts: files dns | ||
</code> | </code> | ||
+ | * for physical:default, set the default gateway: route add default 192.168.0.254. And then, automatically add the route at each reboot writing a script /etc/rc2.d/S99route | ||
- | * For a manual try, | + | |
- | * add the network interface with ifconfig: | + | * For a manual try, add the network interface with ifconfig: |
<code> | <code> | ||
ifconfig yukonx0 192.168.0.2 netmask 255.255.255.0 up | ifconfig yukonx0 192.168.0.2 netmask 255.255.255.0 up | ||
</code> | </code> | ||
- | * then set the default gateway: | + | ===== Rlogin ===== |
- | <code> | + | |
- | route add default 192.168.0.254 | + | |
- | </code> | + | |
- | * To do this automatically, in /etc/rc2.d/S99route | + | To add the rlogin network service: |
<code> | <code> | ||
- | route add default 192.168.0.254 | + | svcs -l rlogin |
+ | svcadm enable network/login:rlogin | ||
</code> | </code> | ||
- | An alternative consists in using the Networking daemon: physical:nwam | + | Note that svcadm enable -t network/login:rlogin only performs a temporary enable of rlogin (won't persist over reboot). |
====== X ====== | ====== X ====== | ||
- | ===== Remote display ===== | + | ===== Display windows remotely ===== |
+ | |||
+ | This is basic on X Window, but from time to time I however encounter problems to do it. | ||
For remote display: | For remote display: | ||
Line 279: | Line 301: | ||
</code> | </code> | ||
- | Also use /usr/openwin/bin/xauth list to list which entities are authorized. | + | Also use **/usr/openwin/bin/xauth list** to list which entities are authorized. |
===== XScreensaver ===== | ===== XScreensaver ===== | ||
Line 293: | Line 315: | ||
===== GDM ===== | ===== GDM ===== | ||
- | On Solaris 10, to set up automatic log in: | + | On Solaris 10, stop dtlogin to use gdm: |
<code> | <code> | ||
- | # gdmsetup & --> set up for user you wish to log in | ||
- | # vi /etc/X11/gdm/gdm.conf | ||
- | ... | ||
- | SystemMenu=true | ||
# /etc/init.d/dtlogin stop | # /etc/init.d/dtlogin stop | ||
# /usr/dt/bin/dtconfig -d | # /usr/dt/bin/dtconfig -d | ||
+ | # svcadm disable cde-login | ||
# svcadm enable gdm2-login | # svcadm enable gdm2-login | ||
</code> | </code> | ||
- | Now, automatic login is a bit disappointing, because you still have to provide user's password... :-( | ||
- | On OpenSolaris 2008.11, no such issue ! Use gdmsetup and it works. | + | On OpenSolaris 2008.11, gdm refers to the service svc:/application/graphical-login/gdm:default. There is no CDE login. |
- | ===== GNOME ===== | ||
- | One of my former desktops used the following: | ||
- | * Theme: I like the [[http://www.gnome-look.org/content/show.php/BlackGarden?content=89218|BlackGarden]] theme. You have to install the theme with Preferences > Desktop Preferences > Display > Themes. Fetch the tar.gz, then close and reload the theme manager to see BlackGarden. The install procedure actually untars the theme in ~/.themes. | ||
- | * Gnome-terminal: transparency's throttle is set to the middle. | ||
- | * icon bar: with weather, sticky notes, log out, two launchers (terminal & firefox). The bar's properties are set to: don't expand, show hide buttons. | ||
- | To launch an application as root: **gksu**. For example, | ||
- | <code> | ||
- | gksu /usr/bin/packagemanager | ||
- | </code> | ||
- | ===== Enlightenment ===== | ||
- | |||
- | [[http://www.enlightenment.org/|Enlightenment]] is a nice Unix window manager. | ||
- | There's a ready-to-use package for DR16 at [[http://www.blastwave.org|Blastwave]]. | ||
- | <code> | ||
- | pkg-get install enlightenment | ||
- | </code> | ||
- | |||
- | Then, you merely need to edit your .dtprofile, and add at the end: | ||
- | <code> | ||
- | exec /opt/csw/bin/enlightenment | ||
- | </code> | ||
- | See [[http://www.lildude.co.uk/howto-build-and-install-e17-on-solaris-10/|for details]]. | ||
- | |||
- | You can download Enlightenment themes from [[http://themes.freshmeat.net/browse/60/|Freshmeat]] or [[http://www1.get-e.org/Themes/E17/|Get-E]]. | ||
- | My favorite themes are : | ||
- | * Bevelfree: coloured, simple with no 3D. | ||
- | * Dufrenite: nice, but a bit 'gray'. | ||
- | * Thingradient | ||
- | * XaquaX: an Apple look | ||
- | |||
- | Enlightenment shows customizable menus. To edit the menus, look for a file called files.menu in ~/.enlightenment. Buttons are configured in the theme as buttons.cfg. Usually, you set action classes (actionclasses.cfg). Make sure they use the right path. | ||
- | |||
- | ===== FVWM ===== | ||
- | |||
- | I like FVWM because it is quite lightweight. However, the look and feel of FVWM 2.4 is a bit 'old' (to my opinion), so I wanted to use FVWM 2.5. As I couldn't find any precompiled package for this version, I compiled it myself from sources, without too many difficulties both on Solaris 10 and OpenSolaris. | ||
- | |||
- | fvwm 2.5.26 | ||
- | |||
- | To set up a vertical pager, do: | ||
- | <code> | ||
- | *FvwmPager: Columns 1 | ||
- | </code> | ||
- | |||
- | On OpenSolaris, I kept on having a silly and ugly small tab next to my Xterms, this tab showing various locales/encodings. To remove this, launch **iiim-properties**, and set Input Method and switcher placement to "None". Apply. | ||
- | A screenshot of my current desktop: | ||
- | {{:os:solaris:fvwm-screenshot.jpg|}} | ||
Line 379: | Line 351: | ||
====== Software management ====== | ====== Software management ====== | ||
+ | |||
+ | ^ Commands ^ Typical install directories ^ Local package database ^ Comments ^ | ||
+ | | pkgadd -d <unzipped-package> | /usr, /usr/sfw, /opt/sfw | /var/sadm/pkg | Default package management utility on Solaris. Does not handle dependencies. | | ||
+ | | pkg-get <blastwave-package> | /opt/csw | | Blastwave package management. Close to apt-get. Handles dependencies | | ||
+ | | pkg install <IPS package> | | | Default package management utility for OpenSolaris | | ||
===== Patches ===== | ===== Patches ===== | ||
- | Use the Sun Connection Update Manager (last version is currently 1.0.4). To do so, it is mandatory to register Solaris. | + | On Solaris: use the Sun Connection Update Manager (last version is currently 1.0.4). To do so, it is mandatory to register Solaris. The command line tool is **/usr/sbin/updatemanager** (run as root). This will ask for registration if you haven't done so yet). This is a graphical interface. |
- | As root, run **/usr/sbin/updatemanager** (this will ask for registration if you haven't done so yet). This is a graphical interface. | + | :!: :!: :!: I encountered a serious problem with patches: I patched the system with security or recommended patches, some of those patches failed, and then at the next reboot: kernel crash (impossible to boot, except in single user mode) :-( So beware... See [[http://forums.sun.com/thread.jspa?threadID=5355061&start=0&tstart=0|Sun's Forums]] and [[http://groups.google.com/group/comp.sys.sun.admin/browse_frm/thread/3d9a7cd5dea16dd4/99164957421cdb62?tvc=1&q=137137-09#99164957421cdb62|Google Groups]]: looks like others encountered the same problem... |
+ | On OpenSolaris: launch **/usr/sbin/updatemanager** | ||
- | :!: :!: :!: I encountered a serious problem with patches: I patched the system with security or recommended patches, some of those patches failed, and then at the next reboot: kernel crash (impossible to boot, except in single user mode) :-( So beware... | ||
- | ===== pkgadd ===== | ||
- | Sun's software is typically installed in /usr, /usr/sfw and /opt/sfw. Other software directories are /usr/local. | + | ===== pkgadd, pkginfo etc ===== |
- | For example, mozilla is in /usr/sfw/bin/mozilla, java is in /usr/bin | + | This is Solaris's default package management utilities. |
- | To install a pre-compiled binary, unzip it (gunzip, bunzip2, unzip...) and then do pkgadd -d <thepackage> | + | Typical prefixes: |
+ | * Sun's packages are prefixed with SUNW (e.g SUNWvbox, SUNWless). | ||
+ | * Blastwave's package are prefixed with CSW (e.g CSWperl, CSWpkgutil). Those packages can be installed with Solaris's package tools (pkgadd, pkgrm etc) or with Blastwave's higher level utility pkg-get or pkgutil. | ||
+ | |||
+ | Typical installation directories: /usr, /usr/sfw and /opt/sfw | ||
+ | * by default, mozilla is in /usr/sfw/bin/mozilla on Solaris 10. | ||
+ | * by default, java is in /usr/bin/java on Solaris 10. | ||
+ | |||
+ | Install a pre-compiled package: 1/ unzip it (gunzip, bunzip2, unzip...) and 2/ pkgadd. | ||
+ | For example: | ||
+ | <code> | ||
+ | $ pfexec pkgadd -d pkgutil-1.4\,REV\=2009.01.20-SunOS5.8-i386-CSW.pkg | ||
+ | |||
+ | The following packages are available: | ||
+ | 1 CSWpkgutil pkgutil - installs Solaris packages easily | ||
+ | (i386) 1.4,REV=2009.01.20 | ||
+ | |||
+ | Select package(s) you wish to process (or 'all' to process | ||
+ | all packages). (default: all) [?,??,q]: | ||
+ | </code> | ||
+ | |||
+ | List all packages: pkginfo. For example: | ||
+ | <code> | ||
+ | $ pkginfo | ||
+ | [..] | ||
+ | system SUNWopenssl-commands OpenSSL Commands (Usr) | ||
+ | system SUNWopenssl-include OpenSSL Header Files | ||
+ | system SUNWopenssl-libraries OpenSSL Libraries (Usr) | ||
+ | [..] | ||
+ | </code> | ||
+ | |||
+ | Get details of a package: pkginfo -l. For example: | ||
+ | <code> | ||
+ | $ pkginfo -l SUNWopenssl-commands | ||
+ | PKGINST: SUNWopenssl-commands | ||
+ | NAME: OpenSSL Commands (Usr) | ||
+ | CATEGORY: system | ||
+ | ARCH: i386 | ||
+ | VERSION: 11.11,REV=2008.10.30.20.37 | ||
+ | VENDOR: Sun Microsystems, Inc. | ||
+ | DESC: OpenSSL Commands (Use) | ||
+ | HOTLINE: Please contact your local service provider | ||
+ | STATUS: completely installed | ||
+ | </code> | ||
+ | |||
+ | Listing the contents of a package: pkgchk -l <package> | ||
+ | <code> | ||
+ | pkgchk -l CSWpkgutil | ||
+ | Pathname: /opt/csw | ||
+ | Type: directory | ||
+ | Expected mode: 0755 | ||
+ | Expected owner: root | ||
+ | Expected group: bin | ||
+ | Referenced by the following packages: | ||
+ | CSWpkgutil CSWcommon CSWzlib | ||
+ | Current status: installed | ||
+ | |||
+ | Pathname: /opt/csw/bin | ||
+ | Type: directory | ||
+ | [..] | ||
+ | </code> | ||
+ | |||
+ | Removing a package: pkgrm <packagename> | ||
Installed packages are located in /var/sadm/pkg. | Installed packages are located in /var/sadm/pkg. | ||
- | To search in which package a given command is included, do | + | |
+ | On Solaris, to search in which package a given command is included, search in /var/sadm/install/contents. For example | ||
<code> | <code> | ||
grep xxx /var/sadm/install/contents | grep xxx /var/sadm/install/contents | ||
</code> | </code> | ||
- | |||
===== pkg-get ===== | ===== pkg-get ===== | ||
- | pkgadd is the basic command to install/remove/manage software packages on Solaris. But, it's quite basic. To automatically download a given package and its dependencies, pkg-get is quite interesting (similar to Debian's apt-get). //I hear it is currently being replaced by pkgutils.// | + | pkg-get should be seen as a front-end to Solaris's default package management commands. It |
+ | * automatically downloads a given package | ||
+ | * automatically installs its dependencies | ||
+ | ... two tasks pkgadd does not handle. Unfortunately, pkg-get will only work for Blastwave-like package (ibiblio). | ||
+ | To install pkg-get, | ||
* Get pkg-get from [[http://www.blastwave.org/mirrors#pkg-get|Blastwave]]. | * Get pkg-get from [[http://www.blastwave.org/mirrors#pkg-get|Blastwave]]. | ||
* Install it: pkgadd -d pkg_get-3.8.4-SunOS5.8-all-CSW.pkg. The procedure is perfectly described on [[http://www.blastwave.org/howto.html|Blastwave's]] site. Check its digest with: | * Install it: pkgadd -d pkg_get-3.8.4-SunOS5.8-all-CSW.pkg. The procedure is perfectly described on [[http://www.blastwave.org/howto.html|Blastwave's]] site. Check its digest with: | ||
Line 420: | Line 462: | ||
PKGGET_DOWNLOAD_DIR=/tmp | PKGGET_DOWNLOAD_DIR=/tmp | ||
</code> | </code> | ||
+ | * Then use pkg-get to install Blastwave packages. | ||
To install a package: pkg-get install <packagename>, e.g | To install a package: pkg-get install <packagename>, e.g | ||
Line 438: | Line 481: | ||
This will upgrade all packages for which a new version exists. It consists in uninstalling the old version (remove) and then installing the new version (install). At first, seeing a remove operation may be surprising, but in the end, it works :-) | This will upgrade all packages for which a new version exists. It consists in uninstalling the old version (remove) and then installing the new version (install). At first, seeing a remove operation may be surprising, but in the end, it works :-) | ||
+ | |||
+ | ===== pkgutil ===== | ||
+ | |||
+ | Blastwave has recently replaced pkg-get by pkgutil. | ||
+ | To install pkgutil, | ||
+ | * get the package | ||
+ | * do: pkgadd -d <pkgutil-pkg> | ||
+ | * then use pkgutil to handle other packages. | ||
===== IPS ===== | ===== IPS ===== | ||
- | /usr/bin/packagemanager | + | OpenSolaris introduces a new package management system. Perhaps I don't know how to use it, but I don't like it very much :-( It takes ages to run... |
+ | |||
+ | IPS packages are typically prefixed by IPS (e.g IPSgnutls, IPSiconv...), but IPS commands will also display other packages (SUNW, CSW...) | ||
+ | * install a package: pkg install <package> | ||
* in which package is a given command: pkg search -r <command> | * in which package is a given command: pkg search -r <command> | ||
+ | There's a nice comparison between [[http://opensolaris.org/os/community/documentation/apt_ips/|Debian's apt-get and IPS or pkgadd / IPS: here]]. | ||
===== Using other packages ===== | ===== Using other packages ===== | ||
Line 462: | Line 518: | ||
===== Bash ===== | ===== Bash ===== | ||
- | A very simple .bashrc: | + | A very simple .bashrc on Solaris: |
<code> | <code> | ||
export PATH=/usr/bin/amd64:$PATH:/opt/csw/bin:. | export PATH=/usr/bin/amd64:$PATH:/opt/csw/bin:. | ||
export PS1="[\u@\w] " | export PS1="[\u@\w] " | ||
+ | </code> | ||
+ | |||
+ | on OpenSolaris: | ||
+ | <code> | ||
+ | PS1='${LOGNAME}@$(/usr/bin/hostname):$( | ||
+ | [[ "${LOGNAME}" == "root" ]] && printf "%s" "${PWD/${HOME}/~}# " || | ||
+ | printf "%s" "${PWD/${HOME}/~}\$ ")' | ||
+ | |||
+ | export PATH=$PATH:/usr/local/bin:/usr/share/bin | ||
</code> | </code> | ||
Line 489: | Line 554: | ||
===== Compilers etc ===== | ===== Compilers etc ===== | ||
- | There's a [[http://developers.sun.com/solaris/articles/build_sw_on_solaris.html|very interesting article on the subject here]]. Mainly, what I get of out it is: | + | For **Solaris**, there's a [[http://developers.sun.com/solaris/articles/build_sw_on_solaris.html|very interesting article on the subject here]]. Mainly, what I get of out it is: |
* no need to install a gcc package (such as CSWgcc) because gcc is usually installed by default in /usr/sfw (mine is version 3.4.3). | * no need to install a gcc package (such as CSWgcc) because gcc is usually installed by default in /usr/sfw (mine is version 3.4.3). | ||
* no need to install gmake (3.80) either: it's already installed in /usr/sfw. | * no need to install gmake (3.80) either: it's already installed in /usr/sfw. | ||
Line 502: | Line 567: | ||
</code> | </code> | ||
- | On OpenSolaris, install SUNWgcc and SUNWgmake. | + | For **OpenSolaris**, install SUNWgcc and SUNWgmake. |
===== Library path ===== | ===== Library path ===== | ||
Line 518: | Line 583: | ||
- | ====== Other Applications ====== | ||
- | ===== Alpine ===== | ||
- | Alpine is a newer version of Pine. There is no package for OpenSolaris, but it is quite easy to compile: | ||
- | * configure it without kerberos | ||
- | * then do make | ||
- | To customize Alpine, for example to read your Google mail account, [[os:unix|see here]]. | + | {{tag> SMF svcadm service svcs FMRI gss kerberos gdm metainit ipv6 networking address route routeadm ifconfig plumb dns sendmail metasync vnc useradd passwd policy dtlogin dtconfig locale LC_MESSAGES date network-admin hostname resolv.conf nsswitch.conf files rlogin DISPLAY xscreensaver failed xdmcp gdmsetup xfontsel fonts xterm pkgadd pkg-get pkgutil IPS pkg Debian updatemanager packagemanager pkginfo pkgchk pkgrm url ibiblio bash PATH PS1 prompt isainfo crle gmake}} |
- | ===== Apache ===== | ||
- | See [[http://192.168.0.2/dokuwiki/doku.php?id=tools:web|here]]. | ||
- | ===== Emacs ===== | ||
- | See [[os:unix]] | ||
- | ===== Eye of Gnome ===== | ||
- | This is a simple image viewer in GNOME. To launch it, run **eog**. | ||
- | ===== Fetchmail ===== | ||
- | To debug, try | ||
- | <code> | ||
- | fetchmail -vk | ||
- | </code> | ||
- | Fetchmail for IMAP requires a valid sendmail server ! | ||
- | ===== Firefox ===== | ||
- | I found a Firefox3 package from the list of pointers of [[http://www.solaris4you.dk/|Solaris4you]]: [[http://www.solaris4you.dk/green_pulse.gif|there]]. | ||
- | The bzip2 actually contains several packages that all install in /opt/sfw (cairo, pango, firefox...). In my case, actually, I only need the firefox package. However, so far, I haven't managed to get firefox3 working if I only install that package and move it to /opt/csw. | ||
- | Consequently, I have installed all required packages in /opt/sfw. This is a pity because some libraries are duplicated (cairo, pango...) :-( | ||
- | Firefox is installed in /opt/sfw: | ||
- | <code> | ||
- | /opt/sfw/lib/firefox3/updater | ||
- | /opt/sfw/lib/firefox3/updater.ini | ||
- | /usr/share/applications/firefox3.desktop | ||
- | /opt/sfw/bin/firefox <symbolic link> | ||
- | </code> | ||
- | Launch /opt/sfw/bin/firefox & and Firefox3 starts ! | ||
- | ===== Eterm ===== | ||
- | Eterm is a terminal particularly suited for use within Enlightenment. Unfortunately, I haven't been able to find any pre-compiled Solaris package, so I had to compile it myself, which proved out to be quite complicated. | ||
- | |||
- | * download, build and install libAST. Unless a special directory has been specified for configure (./configure --prefix=...), libAST installs in /usr/local (this is not the usual Solaris method). | ||
- | <code> | ||
- | export PATH=/usr/sfw/bin:/opt/csw/bin:/usr/sbin:/usr/bin::/usr/openwin/bin:/usr/ccs/bin:. | ||
- | export MAKE=gmake | ||
- | </code> | ||
- | make | ||
- | * download Eterm | ||
- | * add /usr/local/lib to your LD_LIBRARY_PATH so that it finds libAST. | ||
- | <code> | ||
- | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib | ||
- | export PATH=/usr/sfw/bin:/opt/csw/bin:/usr/sbin:/usr/bin:/usr/openwin/bin:/usr/ccs/bin:.:/usr/local/bin | ||
- | export MAKE=gmake | ||
- | </code> | ||
- | * install imlib2 | ||
- | <code> | ||
- | /opt/csw/bin/pkg-get install imlib2 | ||
- | </code> | ||
- | * configure Eterm, specifying the right path for Imlib2 (/opt/csw in my case -- note you mustn't specify /opt/csw/lib). | ||
- | <code> | ||
- | ./configure --with-imlib=/opt/csw | ||
- | </code> | ||
- | * compile Eterm | ||
- | <code> | ||
- | make | ||
- | </code> | ||
- | * install Eterm: the Makefile of bg needs to be fixed: at the end of the Makefile, the lines that call install-sh for the various images is wrong: add a '..' so that gets install-sh from the right directory. | ||
- | * there are specific Eterm themes [[http://www.eterm.org/themes/|here]] | ||
- | ===== GThumb ===== | ||
- | GThumb is GNOME's thumbnail viewer. To launch it, run **gthumb** | ||
- | ===== Lobo ===== | ||
- | [[http://lobobrowser.org/browser/home.jsp|Lobo]] is a Java based web browser. | ||
- | To run it, | ||
- | <code> | ||
- | /usr/jdk/jdk1.6.0_11/bin/java -jar lobo.jar & | ||
- | </code> | ||
- | ===== Mrxvt ===== | ||
- | I haven't found any package for this terminal, but it compiles pretty well on OpenSolaris. [[http://materm.sourceforge.net/wiki/pmwiki.php|Download it here]]. | ||
- | I recommend: | ||
- | * set the installation in /usr directory, because Solaris does not commonly use /usr/local. | ||
- | * disable support for Greek (unless you need it). On my system, it bugged and whenever I typed a pipe, it would switch to Greek encoding ! | ||
- | * set the terminal name to xterm (and not rxvt) on Solaris. Otherwise it'll complain about not having the right termcap. Unless you know better than me how to install termcap and terminfo on Solaris, then do install them (they're providing in the package). | ||
- | <code> | ||
- | ./configure --prefix=/usr --enable-xft --disable-greek --with-save-lines=1000 --with-term=xterm --disable-debug | ||
- | </code> | ||
- | ===== Multimedia ===== | ||
- | * sound-juicer %u | ||
- | * rhythmbox %u | ||
- | * totem %u | ||
- | ===== MySQL ===== | ||
- | You can get a package from [[http://dev.mysql.com/downloads/mysql/5.0.html#downloads|MySQL's web site]], or - easier - a pre-compiled binary from [[http://www.sunfreeware.com/|SunFreeware.com]]. | ||
- | The former installs in /opt/mysql by default, whereas the latter installs in /usr/local/mysql. | ||
- | ===== Nautilus ===== | ||
- | |||
- | Nautilus is GNOME's file manager. To launch it without loading the GNOME desktop or background, do: | ||
- | <code> | ||
- | nautilus --no-desktop | ||
- | </code> | ||
- | |||
- | ===== PHP ===== | ||
- | |||
- | ==== PHP ==== | ||
- | |||
- | Get [[http://www.sunfreeware.com|Php from sunfreeware]]. | ||
- | It installs in /usr/local/php | ||
- | * Link /usr/apache2/libexec/libphp5.so to /usr/local/apache2/modules/libphp5.so | ||
- | * Edit /etc/apache2/httpd.conf. Add the following: | ||
- | <code> | ||
- | LoadModule php5_module libexec/libphp5.so | ||
- | <IfModule mod_php5.c> | ||
- | php_value include_path ".:/usr/local/php/lib" | ||
- | php_admin_flag safe_mode on ===> or off for some wikis | ||
- | </IfModule> | ||
- | </code> | ||
- | * Later in that file, add: | ||
- | <code> | ||
- | # Tell Apache to parse certain extensions as PHP | ||
- | AddType application/x-httpd-php .php .phtml | ||
- | AddType application/x-httpd-php-source .phps | ||
- | </code> | ||
- | |||
- | ==== PhpMyAdmin ==== | ||
- | |||
- | Unzip [[http://www.phpmyadmin.net/|PhpMyAdmin]] in the web server's root (/var/apache2/htdocs) | ||
- | <code> | ||
- | cd phpMyAdmin | ||
- | mkdir config | ||
- | chmod o+rw config | ||
- | cp config.inc.php config | ||
- | chmod o+w config/config.inc.php | ||
- | </code> | ||
- | Open scripts/setup.php in the browser. User & password must match something MySQL knows. | ||
- | <code> | ||
- | mv config/config.inc.php . | ||
- | chmod o-w config.inc.php | ||
- | </code> | ||
- | Try in your browser: .../phpMyAdmin/index.php : you should be able to log into the database. | ||
- | |||
- | ==== ROX Filer ==== | ||
- | |||
- | I successfully compiled ROX Filer 2.8 from sources, on OpenSolaris 2008.11 | ||
- | To run in from the source directory: | ||
- | <code> | ||
- | ./ROX-Filer/ROX-Filer | ||
- | </code> | ||
- | |||
- | ===== Flash Player ===== | ||
- | |||
- | To install a system-wide Flash Player for Firefox on Solaris: | ||
- | * Download the package from [[http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash|Adobe]] (or follow the suggested link) | ||
- | * Unzip it (bzip2 -d flash_player_9_solaris_x86.tar.bz2) | ||
- | * Untar it and put both files flashplayer.xpt and libflashplayer.so in /usr/lib/firefox/plugins. | ||
- | * Restart firefox | ||
- | * Check a shockwave flash plugins is loaded in about:plugins | ||
- | * Check the plugin is okay with [[http://www.adobe.com/go/flashplayerversion|Adobe's online plugin test]]. | ||
- | |||
- | |||
- | ===== Samba ===== | ||
- | |||
- | Samba is pre-installed too. On Solaris 10, its configuration file is in /etc/sfw/smb.conf. | ||
- | * set Samba user passwords: /usr/sfw/bin/smbpasswd -a -U <username> | ||
- | * test configuration file: /usr/sfw/bin/testparm <smb.conf file> | ||
- | * to see where Samba reads its configuration from do: /usr/sfw/sbin/smbd -b | grep conf | ||
- | |||
- | On OpenSolaris 2008.11, to use smbfs, do: | ||
- | <code> | ||
- | modload -p drv/nsmb | ||
- | modload -p fs/smbfs | ||
- | devfsadm -i nsmb | ||
- | pfexec mount -f smbfs //server/share /mntpoint | ||
- | Password: | ||
- | </code> | ||
- | |||
- | |||
- | |||
- | |||
- | ===== Java ===== | ||
- | |||
- | To install a JRE 1.6: | ||
- | * download it from Sun's website. You need to download both the 32-bit and the 64-bit package for 64-bit hosts. Indeed, the 64-bit package is only **additions**. | ||
- | * gunzip, untar the package in the directory of your choice | ||
- | * that's it ! (add java to your path, run java -version to check. Make sure to use the 64-bit version !). | ||
- | |||
- | To install the java plugin in Firefox3, copy (or link) the java plugin to the firefox3 plugins directory: | ||
- | |||
- | ^ Solaris 10 ^ OpenSolaris 2008.11 ^ | ||
- | | /opt/sfw/lib/firefox3/plugins | /usr/lib/firefox/plugins | | ||
- | |||
- | For example, | ||
- | <code> | ||
- | cd /opt/sfw/lib/firefox3/plugins | ||
- | ln -s /opt/jre1.6.0_07/plugin/i386/ns7/libjavaplugin_oji.so . | ||
- | </code> | ||
- | |||
- | ===== VirtualBox ===== | ||
- | |||
- | Virtual Box is an open source alternative to VMWare. //The following of this paragraph applies to installing and using Virtual Box on Solaris (not OpenSolaris) and on a 64-bit system.// | ||
- | |||
- | * Download VirtualBox from [[http://www.virtualbox.org|www.virtualbox.org]]. | ||
- | * Unpack the package | ||
- | * If you have an old version of VirtualBox, it's safer to uninstall it first. | ||
- | * Add the kernel package first | ||
- | * Add the user package | ||
- | * Run /opt/VirtualBox/VirtualBox | ||
- | |||
- | So the commands are: | ||
- | <code> | ||
- | # gunzip VirtualBox-1.6.2-SunOS_amd64.tar.gz | ||
- | # tar -xvf VirtualBox-1.6.2-SunOS_amd64.tar | ||
- | # pkgadd -d VirtualBoxKern-1.6.2-SunOS-r31466.pkg | ||
- | # pkgadd -d VirtualBox-1.6.2-SunOS-amd64-r31466.pkg | ||
- | $ VirtualBox & | ||
- | </code> | ||
- | |||
- | |||
- | ===== Password Safe ===== | ||
- | |||
- | Password Safe is nice and simple application running on Windows and a few other operating systems. On Solaris and some other Unix flavours, one must use Password Gorilla, a Password Safe compatible program. Its interface and performance are quite yucky, but it works and is able to read your password safe databases. | ||
- | |||
- | To install Password Gorilla on Solaris/OpenSolaris: | ||
- | * Download it from [[http://www.fpx.de/fp/Software/Gorilla/|Password Gorilla]] | ||
- | * Download a [[http://www.equi4.com/tclkit/download.html|Tclkit]] | ||
- | * Install Tk 8.4 (e.g pkg-get install tk) | ||
- | * Then, chmod u+x tclkit | ||
- | * and finally launch the application: ./tclkit gorilla-1.4.kit & | ||
- | |||
- | Unfortunately, Password Safe does not run on Pocket PCs. KeePass does. But it doesn't run on Solaris :( | ||
- | |||
- | ===== Pidgin ===== | ||
- | |||
- | Pidgin is an Instant Messenger able to connect to several IM networks. | ||
- | To use it over Google Talk: | ||
- | * protocol: XMPP (or Google Talk) | ||
- | * screen name: your google login | ||
- | * domain: gmail.com | ||
- | * resource: the default 'Home' is perfect | ||
- | * password: your google password | ||
- | * local alias: the name you want to see when you type in messages in Pidgin. Whatever you like here. | ||
- | * force old (5223 port) SSL: make sure this is checked | ||
- | * port: 443 | ||
- | * server: talk.google.com | ||
- | * proxy settings: use GNOME settings will be fine (if you're using GNOME ;-)). | ||
- | |||
- | Pidgin is in /usr/bin. | ||
- | You may need to restart pidgin for those changes to take effect. In addition, make sure the account is marked 'enabled'. | ||
- | |||
- | ===== Screenshots ===== | ||
- | |||
- | Taking a screenshot: | ||
- | <code> | ||
- | $ xwd -root -out scrdump | ||
- | </code> | ||
- | |||
- | Viewing a screenshot: | ||
- | <code> | ||
- | $ xwud -in scrdump | ||
- | </code> | ||
- | |||
- | ===== Urxvt ===== | ||
- | |||
- | Check out the source code [[http://software.schmorp.de/pkg/rxvt-unicode.html|here]]. The CVS command is specified. Then | ||
- | <code> | ||
- | $ ./configure --prefix=/usr/share --enable-xft --enable-font-styles --enable-transparency --enable-fading --enable-rxvt-scroll --enable-next-scroll --enable-xterm-scroll --enable-mousewheel --enable-smart-resize --enable-text-blink --enable-keepscrolling --enable-selectionscrolling --with-term=xterm --with-x --disable-perl | ||
- | $ make | ||
- | $ make install | ||
- | </code> | ||
- | I had to fix the man page directory: they were put in /usr/share/share/man and not /usr/share/man. | ||
- | ===== XnView ===== | ||
- | XnView ([[http://pagesperso-orange.fr/pierre.g/xnview/frdownloadsolarisx86.html|tar.gz]]) is a good image viewer which runs on several platforms including Solaris. | ||
- | To install the soft, unzip the package. | ||
- | Then modify the ./install script and modify directory /usr/lib/X11/app-defaults/XnView to /usr/X11/lib/X11/app-defaults/XnView (Solaris 10 u5). To launch XnView, run /usr/local/bin/xnview. | ||
- | If you have Gnome, you can use gthumb or nautilus --no-desktop. | ||