Tag: freebsd
How to bind a range of IP’s on BSD based hosts ( FreeBSD, OpenBSD )
by dino on Jul.05, 2008, under Uncategorized
First login to your FreeBSD host as a ‘non-root’ user. You should have an account in the ‘wheel’ group that you can do this with. Once you have logged in run the following commands to switch users to ‘root’
su -
Password:
server#
The prompt should have a # in it now meaning you are the ‘root’ user.
Now run these commands.
ee /etc/rc.conf
Using 192.168.1.3 – 192.168.1.6 as an example
ifconfig_fxp0=”inet 192.168.1.2 netmask 255.255.255.248″
ifconfig_fxp0_alias0=”inet 192.168.1.3 netmask 255.255.255.255″
ifconfig_fxp0_alias1=”inet 192.168.1.4 netmask 255.255.255.255″
ifconfig_fxp0_alias2=”inet 192.168.1.5 netmask 255.255.255.255″
ifconfig_fxp0_alias3=”inet 192.168.1.6 netmask 255.255.255.255″
Note that changes to the ‘_aliasNN’ and also the ‘netmask’ changes to ‘255.255.255.255′ from ‘255.255.255.248′. The IP’s will not work unless you use a ‘255.255.255.255′ netmask for the alias IP’s.
Once you have added the enteries to your file you need to press ‘ESC’ and then select the ‘Save File’ option. You can then reboot the server and the IP’s will be bound and ready to use.
You can also use ‘ifconfig’ on the command line to add them without a reboot.
Please see the following man pages for more information.
man ifconfig
man rc.conf
man netstat
WHM shows all accounts as 0/unlimited quotas
by dino on Jul.05, 2008, under cPanel
There are many possible causes of this issue, however most relate to quotas being enabled on the filesystem itself.
Some ways to check the most common errors are:
Quotas enabled in the filesysem
By default, quoatas are enabled in the kernel on all SoftLayer Linux and FreeBSD kernels. If you’ve compiled/installed your own kernel, you’ll need to verify that quotas are enabled.
— FreeBSD systems will need to add “options QUOTA” to their kernel configuration and recompile. They will then need to add “enable_quotas=”YES”" to their /etc/rc.conf file.
— To enable quotas on a certain partition, one will need to modify the /etc/fstab file by adding usrquota (or grpquota if one desires the quota to pertain to an entire group rather than an individual user) to the options column (e.g. “LABEL=/home /home ext3 defaults,usrquota 0 0″).
| [root@linux-test-server ~]# cat /etc/fstab # This file is edited by fstab-sync – see ‘man fstab-sync’ for details LABEL=/ / ext3 defaults,usrquota 1 1 LABEL=/boot /boot ext3 defaults 1 2 none /dev/pts devpts gid=5,mode=620 0 0 none /dev/shm tmpfs defaults 0 0 none /proc proc defaults 0 0 none /sys sysfs defaults 0 0 LABEL=SWAP-sda2 swap swap pri=0,defaults 0 0 /usr/tmpDSK /tmp ext3 defaults,noauto 0 0 /tmp /var/tmp ext3 defaults,bind,noauto 0 0 [root@linux-test-server ~]# |
— Once those entries are added, a reboot of the server should resolve the issue.
Run /scripts/fixquotas
Cpanel has it’s own tools to repair the quotas for it’s accounts. the command
#/scripts/fixquotas
run through ssh may resolve the issue.
Repquota
The command
#repquota -ua
will tell you if quotas are being reported for OS users at all.
Quotacheck
The command
#quotacheck -fv /home
will display the quotas for that filesystem, however the partition has to be unmounted first. It’s best to do this from Single User mode.
Need to change IP address in FreeBSD
by dino on Jun.05, 2008, under Uncategorized
Issue: A change of IP address is needed in FreeBSD.
Solution: If you do not have the root password boot into Single User mode [option 4]. Procced to step 1.
If you have the root password procced to step 2.
1. mount -o (if you get a read-only error, you will have to run fschk -y)
2. vi /etc/rc.conf (If vi is unavailable use ee)
at this point simply edit the IP Address lines that will need to be corrected.
Cpanel DNS on Freebsd: named or rndc does not exist
by dino on Apr.15, 2008, under Uncategorized
Problem:
Cpanel on FreeBSD shows the error that named or rndc does not exist after a cpanel update.
Solution:
server1# ln -s /usr/local/sbin/named /usr/sbin/named
Cannot install binary packages using pkg_addCannot install binary packages using pkg_add
by dino on Mar.05, 2008, under Uncategorized
Failure to install binary packages in older FreeBSD versions using “pkg_add -r”.
Solution:
Add these lines to /etc/csh.cshrc (/etc/profile if you are using bash or sh):
[FreeBSD 4.x]
setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-4-stable/Latest/
setenv PACKAGELIST
[FreeBSD 5.x]
setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-5-stable/Latest/
setenv PACKAGELIST
Need to change IP address in FreeBSD
by dino on Feb.05, 2008, under Uncategorized
Issue: A change of IP address is needed in FreeBSD.
Solution: If you do not have the root password boot into Single User mode [option 4]. Procced to step 1.
If you have the root password procced to step 2.
1. mount -o (if you get a read-only error, you will have to run fschk -y)
2. vi /etc/rc.conf (If vi is unavailable use ee)
at this point simply edit the IP Address lines that will need to be corrected.
