I didn't know how cool it would be to have my own server until I bought it!

1. Why should I buy a server

When I was in college, I bought a small server of my own, which was actually a centos installed on a TV box, and it cost more than two hundred oceans at that time! At that time, the server was only used to host my own blog, but the performance of the server was too rubbish, so I could only host a webpage. If I wanted to build an audio-visual wall or a private network disk, the configuration was not enough, so I recently bought a Personal Servers – HP MicroServer Gen10

My requirements for the server are relatively low. I can flash the Ubuntu system, can install at least two 4T hard drives, have more than two cores, can expand the memory, have low power consumption, and do not have too many requirements in terms of performance. Based on the above requirements, I decisively chose HP MicroServer Gen10: the main home server. The following is the appearance of HP GEN10 (still very handsome)

Two, HP GEN10 configuration

Next, I will share with you the basic configuration of this server I bought. Before introducing the configuration, let’s take a look at the interface of the HP GEN10 server. I think this is one of the reasons why I consider buying this server. The interface Relatively rich and highly scalable.

HP GEN10 interface:

1、USB:前置两个USB口,后置四个USB口,内置一个USB2.0口(其他几个口哪些是3.0的我也不太清除)
2、网口:后置两个千兆以太网口
3、PCI-E:两个PCI-E 3.0
4、内存:两个位置插口,最大支持32G
5、四个硬盘槽位

**Configuration**

3. What to buy a server for?

I bought the server mainly for file backup. I usually like to organize some resources (of course not that kind of learning resources), such as some hard-to-find software, course tutorials, and photos I usually take. I used to back up photos on my own mobile hard disk, but the mobile hard disk has several disadvantages: it is inconvenient to carry, and there is no way to carry it with you, and basically there is no way to back up photos when you go out to play. The second is that the capacity of the mobile hard disk is too small. Now my 1T mobile hard disk is full, so I have to buy a larger hard disk.

3.1 Web server

Of course, since it is a server, it is impossible to just serve as a file backup server. I also set up a website server on the server to store my personal blog and website navigation (some website links I usually collect), and I will show you below. My website, building the website is to use the pagoda panel to quickly build the website.

The following website navigation uses open source navigation, but I added some functions I like, such as search bar, weather and other functions, and I used this navigation as the home page of the browser, so that it is more convenient to use.
insert image description here

3.2 Video server

In addition to building a website, I also built an audio-visual wall Plex on my server. Plex is mainly used to store some 4K movies I usually collect. It can support multiple platforms. Mobile phones, computers, and tablets can download software and connect in the LAN server. The transmission speed of the device in the local area network can reach 50MB/s, and there is no lag in watching 4K movies, which is a lot of cool!

You may have questions, where did the video resources on your video wall come from? No, it still needs to be downloaded, and the download speed is still very slow.

That's right! The download speed of 4K resources is indeed very slow. Generally, BitTorrent is used for downloading. Build a BitTorrent automatic download task. Every night, you only need to submit the 4K video link you want to watch to the BitTorrent downloader, create a new task, and the server will start. It will automatically download video resources when I am sleeping or going to work, which is very convenient and does not delay going home at night, eating watermelon and watching movies.
insert image description here

3.3 Cloud disk server

I choose NextCloud as the cloud disk service, but this open source cloud disk has a pitfall, and I will tell you about this pitfall in detail later. There are two ways to build NextCloud: 1. Use docker to install (more troublesome) 2. Use snap to build (very simple). Here I choose the second method, so I stepped on it. I don’t know if the first method has this question.

This pit is like this, because I used snap to build it, so the storage path of the file after the build is /var/snap/nextcloud/current/nextcloud/below, but since my hard disk is mounted under /homethe directory, I want to change the storage path of the snap to /homeNext, as long as it is changed, various permission problems will be reported. I have configtried changing files and establishing soft and hard links, but none of them work. Finally, I gave up and had to buy another 4T hard disk and mount it under the /var/snap/nextcloud/current/nextcloud/directory.
insert image description here
In addition to using third-party cloud disk management software, the samba service is also a very useful file transfer service. Some codes that need to run in the Linux environment are generally transferred through samba. The transfer rate of samba is better than that of sftp transfer. It should be fast, and it can be mounted to a local disk, which is more convenient to use.

3.4 Code hosting server

Buying a server is not only for entertainment, but learning and work is also an important part. My local code hosting is hosted in a git+Gerritcertain way. The local warehouse management is very easy to use, but after using it for a while, I found that I still prefer to use it for personal use. Gitee, a code hosting platform launched by Kaiyuan China. It is really worth a lot of trouble if it is used by multiple people git+Gerrit. Gerrit is still very good for multi-person code review.

insert image description here

3.5 Development server

Everyone also knows that a Linux environment is necessary for Linux development and learning. Most of them use a virtual machine to compile the Linux kernel, but the virtual machine often crashes, so I have now changed the compilation environment to an Ubuntu server. , you only need to set up the environment once, and it is very convenient to develop and learn at home to compile the code. Moreover, the performance of the server is unmatched by the virtual machine, so the compilation speed is much faster than that of the virtual machine.

The specific compilation method is to use the vscode software to install the ssh plug-in on the Windows platform to connect to the Ubuntu server, and use the bash window that comes with vscode to compile the code. It is very convenient to develop. You only need a vscode, and you don’t need to switch back and forth with several codes.
insert image description here
But vscode also has a pitfall, that is, after ssh connects to the server, the CPU consumption is extremely high, and the two cores are directly occupied, causing the server to be very stuck, so after using it for a while, I gave up using shh to connect to the server to view the code, and now I use samba Open the code, and then use Mobaxterm ssh to connect to the server to compile the code. If your server has more cores, you can ignore this problem. It is preliminarily determined that it is C/C++ Themescaused by this plug-in, and I have not found a solution for the time being.
insert image description here

4. Other services to be built

There are still many things that a server can do. You can explore it. In addition to some of the services I installed above, I will also run some scripts on the server, such as the sign-in script of Youdao Cloud Notes, and send emails when the server runs abnormally. scripts and other small scripts, of course, you can also write some crawlers to crawl some data for analysis.

Intranet penetration will be built in the future. At present, the server can only be connected to the internal network. Intranet penetration will be considered in the future, but the penetration will expose the port of your own server, and there is a risk of being hacked, so for now This aspect has not been fixed yet.

Guess you like

Origin blog.csdn.net/qq_45172832/article/details/131254270