--
1 2 |
user(root) password(orangepi) |
一般使用者
orangepi
orangepi
--
OS 安裝 eMMC
Android 使用 SD_Firmware_Tool 固件升級
Linux
1 |
# nand-sata-install |
批量生產
1 2 3 4 5 6 7 |
/etc/rc.local if [ -b /dev/mmcblk0 ];then export TERM="xterm-256color" echo "y" | /usr/local/sbin/install_to_emmc /sbin/poweroff fi |
--
開機模式選擇
文字
1 |
# systemctl set-default multi-user.target |
GUI
1 |
# systemctl set-default graphical.target |
--
USB 開機自動載入
經過兩篇資料參考結果如下,開機如果沒有插入 USB 磁碟不會開機失敗,開機後插入也會自動掛載
1 2 3 4 5 6 7 8 9 10 11 |
# lsblk -f NAME FSTYPE LABEL UUID MOUNTPOINT sda └─sda1 vfat 0000 2672-D0F8 /mnt/usb mmcblk1 └─mmcblk1p1 ext4 0138605e-103f-447a-8146-b275355541cd / mmcblk1boot0 mmcblk1boot1 mmcblk1rpmb zram0 /var/log zram1 [SWAP] |
編輯 /etc/fstab
1 2 3 4 |
# <file system> <mount point> <type> <options> <dump> <pass> tmpfs /tmp tmpfs defaults,nosuid 0 0 UUID=0138605e-103f-447a-8146-b275355541cd / ext4 defaults,noatime,nodiratime,commit=600,errors=remount-ro,x-gvfs-hide 0 1 UUID=2672-D0F8 /mnt/usb auto defaults,nofail 0 0 |
1 |
# ll /dev/disk/by-uuid/ |
查詢 /dev/disk/by-uuid 也可以查詢到 UUID 資訊
--
中文
只有 Ubuntu 才有
1 2 |
# apt update # apt list --upgradable |
Settings → Language Support → Install / Remove
/etc/default/locale
1 2 3 4 5 6 7 8 9 10 11 12 13 |
# File generated by update-locale LC_MESSAGES=en_US.UTF-8 LANG="zh_TW.UTF-8" LANGUAGE="zh_TW:en" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" |
--
PHP
直接安裝就是 7.2
1 |
# apt-get install php php-mysql php-mbstring php-xml php-curl php-bcmath php-gd |
將 PHP 整合進 Apache2
1 2 3 4 |
# apt install libapache2-mod-php php-mysql # a2dismod mpm_event # a2enmod php7.2 # systemctl restart apache2 |
--
PHP 7.2 升級到 8.0
1 2 3 4 5 6 7 |
# add-apt-repository ppa:ondrej/php # apt install php # systemctl restart apache2 # a2dismod php7.2 # systemctl restart apache2 # a2enmod php8.0 # systemctl restart apache2 |
不要忘記補上 PHP Mod
1 |
# apt install php-mysql |
--
MariaDB
預設安裝 10.1 沒有 JSON 無法接受,安裝 10.6 步驟如下
1 2 3 4 5 6 7 8 9 10 |
# apt update # apt list --upgradable # apt autoremove # apt-get install software-properties-common # add-apt-repository "deb [arch=amd64,arm64,ppc64el] http://mariadb.mirror.liquidtelecom.com/repo/10.6/ubuntu $(lsb_release -cs) main" # apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F1656F24C74CD1D8 # add-apt-repository "deb [arch=amd64,arm64,ppc64el] http://mariadb.mirror.liquidtelecom.com/repo/10.6/ubuntu $(lsb_release -cs) main" # apt update # apt list --upgradable # apt-get install mariadb-server mariadb-client |
add-apt-repository 執行第一次是為了得到所需要的 PUBKEY,得到 PUBKEY 使用 apt-key 加入再執行一次 add-apt-repository 加入 repository
--
格式化
1 |
# mkfs -t ext4 /dev/sda1 |
格式化之後 UUID 會改變,使用 lsblk -f 查看 UUID 之後修改 /etc/fstab 才可以 mount
1 2 3 4 5 6 7 8 9 10 11 |
# lsblk -f NAME FSTYPE LABEL UUID MOUNTPOINT sda └─sda1 ext4 106fcd74-76c2-428f-bc8b-fdeb62e152cc mmcblk1 └─mmcblk1p1 ext4 0138605e-103f-447a-8146-b275355541cd / mmcblk1boot0 mmcblk1boot1 mmcblk1rpmb zram0 /var/log zram1 [SWAP] |
--
輸入法
--
add-apt-repository ppa:ondrej/php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
Co-installable PHP versions: PHP 5.6, PHP 7.x and most requested extensions are included. Only Supported Versions of PHP (http://php.net/supported-versions.php) for Supported Ubuntu Releases (https://wiki.ubuntu.com/Releases) are provided. Don't ask for end-of-life PHP versions or Ubuntu release, they won't be provided. Debian oldstable and stable packages are provided as well: https://deb.sury.org/#debian-dpa You can get more information about the packages at https://deb.sury.org IMPORTANT: The <foo>-backports is now required on older Ubuntu releases. BUGS&FEATURES: This PPA now has a issue tracker: https://deb.sury.org/#bug-reporting CAVEATS: 1. If you are using php-gearman, you need to add ppa:ondrej/pkg-gearman 2. If you are using apache2, you are advised to add ppa:ondrej/apache2 3. If you are using nginx, you are advised to add ppa:ondrej/nginx-mainline or ppa:ondrej/nginx PLEASE READ: If you like my work and want to give me a little motivation, please consider donating regularly: https://donate.sury.org/ WARNING: add-apt-repository is broken with non-UTF-8 locales, see https://github.com/oerdnj/deb.sury.org/issues/56 for workaround: # LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php More info: https://launchpad.net/~ondrej/+archive/ubuntu/php Press [ENTER] to continue or Ctrl-c to cancel adding it. |
--
2,970 total views, 1 views today