注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

云之南

风声,雨声,读书声,声声入耳;家事,国事,天下事,事事关心

 
 
 

日志

 
 
关于我

专业背景:计算机科学 研究方向与兴趣: JavaEE-Web软件开发, 生物信息学, 数据挖掘与机器学习, 智能信息系统 目前工作: 基因组, 转录组, NGS高通量数据分析, 生物数据挖掘, 植物系统发育和比较进化基因组学

网易考拉推荐

OpenSUSE 11.1 安裝 SAS 9.2 for Linux  

2009-12-01 18:56:56|  分类: linux&shell |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
http://www.swlee.org/2009-09-09-opensuse-11-1-install-sas-9-2-for-linux/


OpenSUSE 11.1 安裝 SAS 9.2 for Linux

依照 SAS 官方的Linux 部署手冊上寫到, 目前 SAS 的 support 的 Linux 版本為

Operating System SAS is supported on the following operating systems:

?    Red Hat Enterprise Linux 4 and 5

?    SuSE Linux Enterprise Server 9 and 10

不過我在安裝 SAS  時, 是使用 SuSE Linux 的社群版 OpenSuSE 11.1 比 SAS 官方公佈的 SuSE Linux Enterprise Server 9 and 10 還新一些

註: 事先有先打電話到 SAS 台灣分公司去問, 他們技術部門說: 原則上是可以相容的 (所以理論上 CentOS, Fedora 也可以裝 SAS)

除了 Linux 版本以外, 還必需裝上 libstdc++ 這個 C++ library libstdc++ 在 OpenSuSE 11.1 上最新為 libstdc++43

用 yast 安裝 libstdc++43

# yast -i libstdc++43

另外安裝時還必需有 X window 環境, 並且在安裝的過程必需使用 root 帳號 其實剛開始 Google 到 Installing SAS for LinuxSAS 8.2 For Linux Site-License Version 這篇,

不過這個版本的 SAS 和 Linux 發行版本, 似乎過舊, 新版的 SAS 9.2 for Linux 己經能使用 GUI (圖型介面)安裝, 在 DVD 光碟掛載好後, 直接在 setup.sh 上點兩下在終端機執行, 即可GUI (圖型介面) 安裝 (SAS 9.2 可能有 cmd install ?)


image

而事實上其實 JAVA 在 Linux 上中文有些問題 (請見 java 的一些問題 – 照著這篇文章做或許可以解決?),
但我的目的只是為了在 Linux 上能裝上 SAS, 並使用 command line 執行,
所以對於有沒有中文 就一點都不在乎了

(不過 SAS 在 Linux 的 x window 上一樣是有視窗介面的執行模式, 跑起來的介面跟 win32 差不多)

image

因為 SAS 安裝程式找不到與 JAVA 相對應的字體, 所以除了中文以外, 其他字體也變成框框了 (但我一樣不在意 :P )
不過這樣確讓我吃了苦頭, 花了至少半小時以上, 測試每一個選項,  才知道要選第七個才是英文

image

好! 那麼如果你的 SAS 是在正常的管道取得, 那 Order number, Description 這邊應該會有內容
(因為沒有從其他管道取得 SAS,  所以請別找我要序號或 order number 之類的東西哦!)

image

其實這邊還不是選擇您要安裝的 SAS 目錄, 而是 Depot Directory
些步驟只是先裝你拿到的 SAS 光碟(三片 DVD) 所有的內容先複製到你的 Linux 主機裡 (稍候才會開始進行安裝)

那 Depot Directory 這邊範例選擇安裝在 /usr/local/SAS9.2

image

確定了就按下 Start !

image

換 DVD 的時候到了 放進去後, 把 DVD 檔的路徑改為您實際上 mount DVD 的路徑
(因為筆者裝 SuSE 時, 覺得 裝 gnome 太肥了, 裝的是 xfce以節省磁碟空間, 若你也跟我一樣, 那麼在開始換 DVD 光碟以前, 請先把 gnome-mount 裝好吧!)

image

Depot 好就按 Next

image

然後結束 Depot

image

到這邊 DVD 就可以拿出來, 進到剛才 Depot Directory  /usr/local/SAS92裡

下這個指令開始真正安裝 SAS 9.2 for Linux
# sh ./setup.sh
這個指令開始安裝, 隨即跳出 SAS GUI, 一樣選擇第七項英文

image

當然是選安裝囉!

image

這邊就是真正要安裝的目錄了! 此例為 /usr/local/SAS

image

一樣 Next
image
這邊選第二個, 使用預計的安裝佈署計劃
image
要指定 SAS/GRAPH 的目錄, SAS/GRAPH
為製作高解析度彩色圖形模組。可用來產生多種顏色和多種型式的統計圖,如:柱形圖、圓餅圖、點狀圖、3D圖、等高線圖和地圖等等。
參考 http://zh.wikipedia.org/zh-tw/SAS系統
image
選擇典型安裝
image
請輸入 root 密碼, SAS 安裝的時候會把 profile 的資訊安裝在 /root 目錄底下
image
設定 SAS Administrator
image
設定 User Account
image
這個步驟之後, 幾乎不需要設定甚麼都按 Next 即可
image
然後按下 Start 開始安裝!

而安裝過後 SAS 視窗, 可能會出現提示, 顯示安裝過程有錯的部份
不過沒關係, 因為這個問題我也有寫信去問過 SAS 公司
他們說可以使用 SAS 提供的檢測程式, 來檢查你的 SAS 有沒有裝好
使用方式如下, 例如我裝在 /usr/local/SAS/
那就到 /usr/local/SAS/SASFoundation/9.2/sastest  輸入下面指令

可使用一般 User (此指令會將 SAS 檢測報告放在一般 User 的桌面上)
username@linux-scay:/usr/local/SAS/SASFoundation/9.2/sastest> sh ./sasiq.sh -outputpath ~/Desktop/

SAS Installation Qualification Tool for the SAS System
Parsing input data files… Done.
Validating SAS/AF Software… Passed.
Validating Base SAS Software… Passed.
Validating SAS/CONNECT Software… Passed.
Validating Enterprise Miner Software… Passed.
Validating SAS/ETS Software… Passed.
Validating SAS/FSP Software… Passed.
Validating SAS/GENETICS Software… Passed.
Validating SAS/GRAPH Software… Passed.
Validating SAS/IML Software… Passed.
Validating SAS/INSIGHT Software… Passed.
Validating Install Qualification Tool Software… Passed.
Validating IntegrationTechnologies Software… Passed.
Validating OLAP Server Software… Passed.
Validating SAS/ACCESS to ODBC Software… Passed.
Validating ODS Templates Software… Passed.
Validating SAS/OR Software… Passed.
Validating SAS/ACCESS to Oracle Software… Passed.
Validating SAS/OR Math Program Common Software… Passed.
Validating SAS/ACCESS to PC Files Software… Passed.
Validating SAS/Secure SSL Software… Passed.
Validating SAS/SHARE Software… Passed.
Validating Scalable Perf Data Client Software… Passed.
Validating SAS/STAT Software… Passed.
Validating Table Server Components Software… Passed.
Validating Report Fonts for Servers Software… Passed.
Generating output…
Generating reports…
SASCMD: /usr/local/SAS/SASFoundation/9.2/sas -sysin /usr/local/SAS/SASFoundation/9.2/sastest/sasiq.sas -autoexec /home/username/Desktop/validate_20090909.000/autoexec.sas
==================================

Detailed PDF and HTML reports have been generated:
/home/username/Desktop/validate_20090909.000/sasiq.pdf
/home/username/Desktop/validate_20090909.000/sasiq.htm

25 SAS components validated: 11358 files validated, 0 failed.

既然這邊顯示 0 failed 那應該就是沒問題吧?

那為了可以讓一般 user 也能用 SAS
我們就將 SAS 程式做個 link 到 /usr/local/bin 裡去

username@linux-wce7:~/SAS-dir/data> cd /usr/local/bin/
username@linux-wce7:/usr/local/bin> sudo ln -s /usr/local/SAS/SASFoundation/9.2/sasexe/sas sas
密碼:

假如你當初裝 SAS 所選的目錄是 /usr/local/SAS
那裝好的 SAS 程式會在
/usr/local/SAS/SASFoundation/9.2/sasexe/

檢查一下 link 是否建立
username@linux-wce7:/usr/local/bin> ls -l
總計 0
lrwxrwxrwx 1 root root 43 2009-09-11 19:53 sas -> /usr/local/SAS/SASFoundation/9.2/sasexe/sas

那回到自己的家目錄下吧! 使用下列指令試試 SAS 能不能用?
username@linux-wce7:/usr/local/bin> cd -
/home/username/SAS-dir/data
username@linux-wce7:~/SAS-dir/data> sas -nodms -sysin test.sas

test.sas 為你自己的 SAS code 哦!

Have a lot of fun…

另一篇:

http://www.thejuliagroup.com/blog/?p=283


So you want to install SAS for Linux….

Step 1: Read the documentation for some hints on how to download and install the download  manager, and  the SAS software depot (if you are the SAS administrator).

Step 2 : Throw away the documentation. It will just confuse you after this point and it doesn’t help anyway.

I had installed SAS on a Ubuntu operating system once before, on a virtual machine running on Virtual Box running on an older computer in my office that has Windows XP. I couldn’t remember how I did it except that I ended up literally throwing away the documentation and just using Google to figure it out.  Then I deleted the virtual machine later when I needed space on that computer.

This weekend I installed SAS on the computer in the living room that runs Linux. My husband received the computer for $100 in some raffle or something. It was a bit of a dilemma at first, because our other six computers are Macs and Dennis equates Windows with the anti-Christ, but, after a few minutes thought, he installed Ubuntu and all has been well, barring a few arm-wrestling matches with the little one over whether she was going to get to use it for Club Penguin or he was going to be able to use it for programming.

The  good news is downloading the download manager and installing the SAS software depot was a piece of cake. I followed the instructions on the SAS install site and everything worked perfectly. It took a few hours to download, which was a bit surprising to me, since we just had FiOS installed on the promise of speeding things up, but for once no one tripped over a cord and disconnected the computer, spelled coke on the keyboard or any of those other things that always seem to happen when you are right in the middle of something.

I created the DVDs from the SAS software depot but they did not work. By “they did not work”, I mean that when I popped in the DVD and ran sudo /cdrom/setup.sh   instead of giving me three options, one of which was to install the software, it launched right into creating a new software depot on the computer where I already had a software depot from which I had created the DVDs in the first place. Sort of an annoying Escher-type loop.  FAIL !

If I was more of my usual self I would have been determined to figure this out, but, unfortunately, I only have about 10 or 11 productive hours when I am not in too much pain to work (this sucks) so I decided to go ahead and use the software depot which was installed and actually DID give me three options. So, here is what I did after having downloaded the software depot, and it did work.

LOG IN WITH ROOT ACCESS

1. cd to to the directory where your software depot is located, e.g.,

cd /usr/local/SAS/

2. Make sure your default shell is bash

(If your default shell is NOT bash, in my case it was dash, you will get a message that says:

/bin/sh: illegal option -p

Since the pain medication is eating about 40% of my brain as well as a good bit of my productive hours (this sucks), I passed the problem along to the Windows-hating Dennis when he got home from the lab. He emailed me the following from the upstairs bedroom  ….

In order to install SAS components without the “/bin/sh: illegal option -p” error which stops installation,  your /bin/sh file must be pointing to bash.

To check this, in the terminal execute the command:

ls -l /bin/sh

The line you get in return should end in something like:

sh -> /bin/bash

if it just ends in sh, or something like sh -> /bin/dash, you need to replace it with a symbolic link to bash. To do this, execute the two following lines:

sudo rm  /bin/sh
sudo ln  -s  /bin/bash  /bin/sh

3. Type  sudo ./setup.sh

give your password

Just click along with the next screens and SAS should install no problem.

(The SAS documentation says to just type ./setup.sh  but in my case that tells me I don’t have permission.)

Actually compared to the problems we had early on with SAS 9.2 for Windows, this was relatively pain free.

Running SAS

You need to create a work directory and assign it when you run SAS. I went to my home directory and created a directory named tmp.

mkdir tmp

Then, to invoke SAS, I did this

usr/local//SAS/SASFoundation/SAS92/9.2/sas -work tmp

and SAS started up just happy as could be.

Of course, at this point, three things occur to me.

  1. I had no data on this computer and no actual need for SAS on it at the moment, I just wanted to see if I could install it and get it to run.
  2. There must be something like a .login file where I can set the path and don’t need to specify the full path each time.
  3. I have yet to install SAS on Linux from DVDs. The last time I did it from an external disk drive that had the software depot on it.

Also, there was no Enterprise Guide and no Power and Sample Size application. Not sure if SAS does not make those for Linux or they just weren’t part of our license.

So, there you have it. SAS for Linux. Except for the little bash/ dash episode, it really wasn’t much trouble at all. We only have one person outside our department who wants to install it (the other three used the same external drive that I did), so I think I will just copy the software depot on to a flash drive and send it to him.

Maybe I’ll figure out the DVD thing when I feel better (this sucks) or much more likely I’ll give them to my wonderful assistant and have her figure it out while I write up my lectures for next week on calculating various effect sizes with SPSS, SAS Enterprise Guide for Data Management & Statistics and Basic Statistics using SPSS 14 (yes, unbelievably, we actually had a request for a class on that!)

  评论这张
 
阅读(1271)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2016