$ sudo fdisk /dev/sda
Command (m for help): g
Created a new GPT disklabel (GUID: 200F0D86-C2B4-CB4A-BD51-E9F766D736FE).
Command (m for help): n
Partition number (1-128, default 1):
First sector (2048-625142414, default 2048):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-625142414, default 625142414): +100G
Created a new partition 1 of type 'Linux filesystem' and of size 100 GiB.
Partition #1 contains a vfat signature.
Do you want to remove the signature? [Y]es/[N]o: y
The signature will be removed by a write command.
Command (m for help): p
Disk /dev/sda: 298.9 GiB, 320072933376 bytes, 625142448 sectors
Disk model:
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 200F0D86-C2B4-CB4A-BD51-E9F766D736FE
Device Start End Sectors Size Type
/dev/sda1 2048 209717247 209715200 100G Linux filesystem
Filesystem/RAID signature on partition 1 will be wiped.
Command (m for help): wq
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
※ The above is a 100GB sda1 created for work after initializing the HDD.
※ Proceed according to your Situation
2. Format as an EXT4 and Mount
1) Format HDD(or SSD or USB) Partition to EXT4
$ sudo mkfs.ext4 /dev/sda1
2) Mount HDD(or SSD or USB) Partition
$ sudo mkdir -p /media/sys
$ sudo mount /dev/sda1 /media/sys
$ sudo adduser conda
Adding user `conda' ...
Adding new group `conda' (1001) ...
Adding new user `conda' (1001) with group `conda' ...
Creating home directory `/home/conda' ...
Copying files from `/etc/skel' ...
New password:
Retype new password:
passwd: password updated successfully
Changing the user information for aa
Enter the new value, or press ENTER for the default
Full Name []: conda
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n]
$ su conda
2. Install Anaconda
1) Download Anaconda
$ cd ~
$ wget https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh
$ ls
$ bash Anaconda3-2020.11-Linux-x86_64.sh
$ exit
$ sudo mysql -u root
> create database wordpress;
> grant all on wordpress.* to wordpress@localhost identified by 'test@test';
> flush privileges;
> quit;
How To Install Armbian(Ubuntu Focal:20.04) on Orange Pi R1
======================================
Environment
Device : Orange Pi R1
OS : Armbian(Ubuntu Focal:20.04)
HostName : r1
Ethernet Interfaces
Main : enxc0742bfff848 : 192.168.101.101/24 (gw
192.168.101.1)
Sub : eth0 : 192.168.1.101/24
======================================
※ Odroid-C1 is not recommended.
no HDMI output (serial console only)
no USB hotplugging, power the board with USB device is needed
eMMC not supported
Limited SD card brand (known to work well)
※ Odroid-C2 is not recommended.
It has USB troubles
It can't Reset
1. Install Armbian(Ubuntu Focal:20.04) on Orange Pi R1
Download Armbian(Ubuntu Focal:20.04) Image from Armbian Website
Install Armbian(Ubuntu Focal:20.04) with balenaEtcher on Micro SD
Install Micro SD On Orange Pi R1
Power on Orange Pi R1
Search IP with Angry IP Scanner on Orange Pi R1
2. Initial Setup
1) Setup Initial Account
### default password of Armbian
userid : root
password : 1234
### Change password of root
New root password: ********
Repeat password: ********
### Create New Account
Please provide a username (eg. your forename): test
Create password: ********
Repeat password: ********
Please provide your real name (eg. John Doe): test
Dear test, your account test has been created and is sudo enabled.
Please use this account for your daily work from now on.
2) Change Network IP
#### Setup Main Ethernet Interface
# nmcli con show
# nmcli con add con-name "Main" ifname enxc0742bfff848 type ethernet ip4 192.168.101.101/24 gw4 192.168.101.1
# nmcli con modify Main ipv4.dns 8.8.8.8
# nmcli con modify Main ipv4.dns-search test.com
# nmcli con modify Main ipv4.method manual
#### Setup Sub Ethernet Interface
# nmcli con add con-name "Sub" ifname eth0 type ethernet ip4 192.168.1.101/24
#### Remove Ethernet Interface Old IP
# nmcli con delete "Wired connection 2"
# nmcli con delete "Wired connection 1"
#### Connect to Main Interfacs New IP (192.168.101.5)
=> #Handing off local delivery to Dovecot's LMTP, and telling it where to store mail virtual_transport = lmtp:unix:private/dovecot-lmtp #Virtual domains, users, and aliases virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf
service imap-login { inet_listener imap { #port = 143 } inet_listener imaps { #port = 993 #ssl = yes } } => service imap-login { inet_listener imap { port = 143 } inet_listener imaps { port = 993 ssl = yes } } service pop3-login { inet_listener pop3 { #port = 110 } inet_listener pop3s { #port = 995 #ssl = yes } } => service pop3-login { inet_listener pop3 { port = 110 } inet_listener pop3s { port = 995 ssl = yes } } service lmtp { unix_listener lmtp { #mode = 0666 } => service lmtp { unix_listener /var/spool/postfix/private/dovecot-lmtp { mode = 0600 user = postfix group = postfix } # Change service auth parameter unix_listener auth-userdb { #mode = 0666 #user = #group = } => unix_listener auth-userdb { mode = 0600 user = vmail #group = } # Postfix smtp-auth #unix_listener /var/spool/postfix/private/auth { # mode = 0666 #} => # Postfix smtp-auth unix_listener /var/spool/postfix/private/auth { mode = 0666 user = postfix group = postfix } # Auth process is run as this user. #user = $default_internal_user } => # Auth process is run as this user. #user = $default_internal_user user = dovecot }
# Change service auth-worker parametet
service auth-worker { # Auth worker process is run as root by default, so that it can access # /etc/shadow. If this isn't necessary, the user should be changed to # $default_internal_user. #user = root } => service auth-worker { # Auth worker process is run as root by default, so that it can access # /etc/shadow. If this isn't necessary, the user should be changed to # $default_internal_user. user = vmail }
$ sudo mysql -u root > create database wordpress; > grant all on wordpress.* to wordpress@localhost identified by 'test@test'; > flush privileges; > quit;
How to Upgrade MariaDB from Ubuntu-18.04 to Ubuntu-20.04
======================================
Environment
u1804 : Ubuntu-18.04
u2004 : Ubuntu-20.04
======================================
If you convert MariaDB from Ubuntu-18.04 to Ubuntu-20.04
you can see error message
Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline
1. Change Row type from compact to dynamic
2. convert MariaDB from Ubuntu-18.04 to Ubuntu-20.04
$ sudo mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
Set root password? [Y/n]
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n]
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n]
... Success!
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n]
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n]
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!