« Posts under Fedora

*nix commands I can’t do without

Unix/Linux/*nix survival 101

Let me start with the obvious: I’m definitely not a unix guru by any means. I do however use it on a daily basis for basic build/development oriented tasks, so I know enough to get by. Since my friend just installed his first ever linux distribution (CentOS, Huzzah!), I thought I’d write something up on some common unix commands that help me get through the day.

grep [command flags] [search text] [filename]

grep (global | regular expression | print) is the file text search command. Give it a regular expression and it will print out…

[Read the rest]

Install Fedora

Fedora?

“Fedora is a Linux-based operating system that showcases the latest in free and open source software. Fedora is always free for anyone to use, modify, and distribute. It is built by people across the globe who work together as a community: the Fedora Project. The Fedora Project is open and anyone is welcome to join.” – from the Fedora homepage

I’m using this to run jboss 5.1, postgres, mysql and all my other goodies. Why Fedora? No real reason in particular, other than I wanted to have experience working with more than one flavor of linux, since I use…

[Read the rest]

Set up multiple IPs on a single NIC

Why multiple IP’s on a single Network Interface Card?

If you want to run different instances of the jboss application server on the same linux machine you will need to figure out how you want to avoid port conflitcs. You can either change each instance’s ports on a per instance basis or you can instead set up a separate ip address for each instance and preserve all the default ports that jboss ships with.

For example, jboss by default runs off port 8080, and also consumes a number of other ports such as 8083 for RMI, 1098 for the JNP…

[Read the rest]

Set up IP Tables

IP Tables is software that ships with most linux OS’s and is used as a firewall to control the flow of traffic in and out of the machine. Its design is meant to allow for chaining rules so that rules that appear farther down take precedence over the rules that appear at the top. Editing these rules can be a bit scary, and there is usually a gui tool that can be used to configure this. In fact the file itself recommends use of the visual tool for creating rules. In case you have a healthy dose of confidence, here’s…

[Read the rest]

Install mod_jk

Use mod_jk to bridge apache and Jboss

mod_jk is an apache extension that you can use to redirect incoming http requests to an application server. It lets you configure multiple applications servers by virtual host urls, and provides a means of setting up load balancing preferences between application servers. It’s very useful because it lets apache do what it does best – serve up http requests. Well, its good at serving up html too but apache will usually do a much better job of handling load balancing that most application servers. Let the web server handle http, and let the…

[Read the rest]

Configre Sendmail

If you need a simple MTA that will send mail across the internet, sendmail is a commonly used provider. It ships with most linux distributions and can be configured with relative ease. The other competing out of the box solution is postifix. Which on to pick? Probably postfix, but I was in a hurry and dived in to how to configure sendmail first. I guess eventually I’ll get around to setting up postfix.

Open up the sendmail configuration file:

[root@bedrock ~]# vi /etc/mail/sendmail.mc

Uncomment the flag that bars accepting unresolvable domains:

dnl # We strongly recommend not accepting unresolvable

[Read the rest]

Setting up a Subversion server

Subversion is a code repository management system that is very similar to CVS, with some additional features that make it a more complete solution. Here’s a short list:

  • svn is able to track changes to files when they change names. CVS will break all historical information when this happens, effectively baring the ability to roll back any items when the containing folder is renamed.
  • with svn commits are implemented as atomic, transactional units of work while cvs does not. With CVS, if there is a large commit happening, and the internet connection is interrupted or something goes wrong,



[Read the rest]

Set up postgres

Most linux oses come with postgres and mysql out of the box. If yours doesn’t or you want to run a newer version than the the one your os comes with you should be able to install it using the yum installer. Fedora 11 comes with a visual installer you can use to pick and choose what rpms you want running on your machine. Once you have postgres installed on your box you’ll want to initialize some dbs stuff:

[root@bedrock ~]# service postgresql initdb

open up postgres to listen to domains other than localhost:

[root@bedrock ~]# vi /var/lib/pgsql/data/pg_hba.conf

# connect



[Read the rest]

Untar a file

Short and sweet:

tar -zxvf foo.tar

this will extract the tar’d files into the current working directory.

Most tar balls will ask you to do something like the following in order to build the contents for your target platform:

./configure
make
make install

Some builds will require some kind of different variant of the above – for example the apache mod_jk build will ask you to run the following ./configure command with some additional flags:


For the impatient Apache admins:
$> cd native
$> ./configure --with-apxs=/usr/sbin/apxs (or where ever the apxs/apxs2 is)
$>


[Read the rest]