build & install software locally with dotsoftware
Quick start | Usage | Installation | Software list | Folder structure | Packaging software
For the impatient, just copy and paste the following lines in your bash prompt
# get latest .software
cd
git clone https://github.com/fibo/.software.git
# source it in your profile and in current session
[ -f ~/.bash_profile ] && grep 'source ~/.software/etc/profile' ~/.bash_profile || echo 'source ~/.software/etc/profile' >> ~/.bash_profile && source ~/.software/etc/profile
# you are done!
Give it a try, launch
$ .software_install Golang
Why install software locally?
If you have root rights or sudo with a package manager, don't use me!.
But, sometimes you are in one of the following scenarios
.software has only one feature: installing software locally!
It is implemented by a bash function named .software_install
that takes the software want to install as argument.
For example
.software_install Foo
Optionally, a custom version number can be passed as a second argument
.software_install Foo 2.3.4
Typing .software_install in your bash prompt, and hitting TAB will autocomplete with available software. Take a look to Software list, which includes Perl, Node, Golang, Ruby among others.
Please note that .software supports Linux and OS X, but could work on other Unix-like systems, like BSD. In order to run, .software requires bash, Tar, Gzip, Grep, Findutils and Wget. Other requirements are those needed by software builds: Make, gcc, etc.
Just go to your home directory and clone this repository.
cd
git clone https://github.com/fibo/.software.git
If you don't have git installed you can try the following commands
cd
wget --no-check-certificate https://github.com/fibo/.software/archive/master.zip
unzip master
mv .software-master .software
rm master
The following command will add source ~/.software/etc/profile
to your .bash_profile only once and load .software features in your current session.
$ [ -f ~/.bash_profile ] && grep 'source ~/.software/etc/profile' ~/.bash_profile || echo 'source ~/.software/etc/profile' >> ~/.bash_profile && source ~/.software/etc/profile
Otherwise you can add manually these lines to your .bash_profile. Note that if you are using .software from a graphical environment rather than a remote server login shell, you should edit .bashrc file instead.
##########################
### .software config start
# Set .software target dir, defaults to "~/.software".
# export DOTSOFTWARE_ROOT_DIR=/path/to/your/software/installation/dir
# Init .software
source ~/.software/etc/profile
### .software config end
########################
.software uses enviroment variable DOTSOFTWARE_ROOT_DIR
to know the dir where all your software will be installed.
It defaults to ~/.software.
You maybe want to edit it when
Note that .software by default do not download sources if they are already in folder $DOTSOFTWARE_ROOT_DIR/src. This information can be useful when you need to install software without an Internet connection.
Instead of setting a DOTSOFTWARE_ROOT_DIR
variable, another choice is to create a symbolic link from your /dotsoftware/root/dir to ~/.software/ dir.
Build not supported.
Install it with a package manager:
# apt-get install autoconf
version 5.8
Build depends on:
version 7.53.1
In order to support POST
via https, it is builded --with-ssl
configure flag.
Build depends on:
version 7.1
Build depends on:
version 2.1.0
Build depends on:
version 5.45
Build depends on:
version 4.4.2
It is a .software dependency.
Install it with a package manager:
# apt-get install findutils
Build depends on:
Build not supported.
Install it with a package manager:
# apt-get install g++
Build not supported.
Install it with a package manager:
# apt-get install gcc
Build not supported.
Install it with a package manager:
# apt-get install gettext
version 2.8.2
Build depends on:
version 2.2.0
Build depends on:
version 1.9.1
Golang needs environment variables
GOROOT
which is set to $DOTSOFTWARE_ROOT_DIR/opt/golang
.GOPATH
which should be set by user, for instance $HOME/Golang
.GOBIN
which should be set by user, for instance $GOPATH/bin
, and added to PATH
.version 2.38.0
Build depends on:
version 2.21
It is a .software dependency.
Install it with a package manager:
# apt-get install grep
Build depends on:
version 1.6
Install it with a package manager:
# apt-get install gzip
Build depends on:
version 5.3.0
Build depends on:
version 2.9.0
Build depends on:
version 3.82
Install it with a package manager:
# apt-get install make
Build depends on:
version 0.7.1
Build depends on:
version 8.9.3
Node version above is latest LTS / Stable.
Build depends on:
Build not supported.
Install it with a package manager:
# apt-get install openssl libssl-dev
# yum install openssl-devel
Build not supported.
Install it with a package manager:
# apt-get install libreadline-dev
# yum install readline-devel
version 3.5.11
Build depends on:
version 2.7
Build depends on:
version 5.20.3
Build depends on:
version 2.7.9
Build depends on:
version 9.4.5
Build depends on:
Install requirements with a package manager:
# apt-get install make gcc libreadline-dev zlib1g-dev
Variable PGDATA
defines the directory where PostgreSQL stores data and configuration.
It defaults to $DOTSOFTWARE_ROOT_DIR/opt/pgsql/data
.
On build, commands initdb
and createdb
are launched: this means that
database instance is initialized and a database named as your unix user is created.
Set variable PGDATABASE
in your environment to customize database name.
Common actions are:
stop_postresql
start_postgresql
psql
pg_ctl reload
Configuration files can be found in $PGDATA
directory.
For example, to enable connections to all users and databases from
IP 10.20.30.40, to a PostgreSQL instance running on an host with an IP 1.2.3.4,
edit $PGDATA/postgresql.conf
listen_addresses = '1.2.3.4'
and $PGDATA/pg_hba.conf
host all all 10.20.30.40/32 trust
then launch
pg_ctl reload
To build a Amazon Redshift compatible version launch
.software_install PostgreSQL 8.0.2
version 3.2.8
Build depends on:
version 3.1.2
Build depends on:
version 2.3.1
Build depends on:
Here version may be not the latest cause it is (manually) up to date with GitHub Pages Dependency versions. However you can install another version, for example with
.software_install Ruby 2.1.7
version 4.2.2
Build depends on:
version latest
It is a .software dependency.
Install it with a package manager:
# apt-get install tar
Build depends on:
version 8.6.4
Build depends on:
version 1.18
It is a .software dependency.
Install it with a package manager:
# apt-get install wget
Build depends on:
version 5.0.5
Build depends on:
version 1.2.8
Build depends on:
Install it with a package manager:
# apt-get install zlib1g-dev
# yum install zlib-devel
Software Foo has its homonym file in folder ~/.software/etc/installrc.d.
It defines environment variables needed for installation. It must contain at least SOURCES_URI
.
For example, Wget file contains
SOURCES_URI=http://ftp.gnu.org/gnu/wget/wget-${VERSION}.tar.gz
It can also be used to override functions used by .software_install, which are
For example, Perl file contains
SOURCES_URI=http://www.cpan.org/src/5.0/perl-${VERSION}.tar.gz
function _build() {
cd $CURRENT_VERSION_DIR
./Configure -des \
-Dprefix=$DOTSOFTWARE_ROOT_DIR \
-Dscriptdir=$DOTSOFTWARE_ROOT_DIR/bin \
&& make test \
&& make install
}
Implements the .software_install function.
Contains profile files for every software, where needed.
This file, contains also software versions. Every software must have an homonym section in this file where version number is in the second row, like this
### [Foo](http://url-of-foo-homepage.xxx)
> version 1.2.3
.software installs software locally downloading and compiling sources. This process can be time and cpu consuming, so, if you have two or more similar machines is not that difficult to build only once, then package your result and installing it on other hosts. The requirement are
If you are using default .software configuration you could launch
$ cd
$ tar czf dotsoftware.tar.gz .software/
$ scp dotsoftware.tar.gz host1.example.com:~
$ ssh host1.example.com tar xzf dotsoftware.tar.gz
$ ssh host1.example.com rm dotsoftware.tar.gz