Skip to content

Instantly share code, notes, and snippets.

@symstu
Last active September 8, 2020 07:47
Show Gist options
  • Save symstu/0f11ea2e0e142e32fdd56e6c017f2a7f to your computer and use it in GitHub Desktop.
Save symstu/0f11ea2e0e142e32fdd56e6c017f2a7f to your computer and use it in GitHub Desktop.
Most used commands

Linux commands

# untar archive
tar zxvf tarball.tar.gz

Git

git init --bare
git clone --bare git@host:path

Build from source

# clean dist after installing new packages
make distclean
make clean

Python 3.6

MacOS

# For 3.6 have to be installed vars
CPPFLAGS="-I$(brew --prefix openssl)/include -I$(xcrun --show-sdk-path)/usr/include" 
LDFLAGS="-L$(brew --prefix openssl)/lib"

./configure --enable-optimizations --prefix=<custom-directory>
make
make install

Fedora 31

# fix error ModuleNotFoundError: No module named 'encodings'
unset PYTHONHOME
unset PYTHONPATH

yum install zlib-devel

/configure --enable-optimizations --prefix=/data/services/python/build/3.6.1 --disable-ipv6
make
make install

Python 3.8

# Specific Directory (Tested on MacOS 10.15.2)
./configure --enable-optimizations --prefix=<custom-directory> --with-openssl=/usr/local/Cellar/openssl@1.1/1.1.1d/

# Ubuntu 18+
./configure --enable-optimizations --prefix=~/python37 --with-ssl=/usr/bin/openssl --with-ssl-lib=/usr/lib/x86_64-linux-gnu

make
make install

Fedora 31

./configure --prefix=/data/services/python/build/3.8.1

PostgresSQL 9.4

Fedora 31

# for make world
sudo yum install sgml-common stylesheets openjade sgml-tools

# uuid header files
sudo yum install libuuid-devel

# postgresql can not find libuuid
sudo ln -s /usr/lib64/libuuid.so.1 /usr/lib64/libuuid.so

./configure --with-libraries=/usr/lib64 --with-uuid=e2fs  --without-readline --without-zlib --prefix=/data/services/postgres/build/postgresql-10.12
make

make install
make install-world

PostgresSQL 10

Fedora 31

# uuid header files
sudo yum install libuuid-devel

# postgresql can not find libuuid
sudo ln -s /usr/lib64/libuuid.so.1 /usr/lib64/libuuid.so

./configure --with-libraries=/usr/lib64 --with-uuid=e2fs  --without-readline --without-zlib --prefix=/data/services/postgres/build/postgresql-10.12
make world
make install
make install-world

Redis 2.8.4

Fedora 31

make PREFIX=/some/other/directory install 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment