« January 2005 | Main | April 2005 »
March 31, 2005
Commonly Used Configuration Files and Commands
Bind
Configuration file: /etc/namedb/named.conf
Start: # /etc/rc.d/named restart[start/stop]
Apache
Configuration file: /usr/local/etc/apache/httpd.conf
Start: # /usr/local/sbin/apachectl restart[start/stop/graceful]
MySQL
# /usr/local/etc/rc.d/mysql-server.sh start[stop/restart]
Create new user
mysql> grant usage on database_name.* to user_name@localhost IDENTIFIED BY 'somepassword' WITH GRANT OPTION;
mysql> grant all on database_name.* to user_name@localhost;
PHP
Configuration file: /usr/local/etc/php.ini
ProFTPD
configuration file: /usr/local/etc/proftpd.conf
Start: # /usr/local/libexec/proftpd
Debug mode: # /usr/local/libexec/proftpd -n -d 9
inetd
# /etc/rc.d/inetd restart
Portsnap
# portsnap fetch update
CVSup
Configuration file: /root/ports-supfile
Update: # cvsup -g /root/ports-supfile
Postfix
Configuraton file: /usr/local/etc/postfix/main.cf
Reload: # /usr/local/sbin/postfix reload
Mail queue
Category : FreeBSD General
Posted by FreeBSD Newbie at 06:53 AM | Comments (0)
March 24, 2005
Benchmark Testing
You can use UnixBench to test your server's benchmark, and compare with other's results.Run the following commands to make the test:
# wget http://members.dslextreme.com/users/andylee/unixbench-4.1.0-wht.tar.gz
# gunzip -dvc unixbench-4.1.0-wht.tar.gz | tar xvf -
# cd unixbench-4.1.0-wht
# make
# ./Run
I just ordered a new server from LayeredTech, the configuraion is:
• Intel Pentium 4 2.8GHz
• 2 x 80GB IDE Hard Drive
• 1024MB RAM
• Bandwidth: 1000GB
• IP Addresses: 8 (5 usable)
• Private VLAN
• Number Of Servers: 1
• Basic Resource Monitoring
• FreeBSD, OpenBSD, Linux, Windows*
• 100% Self Managed and Dedicated
Here is the benchmark results:
Start Benchmark Run: Thu Mar 24 16:36:50 UTC 2005
4:36PM up 13:40, 2 users, load averages: 0.00, 0.00, 0.00
End Benchmark Run: Thu Mar 24 16:48:16 UTC 2005
4:48PM up 13:52, 2 users, load averages: 14.43, 5.50, 2.55
INDEX VALUES
| TEST | BASELINE | RESULT | INDEX |
| Dhrystone 2 using register variables | 376783.7 | 4555272.9 | 120.9 |
| Double-Precision Whetstone | 83.1 | 791.2 | 95.2 |
| Execl Throughput.2 | 188.3 | 1015 | 53.9 |
| File Copy 1024 bufsize 2000 maxblocks | 2672.0 | 6528.0 | 24.4 |
| File Copy 256 bufsize 500 maxblocks | 1077.0 | 9023.0 | 83.8 |
| File Read 4096 bufsize 8000 maxblocks | 15382.0 | 327449.0 | 212.9 |
| Pipe Throughput | 111814.6 | 609332.3 | 54.5 |
| Pipe-based Context Switching | 15448.6 | 93890.7 | 60.8 |
| Process Creation | 569.3 | 4076.8 | 71.6 |
| Shell Scripts (8 concurrent) | 44.8 | 296.8 | 66.2 |
| System Call Overhead | 114433.5 | 377500.3 | 33.0 |
| FINAL SCORE | 67.8 |
My first server got about 60, similar servers on the above thread got more than 100, I'm very disappointed at the result.
Category : General
Posted by FreeBSD Newbie at 05:41 PM | Comments (0)
March 12, 2005
FreeBSD and Linux
This is an interesting thread from FreeBSD mailing list, I have nothing against Linux, actually I know both too little to have my own opinions.
> Aperez wrote:
> I read an interview of Linus Torvald made by Linux Magazine. In that
> interview Linus mentioned the following:
>
> "On the other hand, no, Linux does not have that stupid notion of
> having totally separate kernel development for different issues. If
> you want a secure BSD, you get OpenBSD; if you want a usable BSD, you
> get FreeBSD; and if you want BSD on other architectures, you get
> NetBSD. That___s just idiotic, to have different teams worry about
> different things."
>
> I dont want to critize what Linus stated above. However, I find a very
> valid point when he says that every BSD version team is woking in
> different directions.
The important detail, I guess, that makes Linus wrong or at least not entirely
correct in making this statement is that the three BSD-derived systems he
mentions are different systems altogether. They are *NOT* different sets of
packages collected and distributed around the same kernel.
The same can be said about Linux distributions; some times even more so. One
cannot compare any version of Slackware Linux vs. Redhat Linux vs. Mandrake
vs. SuSE vs. Gentoo vs. Ubuntu vs. the Linux distribution "de jour". At any
given point in time, one can find Linux distributions that come with kernel
version 2.2, others with 2.4, a third group coming with some minor release of
2.6.x, etc.
Having said that, I don't see why Linux can be considered as "one system".
Even if it were, I don't see why four different systems (FreeBSD, NetBSD,
OpenBSD and Dragonfly BSD) are bad because they are not "one system". Not to
mention, that this is partly wrong because the BSD systems -- the internals of
their kernels put aside for a while -- have a great deal of similarities
between then; many more than any randomly chosen set of Linux distributions.
What Linus fails to see when he makes comments like the one above are some
very crucial points:
- A "system" is not just its kernel.
- Linux "systems" have a lot more differences than he implies.
- The BSD systems, when seen as a whole and not just as a kernel, have
many more similarities among them than any set of at least two
different Linux systems.
> My question is this:
> Why not all three teams work together for just one BSD version?
They do, in fact. A lot more than Linus implies. They just use their
different BSD systems to develop the things they most like.
Very often, what new features developed on one BSD system is ported or copied
over to other BSD systems. Bug fixes that are made on one of the BSDs are
many times fixed in a short time in other BSDs too.
> At the moment there are three groups of developers and users working
> in the same issues. I think if we should all work together and create
> well rounded BSD version for us users and corporate clients. Imagine a
> BSD version that is portable (NetBSD), that is very secured (OpenBSD)
> and that is a good Destop solution (FreeBSD).
Diversity is not bad. Linus is just wrong in stating that the BSDs are
somehow silly for not making the One, True BSD(TM)(C)(R).
- Giorgos
Category : General
Posted by FreeBSD Newbie at 11:46 PM | Comments (0)
March 11, 2005
Install ProFTPD
Update: The ProFTPD port seems buggy, I suggest you try pure-ftpd, the installation is very easy and worked very well.
I installed NcFTP client when I just got the server, it seems that "pkg_add -r ncftp" also installed NcFTP server and it worked without any configuration - it gave me an impression that I didn't have to care about the FTP server at all. After some time, my ftp client on Windows started displaying the unregistered version message of NcFTP server. I decided to install a free one - proFTPD.
proFTPD installation is a bit tricky, pkg_add doesn't install the configuration file: /usr/local/etc/proftpd.conf. (Can see the error message when run proftpd in debug mode)
Install proftpd with ports
# cd /usr/ports/ftp/proftpd
# make install
Ports will display a message to insert the following three lines to the PAM configuration /etc/pam.conf (you may have to create it).
ftpd auth required pam_unix.so try_first_pass
ftpd account required pam_unix.so try_first_pass
ftpd session required pam_permit.so
After installation, there are two executable files:
/usr/local/libexec/proftpd
/usr/local/etc/rc.d/proftpd.sh
proftpd.sh didn't work, no error message either.
Run proftpd in debug mode
# /usr/local/libexec/proftpd -n -d 9
It displayed the following error message:
opening scoreboard '/var/run/proftpd/proftpd.scoreboard'
RELINQUISH PRIVS at main.c:2315
error opening scoreboard: No such file or directory
Since the directory /var/run/proftpd doesn't exist, to fix this error, either create the directory manually or add a line in the proftpd config file:
ScoreboardFile /var/run/proftpd.scoreboard
Now I can start proftpd with the following command, although I need to do this every time the server is rebooted.
# /usr/local/libexec/proftpd
Misc
1. I have a few sites on this server, all ftp accounts use /home/username/ as the base ftp directory. To avoid modifying all saved setting on my ftp client software, I uncommented a line in the config file:
DefaultRoot ~
2. There is a few seconds delay when connecting to the server, I had the same problem on my Linux server, later fixed it by removing all entries like the following in the config file:
<VirtualHost>
...
</VirtualHost>
But unfortunately, I can't find similar entries on FreeBSD, please let me know if you know how to fix it.
Category : FTP
Posted by FreeBSD Newbie at 06:46 PM | Comments (1)
