Es mostren els missatges amb l'etiqueta de comentaris FreeBSD. Mostrar tots els missatges
Es mostren els missatges amb l'etiqueta de comentaris FreeBSD. Mostrar tots els missatges

dimecres, 27 d’abril del 2011

nginx + PHP + FreeBSD

Investigació bibliografica per internet...



Instal·lació:
[root@nginx ~]cd /usr/ports/www/nginx && make install clean
[...]
[root@nginx ~]# echo "nginx_enable="YES"" >> /etc/rc.conf


Configuració a /usr/local/etc/nginx/nginx.conf

Acceleració:
Fer servir un volum tmpfs per accelerar encara mes la cache del nginx:
Cal fer coincidir el punt de muntatge del tmpfs amb la conf del nginx on guarda la cache.

  • Versio a manija:

[root@nginx ~]#mount -t tmpfs tmpfs /data/nginx/cache

  • Versio automatica pesistent a reinicis:


No s'ha d'oblidar l'advertencia:

Jan  4 11:05:07 nginx kernel: WARNING: TMPFS is considered to be a highly experimental feature in FreeBSD.



Accessoris:



dilluns, 3 de gener del 2011

Estat de la memoria en FreeBSD

Necessites l'estat de la memoria per traçar amb el Cacti, amb la sortida de Linux?
Hi ha varies opcions:





i si ho hem de cridar desde un script:

Una altre opció força xula, pero la sortida no es igual a la de linux es l'script freebsd-memory:

Font de l'script:

dimecres, 29 de desembre del 2010

Instal·lar Nagios en Freebsd

Instruccions per instal·lar nagios en Freebsd 8.1:

ies# cd /usr/ports/net-mgmt/nagios
ies# make install clean

Fer una ullada a:



Moduls a instal·lar:

divendres, 3 de setembre del 2010

FreeBSD will continue supporting ZFS

mitjançant FreeBSD - the unknown Giant per Gerard el 02/09/10

OpenSolaris may be dead now,; its advanced techologies such as the ZFS file system continue to live on in FreeBSD. FreeBSD Developer Pawel Jakub Dawidek confirmed that he is praparing a port of the OpenSolaris ZFS v28 file-system. Some of the new features included in v28 are: Data deduplication Triple parity RAIDZ (RAIDZ3) zfs diff zpool split Snapshot holds zpool import -F continue to [...]
To run a website you need speed and reliability. This company provides both: FreeBSD VPS hosting


dissabte, 7 d’agost del 2010

From sysinstall to ZFS-only configuration.

I’d like to share how we set up new servers at my company.
As you know, sysinstall currently doesn’t support ZFS or GEOM configuration, but I’ll show you how to convert system installed with sysinstall to ZFS-only server. Even if you don’t want to follow all the steps, please take a look at ZFS datasets layout, which after several modifications I consider quite optimal for FreeBSD.
After doing all the steps below your system will use GPT partitions, encrypted+mirrored swap and mirrored ZFS system pool.
I’m assuming your server contains two identical disks (ada0 and ada1).
Start from installing FreeBSD on the first disk using regular installation CD/DVD. Choose exactly one slice and exactly one partition. Reboot.
...

divendres, 23 d’abril del 2010

divendres, 27 de novembre del 2009

Howto to use an USB-Stick as a installmedium

Vist @ http://miwi.bsdcrew.de/2009/06/freebsd-80-install-with-a-usb-stick/

Howto ben xulo de com fer servir un pendrive USB com mitja d'instal·lació. (originalment en alemany, després traduït a l'anglès ;-))

Heus aquí:

1: Esborrem el pendrive:

dd if=/dev/zero of=/dev/da0 bs=1k count=1

2: Fem-lo "bootable"

bsdlabel -Bw da0 auto

3: Crear el FS UFS2 amb l'etiqueta GEOM “FreeBSD”

newfs -L FreeBSD /dev/da0a

4: Muntem l'imatge ISO:

mdconfig -a -t vnode -f 8.0-HEAD-20090609-JPSNAP-i386-dvd1 -u 0 && mount -r -t cd9660 /dev/md0 /mnt/iso

5: Muntem el pendrive

mount /dev/da0a /mnt/USB-Stick

Ara cal copiar tots els arxius del cd muntat al pendrive, després s'ha de crear el fstab:

vi /mnt/USB-Stick/etc/fstab

escrivim el següent:

/dev/ufs/FreeBSD / ufs ro 0 0

Guardar i ja podem arrencar desde l'USB

Truc ideal per arrencar NetBooks sense DVD...

dijous, 29 d’octubre del 2009

Per actualitzar els ports de FreeBSD

Per actualitzar els ports:
portsnap fetch update
pkgdb -F
portsdb -Uu
portupgrade -a

Per actualitzar tot el sistema:


The freebsd-update(8) utility supports binary upgrades of i386 and amd64 systems running earlier FreeBSD releases. Systems running 7.[0123]-RELEASE, 8.0-RELEASE, 8.1-BETA1, or 8.1-RC[12] can upgrade as follows:
# freebsd-update upgrade -r 8.1-RELEASE
During this process, FreeBSD Update may ask the user to help by merging some configuration files or by confirming that the automatically performed merging was done correctly.
# freebsd-update install
The system must be rebooted with the newly installed kernel before continuing.
# shutdown -r now
After rebooting, freebsd-update needs to be run again to install the new userland components, and the system needs to be rebooted again:
# freebsd-update install
At this point, users of systems being upgraded from FreeBSD 7.3-RELEASE or earlier will be prompted by freebsd-update to rebuild all third-party applications (e.g., ports installed from the ports tree) due to updates in system libraries.
After updating installed third-party applications (and again, only if freebsd-update printed a message indicating that this was necessary), run freebsd-update again so that it can delete the old (no longer used) system libraries:
# freebsd-update install
Finally, reboot into 8.1-RELEASE:
# shutdown -r now

dilluns, 10 d’agost del 2009

FreeBSD Install VIM Editor Without X11 GUI

You can easily build VIM without X11 under FreeBSD. First, update your ports tree, using portsnap command, enter: # portsnap fetch update Install vim without X11, enter: # cd /usr/ports/editors/vim && make WITHOUT_X11=yes install clean

To avoid install all X11 dependencies when upgrade via portupgrade, add this to /etc/make.conf:

$ vi /etc/make.conf

.if ${.CURDIR:M*/editors/vim*}
NO_GUI=yes
.endif

Optional: vim configuration

Copy /usr/local/share/vim/vimXY/vimrc_example.vim to /usr/local/share/vimrc, enter: # cp /usr/local/share/vim/vim72/vimrc_example.vim /usr/local/share/vimrc
Create your ~/.vimrc file, enter: $ vi ~/.vimrc
Add customization:
set nocompatible
filetype on
filetype indent on
filetype plugin on
set laststatus=2
syntax on
Save and close the file. Set bash alias, enter: $ echo "alias vi='vim'" >> ~/.bashrc
Setup INPUTRC for bash, enter: # echo 'export INPUTRC=/usr/local/etc/inputrc' >> /etc/profile
Finally, create /usr/local/etc/inputrc, enter: # cat >> /usr/local/etc/inputrc
Append config:
set meta-flag on
set input-meta on
set convert-meta off
set output-meta on

"\e[1~": beginning-of-line
"\e[4~": end-of-line
"\e[5~": beginning-of-history
"\e[6~": end-of-history
"\e[3~": delete-char
"\e[2~": quoted-insert
"\e[5C": forward-word
"\e[5D": backward-word

Fast-lane: