mémorandum Linux

Aperçu

Je vais le résumer ici sous forme de mémorandum afin que je puisse me souvenir de la commande linux aussi précisément que possible. Nous le mettrons à jour de temps en temps.

Mémorandums

check cpu

sudo lshw -class processor

check gpu

lspci | grep -i nvidia

check memory

Définir la méthode d'entrée en basculant vers l'espace Ctrl

https://qiita.com/nabenabe0928/items/09affae67df9c150ad50 Suivez ici. Faire cela réduira considérablement le stress.

count file

ls -1 | wc -l

keyboard setting for ubuntu18.04

sudo dpkg-reconfigure keyboard-configuration
setxkbmap jp

Je vais essayer les deux ci-dessus pour le moment.

environnement pyenv et virtualenv pour ubuntu sur docker

apt update &&apt install -y wget git&& apt install build-essential -y&& git clone https://github.com/pyenv/pyenv.git ~/.pyenv &&\
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile &&\
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile &&\
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.profile &&\
source ~/.profile &&\
apt install -y gcc make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev &&\
pyenv install 3.6.3 &&\
git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv &&\
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.profile &&\
source ~/.profile &&\
pyenv virtualenv 3.6.3 myenv && pyenv global 3.6.3

environnement pyenv et virtualenv pour ubuntu PAS sur docker


sudo apt update &&sudo apt install -y wget git&&sudo  apt install build-essential -y&& git clone https://github.com/pyenv/pyenv.git ~/.pyenv &&\
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile &&\
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile &&\
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.profile &&\
source ~/.profile &&\
sudo apt install -y gcc make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev &&\
pyenv install 3.6.3 &&\
git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv &&\
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.profile &&\
source ~/.profile &&\
pyenv virtualenv 3.6.3 myenv && pyenv global 3.6.3

utilisateur Ajouter une autorisation su


adduser username
usermod -G sudo username

Mettez pyodbc dans ubuntu18.04


apt-get install -y unixodbc unixodbc-dev &&\
pip3 install pyodbc==4.0.30

Insérer gmpy2 (sur le docker)


cd ~/static &&apt update &&apt install -y wget && apt install build-essential -y&&\
wget https://ftp.gnu.org/gnu/m4/m4-1.4.18.tar.gz && tar xf ./m4-1.4.18.tar.gz && cd m4-1.4.18 && ./configure --prefix=/usr && make && make install &&\
cd .. && wget https://gmplib.org/download/gmp/gmp-6.0.0a.tar.bz2 && tar xf ./gmp-6.0.0a.tar.bz2 && cd gmp-6.0.0 && ./configure --prefix=$HOME/static --enable-static --disable-shared --with-pic && make &&make check&& make install &&\
cd .. && wget http://www.mpfr.org/mpfr-3.1.2/mpfr-3.1.2.tar.bz2 && tar xf ./mpfr-3.1.2.tar.bz2 && cd mpfr-3.1.2 && ./configure --prefix=$HOME/static --enable-static --disable-shared --with-pic --with-gmp=$HOME/static && make && make install &&\
cd .. && wget https://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz && tar xf ./mpc-1.0.3.tar.gz && cd mpc-1.0.3 && ./configure --prefix=$HOME/static --enable-static --disable-shared --with-pic --with-gmp=$HOME/static --with-mpfr=$HOME/static && make && make install &&\
cd .. && wget https://github.com/aleaxit/gmpy/releases/download/gmpy2-2.1.0a1/gmpy2-2.1.0a1.tar.gz && tar xf ./gmpy2-2.1.0a1.tar.gz && cd gmpy2-2.1.0a1 && source ~/.profile && python setup.py build_ext --static=~/static install

Série OpenSL 1.0.2 (sur docker)


 cd ~ && mkdir static && cd ~/static &&\
apt-get install -y build-essential wget m4 libgmp-dev file git vim libomp-dev&& cd ~/static && wget https://www.shoup.net/ntl/ntl-11.3.2.tar.gz && tar xf ntl-11.3.2.tar.gz && cd ntl-11.3.2/src && ./configure SHARED=on NTL_GMP_LIP=on NTL_THREADS=on NTL_THREAD_BOOST=on && make -j4 && make install&&\
cd ~/static && wget http://www.openssl.org/source/openssl-1.0.2a.tar.gz && tar -xvzf openssl-1.0.2a.tar.gz && cd openssl-1.0.2a && export CFLAGS=-fPIC && ./config shared --prefix=/usr && make && make install

Mettre docker & docker compose dans ubuntu18.04

apt install -y \
     apt-transport-https \
     ca-certificates \
     curl \
     software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository \
     "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
     $(lsb_release -cs) \
     stable"
apt update
apt-get install docker-ce docker-ce-cli containerd.io
service docker start

gmpy2 on ubuntu (not docker)


cd ~/static &&sudo apt update &&sudo apt install -y wget && sudo apt install build-essential -y&&wget https://ftp.gnu.org/gnu/m4/m4-1.4.18.tar.gz && tar xf ./m4-1.4.18.tar.gz && cd m4-1.4.18 && ./configure --prefix=/usr && make &&sudo make install &&cd .. && wget https://gmplib.org/download/gmp/gmp-6.0.0a.tar.bz2 && tar xf ./gmp-6.0.0a.tar.bz2 && cd gmp-6.0.0 && ./configure --prefix=$HOME/static --enable-static --disable-shared --with-pic && make &&make check&&sudo make install &&cd .. && wget http://www.mpfr.org/mpfr-3.1.2/mpfr-3.1.2.tar.bz2 && tar xf ./mpfr-3.1.2.tar.bz2 && cd mpfr-3.1.2 && ./configure --prefix=$HOME/static --enable-static --disable-shared --with-pic --with-gmp=$HOME/static && make &&sudo  make install &&cd .. && wget https://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz && tar xf ./mpc-1.0.3.tar.gz && cd mpc-1.0.3 && ./configure --prefix=$HOME/static --enable-static --disable-shared --with-pic --with-gmp=$HOME/static --with-mpfr=$HOME/static && make && sudo make install &&cd .. && wget https://github.com/aleaxit/gmpy/releases/download/gmpy2-2.1.0a1/gmpy2-2.1.0a1.tar.gz && tar xf ./gmpy2-2.1.0a1.tar.gz && cd gmpy2-2.1.0a1

sudo python3 setup.py build_ext --static=~/static install

openssl 1.0.2 on ubuntu (not docker)


cd ~/static &&sudo apt-get install -y build-essential wget m4 libgmp-dev file git vim libomp-dev&& cd ~/static && wget https://www.shoup.net/ntl/ntl-11.3.2.tar.gz && tar xf ntl-11.3.2.tar.gz && cd ntl-11.3.2/src && ./configure SHARED=on NTL_GMP_LIP=on NTL_THREADS=on NTL_THREAD_BOOST=on && make -j4 && sudo make install&&cd ~/static && wget http://www.openssl.org/source/openssl-1.0.2a.tar.gz && tar -xvzf openssl-1.0.2a.tar.gz && cd openssl-1.0.2a && export CFLAGS=-fPIC && ./config shared --prefix=/usr && make && sudo make install

Résumé de la construction de l'environnement sur ubuntu (avec gmpy2, openssl 1.0.2)



#Pyenv
sudo apt update &&sudo apt install -y wget git&&sudo  apt install build-essential -y&& git clone https://github.com/pyenv/pyenv.git ~/.pyenv &&\
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile &&\
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile &&\
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.profile &&\
source ~/.profile &&\
sudo apt install -y gcc make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev &&\
pyenv install 3.6.3 &&\
git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv &&\
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.profile &&\
source ~/.profile &&\
pyenv virtualenv 3.6.3 myenv && pyenv global 3.6.3 &&\


#Openssl
cd ~ && mkdir static&&cd ~/static &&sudo apt-get install -y build-essential wget m4 libgmp-dev file git vim libomp-dev&& cd ~/static && wget https://www.shoup.net/ntl/ntl-11.3.2.tar.gz && tar xf ntl-11.3.2.tar.gz && cd ntl-11.3.2/src && ./configure SHARED=on NTL_GMP_LIP=on NTL_THREADS=on NTL_THREAD_BOOST=on && make -j4 && sudo make install&&cd ~/static && wget http://www.openssl.org/source/openssl-1.0.2a.tar.gz && tar -xvzf openssl-1.0.2a.tar.gz && cd openssl-1.0.2a && export CFLAGS=-fPIC && ./config shared --prefix=/usr && make && sudo make install &&\

#GMPY2
cd ~/static &&sudo apt update &&sudo apt install -y wget && sudo apt install build-essential -y&&wget https://ftp.gnu.org/gnu/m4/m4-1.4.18.tar.gz && tar xf ./m4-1.4.18.tar.gz && cd m4-1.4.18 && ./configure --prefix=/usr && make &&sudo make install &&cd .. && wget https://gmplib.org/download/gmp/gmp-6.0.0a.tar.bz2 && tar xf ./gmp-6.0.0a.tar.bz2 && cd gmp-6.0.0 && ./configure --prefix=$HOME/static --enable-static --disable-shared --with-pic && make &&make check&&sudo make install &&cd .. && wget http://www.mpfr.org/mpfr-3.1.2/mpfr-3.1.2.tar.bz2 && tar xf ./mpfr-3.1.2.tar.bz2 && cd mpfr-3.1.2 && ./configure --prefix=$HOME/static --enable-static --disable-shared --with-pic --with-gmp=$HOME/static && make &&sudo  make install &&cd .. && wget https://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz && tar xf ./mpc-1.0.3.tar.gz && cd mpc-1.0.3 && ./configure --prefix=$HOME/static --enable-static --disable-shared --with-pic --with-gmp=$HOME/static --with-mpfr=$HOME/static && make && sudo make install &&cd .. && wget https://github.com/aleaxit/gmpy/releases/download/gmpy2-2.1.0a1/gmpy2-2.1.0a1.tar.gz && tar xf ./gmpy2-2.1.0a1.tar.gz && cd gmpy2-2.1.0a1 && source ~/.profile && python setup.py build_ext --static=~/static install &&\

#ORCL
sudo mkdir -p /opt/oracle &&\
cd /opt/oracle &&\
sudo wget https://download.oracle.com/otn_software/linux/instantclient/19600/instantclient-basic-linux.x64-19.6.0.0.0dbru.zip&&\
sudo apt-get install unzip &&\
sudo unzip instantclient-basic-linux.x64-19.6.0.0.0dbru.zip &&\
sudo apt-get install libaio1 &&\
sudo sh -c "echo /opt/oracle/instantclient_19_6 > /etc/ld.so.conf.d/oracle-instantclient.conf" &&\
sudo ldconfig && export LD_LIBRARY_PATH=/opt/oracle/instantclient_19_6:$LD_LIBRARY_PATH &&\

# temp done
###Élément nécessaire 1 git clone
source ~/.profile && pip install cython setuptools==44.0.0&& python setup.py build_ext install
###Élément nécessaire 2 git clone

Résumé de la construction de l'environnement (une fois divisé) sur ubuntu (avec gmpy2, openssl 1.0.2)



#Pyenv
sudo apt update &&sudo apt install -y wget git&&sudo  apt install build-essential -y&& git clone https://github.com/pyenv/pyenv.git ~/.pyenv &&\
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile &&\
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile &&\
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.profile &&\
source ~/.profile &&\
sudo apt install -y gcc make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev &&\
pyenv install 3.6.3 &&\
git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv &&\
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.profile &&\
source ~/.profile &&\
pyenv virtualenv 3.6.3 myenv && pyenv global 3.6.3 &&\


###Élément nécessaire 2 git clone
source ~/.profile && bash build_exe.sh &&

#Openssl
cd ~ && mkdir static&&cd ~/static &&sudo apt-get install -y build-essential wget m4 libgmp-dev file git vim libomp-dev&& cd ~/static && wget https://www.shoup.net/ntl/ntl-11.3.2.tar.gz && tar xf ntl-11.3.2.tar.gz && cd ntl-11.3.2/src && ./configure SHARED=on NTL_GMP_LIP=on NTL_THREADS=on NTL_THREAD_BOOST=on && make -j4 && sudo make install&&cd ~/static && wget http://www.openssl.org/source/openssl-1.0.2a.tar.gz && tar -xvzf openssl-1.0.2a.tar.gz && cd openssl-1.0.2a && export CFLAGS=-fPIC && ./config shared --prefix=/usr && make && sudo make install &&\

#GMPY2
cd ~/static &&sudo apt update &&sudo apt install -y wget && sudo apt install build-essential -y&&wget https://ftp.gnu.org/gnu/m4/m4-1.4.18.tar.gz && tar xf ./m4-1.4.18.tar.gz && cd m4-1.4.18 && ./configure --prefix=/usr && make &&sudo make install &&cd .. && wget https://gmplib.org/download/gmp/gmp-6.0.0a.tar.bz2 && tar xf ./gmp-6.0.0a.tar.bz2 && cd gmp-6.0.0 && ./configure --prefix=$HOME/static --enable-static --disable-shared --with-pic && make &&make check&&sudo make install &&cd .. && wget http://www.mpfr.org/mpfr-3.1.2/mpfr-3.1.2.tar.bz2 && tar xf ./mpfr-3.1.2.tar.bz2 && cd mpfr-3.1.2 && ./configure --prefix=$HOME/static --enable-static --disable-shared --with-pic --with-gmp=$HOME/static && make &&sudo  make install &&cd .. && wget https://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz && tar xf ./mpc-1.0.3.tar.gz && cd mpc-1.0.3 && ./configure --prefix=$HOME/static --enable-static --disable-shared --with-pic --with-gmp=$HOME/static --with-mpfr=$HOME/static && make && sudo make install &&cd .. && wget https://github.com/aleaxit/gmpy/releases/download/gmpy2-2.1.0a1/gmpy2-2.1.0a1.tar.gz && tar xf ./gmpy2-2.1.0a1.tar.gz && cd gmpy2-2.1.0a1 && source ~/.profile && python setup.py build_ext --static=~/static install &&\


#pyodbc
sudo apt-get install -y unixodbc unixodbc-dev &&\

#ORCL
sudo mkdir -p /opt/oracle &&\
cd /opt/oracle &&\
sudo wget https://download.oracle.com/otn_software/linux/instantclient/19600/instantclient-basic-linux.x64-19.6.0.0.0dbru.zip&&\
sudo apt-get install unzip &&\
sudo unzip instantclient-basic-linux.x64-19.6.0.0.0dbru.zip &&\
sudo apt-get install libaio1 &&\
sudo sh -c "echo /opt/oracle/instantclient_19_6 > /etc/ld.so.conf.d/oracle-instantclient.conf" &&\
sudo ldconfig && export LD_LIBRARY_PATH=/opt/oracle/instantclient_19_6:$LD_LIBRARY_PATH &&\

# temp done
###Élément nécessaire 1 git clone
cd ~/static/cython_ope-from-cryptdb && source ~/.profile && pip install cython setuptools==44.0.0&& python setup.py build_ext install && cp build/lib.linux-x86_64-3.6/cython_ope.cpython-36m-x86_64-linux-gnu.so /sdb/ && cp /home/ubuntu/static/gmpy2-2.1.0a1/build/lib.linux-x86_64-3.6/gmpy2.cpython-36m-x86_64-linux-gnu.so /sdb/


Recommended Posts

mémorandum Linux
Mémorandum Linux [liens]
Linux
mémorandum de configuration manjaro linux
Mémorandum de commande Linux [pour les débutants]
Mémorandum Matplotlib
Commande Linux n ° 4
mémorandum jinja2
Commande Linux
Mémorandum Python
Mémorandum Django
Commande Linux n ° 3
Présentation de Linux
Installation complète du mémorandum n ° 1 de Homebrew humain ArchLinux
Bases de Linux
Mémorandum de commandement
direnv (linux)
Mémorandum Python 2
Un mémorandum pour passer à Manjaro Linux
Organisation Linux
mémorandum complot
commandes linux
Pratique Linux
Mémorandum Slackbot (1)
Ubuntu Linux 20.04
mémorandum de multitraitement
Mémorandum MetaTrader5
Résumé Linux
Mémorandum ShellScript
Processus Linux
Autorisations Linux
mémorandum pip
Mémorandum Python
Commande Linux n ° 5
À propos de Linux
mémorandum pydoc
mémorandum python
Mémorandum de Pandas
Bases de Linux
mémorandum python
Mémorandum DjangoGirls
Oubliez Linux
Mémorandum de commandement
À propos de Linux
Mémorandum Python
Commande Linux
mémorandum pandas
mémorandum python
À propos de Linux
Mémorandum Python
À propos de Linux
Redirection Linux
Liste des commandes Linux
[Linux] À propos de l'exportation
[Memorandum] Environnement de distribution Discord construit uniquement avec Linux
Mémorandum de base Python