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.
check cpu
sudo lshw -class processor
check gpu
lspci | grep -i nvidia
check memory
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.
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
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
adduser username
usermod -G sudo username
apt-get install -y unixodbc unixodbc-dev &&\
pip3 install pyodbc==4.0.30
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
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
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
#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
#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