Image

How to prepare Linux for CoSANG ?

Linux Operating System and Programming Languages. C, C++, Python
User avatar
Shahram
Posts: 287
Joined: Sun Feb 05, 2017 8:31 am

How to prepare Linux for CoSANG ?

Postby Shahram » Sun Feb 05, 2017 2:05 pm

Part one: Install Linux:

First you need to install Linux. We used Ubuntu and Debian without problem and we recommend to install one of them. If your are going to install single operating system it will be very easy, just follow the wizard, but if you want to have dual operating system you need to change some configurations:

1- Install windows. If you have an installed Windows, Create at least 5GB un-partitioned space on your hard disk.

2-Download Linux:
- Debian:https://www.debian.org/CD/live/
- Ubuntu: https://www.ubuntu.com/download/desktop

3- Write Linux image on DVD or USB memory.
To create bootable USB memory use Rufus : https://rufus.akeo.ie/
Be careful Rufus will format all information before writing image.

4- Windows will not allow you too boot from usb if you don't turn off fast startup and safe boot features. It depends on your operating system and you should google for it. Usually you have access to these configurations via your control panel or settings and bios setup. Some times to enable usb or DVD boot you should enable "Legacy" from your bios setup.

These may help:
http://acer--uk.custhelp.com/app/answers/detail/a_id/37059/~/windows-10%3A-enable-or-disable-fast-startup

http://www.windowspasswordsrecovery.com/win8-tips/how-to-disable-uefi-secure-boot-in-windows-8-1-8.html

5- Boot from your USB memory or DVD and install Linux on un-partitioned space. Be careful to select correct partition, otherwise you will loose your information on other partitions. :?

Debian installation guide: https://www.debian.org/releases/stable/installmanual

Ubuntu installation guide: https://builtvisible.com/the-ubuntu-installation-guide/

Please note that you should have internet connection and a lot of companies don't provide driver for Linux but Linux will recognize wired connections. It means if you are using wireless connection you may encounter error, try wired connection.

6- Linux uses "grub" as boot manager and normally it is capable to manage both windows and Linux.

7- Windows tries to change configurations back whenever updates itself, so remember how to disable fast startup and safe boot.


Part two: edit source (if you have error when you try to install packages in part three, otherwise skip this)

Usually required packages are in Linux DVD or USB memory. I f you have installed Linux from DVD you don't need to change any settings and you can install packages directly but if you have used USB you should change sources.list to let Linux find packages from USB memory.

this file is in "/etc/apt". Change permission:

Code: Select all

# cd /etc/apt
# chmod 666 sources.list


then open it in editor and add your sources. for example if I want to add Debian source on USB memory:

deb file:/media/"Debian 7.5"

and for Debian website:

Code: Select all


deb http://httpredir.debian.org/debian/ jessie main contrib non-free
deb http://httpredir.debian.org/debian jessie main
deb-src http://httpredir.debian.org/debian jessie main

deb http://ftp.us.debian.org/debian/ jessie main contrib non-free

deb http://httpredir.debian.org/debian jessie-updates main
deb-src http://httpredir.debian.org/debian jessie-updates main

deb http://security.debian.org/ jessie/updates main contrib
deb-src http://security.debian.org/ jessie/updates main contrib

deb http://repos.codelite.org/debian/ jessie contrib


part three: install packages:

install g++ compiler:

Code: Select all

#apt-get install g++


install gsl:
-Download latest version : http://www.gnu.org/software/gsl
- extract and open directory in terminal

Code: Select all

# ./configure
# make
#make install


install MPICH:

Code: Select all

#apt-get mpich


install FFTW:
-Download version 2. Latest version may not work well : http://www.fftw.org
- extract and open directory in terminal

Code: Select all

# ./configure --enable-prefix --enable-mpi
# make
#make install
#make clean
# ./configure --enable-float --enable-prefix
# make
#make install
#make clean


- this configuration is important to run with MPI and double precision.

install hdf5:
-Download latest version : ftp://ftp.hdfgroup.org/hdf5/current/src
- extract and open directory in terminal

Code: Select all

# ./configure
# make
#make install



if you see error try:

Code: Select all

#apt-get clean
#apt-get update
#apt-get upgrade



Now you are ready to go ;)



User avatar
Shahram
Posts: 287
Joined: Sun Feb 05, 2017 8:31 am

Re: How to prepare Linux for CoSANG ?

Postby Shahram » Thu Feb 23, 2017 1:59 pm

Note for Debian Installation:

This page is main link for download, sometimes people are confused by different versions.

https://www.debian.org/CD/http-ftp/#stable

For IBM compatible 64 bit systems use : amd64 and for IBM compatible 32 bit systems use i386. Usually first image is enough for primary installation and extra images are for extra packages.




Return to “Programming and Linux”

Who is online

Users browsing this forum: No registered users and 1 guest