04-12-2005, 10:25 PM (This post was last modified: 04-12-2005, 10:26 PM by efk.)
If you want to run a Source DS in freebsd, you need to install a few things in order for it to run. Before you get started, make sure your ports are uptodate. To do this you need to use cvsup (more info on this at the freebsd handbook: http://www.freebsd.org/handbook).
Quote:cvsup -g -L 2 /path/to/ports-supfile
First off, I already had linux emulation turned on from when I installed, so if you dont have it on, you can install it via the ports system. This may not be necessary, you may be able to just skip ahead to installing linux_base-rh-9, but I dont have a test box to confirm this.
Quote:cd /usr/ports/emulators/linux_base
If you already have it installed, its probably a good idea to update it to make sure everything is up-to-date. Use portupgrade to do this. If you dont have portupgrade installed you can pkg_add -r portupgrade && rehash to get this going.
Quote:portupgrade -r linux_base
Now you need to install linux_base-rh-9 to update glibc etc. To do this:
Quote:cd /usr/ports/emulators/linux_base-rh-9
make && make install
I just did this and it works for me, Hope this helps the few of you out there that are stuck.
I'm setting up a server shortly and was planning on running it on Linux however I would prefer to run it on FreeBSD because it's quicker and more stable. I was just wondering if you would be willing to answer any questions that I might have. My e-mail is keithtshannon@gmail.com I would just like to get your e-mail if I have any problems with it.
11-25-2006, 03:46 AM (This post was last modified: 11-25-2006, 05:53 AM by k2chris1983.)
This information above is Right but it’s also old & lacks a lot of info for someone to switch over to FreeBSD. In this post I will tell you how to setup (Not Install) a FreeBSD from a Minimal Install…
If you can, login as “root” from the console box, because you can’t ssh as “root” by default in FreeBSD because it’s bad practice and you shouldn’t anyways. And you can’t use SU unless your user is in the wheel group!
So are first step is to modify your user group to the wheel group by doing this as “root”.
Code:
# pw user mod YOURUSERNAME –G wheel
Once this is completed you can log in as your User and execute “su –“. When you have become a Super User we are going to setup the CVSup package system.
What we need to do is make a folder and copy an example over to another folder so we can modify it. Just like this…
If “/usr/ports/” doesn’t exist, type this and try again.
Quote:# mkdir /usr/ports
Now we need to edit the example we just copy over but before that we need to install a text editor like “nano”. Why you ask? I hate “vi”…… Sooo, if you want to install “nano” type this.
Quote:# pkg_add –r nano && rehash
Ok let’s open up ports-supfile and edit the value “*default host=CHANGE_THIS.FreeBSD.org” to “*default host=cvsup4.FreeBSD.org”. Remember to save this File! For more Mirrors check out this URL Click Me
Quote:# nano /usr/ports/ports-supfile
Now we can install CVSup by typing this
Quote:# pkg_add –r cvsup-without-gui && rehash
From the “/usr/ports/” dir, we are going to download the whole ports tree to “/usr/ports/” by typing this command. *Go get a Cup of Coffee*
Quote:# cvsup –g –L 2 ports-supfile
From this point on you can search for files to install with “make search name=filename” from the “/usr/ports/”. Example
Quote:# cd /usr/ports
# make search name=wget
Port: wget-1.10.2
Path: /usr/ports/ftp/wget
Info: Retrieve files from the Net via HTTP and FTP
Maint: vd@FreeBSD.org
B-deps: gettext-0.14.5_2 gmake-3.81_1 libiconv-1.9.2_2 perl-5.8.8
R-deps: gettext-0.14.5_2 libiconv-1.9.2_2
WWW: http://www.gnu.org/software/wget/wget.html
Now if you want to install this you can just
Quote:# cd /usr/ports/ftp/wget && make install clean
This was just an example on how to install a simple program but now we are going to check if your Box has Linux binary compatibility on or off but it’s not turned on by default. The easiest way to enable this functionality is to load the linux KLD object (“Kernel LoaDable object”). You can load this module by typing the following as “root”
Quote:# kldload linux
If you would like Linux compatibility to always be enabled, then you should add the following line to /etc/rc.conf:
Quote:linux_enable="YES"
The kldstat command can be used to verify that the KLD is loaded:
Quote:% kldstat
Id Refs Address Size Name
1 2 0xc0100000 16bdb8 kernel
7 1 0xc24db000 d000 linux.ko
Now lets install Linux Runtime Libraries… This can be done one of two ways, either by using the linux_base port, or by installing them manually. Using the linux_base port is by far the easiest method to use when installing the runtime libraries. It is just like installing any other port from the Ports Collection. Simply do the following:
Quote:# cd /usr/ports
# make search name=linux_base-
Port: linux_base-fc-4_9
Path: /usr/ports/emulators/linux_base-fc4
Info: Base set of packages needed in Linux mode (for i386/amd64)
Maint: freebsd-emulation@FreeBSD.org
B-deps:
R-deps:
WWW:
# cd /usr/ports/emulators/linux_base-fc4
# make install distclean
You should now have working Linux binary compatibility. Some programs may complain about incorrect minor versions of the system libraries. In general, however, this does not seem to be a problem.
Note: There may be multiple versions of the emulators/linux_base port available, corresponding to different versions of various Linux distributions. You should install the port most closely resembling the requirements of the Linux applications you would like to install.
P.S.
I almost forgot something, you need to add the following line to /etc/fstab so that the linprocfs is mounted every
time FreeBSD is started. After you've added the line reboot.
Quote:linproc /compat/linux/proc linprocfs rw 0 0
This will make "steam" see the proc information to start the server up! If you don't add this you will get an error like this "Unable to determine CPU Frequency"...
the only way to fix this is to run the steam update command MANY times until it says up to date
that is what i did, now i can run ./srcds_run but i cant connect the 27015 port is open to wreel
I think that it's more typical to create a new directory for steam, than to change the subdirectory that a game installs into. For example, assuming that ./ is ~/srcds/: Default: ~/srcds/cstrike Your goal, steam executable in ~/srcds: ~/srcds/BBH/cstrike Typical 1: ~/BBH/cstrike Typical 2, steam executable in ~/srcds/BBH: ~/srcds/BBH/cstrike
Notice that Typical 2 is similar to what you're doing, but you would use that command line provided in the tutorial, because steam is in the same directory as the cstrike directory.
box# uname -a
FreeBSD box.xxxxxx.com 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008 root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
box#