Linux Memorandum

Überblick

Ich werde es hier als Memorandum zusammenfassen, damit ich mich so genau wie möglich an den Linux-Befehl erinnern kann. Wir werden es von Zeit zu Zeit aktualisieren.

Memoranden

check cpu

sudo lshw -class processor

check gpu

lspci | grep -i nvidia

check memory

Stellen Sie die Umschaltmethode der Eingabemethode auf Strg ein

https://qiita.com/nabenabe0928/items/09affae67df9c150ad50 Folgen Sie hier. Dadurch wird der Stress erheblich reduziert.

count file

ls -1 | wc -l

keyboard setting for ubuntu18.04

sudo dpkg-reconfigure keyboard-configuration
setxkbmap jp

Ich werde die beiden oben genannten vorerst ausprobieren.

pyenv & virtualenv Umgebung für Ubuntu auf 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

pyenv & virtualenv Umgebung für Ubuntu NICHT auf 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

Benutzer Add su Berechtigung


adduser username
usermod -G sudo username

Setzen Sie pyodbc in ubuntu18.04


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

Fügen Sie gmpy2 ein (auf 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

Openssl 1.0.2 Serie (auf 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

Setzen Sie Docker & Docker Compose in 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

Zusammenfassung der Umgebungskonstruktion auf Ubuntu (mit 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
###Notwendiger Item 1 Git-Klon
source ~/.profile && pip install cython setuptools==44.0.0&& python setup.py build_ext install
###Notwendiger Item 2 Git Klon

Zusammenfassung der Umgebungskonstruktion (wenn geteilt) auf Ubuntu (mit 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 &&\


###Notwendiger Item 2 Git Klon
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
###Notwendiger Item 1 Git-Klon
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

Linux Memorandum
Linux Memorandum [Links]
Linux
Manjaro Linux Konfigurationsmemorandum
Linux Command Memorandum [für Anfänger]
Matplotlib Memorandum
Linux-Befehl Nr. 4
jinja2 Memorandum
Linux-Befehl
Python-Memorandum
Django Memorandum
Linux-Befehl Nr. 3
Linux Übersicht
Vollständige Installation des menschlichen Homebrew-ArchLinux-Memorandums Nr. 1
Linux-Grundlagen
Befehlsmemorandum
direnv (linux)
Python-Memorandum 2
Ein Memorandum zur Umstellung auf Manjaro Linux
Linux-Organisation
Plotly Memorandum
Linux-Befehle
Linux-Praxis
Slackbot-Memorandum (1)
Ubuntu Linux 20.04
Multiprocessing Memorandum
Memorandum MetaTrader5
Linux Zusammenfassung
ShellScript-Memorandum
Linux-Prozess
Linux-Berechtigungen
Pip Memorandum
Python-Memorandum
Linux-Befehl Nr. 5
Über Linux
Pydoc Memorandum
Python Memorandum
Memorandum of Pandas
Linux-Grundlagen
Python Memorandum
DjangoGirls Memorandum
Vergiss Linux
Befehlsmemorandum
Über Linux
Python-Memorandum
Linux-Befehl
Pandas Memorandum
Python Memorandum
Über Linux
Python-Memorandum
Über Linux
Linux-Weiterleitung
* Ken Komiya: "[Schreiben eines Python-Programmdokuments mit Sphinx] (https://docs.google.com/presentation/d/1mLw2ZHeyl_9jWAwxE3Hx7stY5msCd-jyl22PkKRCdqg/edit#slide=id.g885309dee8_0_166)" * Python Study Group # 43] (https://startpython.connpass.com/event/112788/) * cocodrips: "[Schreiben Sie in Zukunft einen Docstring für Ihre Teamkollegen und sich selbst] (https://www.slideshare) .net / cocodrips / docstring) "Python, SphinxLinux-Befehlsliste
[Linux] Über den Export
[Memorandum] Discord-Verteilungsumgebung, die nur unter Linux erstellt wurde
Python-Grundmemorandum