Thursday, July 7, 2011

Bikin server chating sendiri pakai Linux --> Open Fire --> Spark

Halloo Juragan semua yang ada disitu, ada disana dan dimana2...
Ane mo share nih cara bikin server chating sendiri pakai Linux Ubuntu Server --> Open Fire --> Spark.

Langkah - langkahnye :
1) Install Linux Ubuntu Server dulu
2) Install webmin dah biar agak gampang klo mau remote
3) kalo mao remote dr pc pake putty deh, agak bengong dikit klo yg gak ngarti console "ky kite dah ' ' ' "
4) wget deh tuh Open Fire di : http://www.igniterealtime.org/downloads/download-landing.jsp?file=openfire/openfire_3.7.0_all.deb , trus di config deh.
pastiin ampe kelar trus bisa dibuka dari pc laen 192.168.94.2:9090 (port 9090)
5) nah sekarang tinggal install spark deh dr pc client,, sedot : http://www.igniterealtime.org/downloads/download-landing.jsp?file=spark/spark_2_6_3.exe
6) jalanin deh tuh spark dari start menu, create new account, masukin ip server linux tersebut, jangan lupa centang user SSL port method di Advanced, login deh...
7. semoga berhasil kawan...

Ini selengkapnya....

Here, you will learn about:

  • Pre-requisites for Openfire installation
  • Installing and running Openfire on Linux/Unix
  • Installing and running Openfire on Windows
  • Installing Instant Messaging clients

The Openfire instant messaging server is very easy to install. In fact, it's totally newbie-proof. So much so, that unlike other complex server software, even if you've never setup up Openfire before, you'll be able to get it up and running on your first try. If you're sceptical, by the time we are done with this short article, we'll have ourselves a fully-functional Openfire server that will register users and connect with clients.

Preparing Your System

Openfire is a cross-platform server and can be installed under Linux, Solaris, Mac, or Windows operating system environments. Openfire reserves its enormity for its users. When it comes to system requirements, Openfire is very suave and a perfect gentleman who has very moderate demands.

You don't need to spend much time preparing your system for installing Openfire. Just pick out the environment you're comfortable with—Windows or one of the popular Linux distributions such as Fedora, Debian, or Ubuntu, and you're good to go. You don't have to run around getting obscure libraries or worry about mismatched versions.

But like any hard-working gentleman, Openfire has a thing for caffeine, so make sure you have Java on your system. No need to run to the kitchen—this isn't the Java in the cupboard. Openfire is written in the Java programming language, so it'll need a Java Runtime Environment (JRE) installed on your system. A JRE creates a simple (breathable, so to say) environment for Java applications to live and function in. It's available as a free download and is very easy to install.

If you're installing under Windows, just skip to the "Installing Under Windows" section later in the article.

Linux Users Get Your Cuppa!

Sun's Java Runtime Environment is available as a free download from Sun's website (http://www.java.com/en/download/linux_manual.jsp) or it can also be installed from your distribution's software management repositories. Users of RPM-based systems can safely skip this section because the Openfire installer for their distribution already includes a JRE.

On the other hand, users of Debian-based systems such as Ubuntu will have to install the JRE before installing Openfire. Thanks to the popular apt-get package management system, there isn't much to installing the JRE.

Because Sun's JRE isn't free and is also not an open source software, most Linux distributions make the JRE package available in their non-free tree. If the following command doesn't work, check out the detailed installation instructions for your specific distribution, at https://jdk-distros.dev.java.net.

Open a console and issue the following command:

$ sudo apt-get install sun-java6-jre

Now the apt-get system will automatically fetch, install, and activate the JRE for you!

Meet The Protagonists

This article is about making sure that you have no trouble installing one file. This one file is the Openfire installer and it is available in multiple flavors. The four flavors we're concerned with aren't as exotic as Baskin Robbins' 31 flavors but that doesn't make the decision any easier.

The Openfire project releases several installers. The four flavors we're concerned with are:

  • Openfire-3.5.2-1.i386.rpm: RPM package for Fedora Linux and other RPM-based variants
  • Openfire_3.5.2_all.deb: DEB package for Debian, Ubuntu Linux and their derivates
  • Openfire_3_5_2.tar.gz: Compressed "tarball" archive that'll work on any Linux distribution
  • Openfire_3_5_2.exe: Openfire installer for Windows

We'll cover installing Openfire from all of these files, so that you may use Openfire from your favorite Linux distribution or from within Windows. Just to reiterate here, the Windows installer and the RPM Linux installer both bundle the JRE, while the other other versions do not.

The Actual Install-Bit

Alright, so you have the Java JRE setup and you've downloaded the Openfire installer. In this section, we'll install Openfire server from the various versions we discussed in the last section.

Let's first install from the source tarball.

The first step when dealing with .tar.gz source archive is to extract the files. Let's extract ours under /tmp and then move the extracted directory under /opt.

# tar zxvf openfire_3_5_2.tar.gz
# mv openfire /opt

Now we'll create a non-priviledged user and group for running Openfire.

# groupadd openfire
# useradd -d /opt/openfire -g openfire openfire

Next, we'll change ownership of the openfire/directory to the newly-created user and group.

# chown -R openfire:openfire /opt/openfire

Believe it or not, that's it! You've just installed Openfire server. Surprised? Get ready for more. It gets even simpler if you install using the precompiled RPM or DEB binaries. In the case of RPM, Openfire is installed under /opt/openfire and in case of the DEB file, Openfire resides under /etc/openfire.

On RPM-based systems such as Fedora and its derivates (as root), use:

# rpm -ivh openfire-3.5.2-1.i386.rpm

On DEB-based systems such as Debian, Ubuntu, and so on, use:

$ sudo dpkg -i openfire_3.5.2_all.deb

Voila! You're done. Now, who thought my "installing Openfire is totally newbie-proof" comment was an exaggeration?

Running Openfire on Linux/Unix

So, we now have Openfire on our favourite Linux distribution, whichever distribution this may be. Now it's time to fire it up and get going. Depending on how you installed Openfire, the procedure to start it varies a little.

If you've installed Openfire from the RPM or DEB, you'll be pleased to know that the Openfire developers have already done most of the hard work for you. These binaries contain some custom handling for the RedHat/Debian-like environments.

You can start and stop Openfire just like any other service on your system:

# /etc/init.d/openfire start
Starting Openfire:

You can also view the other options available:

# /etc/init.d/openfire
Usage /etc/init.d/Openfire {start|stop|restart|status|condrestart|reload}

On the other hand, if you've installed Openfire using the .tar.gz archive, you can start and stop Openfire using the bin/openfire script in your Openfire installation directory. First, change to the user that owns the /opt/openfire directory:

# su - openfire
# cd /opt/openfire/bin/
# ./openfire start
Starting Openfire

And now you have Openfire up and running!

If you are using a firewall, which you most probably are, make sure to forward traffic on ports 5222 and 5223 (for SSL) which clients use for connecting with the Openfire server. Also forward traffic on port 7777 for file transfer. Linux users can skip the next section on installing Openfire under Windows and move directly to the section that discusses the preliminary Openfire setup.

Openfire Administration

Openfire Administration

A practical step-by-step guide to rolling out a secure Instant Messaging service over your network

Installing and Running under Windows

Installing Openfire under Windows isn't all that different from installing under Linux. One big difference is that the Openfire installer for Windows includes a JRE. This saves you the trouble of obtaining and installing one yourself, but adds to the size of the Openfire installer.

The process is pretty simple. Download the Windows Openfire installer to any convenient location and double-click it. This launches the Openfire installer wizard which first displays a license agreement and, upon agreeing to their terms, asks standard Windows installation questions, such as the directory you want to install Openfire under, and its start menu entry.

The installer creates the directory, copies the files, and you're done! You have just successfully installed Openfire server.

Once you have installed Openfire, a shortcut to a graphical launcher will be added under the Start Menu, as for any other Windows application. By default, it's accessible via Start | Programs | Openfire | Openfire Server.

Installing and Using Openfire

When you start the launcher for the first time and click on the Start button (refer to the previous screenshot), Openfire will display the message Admin console listening at http://127.0.0.1:9090. Use the Launch Admin button to start the web interface. It will automatically open your web browser to the correct URL to finish setting up the server.

Openfire as a Windows Service

If you're not a big fan of graphical interfaces, you can also control Openfire from the Windows command-line as a standard Windows service.

You'll find an Openfire-service.exe file in the 'bin' directory of the installation. You can use this executable file to install and control the Openfire service.

From a console window, you can run the following commands:

To install the service:

Openfire-service /install

To uninstall the service:

Openfire-service /uninstall

To start the service after installation:

Openfire-service /start

To stop the service:

Openfire-service /stop

You can also use the Services tool in the Windows Control Panel to start and stop the service.

If you install the Openfire service, you should use that to start and stop Openfire instead of using the graphical launcher under your start menu.

Fuse Life into Openfire

Now we're on the final leg of our journey. This last step is common to both Windows and Linux environments. We've installed Openfire and it's up and running. Now we need to fuse life into it, which is a colorful way of saying that we need to tweak certain settings and point it to our network.

We must tweak these settings from Openfire's Web interface, which runs on port 9090. To access it, launch your browser, and in the address bar enter your IP address followed by a colon and 9090. For example, if the Openfire server is running on a machine with the IP address 192.168.2.5, then the server interface is at http://192.168.2.5:9090. If you are on the same machine on which you've installed Openfire, you can also use http://localhost:9090 or http://127.0.0.1:9090. Windows users can also launch the web browser using the Launch Admin option from the graphical launcher in their Start Menu.

Linux users can check their IP address by running the ifconfig command

The first time you launch the interface, it'll take you through a brief five-step setup process asking questions about the default language and configuring some server settings. It'll also ask you about the database connection to use. Openfire can work with several databases, including MySQL, PostgreSQL, Oracle, Microsoft SQL Server, and IBM DB2. You can also use Openfire's embedded database, which is powered by HSQLDB. For this last option choose the Embedded Database (refer to the following screenshot) option when prompted.

Installing and Using Openfire

One of the things for which you need the database is storing user information for authentication. But if you have a directory server running on your network, Openfire can obtain authentication information from either OpenLDAP or Active Directory. As we haven't setup a directory server yet, for the moment we'll entrust user management to Openfire. When we're asked to select a user and group system to use, we'll select the Default Option to store users and groups in the embedded server database.

The network settings of the Openfire server involve picking up a domain name for the server and altering the admin console secure and non-secure ports. The interface already includes default values for all of these fields based on the network settings of the machine. If you're not sure what they mean, it is a good idea to leave them to their default values.

If you plan to connect users from two Openfire servers in multiple locations with server-to-server communication, please choose a DNS-resolvable name.

Finally, we'll seal the configuration with a password and provide an email address for the default admin user. On future visits to the server interface, you'll have to use the admin username and the password you've specified to log in to the Openfire server. When it's all done, you'll see a Setup Complete! message (see the screenshot below).

Installing and Using Openfirei

You can now log in to your server using the Login to the admin console button on the page, to see the following screenshot.

Installing and Using Openfire

Using The Server

We now have the server up and running. But how do users connect to the server? Or for that matter, where are the users? Well, let me introduce you to some instant messaging clients.

Installing The Spark Client

Installing the client in both Linux and Windows is a walk in the park. Remember that, like the server, Spark is also a Java application. But you don't have to worry about installing Java for Spark, because versions for all platforms of the client include the JRE.

On your chosen Linux distribution, download the Spark tarball and extract its contents under a standard location, such as /opt.

$ cd /tmp
$ tar zxvf spark_2_5_8.tar.gz
$ mv Spark/ /opt/

Now simply navigate to the newly-extracted directory and run the client by issuing the following commands:

$ cd /opt/Spark/
$ ./Spark

Look ma, no installation!

Let's move on to Windows now. Download the Spark installer for Windows and double-click on it to launch the installer. Like any other Windows application, you need to select the destination directory, the Start Menu entry, and decide whether to create desktop and quick launch icons. When it has completed the installation, the installer gives you the option to launch the client. Use it!

Tuning In With Spark

Now that we've installed Spark, it's time to use it to connect to our server. Before you do so, please remember to keep two things handy:

  1. The name of the server: We specified this in the web interface when we setup Openfire. It's listed under Server Information in the web-based administration console.
  2. The IP address of the server: You should already know this. The key to running a successful network application is to remember the IP addresses of the machines running those services. You can find the IP address of the machine running Openfire using the ifconfig command under Linux and ipconfig under Windows.

Installing and Using Openfire

To create a new user with Spark, launch the client and click on Accounts. In the pop-up window enter a Username, and lock it with a Password (as shown in the previous screenshot). In the Server field, enter the IP address of the Openfire server and click on the Create Account button. When your account is created, Spark will display a pop-up box saying so.

By default, Openfire allows users to create accounts from IM clients. This isn't always a good policy and you can easily take away this power from the users.

Now that we've created an account, let's log on to the server. Like most things with Openfire, this is easily done. To log in, launch Spark and, in the space provided, enter your username, password, and the IP address of the Openfire server. Optionally you may also choose to let Spark remember your password by selecting the Save Password checkbox. Now click the Login button and you're logged in.

Configuring Other IM Clients

There's no dearth of multi-protocol instant messaging clients (see http://en.wikipedia.org/wiki/Comparison_of_instant_messaging_clients) nor is there any shortage of Jabber clients. Not that I am complaining. It's just that I can't hand-hold you through the process of using your favorite IM client to connect to your Openfire server. Honestly though, and by now I am sure you'll trust me when I say this, there's hardly anything to it.

Just keep these three bits of information handy and you can configure just about any client:

  1. The username and password of the user.
  2. The name of the server as specified in the administration console.
  3. The IP address of the server running Openfire.

To demonstrate, I'll configure three of my favorite multi-protocol clients under Windows and Linux—MirandaIM (Windows), Kopete (Linux:KDE), and Pidgin (Linux:GNOME).

MirandaIM

MirandaIM implements protocols as plugins, so while installing it please make sure you select the Jabber protocol for installation. When it's running, MirandaIM sits in the system tray close to the clock in the bottom right-hand side of your Windows system tray. Right-click on its icon in this system tray and navigate to Main Menu | Options. Scroll down to the Network tab and select the Jabber option. This divides the right-side pane into two sections. In the Jabber section, enter your Username, Password (see the following screenshot), and the name of the Openfire server. In the Expert section, select the Manually specify connection host checkbox and enter the IP address of the server in the host entry.

Installing and Using Openfire

If you're registering a new user at this stage, click on the Register new user button. If you've already registered, just click on OK to save the settings. Finally, double-click on the icon in the system tray and from the MirandaIM interface, navigate to the Status drop-down menu and select Online.

Although MirandaIM is great, it lacks the level of depth in implementing the Jabber protocol as compared to dedicated Jabber clients for Windows such as Exodus (http://www.pandion.be/screenshots/), and Psi (http://psi-im.org/).

Kopete

To add an account in Kopete, right-click on its icon in the taskbar and select Configure. In the pop-up configuration window, click on the New button to bring up the Add Account wizard. Select the Jabber protocol and move on to the next step.

Installing and Using Openfire

If you want to add a new account, click on the Register New Account button. Here, enter the IP address of your Openfire server in the Jabber server field, the desired user name in the form username@server name (for example msharma@example.com), and a Password for the account, before clicking on the Register button (see the previous screen capture). Kopete will let you know if the registration was successful or if an error occured.

You'll be returned to step two of the account registration process. Here, enter the Jabber ID (username@server name) and password of the user. Under the Connection tab, select the option Override default server information and in the Server field, enter the IP address of your Openfire server. Now proceed to the last step and click on Finish to exit the setup process. You should now be logged in.

Pidgin

Pidgin not only supports multiple protocols but is multi-platform as well. In addition to Linux, it also runs on Windows. The instructions for setting up Pidgin under Linux and Windows are the same.

Installing and Using Openfire

You can add accounts in Pidgin using the Accounts window, which is under Accounts | Manage. Click on the Add button at the bottom of the window to bring up the Add Account window. Under the Basic tab, select the XMPP protocol, and enter your screen name, which is your username on the Openfire server. Enter the name of your server in the Domain field, and your Password (see the previous screenshot). Now switch over to the Advanced tab and in the Connect server text box, enter the IP address of your Openfire server.

If you want to create this user on the server, make sure you select the Create this new account on the server checkbox at the bottom of the window. Click on Save. If you're creating a new user, Pidgin will now ask you to enter a name and email address for the new user. Enter these details and click on the Register button. Pidgin will indicate whether the registration was successful.

On the other hand, if the user already exists, after saving your account details, you'll be passed back to the Accounts window. Close the window and head over to Accounts | Enable accounts and select the account that you want to log into.

You can also monitor the clients currently logged on to the system from the Openfire admin interface. Head over to Sessions | Active Sessions | Client Sessions. Here you will see a list of all the users currently logged on to the system, with their IP and client information, similar to what is shown in the screenshot below.

Installing and Using Openfire

Touch down! We're at the bottom of our rabbit hole. When I first got here, unlike Dorothy, I wasn't confused; I felt elated. I hope you feel the same.

Summary

In this article, we've prepared an environment for Openfire, installed and configured the server for both Windows and Linux platforms. From installing the Java Runtime Environment to launching and tweaking the server, we've covered all the steps it takes to have to a fully-functional Openfire server.

It sounds like a lot of work, but if you get down to listing the steps, there aren't many. The whole process doesn't take more than half-an-hour. Credit must be given to the Openfire developers, not only for packaging the server for multiple Linux distributions and operating systems, but also for taking the load off the users who are setting it up.

The server we've setup in this article will work for most enterprises. Depending on their current system landscape, some large corporations might want to hook up their directory services with Openfire or use an external database to hold Openfire's data. We'll get to these scenarios in due course, and while they are important options, they are by no means necessary.

sumber : packtpub.com

Demikian yang bisa Ane share, semoga membantu...
salam,
Budiman_

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Macys Printable Coupons