273 lines
11 KiB
HTML
273 lines
11 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html lang="en">
|
||
|
<head>
|
||
|
<meta charset="utf-8">
|
||
|
<title>Installer FreeBSD sur un serveur Online avec MfsBSD</title>
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
<meta name="author" content="wxcafé">
|
||
|
<link rel="icon" type="image/png" href="//wxcafe.net/theme/img/favicon.ico">
|
||
|
<!-- Le styles -->
|
||
|
<link rel="stylesheet" href="//wxcafe.net/theme/css/bootstrap.css" type="text/css" />
|
||
|
<script type="text/javascript">
|
||
|
/* <![CDATA[ */
|
||
|
(function() {
|
||
|
var s = document.createElement('script');
|
||
|
var t = document.getElementsByTagName('script')[0];
|
||
|
|
||
|
s.type = 'text/javascript';
|
||
|
s.async = true;
|
||
|
s.src = '//api.flattr.com/js/0.6/load.js?'+
|
||
|
'mode=auto&uid=wxcafe&button=compact&popout=0';
|
||
|
t.parentNode.insertBefore(s, t);
|
||
|
})();
|
||
|
/* ]]> */
|
||
|
</script> <!-- flattr button loader -->
|
||
|
<style type="text/css">
|
||
|
body {
|
||
|
padding-top: 60px;
|
||
|
padding-bottom: 40px;
|
||
|
}
|
||
|
.sidebar-nav {
|
||
|
padding: 9px 0;
|
||
|
}
|
||
|
.tag-1 {
|
||
|
font-size: 13pt;
|
||
|
}
|
||
|
.tag-2 {
|
||
|
font-size: 10pt;
|
||
|
}
|
||
|
.tag-2 {
|
||
|
font-size: 8pt;
|
||
|
}
|
||
|
.tag-4 {
|
||
|
font-size: 6pt;
|
||
|
}
|
||
|
</style>
|
||
|
<link href="//wxcafe.net/theme/css/bootstrap-responsive.css" rel="stylesheet">
|
||
|
<link href="//wxcafe.net/theme/css/font-awesome.css" rel="stylesheet">
|
||
|
<link href="//wxcafe.net/theme/css/pygments.css" rel="stylesheet">
|
||
|
<!-- Le fav and touch icons -->
|
||
|
<link rel="shortcut icon" href="//wxcafe.net/theme/images/favicon.ico">
|
||
|
|
||
|
<link href="//wxcafe.net/feeds/feed.rss.xml" type="application/atom+xml" rel="alternate" title="Wxcafé RSS Feed" />
|
||
|
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
|
|
||
|
<div class="navbar navbar-fixed-top">
|
||
|
<div class="navbar-inner">
|
||
|
<div class="container-fluid">
|
||
|
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
||
|
<span class="icon-bar"></span>
|
||
|
<span class="icon-bar"></span>
|
||
|
<span class="icon-bar"></span>
|
||
|
</a>
|
||
|
<a class="brand" href="//wxcafe.net/index.html">Wxcafé </a>
|
||
|
<div class="nav-collapse">
|
||
|
<ul class="nav">
|
||
|
<li><a href="//wxcafe.net/archives.html"><i class="icon-th-list"></i> Archives</a></li>
|
||
|
<li><a href="//wxcafe.net/pages/about/">A propos</a></li>
|
||
|
<li class="divider-vertical"></li>
|
||
|
<ul class="nav pull-right">
|
||
|
</ul>
|
||
|
</ul>
|
||
|
</div><!--/.nav-collapse -->
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="container-fluid">
|
||
|
<div class="row">
|
||
|
<div class="span9" id="content">
|
||
|
<section id="content">
|
||
|
<article>
|
||
|
<header>
|
||
|
<h1>
|
||
|
<a href=""
|
||
|
rel="bookmark"
|
||
|
title="Permalink to Installer FreeBSD sur un serveur Online avec MfsBSD">Installer FreeBSD sur un serveur Online avec MfsBSD</a>
|
||
|
</h1>
|
||
|
</header>
|
||
|
<div class="entry-content">
|
||
|
<div class="well">
|
||
|
<footer class="post-info">
|
||
|
<span class="label">Date</span>
|
||
|
<span class="published" title="2014-08-28T12:16:00+02:00">
|
||
|
<i class="icon-calendar"></i> Thu 28 August 2014
|
||
|
</span>
|
||
|
<br />
|
||
|
<span class="label">By</span>
|
||
|
<a href="//wxcafe.net/author/wxcafe.html"><i class="icon-user"></i>Wxcafe</a>
|
||
|
<br />
|
||
|
<span class="label">Category</span>
|
||
|
<a href="//wxcafe.net/category/tutoriel/"><i class="icon-folder-open"></i>Tutoriel</a>
|
||
|
<br />
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</footer><!-- /.post-info --> </div>
|
||
|
<p>J'ai récemment eu l'occasion de louer un serveur chez Online.net (filiale de Illiad)
|
||
|
Voulant depuis pas mal de temps gérer un serveur sous FreeBSD (et tester <a href="http://bhyve.org/">bhyve</a>)
|
||
|
et n'ayant pour différentes raisons pas eu l'occasion de le faire sur mon
|
||
|
<a href="http://home.wxcafe.net">serveur auto-hebergé</a> ni sur <a href="http://wxcafe.net">ce serveur ci</a>,
|
||
|
j'ai commencé a chercher comment le faire sur ce serveur.</p>
|
||
|
<p>Étant donné que Online ne propose pas directement d'image FreeBSD sur ses serveurs, il m'a fallu
|
||
|
chercher un peu plus loin. Il se trouve que <a href="http://forum.online.net/index.php?/topic/3557-installation-de-freebsd-91-amd64-sur-une-dedibox-lt15k-2013/">ce post</a> sur les forums
|
||
|
d'online explique une procédure, mais celle-ci ne fonctionnait pas pour mon serveur en particulier. </p>
|
||
|
<p>J'ai donc cherché un peu sur internet, puis demandé sur irc (#freebsd-fr@freenode),
|
||
|
ou l'on m'a dirigé vers <a href="http://mfsbsd.vx.sk/">mfsbsd</a>, un projet d'installeur
|
||
|
alternatif, minimaliste et simplifié pour FreeBSD.</p>
|
||
|
<p>Pour installer FreeBSD sur votre serveur, donc, il vous faudra accéder a une
|
||
|
console KVM (dans mon cas personnel, iLO). Cela doit être faisable depuis le
|
||
|
panel Online. Une fois cela fait, lancez une console, puis téléchargez l'image
|
||
|
mfsbsd. Dans la console iLO, choisissez de booter sur une image CD/DVD, puis
|
||
|
choisissez l'image mfsbsd. Ensuite, rebootez le serveur. Choisissez de booter
|
||
|
sur l'image CD/DVD (F11 puis 1). Une fois ceci fait, un FreeBSD a l'air tout
|
||
|
a fait classique va démarrer. Une fois ceci fait, la partie importante arrive:
|
||
|
mfsbsd contient un script d'installation root-on-zfs, nommé logiquement
|
||
|
zfsinstall, qui va se charger de tout le travail pour nous.</p>
|
||
|
<p>Utilisez donc ce script ainsi : </p>
|
||
|
<div class="highlight"><pre><span class="cp"># tout d'abord, wipons le MBR :</span>
|
||
|
<span class="n">dd</span> <span class="o"><</span> <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">zero</span> <span class="o">></span> <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">da0</span> <span class="n">count</span><span class="o">=</span><span class="mi">1</span>
|
||
|
<span class="cp"># maintenant, installons le système</span>
|
||
|
<span class="n">zfsinstall</span> <span class="o">-</span><span class="n">g</span> <span class="n">da0</span> <span class="o">-</span><span class="n">u</span> <span class="n">ftp</span><span class="o">:</span><span class="c1">//ftp.freebsd.org/pub/FreeBSD/releases/amd64/10.0-RELEASE/ -s 2G -p root -c</span>
|
||
|
</pre></div>
|
||
|
|
||
|
|
||
|
<p>Avec <code>-g da0</code> votre disque dur principal, <code>-s 2G</code> la quantité de swap désirée,
|
||
|
<code>-p root</code> le nom du zpool, et <code>-c</code> pour activer la compression. D'autres options
|
||
|
sont disponibles, je vous invite a faire un <code>zfsinstall -h</code> si mon setup ne vous
|
||
|
convient pas.</p>
|
||
|
<p>Une fois ceci fait, faites un chroot dans /mnt (ou doit se trouver le nouveau
|
||
|
système) et éditez /etc/rc.conf :</p>
|
||
|
<div class="highlight"><pre><span class="n">zfs_load</span><span class="o">=</span><span class="s">"YES"</span>
|
||
|
<span class="n">sshd_load</span><span class="o">=</span><span class="s">"YES</span>
|
||
|
<span class="n">hostname</span><span class="o">=</span><span class="s">"whatever"</span>
|
||
|
<span class="n">ifconfig_igb0</span><span class="o">=</span><span class="s">"DHCP"</span>
|
||
|
</pre></div>
|
||
|
|
||
|
|
||
|
<p>Remplacez whatever par votre hostname, et igb0 par le nom de votre interface
|
||
|
physique connectée a internet. Quittez le chroot, rebootez, et voila, vous avez
|
||
|
maintenant un système FreeBSD tout propre installé sur zfs a découvrir et
|
||
|
utiliser!</p>
|
||
|
<p>Voila, c'est la fin de ce tutoriel.
|
||
|
(Cela dit, bon courage pour tester bhyve, vu que l'IPv6 chez online est... peu
|
||
|
crédible, disons)</p>
|
||
|
<p>Bon sinon sur d'autres sujets, j'ai mis en place des bots twitter
|
||
|
<a href="https://twitter.com/wxcafe_ebooks">wxcafe_ebooks</a>,
|
||
|
<a href="https://twitter.com/petitefanfare">petitefanfare</a>,
|
||
|
<a href="https://twitter.com/capet_ebooks">capet_ebooks</a>,
|
||
|
<a href="https://twitter.com/zengisse">zengisse</a>,
|
||
|
et <a href="https://wxcafe.net/kim_ebooks">kim_ebooks</a>. Ils sont tous basés sur <a href="https://github.com/wxcafe/ebooks_example">ce
|
||
|
code</a>, qui vient de
|
||
|
<a href="https://twitter.com/m1sp">@m1sp</a>
|
||
|
(<a href="https://github.com/twitter_ebooks">github.com/twitter_ebooks</a>). Donc voila.</p>
|
||
|
<p>A plus</p>
|
||
|
</div><!-- /.entry-content -->
|
||
|
</article>
|
||
|
</section>
|
||
|
</div><!--/span-->
|
||
|
<div class="span3 well sidebar-nav" id="sidebar">
|
||
|
<ul class="nav nav-list">
|
||
|
|
||
|
|
||
|
<!-- Categories links -->
|
||
|
<li class="nav-header"><h4><i class="icon-folder-close icon-large"></i> Categories</h4></li>
|
||
|
<li>
|
||
|
<a href="//wxcafe.net/category/hacking/">
|
||
|
<i class="icon-folder-open icon-large"></i>Hacking
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="//wxcafe.net/category/language/">
|
||
|
<i class="icon-folder-open icon-large"></i>Language
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="//wxcafe.net/category/notes/">
|
||
|
<i class="icon-folder-open icon-large"></i>Notes
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="//wxcafe.net/category/oses/">
|
||
|
<i class="icon-folder-open icon-large"></i>OSes
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="//wxcafe.net/category/programmation/">
|
||
|
<i class="icon-folder-open icon-large"></i>Programmation
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="//wxcafe.net/category/ranting/">
|
||
|
<i class="icon-folder-open icon-large"></i>Ranting
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="//wxcafe.net/category/teaching/">
|
||
|
<i class="icon-folder-open icon-large"></i>Teaching
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="//wxcafe.net/category/tutorial/">
|
||
|
<i class="icon-folder-open icon-large"></i>Tutorial
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="//wxcafe.net/category/tutoriel/">
|
||
|
<i class="icon-folder-open icon-large"></i>Tutoriel
|
||
|
</a>
|
||
|
</li>
|
||
|
<hr>
|
||
|
|
||
|
<!-- Social links -->
|
||
|
<li class="nav-header"><h4><i class="icon-exchange"></i> social</h4></li>
|
||
|
<a class="FlattrButton" style="display:none;"
|
||
|
title="//wxcafe.net"
|
||
|
style="padding-top: 10px;"
|
||
|
rel="flattr;
|
||
|
url://wxcafe.net;
|
||
|
title://wxcafe.net;
|
||
|
button:compact;
|
||
|
popout:0;
|
||
|
uid:wxcafe;
|
||
|
category:blog;"
|
||
|
href="//wxcafe.net">flattr</a>
|
||
|
<li><a href="https://twitter.com/wxcafe"><i class="icon-twitter icon-large"></i> Twitter</a></li>
|
||
|
<li><a href="https://github.com/wxcafe"><i class="icon-github icon-large"></i> Github</a></li>
|
||
|
<li><a href="mailto://wxcafe@wxcafe.net"><i class="icon-envelope icon-large"></i> Email</a></li>
|
||
|
<li><a href="https://data.wxcafe.net/wxcafe.asc"><i class="icon-key icon-large"></i> Gpg</a></li>
|
||
|
<li><a href="finger://wxcafe@wxcafe.net"><i class="icon-terminal icon-large"></i> Finger</a></li>
|
||
|
<li><a href="http://leloop.org/where.html"><i class="icon-map-marker icon-large"></i> IRL</a></li>
|
||
|
|
||
|
<hr>
|
||
|
|
||
|
<!-- Links -->
|
||
|
<li class="nav-header"><h4><i class="icon-external-link"></i> Links</h4></li>
|
||
|
<li><a href="https://github.com/wxcafe/blog-source"><i class="icon-code icon-large "></i> Source!</a></li>
|
||
|
<li><a href="http://paste.wxcafe.net"><i class="icon-paste icon-large "></i> Zerobin</a></li>
|
||
|
<li><a href="http://git.wxcafe.net"><i class="icon-github-sign icon-large "></i> Public Git</a></li>
|
||
|
<hr>
|
||
|
|
||
|
<!--- RSS feed -->
|
||
|
<li class="nav-header"><h4><i class="icon-rss"></i> feeds</h4></li>
|
||
|
<li><a href="//wxcafe.net/feeds/feed.rss.xml" rel="alternate"><i class="icon-bookmark-empty icon-large"></i> RSS</a></li>
|
||
|
<li><a href="//wxcafe.net/feeds/feed.atom.xml" rel="alternate"><i class="icon-bookmark-empty icon-large"></i> Atom</a></li>
|
||
|
|
||
|
|
||
|
</ul> </div><!--/.well -->
|
||
|
</div><!--/row-->
|
||
|
<hr>
|
||
|
<footer>
|
||
|
<address id="about">
|
||
|
Proudly powered by <a href="http://pelican.notmyidea.org/">Pelican</a>,
|
||
|
which takes great advantage of <a href="http://python.org">Python</a>.<br />
|
||
|
Powered by <a href="https://github.com/getpelican/pelican-themes/tree/master/bootstrap2">bootstrap2</a> theme, thanks!
|
||
|
</address>
|
||
|
</footer>
|
||
|
</div><!--/.fluid-container-->
|
||
|
</body>
|
||
|
</html>
|