User Tools

Site Tools


sudoc:su_installation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
sudoc:su_installation [2019/07/29 23:36] seisunixsudoc:su_installation [2023/03/23 22:05] (current) – [Installing SU on specific platforms] seisunix
Line 2: Line 2:
  
  
-Remember that the U in SU stands for "Unix". Thus, you must must be running some form of a Unix or Unix-like environment to use SU. Today, many choices are available. There, are, of course, many variations of Linux, each which works equally well as a platform for SU. Another Unix option is Mac OX based systems from Apple.  +Remember that the U in SU stands for "Unix". Thus, you must must be running some form of a Unix or Unix-like environment to use SU. Today, many choices are available. There, are, of course, many variations of Linux, each which works equally well as a platform for SU. Another Unix option is Mac OSX, which was based on FREE BSD Unix.  
  
-In more recent releases of Microsoft windows, there is a "bash shell" environment available, which is a version of Ubuntu Linux. An older solution to the Windows versus Unix question is a system called Cygwin, which comes in 32 bit and 64 bit systems. Finally, users may configure their windows as dual-boot platforms.+In more recent releases of Microsoft Windows, there is a "bash shell" environment available, which is a version of Ubuntu Linux. An older solution to the Windows versus Unix question is a system called Cygwin, which comes in 32 bit and 64 bit systems. For Microsoft Windows installations, you will need to also add an X-windows server.Finally, users may configure their windows as dual-boot platforms, enjoying either a completely linux or a completely Microsoft environment.
  
-Everything that follows is on the "Unix command line". To do anything further requires that you  +More recently in Ubuntu 20.04 and later, the Linux environment for Window is called the Windows Linux Subsystem (WSL) and is an effective environment for installing Linux operating systems. Yet another tool is the Hyper-V virtual machine environment. 
-open your systems "Terminal" application so that you have access to the command line.+ 
 +Everything that follows in this discussion is executed on the "Unix command line". To do anything further requires that you  
 +open your systems "Terminal" application so that you have access to the command line. This can be a culture shock for those who grew up in the "land of point and click drag and drop" and "there's an APP for that." This may seem pretty old school, but, in reality this is the "expert user" environment.
  
 ===== Preliminaries ===== ===== Preliminaries =====
Line 29: Line 31:
  
 $ sudo mkdir /usr/local $ sudo mkdir /usr/local
 +
 $ sudo mkdir /usr/local/cwp $ sudo mkdir /usr/local/cwp
 +
 $ chown john /usr/local/cwp $ chown john /usr/local/cwp
  
Line 38: Line 42:
 You can download the latest release of SU [[https://nextcloud.seismic-unix.org/index.php/s/LZpzc8jMzbWG9BZ|here]]. You can download the latest release of SU [[https://nextcloud.seismic-unix.org/index.php/s/LZpzc8jMzbWG9BZ|here]].
  
-Move the current distribution that has a name like   cwp_su_all_4XRXX.tgz   where the .tgz extension means that the file is a gzipped Unix tar compressed and bundled archive---often called "tarball."+Move the current distribution that has a name like   cwp_su_all_4XRXX.tgz   where the Xs are numbers and the .tgz extension means that the file is a gzipped Unix tar compressed and bundled archive---often called "tarball."
 Please move the tar archive to the directory you have created. In my example, regular user "john" can do all of the subsequent  steps, without ever having to become the "super user". Please move the tar archive to the directory you have created. In my example, regular user "john" can do all of the subsequent  steps, without ever having to become the "super user".
  
Line 44: Line 48:
  
 $ gunzip cwp_su_all_4XRXX.tgz $ gunzip cwp_su_all_4XRXX.tgz
 +
 $ tar -xvf cwp_su_all_4XRXX.tar $ tar -xvf cwp_su_all_4XRXX.tar
  
Line 56: Line 61:
 Type: Type:
  
- echo $SHELL+$ echo $SHELL
  
-Note that the first dollar sign merely represents the command line prompt, which may be different on your system. The object  $SHELL is read as "value of" SHELL. Here SHELL is an environment variable, that has the value of /bin/sh, /bin/bash, /bin/ksh, /bin/zsh, /bin/csh, /bin/tcsh+Note that the first dollar sign merely represents the command line prompt, which may be different on your system. The object  $SHELL is read as "value of" the variable SHELL. Here SHELL is an environment variable, that has the value of /bin/sh, /bin/bash, /bin/ksh, /bin/zsh, /bin/csh, /bin/tcsh and it is customary to write environment variables all in capital letters.
  
-=== Shell environment:  /bin/bash ===+=== Shell environment:  /bin/bash  (the Bourne Again Shell) ===
  
 The most common shell environment these days is /bin/bash and the configuration files in your home directory are .bash and .bash_profle  These files must be edited so that the environment variable CWPROOT and that $CWPROOT/bin are on the users' path. The most common shell environment these days is /bin/bash and the configuration files in your home directory are .bash and .bash_profle  These files must be edited so that the environment variable CWPROOT and that $CWPROOT/bin are on the users' path.
  
 To do this, type: To do this, type:
 +
 $ cd $ cd
  
Line 83: Line 89:
  
 # set the CWPROOT variable # set the CWPROOT variable
 +
 export $CWPROOT=/usr/local/cwp export $CWPROOT=/usr/local/cwp
  
 # set the PATH variable # set the PATH variable
 +
 export PATH=$PATH:$CWPROOT/bin:. export PATH=$PATH:$CWPROOT/bin:.
  
  
-=== Shell environments: /bin/ksh  /bin/zsh /bin/sh ===+=== Shell environments: /bin/ksh (Korn Shell) and /bin/sh (Bourne Shell) ===
  
 The configuration file for these environments is called  .profile  however the syntax is  The configuration file for these environments is called  .profile  however the syntax is 
-the same, so add the same lines to the bottom of    .profile+the same, so add the same lines to the bottom of    .profile. . 
 + 
 +Caveat: on most modern systems /bin/sh is merely a link to the /bin/bash shell, 
 +so the configuration file will be .bashrc and .bash_rc. 
 + 
 +=== Shell environment: /bin/zsh  (Z-shell) === 
 + 
 +This is an important environment, because MacOSX Catalina and later releases make this the 
 +default shell for new installations. 
 + 
 +The configuration file for these Z-shell  is called  .zshrc  however the syntax is  
 +the same, so add the same lines to the bottom of    .zshrc 
  
  
-=== Shell environments:  /bin/csh and /bin/tcsh ===+=== Shell environments:  /bin/csh (C-shell) and /bin/tcsh (T-shell) ===
  
 The C-Shell is a totally different environment. These are less commonly used environments, today. The C-Shell is a totally different environment. These are less commonly used environments, today.
Line 147: Line 167:
  
  
-===== Setting the Makefile.config ====+==== Setting the Makefile.config ====
  
 Now you are ready to begin installing SU. Note that if you get error messages along the way, these Now you are ready to begin installing SU. Note that if you get error messages along the way, these
Line 196: Line 216:
 There are additional items to install for the complete package. These are There are additional items to install for the complete package. These are
  
-make xminstall   --- for FFTLAB+make xminstall   --- for FFTLAB, a fun educational app for exploring the Fourier Transform 
 + 
 +make mglinstall  --- Open GL applications, Graphics codes that could be built upon. 
 + 
 +make finstall    ---- Fortran codes, modeling and anisotropy codes. 
 + 
 +make sfinstall   ---- SFIO installation for  segdread (the SEGD to SU data reader) 
 + 
 + 
 +None of these is essential for running most of SU. 
 + 
 + 
 +==== Installing SU on specific platforms ==== 
 + 
 +=== Ubuntu 22.04  === 
 + 
 +After you have installed Ubuntu 22.04, no matter what environment you are using for this, there are addition packages that must be installed. 
 + 
 +$ sudo apt-get install xorg 
 + 
 +$ sudo apt-get update 
 + 
 +$ sudo apt-get install xorg 
 + 
 +$ sudo apt-get install gcc 
 + 
 +$ sudo apt-get install libx11-dev 
 + 
 +$ sudo apt-get install libxt-dev 
 + 
 +$ sudo apt-get install libxext-dev 
 + 
 +$ sudo apt-get install make 
 + 
 +$ sudo apt-get install libmotif-dev 
 + 
 +$ sudo apt-get install libtirpc-dev 
 + 
 + 
 + 
 + 
 + 
 + 
 +=== Case study: Linux Mint notes contributed by a user, including comments on the sfinstall portion === 
 + 
 + 
 +# setup base dir 
 +sudo mkdir -p /opt/cwp/44R19 
 +cd /opt/cwp 
 +# Replace USER below with your username 
 +sudo chown USER:USER 44R19 
 + 
 +# Add env vars to bashrc. 
 +cat >> ~/.bashrc << eof 
 +# Seismic Unix 
 +export CWPROOT=/opt/cwp/44R19 
 +export PATH=$PATH:/opt/cwp/44R19 
 +eof 
 + 
 +# Check CWPROOT is set. 
 + 
 +. ~/.bashrc  
 + 
 +cd $CWPROOT 
 + 
 +# grab and unpack SU 
 + 
 +cp ~/Downloads/cwp_su_all_44R19.tgz . 
 + 
 +tar -xzvf cwp_su_all_44R19.tgz 
 + 
 +# set the make config to Linux_x86_64. 
 + 
 +cd src 
 + 
 +cp configs/Makefile.config_Linux_x86_64 Makefile.config 
 + 
 +# Make the base seismic unix. 
 + 
 +make install 
 + 
 +# Install the required libraries for the X-toolkit windows. 
 + 
 +sudo apt-get install libx11-dev libxt-dev 
 + 
 +make xinstall 
 + 
 +# Install the required libraries for the Fortran codes 
 + 
 +sudo apt-get install gfortran 
 + 
 +# add the string '-std=legacy' to the FFLAGS line of the Makefile.config (line 97 for me) 
 + 
 +make finstall 
 + 
 +# Install Mesa/OpenGL items 
 + 
 +sudo apt-get install libglu1-mesa-dev freeglut3-dev libxmu-dev libxmu-headers libxi-dev 
 + 
 +make mglinstall 
 + 
 +# Build Utils 
 +make utils
  
-make mglinstall  --- Open GL applications+# Install libraries and build motif based applications 
 +sudo apt-get install aptibmotif-dev 
 +make xminstall
  
-make finstall    ---- Fortran codes 
  
-make sfinstall   ---- SFIO installation for  segdread (the SEGD to SU reader)+# Edit code and build SFIO version of SEGDREAD 
 +# remove lines 399 to 404 of  src/Sfio/src/lib/sfio/Stdio_b/Sfstdio.c 
 +        printf("/* Linux7.2 requires __FILE in wchar.h - we fake it here */\n"); 
 +        printf("#include        \"FEATURE/sfio\"\n"); 
 +        printf("#if _typ___FILE\n"); 
 +        printf("typedef FILE    *__FILE;\n"); 
 +        printf("#endif\n\n");
  
  
 +# remove lines 5 to 10 of  src/Sfio/src/lib/sfio/Stdio_s/stdio_s.h
 + #include        "FEATURE/sfio"
 +
 + #if _typ___FILE /* Redhat7.3 requires __FILE in wchar.h */
 + typedef struct _sfio_s  *__FILE;
 + #endif
 +make sfinstall
sudoc/su_installation.1564443394.txt.gz · Last modified: 2019/07/29 23:36 by seisunix