LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 05-05-2005, 03:17 PM   #1
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Rep: Reputation: 45
package management (new to solaris)


Hi all, I've been a slackware user for a few years, so the recent move to Solaris is quite interesting for me =). I've recently bought an Ultra 60, just installed Solaris 10 on it today.

I do have some issues i'm trying to resolve..

1) Package Management: I noticed Solaris uses 'pkgadd' to install packages. I found a nice repository at http://www.sunfreeware.com and i can just download the packages, gunzip, and
pkgadd -d mypackage. If there are other better ways, then do tell =)

Are there ways to
- View a list of the packages and their versions of what i have currently installed? (like pkgtool in slackware)

- upgrade/remove a package? eg: If i have Apache 2.0.53 installed, i would want to upgrade or remove it before installing 2.0.54. (similar to upgradepkg and removepkg in slack)

2) How the heck can i sort out my PATH properly? Its currently set to /usr/sbin:/usr/bin, I know it should be more than this.. wget works when adding /usr/local/bin as a path, make works when i add /usr/ccs/bin to the path, but is there anything more? And how do i make this permanent?

3) The default shell is /bin/sh, and i don't like it =/, i prefer bash.. Is there any way to make bash the default one? And is there anyway to set the bashrc file? /etc/profile looks different here.. (scary)

Thanks alot all =)

Last edited by xushi; 05-05-2005 at 04:26 PM.
 
Old 05-05-2005, 06:01 PM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
- View a list of the packages and their versions of what i have currently installed? (like pkgtool in slackware)
pkginfo
prodreg
Quote:
- upgrade/remove a package? eg: If i have Apache 2.0.53 installed, i would want to upgrade or remove it before installing 2.0.54. (similar to upgradepkg and removepkg in slack)
pkgrm then pkgadd

You can also use the wrapper pkg-get that is handling version checking, update and dependancies.
See blastwave.org for details.
Quote:
2) How the heck can i sort out my PATH properly? Its currently set to /usr/sbin:/usr/bin,
Meaning you're logged as root, regular users' PATH is just /usr/bin by default.
Quote:
I know it should be more than this.. wget works when adding /usr/local/bin as a path
It shouldn't, /usr/local/bin is not an allowed directory for freewares under SVR4/Solaris standards.
wget is normally in /usr/sfw/bin.
Quote:
, make works when i add /usr/ccs/bin to the path, but is there anything more? And how do i make this permanent?
You can add directories to the default PATH in /etc/default/ if you want the setting to be global.
Here's my PATH:
/usr/bin:/usr/sfw/bin:/opt/csw/bin:/usr/ccs/bin:/usr/dt/bin:/usr/openwin/bin:/usr/openwin/demo:/usr/sbin:/usr/ucb:
Quote:
3) The default shell is /bin/sh, and i don't like it =/, i prefer bash.. Is there any way to make bash the default one? And is there anyway to set the bashrc file? /etc/profile looks different here.. (scary)
You can change user's shells (as root) by using the "passwd -e [userid]" command.
What scares you in /etc/profile ?
I wouldn't advice you to set root's shell as bash, create an alias account instead.
Also, beware not breaking /etc/profile with bash specific constructions as you may mess you system.
 
Old 05-06-2005, 02:34 AM   #3
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Original Poster
Rep: Reputation: 45
Thanks alot for the reply,

Quote:
Originally posted by jlliagre
pkginfo
prodreg
pkgrm then pkgadd
That works, thanks, and i'll give pkg-get a look soon

Quote:
Meaning you're logged as root, regular users' PATH is just /usr/bin by default.
It shouldn't, /usr/local/bin is not an allowed directory for freewares under SVR4/Solaris standards.
wget is normally in /usr/sfw/bin.
I found alot of the programs i was looking for in /usr/sfw/bin, thanks. Shall i avoid using packages from sunfreeware.com then? because it installs them to /usr/local/

Quote:
What scares you in /etc/profile ?
breaking it with bash specific constructions
I'm just put off with the fact with
- I can't press backspace to delete, it displays ^H. The delete button displays ^[[3~ (also up/down arrows)
- I can't use the tab button to complete my command name
- i can't display the current dir i'm in before the #
- i miss the good ol' colors =/

I mean i know how to sort these out in bash, but like you said, i don't want to break the /etc/profile.

EDIT:
=======
The default PATH, that's in /etc/default/login, right?
Thanks alot for your help.

Last edited by xushi; 05-06-2005 at 02:37 AM.
 
Old 05-06-2005, 04:10 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
Shall i avoid using packages from sunfreeware.com then? because it installs them to /usr/local/
From "man filesystem":
/usr/local
Not part of the SVR4-based Solaris distribution. The
/usr directory is exclusively for software bundled
with the Solaris operating system. If needed for stor-
ing machine-local add-on software, create the direc-
tory /opt/local and make /usr/local a symbolic link to
/opt/local. The /opt directory or filesystem is for
storing add-on software to the system.
Quote:
I'm just put off with the fact with
- I can't press backspace to delete, it displays ^H. The delete button displays ^[[3~ (also up/down arrows)
??
in what context ?
I do not experience that while running bash under Solaris 10, backspace sends ^H, which is right, and delete sends ascii 127, which also the right code.
Quote:
- I can't use the tab button to complete my command name
Yep, that's a bash feature.
Quote:
- i can't display the current dir i'm in before the #
You can do that with ksh too.
Quote:
- i miss the good ol' colors =/
Colors have nothing to do with the shell, but with the terminal. I do have colors with sh, ksh and bash.
Quote:
The default PATH, that's in /etc/default/login, right?
yes. There's another for shell launched by "su" in /etc/default/su
 
Old 05-06-2005, 11:18 AM   #5
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Original Poster
Rep: Reputation: 45
Quote:
Originally posted by jlliagre
From "man filesystem":
/usr/local
Not part of the SVR4-based Solaris distribution. The
/usr directory is exclusively for software bundled
with the Solaris operating system. If needed for stor-
ing machine-local add-on software, create the direc-
tory /opt/local and make /usr/local a symbolic link to
/opt/local. The /opt directory or filesystem is for
storing add-on software to the system.
Thank you for that,

Quote:
??
in what context ?
I do not experience that while running bash under Solaris 10, backspace sends ^H, which is right, and delete sends ascii 127, which also the right code.
When i open a terminal in Solaris, or even when i SSH from my laptop into the server, it starts with /bin/sh, and not bash shell. That's why i was asking if i can just automatically use bash instead, but nevermind, i don't mind typing 'bash' everytime i login.


Quote:
Colors have nothing to do with the shell, but with the terminal. I do have colors with sh, ksh and bash.
If i decide to create a .bashrc file for root, where would i stick it? in the / folder?

Quote:
yes. There's another for shell launched by "su" in /etc/default/su
I had to also do the same thing with SUPATH too. Thanks =)

I'm slowly getting there =) i appreciate all your help.

Last edited by xushi; 05-06-2005 at 11:37 AM.
 
Old 05-06-2005, 12:24 PM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
When i open a terminal in Solaris, or even when i SSH from my laptop into the server, it starts with /bin/sh, and not bash shell.
This is not a property of the system, but an attribute of the user account you use (last field in /etc/passwd for that user).
Quote:
That's why i was asking if i can just automatically use bash instead, but nevermind, i don't mind typing 'bash' everytime i login.
As I told you already, feel free to set non root account's shell to whatever is wanted with the "passwd -e" command.
Leave root shell as is, and create an alternate root accout like this should you want it:
Code:
bashroot:x:0:1:Super-User with bash shell and a home directory:/export/home/root:/bin/bash
Then create its home dir and give it a password:
Code:
mkdir /export/home/root
pwconv
passwd bashroot
and you are set.

Quote:
If i decide to create a .bashrc file for root, where would i stick it? in the / folder?
That's correct, and somewhat controversial. My "bashroot" suggestion would overcome this.

However, I must say it is a bad habit to customize the root account, and use it as general purpose login name.
Better sticking to a non privileged user, and use only the root account (or better zsudo/RBAC) only for
tasks really needing it.
 
Old 05-09-2005, 06:21 AM   #7
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Backspace & delete problem fixed !

Quote:
I'm just put off with the fact with
- I can't press backspace to delete, it displays ^H. The delete button displays ^[[3~ (also up/down arrows)
I just experienced the same issue not with JDS, but with a previous release of gnome.

In fact, this has nothing to do with Solaris but is a "feature" of the terminal emulator (gnome-terminal).

To fix it, go to "Edit/Current Profile/ Compatibity" and set backspace to send backspace (^H) and delete to send ascii DEL, and you're set.
 
Old 05-10-2005, 12:01 PM   #8
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Original Poster
Rep: Reputation: 45
Sorry for the late reply, i was busy with my finals.

Thanks alot for the help, you've made my move into solaris even easier than what i anticipated in the beginning. I probably might have a fwe more questions now and then, but i'll do my research before asking first.. =)

As for the CLI, it turns out this was all happening because i was using Eterm on my laptop when ssh-ing into the server.
 
Old 05-10-2005, 12:45 PM   #9
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Original Poster
Rep: Reputation: 45
Alright, i must ask

I'm becoming quite interested with pkg-get, but there are a few things that are worrying me about it..

- The FTP/HTTP sites its downloading the packages from, its downloading it form a folder called 5.8. Does that mean solaris os 5.8?

pkg-get doesn't seem to see the programs i already have installed.. I told it to install mysql4, and it went on to download and install openSSL, Perl and a few more packages..

Originally, i have
Perl 5.8.4 -> SUNWperl584core, but it installed perl > CSWperl
same with openSSL
I already have SUNWopensslr, and it installed CSWossl.

Is it normal? Can i trust it with the programs its installing to /opt/csw ? Shall i remove the SUNW ones ? or am i starting to mess up my system here?
 
Old 05-11-2005, 02:55 AM   #10
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
- The FTP/HTTP sites its downloading the packages from, its downloading it form a folder called 5.8. Does that mean solaris os 5.8?
It does. But nevermind, Solaris is maintaining, in fact guaranteeing, upward compatibility from version 7, 8, and 9 upward, so there's no risk with it.

Quote:
pkg-get doesn't seem to see the programs i already have installed.. I told it to install mysql4, and it went on to download and install openSSL, Perl and a few more packages..

Originally, i have
Perl 5.8.4 -> SUNWperl584core, but it installed perl > CSWperl
same with openSSL
I already have SUNWopensslr, and it installed CSWossl.

Is it normal?
It is probably subject to discussion, but is the way blastwave maintainers have designed their project.
http://www.blastwave.org/standards/layout.php
They try to avoid version conflicts by building an isolated "freeware ecosystem" under /opt/csw and ignoring other freewares that may have been installed elsewhere.
One other side effect of this way of doing is that /opt/csw can be NFS shared easily.
Quote:
Can i trust it with the programs its installing to /opt/csw ?
As much as you trust other open source projects.
Quote:
Shall i remove the SUNW ones ?
You're free to do so, but need not if your are not disk space constrained.
Quote:
or am i starting to mess up my system here?
You aren't.
 
Old 05-11-2005, 05:17 PM   #11
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Original Poster
Rep: Reputation: 45
Hmm, i;m probably going to end up doing a minimal installation of Solaris. Installing Gaim wants me to also install some 30 programs, and i from what i see pkg-get provides more up to date software, and looks good enough to use for all my apps.
 
Old 05-12-2005, 01:49 AM   #12
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
What's that ?
Quote:
Naqql fu2aduka 7aithu shi2ta minal hawa. Wamal 7obbu illa lil 7abib el awwali.
 
Old 05-12-2005, 02:15 AM   #13
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Original Poster
Rep: Reputation: 45
Heh, first to ask.. It's an arabian quote. I'm not that good in translation, but it means something like
Quote:
Move around your heart between whichever loves you choose. But what's true love except first love.
 
Old 10-02-2006, 09:52 PM   #14
dav_y2k
LQ Newbie
 
Registered: Apr 2005
Distribution: RedHat
Posts: 16

Rep: Reputation: 0
creating .bashrc

Hi all,
I am new to SunOS and my version is SunOS 5.8 Generic_117000-03 sun4u sparc SUNW,UltraAX-i2, but I'm used to Linux environment (RedHat) so I use the bash shell.

I'm trying to use tcpdump (no root access but permmision has been granted):

host# ls -l /opt/sfw/sbin/tcpdump
-rwxr-xr-x 1 root sys 401176 Nov 28 2001 /opt/sfw/sbin/tcpdump

but in my working directory when I type tcpdump:

bash-2.03$ tcpdump
bash: tcpdump: command not found
What I want to achieve is to add tcpdump's location to my PATH: /opt/sfw/sbin

also I do not have .bashrc file in my directory, do I create a new .bashrc file? cos I tried to add this path in .cshrc but did not work. what do I do so that when I do this:

bash-2.03$ tcpdump

it works?

Thanks in advance
 
Old 10-04-2006, 07:55 AM   #15
mackdav
Member
 
Registered: Feb 2005
Distribution: RHEL, CentOS
Posts: 113

Rep: Reputation: 16
jlliagre: I am curious, why not just modify the root shell?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Package Archive style package management mugwump84 Linux From Scratch 3 08-25-2005 05:19 PM
Package management awing_pilot Linux - Newbie 1 03-30-2005 12:41 PM
package management laydros Slackware 6 01-21-2005 06:43 PM
Is Management interface detected by Solaris ? markraem Solaris / OpenSolaris 1 07-06-2004 07:40 PM
Package management Ultimaterra2005 Red Hat 1 02-22-2004 12:02 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 01:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration