Home arrow Solaris
Solaris
Error Starting Xorg Server After Solaris Update PDF
Tuesday, 11 June 2013
If your XOrg server does not start (via GDM) after an Solaris update and reboot then you could generate a new XOrg config file and with that config file replace /etc/X11/xorg.conf file.

  Xorg -configure

  cp /home/john/xorg.config.new /etc/X11/xorg.conf

Then restart your machine and GDM should start your Xorg server.

Last Updated ( Tuesday, 11 June 2013 )
 
Solaris Tips PDF
Monday, 04 March 2013
This is work in progress...

See statistics about processes (monitor processes) on your Solaris machine:

  prstat

Display current resolution and supported Xorg resolutions and refresh rates of your Xorg server from SSH:

  xrandr -display :0.0

You will get something like this:

xrandr -display :0.0
Screen 0: minimum 320 x 200, current 1680 x 1050, maximum 8192 x 8192
VGA1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 430mm x 270mm
   1680x1050      59.9*+
   1600x1200      60.0
   1280x1024      75.0     60.0
   1024x768       75.1     72.0     70.1     60.0
   832x624        74.6
   800x600        72.2     75.0     60.3     56.2
   640x480        72.8     75.0     66.7     60.0
   720x400        70.1

 

Change resolution and refresh rate of X11 server in Solaris (via SSH):

  xrandr -display :0.0 --output VGA1 --mode "1024x768" --size "1024x768" --fb "1024x768"


Calculate VESA CVT mode lines in X11 server:

  cvt 1680 1050

you will get:

# 1680x1050 59.95 Hz (CVT 1.76MA) hsync: 65.29 kHz; pclk: 146.25 MHz

Modeline "1680x1050_60.00"  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync


Shutdown your Solaris machine:

  poweroff

 

Last Updated ( Monday, 04 March 2013 )
 
Managing Packages in Solaris PDF
Monday, 04 March 2013
This is work in progress...


See from which repository Solaris will install packages:

  pkg publisher


Install a package (next command will install Midnight Commander):

  pkg install mc


See info about a package:

  pkg info -r mc


List packages that need to be updated:

  pkg list -u

Update packages:

  pkg update

or:

  pkg update --accept

After you've updated Solaris packages reboot the system.

Last Updated ( Tuesday, 11 June 2013 )
 
Enable or Disable gdm in Solaris PDF
Monday, 04 March 2013
To see the status of gdm in Solaris run (run as root):

  svcs gdm

you will get something like this:

STATE          STIME    FMRI
online         16:38:17 svc:/application/graphical-login/gdm:default

To deactivate/disable gdm run:

  svcadm disable gdm

To activate it run:

  svcadm enable gdm


You might need to install slim_install package:

  pkg install slim_install

Last Updated ( Monday, 04 March 2013 )
 
Install PHP in Solaris PDF
Monday, 04 March 2013
To install PHP in Solaris  using pkg run:

  pkg search php

Then:

  pkg install php-52

If you get an error like this:

pkg install: No matching version of web/php-53 can be installed:
  Reject:  pkg://solaris/web/ This e-mail address is being protected from spam bots, you need JavaScript enabled to view it ,5.11-0.175.1.0.0.24.0:20120904T174930Z
  Reason:  All versions matching 'require' dependency pkg:/system/ This e-mail address is being protected from spam bots, you need JavaScript enabled to view it ,5.11-0.175.1.0.0.23.0 are rejected
    Reject:  pkg://solaris/system/ This e-mail address is being protected from spam bots, you need JavaScript enabled to view it ,5.11-0.175.1.0.0.24.2:20120919T185204Z
    Reason:  This version is excluded by installed incorporation pkg://solaris/consolidation/osnet/ This e-mail address is being protected from spam bots, you need JavaScript enabled to view it ,5.11-0.175.0.10.1.0.0:20120920T143019Z

Then you should try to install other version. For example the error here was for installing php-53 which needed  other version of linker.

 
Configure Networking in Solaris from Command Line PDF
Monday, 25 February 2013
This is a quick tutorial on how to configure networking in Solaris from command line using static IP configuration.

First we disable automatic configuration daemon:

  netadm enable -p ncp defaultfixed

We create an interface using:

  ipadm create-ip net0      # if you have net0 then just skip this command

Then we asign an IP and a subnet for our network interface:

  ipadm create-addr -T static -a 10.0.0.100/24 net0/v4

After we've asignet a static IP and a subnet for our network interface last steps will be to add a default route and configure dns.

  route -p add default 10.0.0.1

To see the default route you've just added run:

  netstat -nr

Last step is to configure dns.

(to be completed)

Don't just edit /etc/resolv.conf.

Tips:
dladm show-phys      # show physical interfaces

Last Updated ( Monday, 25 February 2013 )
 
Solaris gcc fatal error: stdio.h: No such file or directory PDF
Friday, 08 June 2012
If you get the following error when you try to compile a simple C program under Solaris using gcc:

root@solaris:/home/john/learn/cpp/example2# gcc -c firstapp.c
firstapp.c:1:19: fatal error: stdio.h: No such file or directory


then the problem is that you do not have installed system headers. In order to install system headers in oracle run from command line:

  sudo kg install system/header

 
Solaris Quick Guide PDF
Thursday, 07 June 2012
This is a Quick Guide to Oracle's Solaris OS. It might be usefull to people who try DTrace or ZFS on Solaris but they did not use Solaris at all until now.

First of all you can get a full installed Solaris for evaluation/testin from Oracle's website in OVA VirtualBox format that can be easily imported into your VirtualBox app.

Display available services in Solaris

In order to display available services in Solaris run:

  svcs -a

If you want to look for a particular service (for example Apache) run:

  svc -a | grep apache

You will get:

  online         18:19:10 svc:/network/http:apache22

Or if you want to see if ssh service is running type:

  svc -v ssh


Start or stop services in Solaris

To start a service in Solaris run:

  svcadm enable http        # wil start http service
  svcadm enable mysql     # will start MySQL service


To stop and disable a service run:

  svcadm disable mysql

To check if a service was started run (following example check for mysql service):

  svcs -a | grep mysql

The output of the previous command would be:

online         18:21:03 svc:/application/database/mysql:version_51

To restart a service in Solaris we will use svcadm restart command:

  svcadm restart http     # will restart http service

There is also svccfg, the command used to configure a service in Solaris.


Install packages from command line in Solaris


To install system headers for example (system include files) run:

   pkg install system/header

The ouput will be:

install a package in solaris
# pkg install system/header

           Packages to install:  1
       Create boot environment: No
Create backup boot environment: No

DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                                  1/1   1560/1560      3.1/3.1

PHASE                                        ACTIONS
Install Phase                              1681/1681

PHASE                                          ITEMS
Package State Update Phase                       1/1
Image State Update Phase                         2/2


Last Updated ( Friday, 08 June 2012 )
 

Other BSD Systems

OpenBSD

Misc

Solaris

Polls

Best BSD firewall?