Location>code7788 >text

Bought a mini host as a server

Popularity:45 ℃/2024-10-27 22:57:25

Although there is Apple's computer, but in the installation of some software, from the thought of whether there can be a small server, lest a variety of settings what help me to strengthen a variety of other lead to a variety of abnormalities in Mac, the overall words went to look at a number of small hosts, looked at Apple's MV Mini Mac, but found that it is too expensive, probably more than 3,000, especially if it is the pride of the words are needed to need probably more than 3,000. 3000 more, and then 32 years old, then more expensive, so more words on the consideration of some other small host, and then also saw some of the UC these servers, but think it is still too expensive, so they go to Taobao search, and found this one N100 version of the host.

Cost words because there is that post, so it is about 410 ten or so, and then get a look of their own memory 300 or so, hard disk words their own before, so how the total cost of words is about 700 or so, the size of words, about a cell phone folded horizontally and vertically the size of a square, with wifi, although unstable

iowejofwjeofjwoeifjwoe

I. Installation of the system

The system I see is supported by windows, and now Ubuntu, but my choice is centos stream 9, 10, I also looked for, but found that a lot of software is still incompatible. So I ended up with centos stream 9.

1. Download Ventoy software

Go to the Ventoy website to download the Ventoy software (Download . Ventoy) as below

QQ_1727625608185

2、Make a boot disk

Select the appropriate version as well as the platform after the download, unzip, unzip out into the folder, as shown on the left in the figure below, double-click to open, the right interface will appear in the figure below, select the U disk you need to make a startup disk, and then click on the installation and wait for a successful installation can be successfully made to boot the U disk.

3. centos installation

direct accessofficial websiteIf you want to download it, you can just put it on your USB flash drive.

QQ_1727625711792

It has a BIOS that boots by pressing F7 and loads directly.

image-20241007222938414

After that it's the normal centos installation process.

II. Connecting to wifi

Because it is used as a server, so it does not configure a special monitor, just change the network, it can not connect to the new wifi, here you can use the network cable to connect to the router to carry out the following operations can be.

In CentOS, connecting to Wi-Fi via the command line usually requires the use of nmcli (NetworkManager command line tool) to manage network connections. nmcli is a command line interface to NetworkManager that can be used to create, modify, activate and deactivate network connections. Below are the detailed steps on how to connect to Wi-Fi using the nmcli command line tool.

Step 1: Check the network interface

First, verify that your Wi-Fi network interface is detected and that NetworkManager is running.

nmcli device status

Example output:

DEVICE         TYPE      STATE         CONNECTION
wlp3s0         wifi      disconnected  --
enp0s25        ethernet  connected     Wired connection 1
lo             loopback  unmanaged     --

In this example, wlp3s0 is the Wi-Fi interface, which is currently unconnected.

Step 2: Enable the Wi-Fi card

If your Wi-Fi network card is disabled, you can enable it with the following command:

nmcli radio wifi on

Verify that Wi-Fi is enabled:

nmcli radio

Step 3: Scan for Available Wi-Fi Networks

Use nmcli to scan for nearby Wi-Fi networks:

nmcli device wifi list

You will see a list of available Wi-Fi networks, each displaying the SSID (network name), security type, and other information.

Step 4: Connect to a Wi-Fi network

Use the nmcli command to connect to the specified Wi-Fi network. For example, if your Wi-Fi network name (SSID) is MyWiFiNetwork and the password is password123, you can use the following command to connect:

nmcli device wifi connect 'xxxxxx' password 'xxxxx'

You should see output similar to the following, indicating a successful connection:

Device 'wlp3s0' successfully activated with 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'.

Step 5: Verify Connection Status

Verify the network connection status:

nmcli connection show

View details of the current connection:

nmcli device show wlp3s0

III. VNC Remote Connection

The desktop still needs to be used occasionally, though not much.

root@master:~# dnf install  -y  tigervnc-server
root@master:~# vncserver
bash: vncserver: command not found...
Install package 'tigervnc-server' to provide command 'vncserver'? [N/y] y


 * Waiting in queue... 
 * Loading list of packages.... 
The following packages have to be installed:
 dbus-x11-1:1.12.20-8.el9.x86_64        X11-requiring add-ons for D-BUS
 tigervnc-license-1.14.0-3.   License of TigerVNC suite
 tigervnc-selinux-1.14.0-3.   SELinux module for TigerVNC
 tigervnc-server-1.14.0-3.el9.x86_64    A TigerVNC server
 tigervnc-server-minimal-1.14.0-3.el9.x86_64    A minimal installation of TigerVNC server
Proceed with changes? [N/y] y


 * Waiting in queue... 
 * Waiting for authentication... 
 * Waiting in queue... 
 * Downloading packages... 
 * Requesting data... 
 * Testing changes... 
 * Installing packages... 

WARNING: vncserver has been replaced by a systemd unit and is now considered deprecated and removed in upstream.
Please read /usr/share/doc/tigervnc/ for more information.

You will require a password to access your desktops.

getpassword error: Inappropriate ioctl for device
Password:

After that, turn on screen sharing on your mac and you're done!

image-20241007225855305

QQ_1728313164289

IV. docker configuration

I thought docker installation was easy, but I didn't realize that this was the hardest step. After installing docker, it always reported an error:

Error response from daemon: Get "/v2/": context deadline exceeded

Even changing mirrors does nothing.

{
  "registry-mirrors": [
    ""
        ]
}

It looks as if docker every pull image to visit once, but this URL has been unable to connect to the domestic, a variety of folding, here only paste the code it, the principle will not speak (know understand).

img

sslocal -c /etc/cat proxy.json -d start
curl --socks5 127.0.0.1:1080 /ip

sudo yum -y install privoxy

vim /etc/systemd/system//

[Service]
Environment="HTTP_PROXY=http://127.0.0.1:8118"

/etc/systemd/system//

[Service]
Environment="HTTPS_PROXY=http://127.0.0.1:8118"

Finally restart docker

systemctl start privoxy
systemctl enable privoxy
sudo systemctl daemon-reload
sudo systemctl restart docker

QQ_1729956484197

V. Document sharing

The sd card doesn't seem to be able to read it, so I'll have to get a usb converter.

fdisk -l
mount /dev/sdb1 /mnt/usb/sd

To set up file sharing in CentOS, you can use the Samba service. The following are the basic steps to configure Samba to share files:

  1. Installing Samba
sudo yum install samba samba-client samba-common
  1. Setting up a shared directory

    Editing the Samba Configuration File/etc/samba/, add the following to the end of the file:

[shared]
   path = /path/to/shared/directory
   writable = yes
   browseable = yes
   guest ok = yes
  1. Setting the Samba Password

    In order to allow access, a Samba password needs to be set for the user:

sudo smbpasswd -a your_username
  1. Restart the Samba service
sudo systemctl restart 
sudo systemctl restart 
  1. Configure the firewall (if enabled)

    Allow Samba to pass through the firewall:

sudo firewall-cmd --permanent --zone=public --add-service=samba
sudo firewall-cmd --reload

You should now be able to access the share from other computers on your network via SMB/CIFS. In Windows, you can use the\\centos-ip\sharedIn Linux, you can use thesmbclient //centos-ip/shared -U your_username

QQ_1730035390803

Reference:

https://Cat Agents/Cat Agents/

/questions/48056365/error-get-https-registry-1-docker-io-v2-net-http-request-canceled-while-b