|
Note you can default to bash at the system level and I believe that should
get rid of the "is not an identifier" error. Add the following line to the
end of stream file /QOpenSys/QIBM/ProdData/SC1/OpenSSH/etc/sshd_config
ibmpaseforishell=/QOpenSys/QIBM/ProdData/OPS/tools/bin/bash
Then stop/start *SSHD server.
At this point either bash or zsh are your best bets for a shell. I use zsh
because the bash I obtained from perzl.org had issues with Node.js REPL
sessions going into some form of a race condition (consumed mass CPU in a
loop). I just tested the bash delivered by 5733OPS and it does NOT have
that issue (yahoo!).
Aaron Bartell
litmis.com - Services for open source on IBM i
On Thu, Jul 7, 2016 at 7:57 AM, Bradley Stone <bvstone@xxxxxxxxx> wrote:
Here's what I ended up with (and I'm using bitvise SSH client) for myseems
/QOpenSys/etc/profile file:
PATH=/QOpenSys/QIBM/ProdData/OPS/Node4/bin:$PATH
export PATH
bash
Also making sure just LFs, not CRLFs after each line.
I tried a few different things, like starting bash first, but then it
like it didn't change the path.PATH=/QOpenSys/QIBM/ProdData/OPS/Node4/bin:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin:
The syntax used above I believe is because of the different BASH version?
Two steps instead of one.
Trying to use:
export PATH=/QOpenSys/QIBM/ProdData/OPS/Node4/bin:$PATH
I got the error:
-bsh:
is not an identifieron
At least it's to the point where I want it. I'll have to read up more on
bash, bsh, sh and all the different versions later.. right now it's not
my priority list. :)can
Brad
On Wed, Jul 6, 2016 at 6:26 PM, Bradley Stone <bvstone@xxxxxxxxx> wrote:
Excellent information, Kevin. Thanks!
On Wed, Jul 6, 2016 at 5:47 PM, Kevin Adler <kadler@xxxxxxxxxx> wrote:
Now, I don't see a .profile file under /home/<userid>. I assume I
/QOpenSys/etc/.profilecreate one.
Yes. If the file doesn't exist, it is not used.
I also don't see /QOpenSys/etc/profile either. Is that just a filewithout
an extension one could create? Or should it be
prefixcreatingthat
we would create?
The files are /QOpenSys/etc/profile and ~/.profile. You could try
/QOpenSys/etc/.profile, but it wouldn't do you much good. The dot
"hidden".on the file is a convention on UNIX that indicates the file is
with
eg.
kadler@kadler:~/t$ touch a b .c
kadler@kadler:~/t$ mv c .c
kadler@kadler:~/t$ ls -l
total 0
-rw-r--r-- 1 kadler kadler 0 Jul 6 17:34 a
-rw-r--r-- 1 kadler kadler 0 Jul 6 17:34 b
kadler@kadler:~/t$ ls -al
total 16
drwxr-xr-x 2 kadler kadler 4096 Jul 6 17:34 .
drwxr-xr-x 86 kadler kadler 12288 Jul 6 17:34 ..
-rw-r--r-- 1 kadler kadler 0 Jul 6 17:34 a
-rw-r--r-- 1 kadler kadler 0 Jul 6 17:34 b
-rw-r--r-- 1 kadler kadler 0 Jul 6 17:34 .c
Most people don't want to "pollute" their home directory with
configuration files/directories all the time, so they are prefixed
athey
dot to hide them. The /etc (/QOpenSys/etc in PASE) directory is a
completely separate directory used to store configuration files so
tonsare not hidden there. Interestingly enough, the convention on Linux is
changing to put configuration files/directories under a ~/.config
directory so as to not pollute their home directories with tons of
"dotfiles." (It also makes it easy to backup 1 directory instead of
shellanyof configuration files and directories for each application).
Back to the main topic, each of these files is just a plain text file
(make sure it's in ASCII for the PASE shell to read) that can contain
SHELL commands. Be aware that these scripts are read by the login
BASHthewhich be default is /QOpenSys/usr/bin/bsh and doesn't support some of
usernewer features like being able to export on the same line as the
declaration. The /QOpenSys/etc/profile is read by all users and each
can customize their own environment with their ~/.profile.
Other shells have their own configuration files/scripts as well eg.
0.12wrote:uses .bashrc. You can put shell-specific setup in these files.
On Wed, Jul 6, 2016 at 5:15 PM, Kevin Adler <kadler@xxxxxxxxxx>
/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin
PATH is kind of like your library list. By default, PASE uses
as you noted.
Due to how the OPS stuff is shipped, we can't switch over Node
tothat
/QOpenSys/usr/bin/ProdData.Node v4. Instead, we ship them under different subdirectories in
I *believe* that the node developers also created a
node4 symlink you can use instead of node if you want to ensure
07/06/2016youryou
use Node v4.
If you want to set your PATH to be persistent. Just add a line to
~/.profile:
export PATH=/QOpenSys/QIBM/ProdData/OPS/Node4/bin:$PATH
and every time you start a PASE shell, your PATH will be set.
If you want to do it "system wide" you need to add the line to
/QOpenSys/etc/profile instead.
"OpenSource" <opensource-bounces@xxxxxxxxxxxx> wrote on
setNode04:54:40 PM:
From: Bradley Stone <bvstone@xxxxxxxxx>
To: IBMi Open Source Roundtable <opensource@xxxxxxxxxxxx>
Date: 07/06/2016 04:55 PM
Subject: Re: [IBMiOSS] How to tell the system which version of
to
use
Sent by: "OpenSource" <opensource-bounces@xxxxxxxxxxxx>
Aaron, (or anyone else)
Can you (or anyone else) tell me then how my system is already
theto
use
the old version vs. the new version? It must be something in
Icurrent
path.
Somewhere the system has to be being told "use this version".
towant
to
tell it to use the new version. This should be something simple
Iothersdo I
would hope without making a shell script.
I see in /usr/bin the node command (v0.12.13) as well as many
the(ls,
curl, jar, etc) Can I replace any files in there to make it use
future,new
version instead of writing a script?
Sorry to be a pest, but this will be asked MANY times in the
/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/binI'm
sure of it. :)
When I use
echo $PATH
I get:
But...
When I use
export PATH=/QOpenSys/QIBM/ProdData/OPS/Node4/bin:$PATH
And then node -v, it does claim to be using the new version.
session.I
want
to set it to use it system wide, not just for my particular
Am I asking the wrong question? :) I apologize if I am... but
on(orwould
hope this would be something simple, something documented by IBM
the
OSS group).
IBM released Node4, I would hope there were some documentation
script.how to
set your system to use it besides needed to create a shell
do ItheWhen
they release the next version, the path would be the same to use
app.new
<aaronbartell@xxxxxxxxx>version, or to be able to go back to the old version.
Brad
On Wed, Jul 6, 2016 at 4:28 PM, Aaron Bartell
wrote:
I use shell scripts to set the environment before starting my
bvstone@xxxxxxxxx>For
example:
---start.sh---
export PATH=/QOpenSys/QIBM/ProdData/OPS/Node4/bin:$PATH
PORT=80 node app.js
And then put it in a SBMJOB..
SBMJOB JOB(QSH CMD('/path/to/start.sh'))
Aaron Bartell
litmis.com - Services for open source on IBM i
On Wed, Jul 6, 2016 at 4:23 PM, Bradley Stone <
knowwrote:
Yep, it shows v0.12.13. I know node4 is installed. I also
ifhow
to
check the version.
So, again I ask, how do I tell my applications (or my system
<bvstone@xxxxxxxxx>that's
<aaronbartell@xxxxxxxxx>the
right terminology) to use the new version?
On Wed, Jul 6, 2016 at 3:43 PM, Aaron Bartell
wrote:
Before you start your app you can run:
node -v
From within your app you could try this:
http://bit.ly/determine-nodejs-version
Aaron Bartell
litmis.com - Services for open source on IBM i
On Wed, Jul 6, 2016 at 3:38 PM, Bradley Stone
wrote:
Any other changes to source needed besides that? How
ES6(notknow
if
I'm
using the new or old Node version with my application?
just the
DB2aaronbartell@xxxxxxxxx>
adapter).
On Wed, Jul 6, 2016 at 3:31 PM, Aaron Bartell <
wrote:
That depends what you mean by "convert". Node4 uses
youwhich
has
a
number
of new features. With that said, the primary thing
mailingtheneed
require('/QOpenSys/QIBM/ProdData/OPS/Node4/os400/db2i/lib/db2')to be
memory...aware
of
is the changed path of the DB2 adapter. Going off of
require('/QOpenSys/QIBM/ProdData/Node/os400/db2i/lib/db2')
Node v0.12.x
var db =
Node v4.x
var db =
installed.<bvstone@xxxxxxxxx>
Aaron Bartell
litmis.com - Services for open source on IBM i
On Wed, Jul 6, 2016 at 3:24 PM, Bradley Stone
wrote:
Just looking through my system I see I have Node4
Is there a "simple" way to convert my apps done with
mailingold
mailingversion
to
use
the new version?
--
This is the IBMi Open Source Roundtable (OpenSource)
http://lists.midrange.com/mailman/listinfo/opensourcelist
To post a message email: OpenSource@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
archivesor email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the
mailingat http://archive.midrange.com/opensource.--
This is the IBMi Open Source Roundtable (OpenSource)
http://lists.midrange.com/mailman/listinfo/opensourcelist
To post a message email: OpenSource@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
archivesor email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the
at http://archive.midrange.com/opensource.--
This is the IBMi Open Source Roundtable (OpenSource)
archiveshttp://lists.midrange.com/mailman/listinfo/opensourcelist
To post a message email: OpenSource@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
or email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the
at http://archive.midrange.com/opensource.--
This is the IBMi Open Source Roundtable (OpenSource)
archiveshttp://lists.midrange.com/mailman/listinfo/opensourcelist
To post a message email: OpenSource@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
or email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the
http://lists.midrange.com/mailman/listinfo/opensourcelistat http://archive.midrange.com/opensource.--
This is the IBMi Open Source Roundtable (OpenSource) mailing
To post a message email: OpenSource@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
listlistor email: OpenSource-request@xxxxxxxxxxxx--
Before posting, please take a moment to review the archives
at http://archive.midrange.com/opensource.
This is the IBMi Open Source Roundtable (OpenSource) mailing
To post a message email: OpenSource@xxxxxxxxxxxx--
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/opensource.
This is the IBMi Open Source Roundtable (OpenSource) mailing
------To post a message email: OpenSource@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/opensource.
--
This is the IBMi Open Source Roundtable (OpenSource) mailing list
To post a message email: OpenSource@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/opensource.
This is the IBMi Open Source Roundtable (OpenSource) mailing list
To post a message email: OpenSource@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/opensource.
--
This is the IBMi Open Source Roundtable (OpenSource) mailing list
To post a message email: OpenSource@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/opensource.
This is the IBMi Open Source Roundtable (OpenSource) mailing list
To post a message email: OpenSource@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/opensource.
This is the IBMi Open Source Roundtable (OpenSource) mailing list
To post a message email: OpenSource@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/opensource.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.