📜 ⬆️ ⬇️

My first ubuntu server on old hardware

04/21/09
When I got my current job in 2007, I had to make a proxy server from junk


CPU: Pentium II/Pentium II Xeon/Celeron (400.91-MHz 686-class CPU)
real memory = 67108864 (64 MB)

I barely put FreeBSD 6.2-RELEASE there and for a long time I shamanized how to start up and make squid, apache, mysql run in 64 MB of RAM. I even had to set up ssh to blowfish as less stressful for 400 Hz and conjure with squid.conf so that I was more careful with memory, even achieved that 1 MB of RAM was free =)
Fresh screenshot cap top'a
last pid: 63580; load averages: 0.02, 0.01, 0.00 up 15+20:54:33 11:23:17
65 processes: 1 running, 64 sleeping
CPU states: 2.7% user, 0.0% nice, 4.3% system, 3.9% interrupt, 89.1% idle
Mem: 24M Active, 7068K Inact, 20M Wired, 3288K Cache, 13M Buf, 400K Free
Swap: 512M Total, 85M Used, 427M Free, 16% Inuse, 336K In


Many services were needed at that time, when the office had megabyte traffic, but with the advent of civilization in our northern edge in the form of unlimited Internet, many services could be turned off and made easier for an old horse, but a more modern old one appeared on the horizon =) Pentium III-500 and 256 MB of RAM
')
By this time I was already Ubuntinian (at home alone and at work too) and I began to like the philosophy of packet systems more and more; compiling software into free fries from ports is, of course, cool, but not on old hardware. I know how to “collect the world” and the core, even like in the previous work I transferred the main server with billing from 4 branches to 6 for the night time of the day - it was really cool, but either I was already tired or I was splitting up. Updating the software from the ports in Free is not difficult, but after updating the software in Ubuntu, which became sweet to my heart, I decided to change the Free Ubuntu for the first time. Here I am such a pervert software engineer, all with the girls, and with the axes. Maybe it is true that it is human nature to choose the easiest way?
In general, on the “new junk” I decided to put Ubuntu a server without graphics, with access via ssh, as it used to be in Free Years. Later in the plans to transfer another server from Free to Ubuntu, but everything is more complicated there, as it is necessary to turn around like Munchausen, and instantly make Free Ubuntu out of Free and quickly = / But this is later ...
In the meantime, the P-III 500Hz stands on the table and the Inquisitor is tormenting him with stress tests for glitchiness ... even though the computer is old by today's standards, it shouldn't be buggy.
I decided to install Ubuntu 8.04.2 LTS Server, since the server still needs more stability, and on my desktop machines it costs 9.04. This devil pulled me for the sake of ext4 to sit on alpha for half a year, but I haven’t seen such stable alphas and beta, and therefore I am very pleased, but in the future I’ve given the word I’ll not do this again, I’ll remove the proposed and backports and I’ll be the most stable of all stable =)
As soon as the Inquisitor finishes its work, I will move on to the installation of my first ubuntu server (not considered in virtual machines). There are little thoughts, if I regret about treason, maybe Ubuntu will not pull on such a machine, and Frei only has to have must-have on such modest requirements ... Let's see ... nobody rushes to tear down the OS and put up another one ... I always have time ... and so will experience is great ...

04.22.09
Today is a holiday for girls ... ugh ... for programmers. Celebrate 2204.
Old-Servak ​​has smelled updates in the morning ... here again thoughts have scrolled ... how convenient it is to update the OS with the software delivery package system.
Immediately after installing ubuntu server, the problem is with Russian letters, during installation everything is in Russian, and after rebooting the problem. Aptitude aptitude install cyrillic-console and dpkg-reconfigure console-setup , but this is certainly not gut = (. At the time of launch, the system writes about the antiquity of BIOS in 1999 and about acpi. To make it easier for the system to specify acpi = off in / boot / grub /menu.lst

Since the server will be a proxy and will be replaced by an even older one, set Squid. Ineta's world has become more dynamic, the times of static html have passed, so the squid.conf settings are now more aggressive in terms of caching. Making the article Optimize squid cache . The Internet channel in the office is unlimited, but not wide, so Squid as always helps out.
According to the article, we change the parameters for better caching of files and especially advertising, we will cut out later with the help of bfilter, and what we don’t cut out, we will effectively cache.
reload_into_ims on

refresh_pattern \.bz2$ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
refresh_pattern \.exe$ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
refresh_pattern \.gif$ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
refresh_pattern \.gz$ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
refresh_pattern \.ico$ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
refresh_pattern \.jpg$ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
refresh_pattern \.mid$ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
refresh_pattern \.mp3$ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
refresh_pattern \.pdf$ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
refresh_pattern \.swf$ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
refresh_pattern \.tar$ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
refresh_pattern \.tgz$ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
refresh_pattern \.zip$ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache

refresh_pattern ad\. 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
refresh_pattern ads\. 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
refresh_pattern adv\. 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
refresh_pattern click\. 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
refresh_pattern count\. 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
refresh_pattern counter\. 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
refresh_pattern engine\. 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
refresh_pattern img\.readme\.ru 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
refresh_pattern userpic\.livejournal\.com 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
refresh_pattern \.ru/bf-analyze 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
refresh_pattern \.ru/bf-si 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
refresh_pattern /advs/ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
refresh_pattern /banners/ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
refresh_pattern /cgi-bin/iframe/ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache

refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 80% 14400



Cache hits increase, as reported by sarg. Until I forgot, parallelism we turn pipeline_prefetch on .
While I like everything ... 84MB free RAM ... normal flight
comb squid still nuna ... but this is only later

04/26/09
Everything is not normal! = (The segmentation fault started, checking immediately memtest showed memory errors (there are three banks 64,64,128mb). Foul as it happened after the test of the same memtest and Inquisitor, I detected detection of a broken jar / slot. You need to set the memory settings in the BIOS more slow, let the main thing work, in general, ubuntu will have to be rearranged, after a new check of the iron. It’s necessary to be so fucked up for checks, but the sucker is destiny ...

06.23.09
The old proxy ordered to live long and died yesterday. A “new” proxy based on ubuntu urgently took his place. Immediately after commissioning, I realized what was missing in the ubuntu server, unlike freebsd. There is not enough administrator notification system about the security status of the server; on FreeBSD, I regularly receive status messages and know what is happening with the reporting servers. While unscrewing install packages logcheck and checksecurity. Logcheck is not bad and all sorts of fail / error / not found will immediately be included in the report. Checksecurity as stated in the description is too basic and will simply inform about the change of suid files. Hope for me only while on logcheck

Previously, when the Internet was a megabyte, the authorities always asked to implement billing. In the current office the same situation was, but time does not stand still. Here in our “village”, too, everyone has no limit and I took this into account in the new server, did not transfer MySQL and billing to squid2mysql. With an unlimited tariff, it’s no longer necessary to count anyone as downloaded. I changed the authorization on the Internet from password to IP + and got a login / password pair just in case and for some employees without a permanent computer. And login / password is now in a text file and ncsa from squid is used - it suits me so. I have not yet decided how to watch sarg reports, I think I can put a lightweight nginx or ligthhttpd or copy reports to the main server, creating a subdomain there. I will decide later ... what's best

Thoughts are spinning like again to show focus and over the weekend they will dodge so that on the main server also replace FreeBSD with Ubuntu Server. Only there are so many services that simply will not work.

to be continued…

Source: https://habr.com/ru/post/57800/


All Articles