ラズベリーパイ3 b+セットアップcentos 64(無線、ソースの設定、pythonのインストール、gitのインストール)
ラズベリーパイ3 b+のcpuは64ビットですが、64ビットのシステムが見つかりませんでした。公式指定のデバックは32です。しかし、セントロ64はラズベリー派3 b+をサポートしています。封印された能力が現れます。システムのミラーダウンアドレスをインストールします。http://mirrors.huaweicloud.com/centos-altarch/7.8.2003/isos/aarch64/images/ ミラー選択CentOST-Userland-7 aarch 64-Rapberry PI-inmail-4-2003-sda.raw.xz解凍はwin 32 dismargを使ってSDカードにミラーを書き込む(sdカードは4 g)マジコンに成功したらパスワードを登録することができます。rootアカウント:centosはシリアルまたはputtyを使って登録することができます。ipアドレスの検索はdhcpsrvを使って直接接続できます。拡張メモリカードの実際の容量を参照してください。 無線LANの配置無線と拡張メモリはこの大神を参照することができます。https://blog.csdn.net/weixin_39723337/articale/details/98476036 ソースを換えるのは遅すぎます。だから、ソースを変えます。ラズベリーパイのcentos 64ソースに関する文章は多くないです。これも何度も繰り返して、大神さんの文章を探しましたが、この大神さんの文章だけが私を助けました。https://blog.csdn.net/smart9527_zc/articale/detail/84976097 pythonをインストールします。(多くの依存をインストールして、順番が間違ったら、これまでは、とにかく何回も繰り返したらいいです。繰り返しの回数が多くなります。うん、順番が覚えられません。) centosインストールgitはこの大神さんの文章を参考にしてもいいです。https://blog.csdn.net/u014066037/article/details/70224780 センターファイアウォール(直接閉めました。安全ではないですが、手抜きです。)インストールした後にcentosファイアウォールはデフォルトでオープンしました。多くのポートが使えないでファイアウォールの状態を確認します。firewall-cmd--stateはファイアウォールを停止します。systeml stop firewalled.serviceはファイアウォールを起動します。systectl start firewalled.serviceはファイアウォールを再起動します。list-portオープン80ポートfirewall-cmd--zone=public(作用ドメイン)--add-port=80/tcp(ポートとアクセスタイプ)--permant(永久有効)削除80ポート:firewall-cmd--zone=public--remove-port=80/tcp--permantは使用中のポートを調べます。netstat-ntlpはポートが占有されているかどうかを調べます。netstat-na grep 10086ポートマッピング:iptables-t-nal-A PREROUTTING-DItdport 80。マッピング保存:service iptables save(再起動有効)注意:selinuxは拒否されるかもしれません。setensforce 0 を試してみてください。 centosはディスク空間df-h freeコマンドの詳細を調べます。total:システム総メモリ、used:メモリfreeを使用しました。空きメモリshared:buffer/cache:簡単に言えばキャッシュ(この部分は悲しいリリースです。)手動でキャッシュを解放します。echo 1>/proc/sys/vm/dropcaches echo 2>/proc/sys/vm/drop_caches echo 3>/proc/sys/vm/drop_caches 起動自己起動スクリプトの参考:https://www.cnblogs.com/qzqdy/p/9596100.html centosバックグラウンド起動(dosインターフェースはオフできます)nohup python main.py& 実行.shファイルにはまず権限があります。1./ファイル名を追加してください。sh 2 shにファイル名を追加します。sh 指定されたフォルダに権限sudo chmod-R 777/usr/www/ を追加します。バージョン番号cat/etc/redhat-release を確認します。
vi /etc/wpa_supplicant/wpa_supplicant.conf
( , , )
network={
ssid=" "
key_mgmt=WPA-PSK
psk=" "
priority=10
}
wifi `nmcli d wifi connect password `
ifconfig wlan0 ip
1: cd /etc/yum.repos.d/
2: rm * # ...
3: vi CentOS-Base.repo
( , , , )
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
baseurl=https://mirrors.aliyun.com/centos-altarch/$releasever/os/$basearch/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=https://mirrors.aliyun.com/centos-altarch/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=https://mirrors.aliyun.com/centos-altarch/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
enabled=1
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=https://mirrors.aliyun.com/centos-altarch/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
————————————————
: CSDN 「smart9527_zc」 , CC 4.0 BY-SA , 。
:https://blog.csdn.net/smart9527_zc/article/details/84976097
4: vi epel.repo
( )
[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel/7/$basearch
#metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch/debug
baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel/7/$basearch/debug
#metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/7/SRPMS
baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel/7/SRPMS
#metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
————————————————
: CSDN 「smart9527_zc」 , CC 4.0 BY-SA , 。
:https://blog.csdn.net/smart9527_zc/article/details/84976097
5:
6: :
yum makecache
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7-aarch64
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
7:
#
wget: yum -y install wget
gcc g++ make :
yum -y install gcc automake autoconf libtool make
yum -y install gcc-c++
python ( python , , , , ):
sudo yum install zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel xz xz-devel libffi-devel
# python
: cd /usr/local/
: wget https://www.python.org/ftp/python/3.7.5/Python-3.7.5.tgz
: tar -xvf Python-3.7.5.tgz
: cd Python-3.7.5
: ./configure prefix=/usr/local/python3
: make && make install
:
Successfully installed pip-19.2.3 setuptools-41.2.0
#
centos python
mv /usr/bin/python /usr/bin/python22
python3
ln -s /usr/local/python3/bin/python3.7 /usr/bin/python
`python` python
yum python2 yum
vi /usr/bin/yum
#! /usr/bin/python #! /usr/bin/python22
# pip
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
#
ln -s /usr/local/python3/bin/pip3 /usr/bin/pip
# pip
pip
mkdir ~/.pip
cd ~/.pip
vi pip.conf
[ ]
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com
vi /usr/libexec/urlgrabber-ext-down python22
File "/usr/libexec/urlgrabber-ext-down", line 28
https://www.cnblogs.com/Trees/p/7497268.html
# git
yum install git
# :
SSH
ssh-keygen -t rsa -C "email "
3 ( ), id_rsa id_rsa.pub , /root/.ssh
id_rsa.pub github ssh
#
( ) git clone git@code.aliyun.com:xxx/xxxx.git
#git
git branch -a
git pull
git checkout -b 0319 origin/0319
---
git fetch --all
git reset --hard origin/master
git pull
以下の内容はcentos共通です。vi /etc/rc.d/rc.local
: echo "/opt/script/StartTomcat.sh" >> /etc/rc.d/rc.local
chmod +x /etc/rc.d/rc.local