Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to build a server gracefully with ARM development board

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces you how to elegantly use the ARM development board to build a server, the content is very detailed, interested friends can refer to, hope to be helpful to you.

I dismantled an old ARM development board and used it to make a Debian-based mini server. I now have a gateway that I can access at any time, it:

Very energy efficient, only about 3-3.5W

Always accessible, even if I use dynamic IP (via DynDNS)

There is a Nginx web server, so I can share my life with the world. Nginx is a performance-oriented HTTP server, which has the advantages of less memory and high stability compared with Apache and lighttpd. )

There is an Exim mail server, so I can accept Email through SMTP and store it in my house. I read email via SSH/mytt.

Ability to connect remotely via SSH, allowing remote awakening of my home desktop.

Download (wget/rtorrent) in the background and share it with a Samba server to a bound device, such as an Andriod tablet

SSH ports are reused as HTTPS ports to filter out some firewall restrictions.

This is my best work. I like the process of building it.

# # Building a tiny ARM-based server##

About a year ago, I got a NAS device-a rather old, low-power ARM-based file server. By modern standards, it is considered obsolete. However, I know that from the day I get it, I will enjoy remaking it very much.

I am a programmer by profession. I sincerely think that programming and life are separate, and there is a possibility that they can both be improved.

# # Disassembling and soldering # #

First of all, I have to take the whole thing apart so that I can build the world according to my ideas. According to the instructions of other engineers, it took me half an hour to open it. I removed the two optical drives from the machine and connected them to my external USB/SATA attachment. Quickly tested its function.

Smartctl-a / dev/sdX

This command shows that both optical drives have bad sectors. I found a 160GB USB mobile hard drive hanging on it. Because this is an embedded device, there is no VGA output and no serial input. I need to find a way to monitor its startup process. I have been google for a long time, and there is actually a strong disk of RS232 on this machine. The method provided by the omnipotent Internet is very simple:

Pin 1 = + 3.3V

Pin 2 = GND

Pin 3 = Rx

Pin 4 = Tx I am past the age of using bread version to build RS232 interface. I ordered a TTL-to-RS232 cable online from an electronic store.

The red arrow above refers to the serial line I soldered. Two days later, I connected another cable from serial port to USB. My computer is ArchLinux,Atom 330. I plugged the USB into the computer and opened the serial port to debug the program so that I could control the board.

Minicom-D / dev/ttyUSB0-b 115200

# # U-booting from no BIOS whatsoever##

Here's how to partition a 160g hard drive and boot the kernel.

I mounted the old drives up to my main PC's USB/SATA enclosure, and sure enough, I saw clear signs of a Linux-based machine: the software RAID driver in my ArchLinux detected raid devices (cat / proc/mdstat showed information about the RAID structure disk redundant Array). Apparently, MyBook had the two drives in a RAID formation-which I proceeded to successfully mount. There were 4 partitions in each of the two drives, clearly ina RAID1 mirror formation-with the 4th and final partition being the one with the "File Server" storage area. I proceeded to copy the first three partitions (including the partition table) to my 160GB drive (via dd). I then used fdisk to fix the size of the 4th partition to be the remaining space of my drive.

# # Installing Debian (and some thoughts about Windows) # #

This paragraph is mainly about how to install the Debian operating system and how to view the difference between linux and windows.

Sadly, this is a skill that Microsoft all but destroyed, making people hopelessly dependent on "wizards". That, in itself would have been fine, if it were not for the inevitable side-effect: people clicking on buttons unaware of what is going on behind them, end up with systems that can only be rescued with "OS reinstalls". My own settings-since I work with UNIX systems-are simple files under / etc and my $HOME... And have always been living under revision control (e.g my main dot files and vim configuration), happily migrating over the last 15 years across many machines. Backing them up and restoring them

Next, the author describes how to solve the problem of IP changes of service providers, mainly using the cron timing tool to make a DynDNS program self-start, this DynDNS can map a fixed IP address. In this way, you can have stable access outside. Paste the code.

download

# apt-get install gcc...# wget http://inatech.eu/inadyn/inadyn.v1.96.2.zip# unzip inadyn.v1.96.2.zip# cd inadyn# make...# cp bin/linux/inadyn / usr/local/bin

Self-starting

# cat / var/spool/cron/crontabs/root... @ reboot / usr/local/bin/inadyn

Then the author describes how to install mail server Exim, web server Nginx

# # Conclusion-UNIX glory##

In plain words, UNIX power put to use-in the tiny server, in my phone, in my tablet. All 3 of them, running on ARM processors. To be honest, I didn't expect that; 15 years ago I was sure that Intel and MS had cornered the galaxy... But somehow, Linux managed to change all that.

On how to gracefully use the ARM development board to build a server to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report