Ubuntu
Installing Cacti on Ubuntu 8.04
15So I’ve had the WORST luck in trying to figure out how to setup Cacti on Ubuntu so it will properly poll my system and give me graphs. Part of the reasoning behind this is that I’m in the process of replacing my existing Netgear router with a Ubuntu box (guide to come shortly!) but a prereq of doing this is to setup reporting on the Ubuntu box so I can see all kinds of metrics on disk, IO, network bandwidth, etc–all the fun stuff that makes you jump up and down with. My previous attempts went through fine, but the problem was that I didn’t seem to be able to get stats polled from my devices, namely network interfaces.
To begin with always make sure your system is up2date:
sudo apt-get update
sudo apt-get upgrade
Now that we have that out of the way, make sure your system has SNMPD installed:
sudo apt-get install snmp snmpd
Now that it is installed, we need to do a bit of configuration to it. Run:
sudo nano /etc/default/snmpd
and you’ll see something like:
# This file controls the activity of snmpd and snmptrapd# MIB directories. /usr/share/snmp/mibs is the default, but
# including it here avoids some strange problems.
export MIBDIRS=/usr/share/snmp/mibs# snmpd control (yes means start daemon).
SNMPDRUN=yes# snmpd options (use syslog, close stdin/out/err).
SNMPDOPTS=’-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid’# snmptrapd control (yes means start daemon). As of net-snmp version
# 5.0, master agentx support must be enabled in snmpd before snmptrapd
# can be run. See snmpd.conf(5) for how to do this.
TRAPDRUN=no# snmptrapd options (use syslog).
TRAPDOPTS=’-Lsd -p /var/run/snmptrapd.pid’# create symlink on Debian legacy location to official RFC path
SNMPDCOMPAT=yes
Make sure that you change:
SNMPDRUN from No to Yes, and you remove the 127.0.0.1 from the SNMPDOPTS line. You’ll see what I’m saying when you compare yours to mine that you see above that I’ve made bold.
Then we are going to configure the communities by running:
sudo nano /etc/snmp/snmpd.conf
Do a search within the conf file and you should see:
# sec.name source community
#com2sec paranoid default public
com2sec readonly localhost public
#com2sec readwrite default private
By default the first line is the one that is commented and the last two are uncommented. I mearly commented out the first line (its the one in italics) and removed the comment from the second line. Also I changed the source from default to localhost and left the community name as public.
Now comes the test, you want to make sure that snmp is up and running. Since changes were made to the configuration you want to give those services a swift kick in the pants:
sudo /etc/init.d/snmpd restart
Once that is done you’ll want to run:
snmpwalk -Os -c public -v 1 localhost system
You should get a mess of information returned:
sysDescr.0 = STRING: Linux otani 2.6.24-19-generic #1 SMP Wed Jun 18 14:43:41 UTC 2008 i686
sysObjectID.0 = OID: netSnmpAgentOIDs.10
sysUpTimeInstance = Timeticks: (227377) 0:37:53.77
sysContact.0 = STRING: Root(configure /etc/snmp/snmpd.local.conf)
sysName.0 = STRING: otani
sysLocation.0 = STRING: Unknown (configure /etc/snmp/snmpd.local.conf)
sysORLastChange.0 = Timeticks: (0) 0:00:00.00
sysORID.1 = OID: snmpFrameworkMIBCompliance
sysORID.2 = OID: snmpMPDCompliance
sysORID.3 = OID: usmMIBCompliance
sysORID.4 = OID: snmpMIB
sysORID.5 = OID: tcpMIB
sysORID.6 = OID: ip
sysORID.7 = OID: udpMIB
sysORID.8 = OID: vacmBasicGroup
sysORDescr.1 = STRING: The SNMP Management Architecture MIB.
sysORDescr.2 = STRING: The MIB for Message Processing and Dispatching.
sysORDescr.3 = STRING: The management information definitions for the SNMP User-based Security Model.
sysORDescr.4 = STRING: The MIB module for SNMPv2 entities
sysORDescr.5 = STRING: The MIB module for managing TCP implementations
sysORDescr.6 = STRING: The MIB module for managing IP and ICMP implementations
sysORDescr.7 = STRING: The MIB module for managing UDP implementations
sysORDescr.8 = STRING: View-based Access Control Model for SNMP.
sysORUpTime.1 = Timeticks: (0) 0:00:00.00
sysORUpTime.2 = Timeticks: (0) 0:00:00.00
sysORUpTime.3 = Timeticks: (0) 0:00:00.00
sysORUpTime.4 = Timeticks: (0) 0:00:00.00
sysORUpTime.5 = Timeticks: (0) 0:00:00.00
sysORUpTime.6 = Timeticks: (0) 0:00:00.00
sysORUpTime.7 = Timeticks: (0) 0:00:00.00
sysORUpTime.8 = Timeticks: (0) 0:00:00.00
If you get something else like:
Timout: No response from Localhost
Go back and make sure you’ve setup your communities properly and restart SNMPD from the /etc/init.d/snmpd restart command.
Next you are going to want to setup your web and MySQL server’s. If you’ve already done this great, but for those who are starting on a vanilla installation, go ahead and run the following:
sudo apt-get install mysql-server apache2 libapache2-mod-php5 php5-mysql php5-cli php5-snmp
You’ll need to test that Apache and PHP are up and running, so run:
sudo joe /var/www/phpinfo.php
and type in the phpinfo bit (unfortunately it won’t properly display through Blogger if I type in the code, but you can always find it here on how to create a test page).
Save your file and go to: http://localhost/phpinfo.php and if you get the PHP info page, you are all set there!
Next you’ll want to install phpmyadmin. It’s not a requirement, but I always do this so you have a graphical interface to manage your MySQL instance:
sudo apt-get install phpmyadmin
And you can test that this is running by going to: http://localhost/phpmyadmin and logging in with root as the username and the password you setup during the installation process of MySQL above.
Now that we have that squared away, we want to install Cacti using:
sudo apt-get install cacti
The installation process is fairly straight forward. You will be asked:
- Configure libphp-adodb = Press OK
- Configure database for cacti with dbconfig-common = Press OK
- Password for MySQL database Administrator = Type in the password that you configured in the MySQL installation process and the one that you verified works through phpMyAdmin above.
- MySQL Application password for Cacti = This is the password for the new Cacti database instance that is going to be created. Make this a good one, as it’s not going to be the same one that is used to log into Cacti to administer it.
- Webserver Type = apache2
So now that cacti has been installed and we are trucking right along, we’ll want to pull up the web installer: http://localhost/cacti. You have to go through the web-based installer process:
- Click Next on the first screen
- Select NEW INSTALL and check that the information is correct
- Make sure that everything shows up as [FOUND] and resolve any conflicts (there shouldn’t be as in my installation I didn’t have to do anything else).
- Click Finish
When you get to the login page, your default credentials on the first run are:
- Username = admin
- Password = admin
Obviously be a good boy and on the next screen make sure you change this to something proper. This will be the admin password that you change, so make it a good one!
Now comes the fun part, you are going to setup graphs! But before you can get to that you have to understand the process by which you set things up:
- Setup Devices
- Create graphs for devices
- Optional – Create a new tree for the devices
- Associate Devices to a Tree
This is the part that I got stumbled up on for awhile as it’s not the most intuitive system to go through. So to start with click on Console from the upper right corner, and click on the link labeled Create devices for network.
There should already be a device there, but go ahead and delete it and create a new one from scratch. (The Add button to add a new one is in the upper right hand corner of the frame). In the add menu, there will be several fields that you need to fill in:
- Description – name this something that you will recognize, for me it was localhost-2
- Hostname – 127.0.0.1
- Host Template – ucd/net SNMP Host
- Description – Whatever you want to put there to make it so you know what this is
- Down Device Detection – Ping
- Ping Method – UDP Ping
- Ping Port – 23
- Ping timout value – 400
- Ping retry count – 1
- SNMP Version – 1
When you select SNMP version to 1, additional options will open up for you:
- SNMP Community – public, or whatever name you specified in your SNMP community that was configured earlier in this guide.
- SNMP Port – 161
- SNMP Timeout – 500
- Maximum OID’s Per Get Request – 10
Once you have that click on Create to create your device. After you click on create, the device will refresh with additional options at the bottom for:
- Associated Graph Templates
- Associated Data Source Templates
If you scroll to the top of the frame, you’ll see a link labeled Create Graphs for this Host. Click on the link to get you to the next screen. Under Graph Templates, select the check boxes next to:
- CPU, Load Average, and Memory
Under Data Query [SNMP - Interface Statistics], click on the drop down menu and select In/Out Bits with Total Bandwidth and click the Create button.
We’re almost there. We have to either first create a tree to associate this new device to, or we have to associate this device to an existing tree. By default, Cacti will install with a Default Tree. And for those like me, who are setting this up on one box, and this will be the only box that Cacti monitors, we can skip creating a new tree and go straight to associating this to an existing tree. If you want to create your own tree, it’s simply a matter of clicking on the Graph Trees link on the left menu, and adding a new tree with a new name.
To associate your device with a tree, it’s simply just clicking on the Devices link on the left menu, and clicking the checkbox next to your device, and from the drop down menu select Place on Tree (Default Tree) and click on the Go button. You’ll be asked to confirm, just confirm with default values and that’s it!
If everything went well within a few minutes you should have some graphs being generated!
Mounting Network Drive Ubuntu 8.04
6So my one Ubuntu server box after the last server update died and never came back to life. It was on an old IBM Intellistation P4 box, and the POST beep codes tell me that it’s either the system RAM or the system board. Since neither I’m in a position where I’m about to pour more cash into, I decided to just put a Ubuntu VM on my main box and go from there. After all the main box these days seems to be just idling away, so why not!
The problem was that I couldn’t remember how to mount a network drive, so it booted up at startup. After a few minutes of souring and trying a few things, came across the answer.
First run the following command:
sudo apt-get install smbfs
This will install the Samba File System, but more importantly it will also install the smbmount application.
Test to make sure that you can from the machine that you are setting up the mount point reach the network file system. You can do this via the command:
sudo smbmount //servername/directory /mountpoint -o username=putusernamehere,password=putpasswordhere
Obviously replace the necessary values above with the real information. Mine looks like:
sudo smbmount //192.168.1.7/public /storage -o username=george,password=xxxxxxxxx
Doing this, I received the error message:
mount error: can not change directory into mount target /storage
This is resolved by simply running the command:
sudo mkdir /storage
To add this mount point to your startup you will first backup your fstab file:
sudo cp /etc/fstab /etc/fstab_backup
once that is backed up, you will:
sudo nano /etc/fstab
Add in the following line:
//servername/directory /mountpoint smbfs username=putusernamehere,password=putpasswordhere 0 0
Mine looks like:
//192.168.1.7/public /storage smbfs username=george,password=xxxxxxxxx 0 0
Then writeout the file and exit nano, and run:
sudo mount -a
This will reload the mount points and if successful you will have full access to your network drive via the /storage directory!
How to flush DNS cache on Ubuntu 8.04
0Some distributions run a caching nameserver in the background out of the box while some do not. To clear the cache if you have such a daemon running, simply restart the nscd service in ubuntu.
Most DNS clients will cache the results of name resolution request to speed up multiple lookups to the same URL. Just think about how many requests are made to the same domain when visiting a single web page. Every file, image, style sheet, etc. that is on that page and served from the same domain requires a DNS lookup.
So if you have an invalid DNS entry cached on your local client you’ll need to flush it out of the cache so your client can do a new lookup and get the correct information. Or your other option is to wait until that DNS entry expires and the cache flushes it automatically… which typically takes about 24 hours.
In ubuntu if you want to flush DNS cache you need to restart nscd daemon
Install nscd using the following command
sudo aptitude install nscd
Flush DNS Cache in Ubuntu Using the following command
sudo /etc/init.d/nscd restart
Device Manager in Ubuntu
2For those familiar with Windows, you are probably more than use to use the following when you want to find out what hardware is attached to your machine:
- Right Click on My Computer
- Go to Properties
- Click on Device Manager
and vola, your hardware comes up for you. So it took me awhile to figure this out, and given how simple this really is I was almost dumb struck, but you can run:
sudo lshw
and after a second or two, you will get a pretty detailed output of your devices and basic configuration. Very handy for those who like me, are trying to find out the next little fix to their rig but can’t remember what the heck they put into the AGP or PCI slots.
Installing Cisco VPN Client 4.8 on Ubuntu 8.04
0The first that you will want to do is to get the Cisco VPN client software from your IT department. I tried to get this directly from Cisco’s website, only to find after going through their completely too long registration process, that the software wasn’t made available to me because I wasn’t a special registration type (I’m figuring you have to register with some sort of Cisco specific ID or something particular to the products that you have purchased from Cisco). At any rate, I got mine from my IT department.
Once you have it, download it to your /home/user directory. Replace user with the user that you are currently logged into as.
Most likely this is in a .tar.gz format, so you’ll need to run the following from a Terminal:
tar zxvf vpnclient-linux-x86_64-4.8.01.0640-k9.tar.gz
this will unzip the file into /home/user/vpnclient directory.
Next you’ll need to know that you have the linux header file for the current version that you are running. You’ll want to run the following to show the current version:
uname -r
When I ran this on my system, I got:
2.6.24-18-generic
To make sure that you have the right version, you’ll want to run the following:
sudo apt-get install linux-headers-2.6.24-18-generic
For me, my update manager has downloaded this before, so I didn’t have anything to download. After this is run, you’ll want to make sure you are in the /home/user/vpnclient directory and run the following:
sudo make
This will make the installer for the vpnclient. Because you need to run a patch, make sure you’ve run:
sudo apt-get install patch
Now to the fun stuff, download the patch from here and save it to your /home/user/vpnclient directory. Run the following from the vpnclient directory:
patch < ./vpnclient-linux-2.6.24-final.diff
and you should see the following:
patching file GenDefs.h
patching file interceptor.c
Once that is done, run the following:
sudo ./vpn_install
You should see the following questions asked:
Directory where binaries will be installed [/usr/local/bin]Automatically start the VPN service at boot time [yes]
In order to build the VPN kernel module, you must have the
kernel headers for the version of the kernel you are running.Directory containing linux kernel source code [/lib/modules/2.6.24-18-generic/build]
* Binaries will be installed in “/usr/local/bin”.
* Modules will be installed in “/lib/modules/2.6.24-18-generic/CiscoVPN”.
* The VPN service will be started AUTOMATICALLY at boot time.
* Kernel source from “/lib/modules/2.6.24-18-generic/build” will be used to build the module.Is the above correct [y]
Answer yes to all of them. All things considering you should see that the install process goes through. The last things that you should see when the installer finishes up is:
Setting permissions.
/opt/cisco-vpnclient/bin/cvpnd (setuid root)
/opt/cisco-vpnclient (group bin readable)
/etc/opt/cisco-vpnclient (group bin readable)
/etc/opt/cisco-vpnclient/Profiles (group bin readable)
/etc/opt/cisco-vpnclient/Certificates (group bin readable)
* You may wish to change these permissions to restrict access to root.
* You must run “/etc/init.d/vpnclient_init start” before using the client.
* This script will be run AUTOMATICALLY every time you reboot your computer.
Then you’ll just need to move your *.pcf files into the profiles directory and away you go! This can be done by a simple:
cp *.pcf /etc/opt/cisco-vpnclient/Profiles
Then you’ll want to start the software, you can do this by running the command:
sudo /etc/init.d/vpnclient_init start
Within your profile names, make sure that you don’t have any spaces in them. To start the software, you’ll want to run:
sudo vpnclient connect NameOfConnection
You’ll replace NameOfConnection with the name of the connection file without the .pcf extension.
Password Protecting Directory in Ubuntu 8.04
1To password protect a directory in Apache2.2 hosted on Ubuntu 8.04 (will probably be very similar as the versions change in Ubuntu), this is a two fold process.
Configuring Apache to use .htaccess files
The first is to configure Apache2.2 to allow access to use .htaccess files. To do this, you will want to first confirm that that within the apache2.conf file located in /etc/apache2/, that the following line exists:
AccessFileName .htaccess
I didn’t add this to my installation of Apache2.2 it was already there, so I’m assuming the same would be for everyone else. The second is to go into the /etc/apache2/sites-available directory and modify the virtual host configuration file for each site that you have hosted. For me, I only have 1 site hosted at the moment, so the only file I modified was /etc/apache2/sites-available/default.
To have Apache know that it should check for the .htaccess file, you will want to modify it by changing the two instances of:
AllowOverride None
to
AllowOverride All
Within the directory tags in the configuration file. There is a third directory tag going down that configuration file for /usr/lib/cgi-bin and you shouldn’t need to change this instance of the Allow Override directive. Once you do this, remember to restart Apache by:
sudo /etc/init.d/apache2 restart
Once this is done your Apache will be configured to check for .htaccess files.
Setting up your .htaccess file
Now that you have Apache configured, you will need to configure your .htaccess file. First create this by:
sudo joe /var/www/.htaccess
and add the following:
AuthUserFile /var/.htpasswd
AuthName “Private System–No Unauthorized Access!”
AuthType BasicRequire user username
I put the authentication file outside of the /var/www directory so that it’s not web accessible. The AuthName is simply the label that gets put on the popup box that appears when you are prompted to enter in a username/password. The last line for Require user is the username that you will be using to authenticate with. Each person who you want to give access to should have a require user entry in your .htaccess file.
After you save this file, you will need to setup a password for the user that you specified in the .htaccess file. To do this run:
cd /var/
and then run:
sudo htpasswd -c /var/.htpasswd username
Enter in the username that you put into the .htaccess file and it will ask you to enter your password and then reenter it. Once you do this, you should be able to go to the URL of the directory that you put your .htaccess file in and you should receive a username/password prompt!
apt-get update requests Ubuntu CD
2When you are performing an:
sudo apt-get update
You are prompted for the Ubuntu CD:
Do you want to continue [Y/n]? y
Media change: please insert the disc labeled
‘Ubuntu-Server 7.10 _Gutsy Gibbon_ – Release i386 (20071016)’
in the drive ‘/cdrom/’ and press enter
To get around this, go into your sources list:
sudo joe /etc/apt/sources.list
and look for the line at the top:
deb cdrom:[Ubuntu-Server 7.10 _Gutsy Gibbon_ - Release i386 (20071016)]/ gutsy main restricted
and comment this out:
#deb cdrom:[Ubuntu-Server 7.10 _Gutsy Gibbon_ - Release i386 (20071016)]/ gutsy main restricted
Rerunning:
sudo apt-get update
will now download the sources, instead of trying to get them from a CD.
Installing NoIP Client on Ubuntu 8.04
2The very first thing that you want to do is to go to the No-IP website and create an account. I’m assuming that for the purposes of this document you all know how to do that. The important bits of information that you will need from this process is to know:
- Account Name (typically this is your email address)
- Password for No-IP
- Host Name configured in No-IP
Once you have setup an account and created your unique host name, open up Terminal (Applications > Accessories > Terminal) and start punching in the following:
sudo apt-get install no-ip
When the package is downloaded, you will want to create the configuration directory:
sudo mkdir /var/lib/noip2
Once the configuration directory is created, you’ll need to create a configuration file:
sudo joe /var/lib/noip2/noip2.conf
and when Joe opens, just enter in a space and save and exit. That will create the dummy file and you’ll be then able to run:
sudo noip2 -C
which will run the configuration for NoIP2.
First you will be prompted to enter in the interface that has an external connection. In my case, since I’m running noip from my Ubuntu router it has two interfaces, my external connection is on eth1.
You will be prompted to first enter in your Account Name. Remember this is your email address. Then you will be prompted to enter in your password and finally it will register your host that is registered to your no-ip account.
Once the wizard is complete you should be dropped back to your Terminal prompt. Now the question is how do you know that it’s running? For this you will want to check your logs. Run the following:
cat daemon.log | grep noip
You should see something like the following:
george@otani:/var/log$ cat daemon.log | grep noip
May 11 09:42:38 otani noip2[11343]: v2.1.7 daemon started with NAT enabled
May 11 09:42:38 otani noip2[11343]: ****.servehttp.com was already set to xx.xx.xx.xxx.
The “****.servehttp.com’ will be replaced with whatever you specified as your own host within the configuration wizard and the xx.xx.xx.xxx will be the IP address that should be your external WAN IP address. You can confirm this by opening your router administration and comparing what you see in the logs to what’s listed there as your WAN address. Or you can visit a webpage that will tell you what your external IP address is.
Installing OpenFire on Ubuntu 8.04
29The first thing that you will want to do is to setup LAMP (Linux, Apache, MySQL, PHP) on your image. I’m doing this on a fresh Ubuntu Desktop 32bit 8.04 installation so that I can use X11. A great guide exists here, but I’ll post the steps here as well (sometimes those pesky links die).
Installing Apache2
1. Open up the Terminal (Applications > Accessories > Terminal).
2. Copy/Paste the following line of code into Terminal and then press enter:
sudo apt-get install apache2
3. The Terminal will then ask you for you’re password, type it and then press enter.
Testing Apache2
To make sure everything installed correctly we will now test Apache to ensure it is working properly.
1. Open up any web browser and then enter the following into the web address:
http://localhost/
You should see a folder entitled apache2-default/. Open it and you will see a message saying “It works!” , congrats to you!
Installing PHP5
In this part we will install PHP 5.
Step 1. Again open up the Terminal (Applications > Accessories > Terminal).
Step 2. Copy/Paste the following line into Terminal and press enter:
sudo apt-get install php5 libapache2-mod-php5
Step 3. In order for PHP to work and be compatible with Apache we must restart it. Type the following code in Terminal to do this:
sudo /etc/init.d/apache2 restart
Testing PHP5
To ensure there are no issues with PHP let’s give it a quick test run.
Step 1. In the terminal copy/paste the following line:
sudo gedit /var/www/testphp.php
This will open up a file called phptest.php.
Step 2. Create a phpinfo page to test PHP and verify that it’s functioning. I have a copy here that you can use. Right click on the link and go to Save As to save the test page. You’ll want to then upload that saved file to your FTP site. Or if you are on your Ubuntu machine, you can run the below. Make sure that you’re in the DocumentRoot directory (see your Apache conf for the DocumentRoot path).
wget http://evolutioncreations.com/download/phptest.php
Step 3. Save and close the file.
Step 4. Now open you’re web browser and type the following into the web address:
http://localhost/testphp.php
Congrats you have now installed both Apache and PHP!
Installing MySQL5
To finish this guide up we will install MySQL. (Note – Out of Apache and PHP, MySQL is the most difficult to set up. I will provide some great resources for anyone having trouble at the end of this guide.)
Step 1. Once again open up the amazing Terminal and then copy/paste this line:
sudo apt-get install mysql-server
Step 3. This is where things may start to get tricky. Begin by typing the following into Terminal:
mysql -u root -p
Enter in the password that you setup during the apt-get install process.
Step 4. We are now going to install a program called phpMyAdmin which is an easy tool to edit your databases. Copy/paste the following line into Terminal:
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
After that is installed our next task is to get PHP to work with MySQL. To do this we will need to open a file entitled php.ini. To open it type the following:
gksudo gedit /etc/php5/apache2/php.ini
Step 5. Once the text editor opens the php.ini file, go to the bottom of the file and add in the following line:
extension=mysql.so
This will allow you to use MySQL within your PHP scripts.
Now just restart Apache and you are all set!
sudo /etc/init.d/apache2 restart
Installing OpenFire 3.5.1
The first thing that we want to do in preparation to install OpenFire is to install Java. Since I’m doing this on a fresh install of Ubuntu Java isn’t installed. But if you do have it installed, make sure you hava version 6.
Step 1. To check your Java version you can run the command:
java -version
If nothing returns, or you get something that tells you that you need to install Java, proceed to step 2. If you do get something back and Java is version 6, then skip to step 3.
Step 2. To install Java, run the following command from Terminal (Applications > Accessories > Terminal):
sudo apt-get install sun-java6-bin
Since you only have one version of Java installed on your system, you don’t need to go to step 2a. If you have multiple versions of Java installed, you will want to specify your Java version:
sudo update-alternatives –config java
select /usr/lib/jvm/java-6-sun/jre/bin/java
Step 3. To create your MySQL user and database. Since your LAMP installation installs phpMyAdmin, first log into phpMyAdmin using root as your username and the password you configured during the installation process.
On the main page, locate Priviledges and scroll down to Add a new User.
Use the following on the New User screen:
Username = Enter a username, I used ‘openfire’
Host = From the drop down menu, select localhost
Password = Enter a password, retype your password
Under the Database for user section of that page, click on the radio button for Create database with same name and grant all priviledges.
At the bottom of the page, click on the Go button.
Step 4. Now that we have setup the database and user, we want to get the OpenFire package. First go to:
cd /opt
Then run:
sudo wget http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_3_5_1.tar.gz
Once the file downloads, run:
sudo mv downloadServlet\?filename\=openfire%2openfire_3_5_1.tar.gz openfire_3_5_1.tar.gz
then run:
sudo tar zxvf openfire_3_5_1.tar.gz
then create a a symlink:
ln -s /opt/openfire/bin/openfire /etc/init.d/
You know have to make your symlink executable:
chmod +x /etc/init.d/openfire
Now we have to fix an error that comes up when you try and restart the service. Go into the /opt directory:
cd /opt/openfire
and run:
nohup: appending output to `nohup.out’
Congraduations! You can now finish the configuration through the URL:
http://localhost:9090/
Setting up DirectoryIndex in Ubuntu Apache 2.2
2So in setting up this new Ubuntu box, I ran into a problem that I couldn’t solve for the longest time, even though it is the simplest of problems–how do you setup DirectoryIndex in Apache2.2 without using a .htaccess file?
It turns out that this is VERY simple. Assuming that you are like me and just setting up Apache 2.2 on a home machine and that you are not using virtual hosting, it goes something like this.
First you want to find your default configuration. For me it was in the /etc/apache2 directory. Using your favorite text editor (mine is joe), open the file:
sudo joe /etc/apache2/sites-available/default
locate the following block:
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
then add the following line into the above directory block:
DirectoryIndex nameoffile.extension
For me, it looks like:
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
DirectoryIndex login.php index.php home.html
It’s that easy!