User Tools

Site Tools


freebsd:freebsd_3tweaks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
freebsd:freebsd_3tweaks [2025/01/16 09:10] azmanfreebsd:freebsd_3tweaks [2025/02/14 13:09] (current) azman
Line 2: Line 2:
  
 Maybe useful to some... Maybe useful to some...
 +
 +===== ZeroConf =====
 +
 +  * avahi & multicast dns <code>pkg install -y avahi-app nss_mdns</code>
 +  * enable avahi daemon in ''rc.conf'':<code>
 +avahi_daemon_enable="YES"</code>
 +  * modify the ''hosts:'' line in ''nsswitch.conf'':<code>
 +hosts: files dns mdns</code>
 +
 +===== User Account =====
 +
 +  * by default root shell is csh and user is sh - edit .shrc to get prettier prompt<code>
 +  PS1="`whoami`@\H:\w\$ "</code>
 +  * (IF using slim) to enable x environment after slim login, create ''~/.xinitrc'' for each user:<code>
 +  exec /usr/local/bin/mate-session</code>
 +
  
 ===== Git ===== ===== Git =====
Line 69: Line 85:
   </IfModule></code>   </IfModule></code>
   * copy template configuration file ''//# cp /usr/local/ etc/php .ini-production /usr/local/ etc/php .ini//''   * copy template configuration file ''//# cp /usr/local/ etc/php .ini-production /usr/local/ etc/php .ini//''
 +
 +Data-base (mysql/mariadb)
 +
 +  * install package(s) <code>pkg install mariadb103-server mariadb103-client php56-mysqli</code>
 +  * to load on startup, edit ''rc.conf'':<code>mysql_enable="YES"</code>
 +  * by default, it listens to remote request at port 3306. to check:<code>
 +# lsof -i4 -i6
 +# sockstat -4 -6</code>
 +  * to allow local access only, edit ''rc.conf'':<code>mysql_args="--bind-address=127.0.0.1"</code>
 +  * now, to make sure all is okay:<code>
 +# lsof -i4 -i6 | grep mysql
 +# netstat -an | grep 3306
 +# sockstat -4 -6 | grep 3306</code>
 +
 +===== Label for Partitions/Slices =====
 +
 +This is nice to have in / etc/ fstab when device assignment may change (e.g. usb drive on different machine may be assigned differently)
 +
 +For ufs,<code># tunefs -L <label> /dev/da0p?</code>
 +
 +To check if assigned,<code># ls /dev/ufs</code>
 +
 +For swap,<code># glabel label <label> /dev/da0p?</code>
 +
 +To check if assigned,<code># ls /dev/label</code>
 +
 +Then, / etc/ fstab entry can be like,<code>
 +/dev/label/<label> none swap sw 0 0
 +/dev/ufs/<label> / ufs rw 1 1
 +</code>
 +
 +===== Disk Utility ''gpart'' =====
 +
 +Show partition
 +
 +<code># gpart show</code>
 +
 +Resize partition
 +
 +<code># gpart resize -i 3 da0</code>
 +
 +Not really gpart stuff, but don't forget to grow FS to fit new size
 +
 +<code># growfs /dev/da0p3</code>
 +
 +===== Access to Linux ExtFS =====
 +
 +At the moment, full R/W access for Ext2, Journal-less for Ext3 and R/O for Ext4.
 +
 +<code>
 +# kldload ext2fs
 +# mount -t ext2fs /dev/<slice> <mount-path>
 +</code>
 +
 +===== Creating Disk Layout for Bootable USB =====
 +
 +{{page>freebsd:freebsd_prep_bootusb&noheader}}
  
freebsd/freebsd_3tweaks.1736989829.txt.gz · Last modified: by azman