Increasing swap

Creating a swap file in FreeBSD

  1. Make sure the virtual disk driver (md(4)) is present in the kernel configuration file. It is included in the GENERIC kernel.
device md # Memory "disks"
  1. Create a swap file (/usr/swap0):
# dd if=/dev/zero of=/usr/swap0 bs=1024k count=64
  1. Set appropriate permissions on (/usr/swap0):
# chmod 0600 /usr/swap0
  1. Enable the swap file in /etc/rc.conf:
swapfile="/usr/swap0" # Set to name of swapfile if aux swapfile desired.
  1. Reboot the computer, or to enable swap right now enter:
# mdconfig -a -t vnode -f /usr/swap0 -u 0 && swapon /dev/md0

Flash

Turned out that watching Flash on FreeBSD is a non-trivial task. There is nothing to download from the Adobe site, and after installing from ports, Flash is still not visible in either Opera or Firefox. Found another workaround — will give it a try.

Open the package manager as mentioned above and look for www/linux-flashplugin7, install it. It will install nspluginwrapper too and activate the browser plugin and any other browser plugins (like adobe acroread8) too. Restart the browser and use Flash. www/linuxpluginwrapper is obsolete.

KDE

Building the subject from ports was not the most optimal decision… At this point the KDE-3.5.8 build on a Duron-750 with ADSL-512k has been running for 21 hours already. What would have been the right way to do it?

NAT

Question — do I need to install anything else to set up NAT, or can ppp handle it on its own? Found this:

http://www.opennet.ru/openforum/vsluhforumID3/3173.html#1

/etc/ppp/ppp.conf:

default:
set device PPPoE:ed0:my_isp's_name
set speed sync
set mru 1492
set mtu 1492
set ctsrts off
enable lqr
add default HISADDR
set timeout 0
set redial 0 0
#NAT
nat enable yes
nat log yes
nat same_ports yes
nat unregistered_only yes
enable dns

my_isp's_name:
set authname username
set authkey password

In rc.conf:

ssh

First rake. ShellGuard, my beloved ShellGuard - won’t connect. sshd is running and configured, I can log in locally on 127.0.0.1. Even PuTTY connected. Though sluggishly. But ShellGuard says

no matching comp found. Client zlib Server: none,zlib@openssh.com

Thanks to opennet. Turns out the fix is

"Compression yes" in /etc/ssh/sshd_config

and also

PasswordAuthentication yes

Though it connected sluggishly too. I’m blaming the huge number of interfaces and a running torrent. If it’s this slow on a real machine (up to 30 seconds to log in), the question will come up again.

Tasks and Questions

Tasks#

  1. install FreeBSD
  2. configure sshd
  3. configure NAT for ADSL
  4. locale russification, but for some reason only for root, even though I set it in /etc/profile
  5. configure X
  6. install KDE
  7. update ports
  8. MS Office under Wine

Questions#

  1. Do I need a firewall? What for?
  2. how the heck do you russify it? I’ve worn the Handbook to shreds…
  3. how do you disconnect a PPPoE connection? how to reconnect after a drop? How to detect a drop?