Register for your free account! | Forgot your password?

You last visited: Today at 07:27

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[How To] Updating FreeBSD

Discussion on [How To] Updating FreeBSD within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 11
Join Date: Nov 2010
Posts: 1,709
Received Thanks: 3,827
Red face [How To] Updating FreeBSD

Good morning,

I created this tutorial because I often meet people using dinosaur-era versions of FreeBSD and when I need to do some work for them I spend hours upgrading. So today I am going to show you how to keep everything up to date.

I take no responsibility for any damage you may cause by using these commands, and I advise you to make a backup before anything else if you are not sure of what you are doing.

That said, unless you have a really old version, it is unlikely that you will break anything that can't be fixed.

PART A: Updating the Operating System

This being a Metin forum you may ask: what's the point of having an updated FreeBSD if Metin is some piss old thing?

Well, first and most obviously for security. Obsolete versions of the OS do not receive security patches. Second, for performance: opposite to what happens in the Windows world, in FreeBSD the latest software usually tends to be more stable and faster. And third for convenience, since it is not even possible to comfortably install anything if your O.S. is too old.

Within FreeBSD we can distinguish between major (e.g. 13) and minor (12.3) versions.

To check the current version of your FreeBSD, just use this command:

Code:
uname -a
Obediently, FreeBSD will reply with a string of numbers including the version. For example something like:

FreeBSD myservercom 13.1-RELEASE FreeBSD 13.1-RELEASE releng/13.1-n250128-fc752ac2212 GENERIC amd64

The official FreeBSD web site () always informs in the front page of which versions are currently supported. This changes frequently, so always check it. Let's see what freebsd.org says today:



Depending on what our own version is and which ones are listed here, there are 3 possible scenarios:

1. We have a supported version

Let's say we already have 12.3. In this case, we could simply update our current version to its newest release, without the need to upgrade to a higher version number:

Code:
freebsd-update fetch install
If there is any file bound to be updated you will see it listed here. If the list is too long to fit the console window, the program will pause to allow us to see it. To continue, just type :q




2. Our major release is supported, but not the minor one

Before we start, I recommend to make the task easier to set the ee editor as the default editor for the system, since vi is quite complicated to use:

Code:
setenv EDITOR ee
Now, let's move on to the explanation of how to solve this scenario number 2:

Let's say we have version 12.1. In this case, it would be time to upgrade to, for example, version 12.3 which is the oldest supported version, and it is done in this way:

Code:
freebsd-update upgrade -r 12.3-RELEASE
This time there will be esoteric questions like:

"Does this seem reasonable? y/n"

In the absence of the knowledge to answer such a question, we can simply type y for yes and hope for the best.

If a system configuration file changes or we have made our own modifications to them it will ask us which one we want to keep, giving us the option to add or remove lines on our own (hence the text editor). This is called merging, and programmers should be familiar with this process.

If you aren't or you're not sure what to do, it's usually safe to accept the new changes, unless it's a file which we modified ourselves in which case w e should use our best judgement.

To accept the changes, move to every line starting with:

Code:
>>>>>>>>>>>> CURRENT VERSION
and delete every line from there up to the line that looks like this:

Code:
=======================
Deleting a line can be accomplished with CTRL+k and once we're done with that particular file we can press ESC to Save and Exit. When

Once the download of the necessary files is finished, we may be asked to run freebsd-update install. It is also possible that we will be asked to reboot, and once we have rebooted we will probably have to run freebsd-update install once again. In any of the cases, I advise you to pay attention to what it says on the screen during the process, since I cannot predict here how a particular upgrade is going to be like.


3. We have an unsupported major version

Continuing with the example of the screenshot I took from freebsd.org - remember that this changes and you should check the current situation at the time - let's imagine now that we have version 11.3. Since no version 11 is supported anymore, it would be necessary to upgrade to version 12.3 at once. The procedure is exactly the same as described above with the following exceptions:
[LIST][*]Once the whole process is complete, we will be advised to reinstall the software we have installed through the ports. If you don't know what it is, or don't have it, you can just do a pkg update.
[*]Since this is a major update, it is possible that certain things may stop working, or work differently.
[*]We may be allowed to install newer versions of certain software than we were previously offered. We may not be able to install older versions that were previously available for our OS.

In case we find ourselves at a dead end and want to go back to the previous version, we can do a rollback:

Code:
freebsd-update rollback
B: Updating installed software

By installed software I don't mean Metin but MySQL, nginx, php-fpm and other official software available through two methods:

- The package repository, providing precompiled binaries.

- The ports collection, which allows us to compile the code on our own and choose what we want and what we don't.

In the past, it was often necessary to resort to the ports system to install many things, as necessary features would not be compiled into the packaged binary. Nowadays, it is uncommon to need custom binaries, so I will skip that part.

Managing packages

Update everything we have on the system:

pkg update && pkg upgrade



At this point we will be told what will be removed, reinstalled or installed, depending on dependencies and so on. MariaDB users beware that there are packages that insist on installing MySQL instead of MariaDB! If you see any package giving such problems, you can either lock it with pkg lock <package> so that it will not be updated automatically, or install it through the ports system.

See the list of installed software

Code:
pkg info
Search for available software

pkg search <phrase to search>
example: pkg search mariadb

Install software

pkg install <software name>
example: pkg add tcptrack

Delete software

pkg delete <software>
example: pkg delete mysql56-server

Before we finish, let's talk about a particular case - what if we want to upgrade to a newer version of, for example, mysql or php?

The pkg upgrade command will not do this on its own. If we have MySQL 5.6, it will install the updates available for that version, and that's it. Just like with the operating system, if we want to upgrade to a newer version, we have to specify it.

If we have MySQL 5.6 and we want for example to install MySQL 8.0 we will have to do something like this:

Code:
pkg install mysql80-server
It is possible that we will be informed of a conflict, in which case we should first uninstall the previous version:

Code:
pkg delete mysql56-server mysql56-client
Remember that in FreeBSD only the binary is uninstalled; our existing data and configuration files will not be removed. Also, we have to restart the service ourselves (in this case with service mysql-server restart) as the installer will not do it for us either and the previous version will continue to run as long as we don't stop it.



As I said in the system update section, pay attention to the text show in the screen after the update is finished because it informs us of possible problems, where the configuration files are (particularly if this location has changed) or what needs to be done after the installation for the software to work properly. This text is usually very short and to the point and very much worth reading.



Note: you can find more tutorials and eventually updated versions of this one in my .
.Shōgun is offline  
Thanks
1 User
Old 09/14/2022, 15:49   #2
 
elite*gold: 139
Join Date: Sep 2022
Posts: 26
Received Thanks: 4
A really explicit and perfect guide as always thank you Shogun!
Thrally is offline  
Old 02/06/2023, 08:59   #3
 
elite*gold: 0
Join Date: Feb 2023
Posts: 4
Received Thanks: 0
Does mySQL 8.0 match with creating a metin2 P-Server?
EnisAk is offline  
Old 01/28/2024, 11:04   #4
 
Metin2Gherla's Avatar
 
elite*gold: 0
Join Date: Jun 2023
Posts: 6
Received Thanks: 2
A really explicit and perfect guide for begginers ! nice job
Metin2Gherla is offline  
Old 01/29/2024, 20:25   #5
King of Hell





 
Crowley's Avatar
 
elite*gold: 0
The Black Market: 408/1/0
Join Date: Mar 2012
Posts: 5,263
Received Thanks: 776
Arrow Metin2 Guides & Templates -> Metin2 PServer Gu…

#moved
Crowley is offline  
Reply


Similar Threads Similar Threads
Wie kann ich auf VirtualBox von FreeBSD 8.2 auf FreeBSD 7.2?
12/07/2013 - Metin2 Private Server - 2 Replies
Hey Leute, ich wollte auf VirtualBox von FreeBSD 8.2 auf FreeBSD 7.2 Wechseln kann mir einer per Teamviewer helfen oder einen link schicken wie das geht? danke im Vorraus Skypename: shikarox3 mfg Shikarox3 :handsdown:
Help with FreeBSD Server // Helfen Sie mit FreeBSD Server
01/08/2012 - Metin2 Private Server - 6 Replies
I just created my FreeBSD 7.2 metin2, but when i start, i see this error: http://img233.imageshack.us/img233/1858/imagemieq .png What is the problem? Help me please! At error, say: ConnectDBCheckAUTHkill Problem its libs? Low ram? .. What is problem.. Help =============
[Service]Serverinstallation auf FreeBSD/FreeBSD auf Linux/Debian
12/28/2010 - Metin2 Private Server - 23 Replies
Huhu community, ich möchte euch ab jetzt meinen Service anbieten. Das mache ich aus dem Grund, weil ich gerne Leuten helfen möchte die vielleicht nicht so gut mit den Serverfiles bzw. einem Root Server umgehen können. Jetzt stellt ihr euch sicherlich die Frage, was mache ich genau - und wie viel kostet es - kostet es überhaupt was? Also erstmal zur Ersten frage. Was mache ich genau und wie sieht der Service aus?
FreeBSD 8.1 auf FreeBSD 7.1/7.2 downgraden
10/30/2010 - Metin2 Private Server - 10 Replies
Hallo Com, da ich über die Suchfunktion nichts gefunden habe, hier meine Frage: Wie kann man FreeBSD 8.1 auf FreeBSD 7.1 oder 7.2 downgraden? Mein Root ist ein EQ4 Bei hetzner. Leider funktioniert bei mir die csup Methode nicht. Hoffe auf schnelle Antwort, .Gravita



All times are GMT +1. The time now is 07:27.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.