Thursday, June 17, 2010

How to Reset password Root on Sme server

Restore Password Root / Admin di SME Server Linux

Pada tulisan kali ini akan dibahas tentang cara me-reset password root/admin, dimana mungkin kita lupa password root kita, atau ada yang mengganti password root.
Berikut Step-step yang dapat dilakukan untuk me-reset passwor root / admin di SME Server.
- Reboot Server
- Ketika Tampilan Grafik Boot Loader Muncul Tekan "CRTL + X"
- Tekan Tab untuk mengetahui available kernel
- tuliskan "nama kernel" single
- Tekan Enter - Maka sistem akan boot kedalam mode single user dan login tanpa password root tetapi memiliki kekuatan sebagai SU
Setelah masuk ke system silahkan mengubah password root atau admin
Ketik : passwd root untuk mengubah passwor root
dan passwd admin untuk mengubah password admin

How to Enable webmail on SME server

If you wish, you can configure your SME Server so that users can access their email via a web interface. Once webmail is enabled, users will be able to access their email from the local network or anywhere in the world via the Internet using any web browser which supports Javascript and tables, which almost all browsers do.

For added security, SME Server supports the use of https Secure Socket Layer (SSL) connections. When users connect using SSL, all communication between their browser and the server is securely encrypted to prevent eavesdropping.


Note:

The specific program SME Server uses for webmail is the Internet Messaging Program (IMP). If you would like more information about IMP, you can visit the project web site at: http://www.horde.org/imp/

If you intend to enable webmail, you should consider whether your users will use webmail exclusively or will use webmail part of the time (for example, when travelling) and a regular email client the rest of the time. If they plan to use webmail and another client, it may be easier if the other client uses the IMAP protocol. If the client uses POP3, email messages will be pulled down from the server into the local email client and most email clients default to deleting the message from the server at that time. Messages will therefore not be visible when the user later logs into webmail. If IMAP is enabled on the local client, messages remain on the server at all times and will be visible both from the local client and via webmail. For more information on IMAP and POP3, see the section in chapter 2.

A second issue is that using webmail will consume resources and bandwidth from your server. We recommend that you evaluate the suitability of your server hardware if you plan to use webmail, but webmail can always be disabled later if you find that your system is not performing well.

Enabling Webmail On Your System

Because the use of webmail can be resource-intensive, the server ships with webmail disabled by default. To enable the use of webmail, the server Admin must perform the following steps:

1. Connect to the server-manager and login as the admin user.

2. In the Configuration group, click on email and then the 'change email access settings' button. You are given two webmail options:

  • Disabled
  • Enabled (Allow HTTPS secure) - Allows users to connect only through a secure SSL connection.

After you enable webmail, your users should be able to connect and use webmail.

Starting Webmail

To use webmail, a user first needs a valid user account and password on the server. Next, the user opens up a web browser and points it to the server using an address resembling the following URL: https://www.tofu-dog.com/webmail/


Note:

In the example above, www.tofu-dog.com points to the server located at The Pagan Vegan and https indicates secure communication using SSL encryption which, as from SME Server 7.0 , is the only option.

Note that if the server is behind another firewall, that firewall will need to allow traffic through on TCP port 443 in order for SSL connections to take place.

Logging In

Once connected, a user will be given a login screen similar to that shown in the screen below. From this screen you can read the help menu (by clicking on the link for New User Introduction at the top of the page) or login with your normal network user name and password. Note that IMP supports a wide variety of languages in addition to English.

Image:Webmail_login.png

Viewing The Inbox

Once logged in, you will see your Inbox, as shown in screen below.

Image:Webmail_inbox1.png

Let's take a quick tour of the Inbox window.

In the top left corner is a pop-up menu that shows the list of your available mail folders. In your first webmail session, the only folder choice will be INBOX . As soon as you send an email message, a folder called sent-mail will be created and available in the menu. You can also create additional mail folders at any time.

In the top center portion of the window is a status message indicating the folder you are in and the number of new or recent messages in that folder.

On the left side is a navigation menu allowing you to compose new messages, modify contacts, create folders, modify preferences or logout of the webmail system.

In the main part of the window are the actual messages. Each message has an icon denoting its status at the far left, the date/time of the message, who it is from, the subject and the size. Messages may be sorted by clicking on the column heading. You can read a message simply by clicking on the subject or sender of a specific message. The envelope/arrow icon that you can see in the status area of the second message in the image above indicates that this message is new.

We will describe the various functions in greater detail later in this chapter, but this should be enough to get you started.

Logging Out of Webmail

Before we discuss the features of webmail, it is important to emphasize that you must always click on the Logout menu item when you are finished using webmail. If you do not do so, anyone else who uses your web browser on your computer (until you exit your web browser or logout of/shutdown your computer) will be able to read your messages and send messages from your account. After a successful logout, you will see the webmail login screen with a message at the top of the screen indicating that your logout was successful.

Composing Messages

To compose a new message, click on Compose in the menu on the left. You should see a screen similar to that below.

Image:Webmail_compose1.png


At the top of the compose screen, your available options include the ability to spell-check the message in your language of choice, or to cancel, save a draft or send the message.

If you choose to save a draft, your message will be saved in a folder called drafts . You may later retrieve this message by using the popup menu in the upper left corner to switch to the "drafts" folder.

Below that are the familiar email fields for you to fill out. At the bottom of the page, the menu of commands is repeated for your convenience.

Reading Messages

To read a message, click on the From or Subject fields of the message. You should see a screen similar to the one below.

Image:Webmail_read1.png

You now have several options. You can:

  • Delete the message.
  • Reply only to the sender.
  • Reply to all of the original recipients.
  • Forward the message to someone else.
  • Bounce the message to another person (similar to "Forward" but without providing you the opportunity to comment). *5
  • Save As - save the message to a text file.

By clicking on the Reply button, you will be able to enter a reply window such as that shown below. Notice that the original message text is "quoted" with a ">" character in front of it. At this point, you can type more text or edit existing text, add or delete recipients, spell-check the message and do anything else that you could do in a normal compose window. Again, you can choose to cancel the message, save a draft or send the message.

Image:Webmail_reply1.png


#5 In fact, the bounce command will send the message on to a third-party without indicating that you were the one forwarding it. So if "ffrog" sent a message to the "sales" group (of which you are a member) and you then bounced it to another user, that user would see the message coming from "ffrog" and going to "sales", but your name would not appear anywhere in the visible headers. Compare that to a "forward" command where the recipient knows you are the person forwarding the message.

Deleting Messages

You can delete a message while reading it, as mentioned previously, or you can delete a message - or a group of messages - from the Inbox view.

Image:Webmail_inbox2.png


To do so, check the box next to each message you wish to delete. After that, press the Delete text button directly above or below the list of messages on the left side. You will now see a trash icon next to the checkbox and a line through the messages.

As an example, in the image above, our user (ffrog) wants to delete the second and third messages. He can click on the checkbox next to each message and then click Delete . This will produce a screen such as that below.

Image:Webmail_delete1.png

If you do not want to see the deleted messages, you have two choices. If you click on the Hide Deleted text button on the right side, the messages will be hidden from view, but will still be there and could be recovered with the Undelete button. If you choose Expunge, the messages will be permanently deleted.

Using Contacts

The server webmail system provides two means of keeping track of e-mail addresses. First, you can have your own Contacts list. Second, you can easily access the company directory that lists all users and groups that have been created.

You can view and edit your contacts through two menu choices. From the left menu you can choose Contacts . This allows you to view or edit contacts, but does not allow you to add a contact to an e-mail list. To add a contact, you must open the Contacts window from the "Contacts" link in a Compose window, as highlighted in the image below.

When you create your own address book, you must then go to options, address book, column options, and choose which additional columns you want displayed.

Image:Webmail_contacts_compose.png


In either case, you will find yourself viewing a window that looks like the one below.

Image:Webmail_contacts1.png


If this is the first time you have entered the Contacts window, you will not see anything next to the "Select" button. Normally, though, you will see a pop-up menu with all of your contacts in it (as seen in the window above where "bob " appears). To enter a new contact, simply type the e-mail address, a "nickname" that will appear in the Contacts list, and the full name of the person. You must fill out all three fields. Then click Add Contact .

To update a contact's information, select the user's name/address from the contacts pop-up menu. The information should automatically appear in the fields. (If it does not, after selecting the entry from the pop-up menu, press the Select button next to the menu.) Enter the new information and click Update Contact . In a similar fashion you can delete a contact by selecting the contact from the pop-up menu and pressing the Delete Contact button.

As mentioned earlier, if you entered the Contacts window from the link in the Compose window, the three buttons - Insert into To:, Insert into Cc:, and Insert into Bcc: - will allow you to transfer the contact information directly into the Compose window.

To search the company directory, use the lower section of the Contacts window labeled LDAP Search *6. You have the ability to search either the entire name field or just the surname. Enter the text you are searching for in the entry box and choose how you want to compare the text against the directory. The default is to search for entries where the name is the text you enter, which requires an exact match. You may find it more useful to search for entries where the name contains the search text. A search with "contains" will find names where the search text appears somewhere in the name.

After entering your text and choosing your search options, press the Start Search button to query the directory. As shown in the screen below, your results will be returned in a new LDAP Results section of the same Contacts window. As with the section at the top of the screen, you choose your entry from the pop-up menu (or press the Select button if your entry is displayed already) and the information should appear in the entry box below. Assuming you entered Contacts from the link in the Compose window, you can now insert this information into the To, Cc or Bcc lines of the Compose window.

Note that you also have the option of inserting this entry directly into your Contacts list. If you have a large company directory, you may find this a useful way of ensuring that frequently used contacts are readily available.


Note:

Unlike your local Contacts list, you cannot directly update entries that are in the company directory. Instead, those entries must be updated by the system administrator using the Directory panel in the server-manager. See the Directory section of Chapter 13 for more information.

Image:Webmail_contacts-ldap.png


#6 The search is called an LDAP search because the directory is queried using the Lightweight Directory Access Protocol (LDAP), one of the most common protocols used on the Internet for searching directories.

Changing Webmail Preferences

By clicking on the Preferences link on the navigation menu, you can modify preferences for your webmail session, as shown in the screen below.

Image:Webmail_prefs.png

You have four preferences you can configure:

  • Signature - You may include any text that you wish to appear by default at the bottom of your email messages. Once configured, it will always appear at the bottom of a Compose or Reply window when you enter that window. You can, however, delete it for a specific message simply by editing the text in the Compose or Reply text window.
  • Full Name - If you leave this blank, all of your messages will appear to recipients as having come from your email address. If you enter text here, recipients will usually see that text first instead of your e-mail address.
  • From Address - By default your From address is your regular system email. You do not need to set it here . Enter an address here only if you want people to see a different reply address than your normal system-generated e-mail address.
  • Preferred Language - This allows you to specify the language used in the menus.

When you are done modifying your preferences, press the Save Preferences button at the bottom of the page.

Helpful Webmail Plugins

A number of helpful plugins are available for use with Webmail. Some plugins such as Turba (address book) and Ingo (email filter rules manager) are already included in the base package. A partial list of other helpful plugins with links to convenient installation instructions follows below.

  • Nag is a task list application. It stores todo items, things due later this week, etc. It is very similar in functionality to the Palm ToDo application. Nag install HOW TO
  • Mnemo is a notes and memos application. It lets users keep free-text notes and other bits of information which doesn't fit as a contact, a todo item, an event, etc. It is very similar in functionality to the Palm Memo application. Mnemo install HOW TO
  • Kronolith is a web-based calendar system written in PHP and utilizing the built-in Horde Application Framework. Kronolith install HOW TO
  • Trean is a bookmarks manager, allowing you to store your bookmarks in one place and access them from any browser.
  • Gollem is a web-based file manager integrated with the rest of Horde.

Webmail Whitelists

Webmails whitelist has nothing to do with spamassassin or filtering into the junkmail folder. Messages are already sorted into the junkmail folder by spamassassin before webmail has any chance to look at them.

How to install Openbravo on SME server

Introduction

Openbravo ERP has been specifically designed to help businesses improve their performance. Its functional coverage includes all areas of an integrated management system. Additionally, this same application seamlessly integrates the rest of the areas, starting with a management scope directly helping clients with its CRM (Customer Relationship Management), BI (Business Intelligence), and POS (Point of Sale).
Installation

Before you can begin with Openbravo setup, you must satisfy all pre-requisites. They are:

* Tomcat
* Postgres
* Apache Ant

To install Ant, download the .tar.gz version from http://ant.apache.org/bindownload.cgi to a temp folder. We use for our example 1.7.1

Unpack

tar xzvf apache-ant-1.7.1-bin.tar.gz

Copy to the destination folder

cp -rf apache-ant-1.7.1 /usr/local/ant

There is not need to add now ant to the path for Openbravo installation. If you want to do, read the Ant documentation.

Download the last Openbravo release (currently 2.40). The easy way to install is to download the binary package. Download from SF:

http://switch.dl.sourceforge.net/sourceforge/openbravo/OpenbravoERP_2.40-linux-installer.bin

Make executable

chmod 777 OpenbravoERP_2.40-linux-installer.bin

Start installation

./OpenbravoERP_2.40-linux-installer.bin

Use the default choices. When you prompted for Ant path, type

/usr/local/ant/bin/ant

When prompted for Tomcat path, type

/opt/tomcat

When prompted, choose a password for tad user.

Remember, leave all as default. Only modify the Date Format and Time Format.

Now wait at least 20 minutes to finish the installation!
Test new installation

Access at http://server:8080/openbravo

User: Openbravo

Pass: openbravo

##################################################
Note:
when i install open bravo have a error is:
postgres
then i set trust not same server in

How to install postgres on SME server

The command below will install postgres and update postgres-libs. For dependency resolution it will also install tcl and mx from the base repository.

If you see other packages, such as perl or php, abort the installation. This might occur because you have installed perl-CGI-Session or perl-DBD-Pg. These two packages might be on your system because you have installed otrs or another aplication. You can check if they are still needed:

rpm -q --whatrequires perl-CGI-Session perl-DBD-Pg

If that answers no packages need ... you can safely remove these packages

yum remove perl-CGI-Session perl-DBD-Pg


Enable centosplus repository and install postgres (at the time of writing this is version 8.1.9)

yum --enablerepo=centosplus install postgresql postgresql-contrib postgresql-devel postgresql-docs postgresql-pl postgresql-python postgresql-test

After install, ignore the post-upgrade and restart message

Start postgres

/etc/init.d/postgresql start

Then make the necessary custom templates:

mkdir -p /etc/e-smith/templates/var/lib/pgsql/data
mkdir -p /etc/e-smith/templates-custom/var/lib/pgsql/data
cp /var/lib/pgsql/data/postgresql.conf /etc/e-smith/templates/var/lib/pgsql/data
cp /var/lib/pgsql/data/pg_hba.conf /etc/e-smith/templates/var/lib/pgsql/data
cp /var/lib/pgsql/data/postgresql.conf /etc/e-smith/templates-custom/var/lib/pgsql/data
cp /var/lib/pgsql/data/pg_hba.conf /etc/e-smith/templates-custom/var/lib/pgsql/data

Now login as postgres user:

su postgres

Then access to superuser database, set a password and exit.

psql -U postgres -d template1
alter user postgres with encrypted password 'add_your_pass_here';
\q
exit

Edit the file /etc/e-smith/templates-custom/var/lib/pgsql/data/postgresql.conf remove # and change the following settings:

superuser_reserved_connections=2
ssl = on
password_encryption = on
listen_addresses = 'localhost'

Then copy your server SSL keys:

cd /var/lib/pgsql/data
cp /etc/httpd/conf/ssl.crt/server.crt .
cp /etc/httpd/conf/ssl.key/server.key .
chown postgres:postgres server.*

Edit the file /etc/e-smith/templates-custom/var/lib/pgsql/data/pg_hba.conf and change the following settings:

local all all md5
host all all 127.0.0.1/32 md5
host all all ::1/128 md5

and add at the end:

host all all 0.0.0.0 255.255.255.255 reject

Be sure to add an extra white line at the end.

Expand template:

expand-template /var/lib/pgsql/data/pg_hba.conf
expand-template /var/lib/pgsql/data/postgresql.conf

Restart with new settings:

/etc/init.d/postgresql stop
/etc/init.d/postgresql start

and add the symlinks to start automatically:

ln -s /etc/init.d/postgresql /etc/rc.d/rc7.d/S56postgresql
ln -s /etc/init.d/postgresql /etc/rc.d/rc6.d/K03postgresql

To ensure everything is all right:

signal-event post-upgrade
signal-event reboot


To test if you have set postgres password correctly:

su postgres
psql -U postgres -d template1

and enter the password you have set above. If all is correct, you should enter the postgres console. Then exit:

\q

and exit from postgres user:

exit

How to install Tomcat on SME server

Tomcat Installation and configuration

Extracted from MasterSleepy http://www.vanhees.cc/index.php?module=ContentExpress&func=display&ceid=43

* Download java jdk and upload it to your sme server

Go to java.sun.com and download jdk For my example I use jdk-6-linux-i586-rpm.bin ATTENTION: adapt all document jdk filename depending witch file you download

* Install Java jdk

chmod a+x jdk-6-linux-i586-rpm.bin
./jdk-6-linux-i586-rpm.bin
ln -s /usr/java/jdk1.6.0 /usr/java/jdk

After executing bin file, you can remove both file jdk-6-linux-i586-rpm.bin and jdk-6-linux-i586.rpm

* Download tomcat last version

Go to Tomcat download website. Download Core module apache-tomcat-6.0.14.tar.gz and Administration Web application apache-tomcat-5.5.23-admin.tar.gz if you want another tomcat modules go here.

wget http://apache.root.lu/tomcat/tomcat-6/v6.0.14/bin/apache-tomcat-6.0.14.tar.gz

* Unpack archive

Unzip and move it

tar -xvzf apache-tomcat-6.0.14.tar.gz
mv apache-tomcat-6.0.14 /opt/
cd /opt
mv apache-tomcat-6.0.14 tomcat

* Create user and group

groupadd tomcat
useradd -g tomcat -d /opt/tomcat tomcat
chown -R tomcat:tomcat /opt/tomcat/
chmod 770 /opt/tomcat/

* Create statup script

Edit /etc/rc.d/init.d/tomcat with your favorite text editor, it should contain the following :

#! /bin/bash
#
# tomcat Start the tomcat server.
#

NAME="Jakarta Tomcat 6"
TOMCAT_HOME=/opt/tomcat
CATALINA_HOME=/opt/tomcat
JAVA_HOME=/usr/java/jdk
CATALINA_OPTS="-Dfile.encoding=iso8859-1"
TOMCAT_USER=tomcat
LC_ALL=en_US
export TOMCAT_HOME CATALINA_HOME JAVA_HOME CATALINA_OPTS TOMCAT_USER LC_ALL
cd $TOMCAT_HOME/logs
case "$1" in
start)
echo -ne "Starting $NAME.\n"
/bin/su $TOMCAT_USER $TOMCAT_HOME/bin/startup.sh
;;

stop)
echo -ne "Stopping $NAME.\n"
/bin/su $TOMCAT_USER $TOMCAT_HOME/bin/shutdown.sh
;;

*)
echo "Usage: /etc/init.d/tomcat {start|stop}"
exit 1
;;
esac

exit 0

* Make startup script runable and make tomcat start automatically at boot

chmod 755 /etc/rc.d/init.d/tomcat
ln -s /etc/rc.d/init.d/tomcat /etc/rc.d/rc7.d/S98tomcat
ln -s /etc/rc.d/init.d/tomcat /etc/rc.d/rc6.d/K02tomcat
ln -s /etc/rc.d/init.d/tomcat /etc/rc.d/rc2.d/K02tomcat
ln -s /etc/rc.d/init.d/tomcat /etc/rc.d/rc1.d/K02tomcat
ln -s /etc/rc.d/init.d/tomcat /etc/rc.d/rc0.d/K02tomcat

End MasterSleepy HOWTO

Add MySQL Database Connector

1. Download the MySQL Java Database Connector http://dev.mysql.com/downloads/connector/j/
2. Copy the JAR file into /opt/tomcat/lib

If you want to access Tomcat outside your local network, you must open port 8080 (or whatever you configured).

config set tomcat service access public status enabled TCPPort 8080
signal-event remoteaccess-update

Wednesday, June 16, 2010

How to check version Sme on SME server

cat /etc/*release*

How to update Centos on SME server

Rubah nama file konfigurasi repository yang lama yang terdapat di /etc/yum.repos.d/CentOS-Base.repo.

[root@server1 support]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.old

Buat file konfigurasi repo yang baru dengan nama CentOS-Base.repo ( saya menggunakan editor nano karena lebih mudah :) ). dan isikan file terbut dengan konten dibawah ini.

[root@server1 support]# nano /etc/yum.repos.d/CentOS-Base.repo

——————————— Config start ———————————————

[Add Ons]
name=CentOS
baseurl=ftp://kambing.ui.ac.id/centos/5.4/addons/i386/
enabled=1
gpgcheck=1
gpgkey=ftp://kambing.ui.ac.id/centos/RPM-GPG-KEY-CentOS-5

[CentOS Plus]
name=CentOS
baseurl=ftp://kambing.ui.ac.id/centos/5.4/centosplus/i386/
enabled=1
gpgcheck=1
gpgkey=ftp://kambing.ui.ac.id/centos/RPM-GPG-KEY-CentOS-5

[Extras]
name=CentOS
baseurl=ftp://kambing.ui.ac.id/centos/5.4/extras/i386/
enabled=1
gpgcheck=1
gpgkey=ftp://kambing.ui.ac.id/centos/RPM-GPG-KEY-CentOS-5

[Fasttrack]
name=CentOS
baseurl=ftp://kambing.ui.ac.id/centos/5.4/fasttrack/i386/
enabled=1
gpgcheck=1
gpgkey=ftp://kambing.ui.ac.id/centos/RPM-GPG-KEY-CentOS-5

[OS]
name=CentOS
baseurl=ftp://kambing.ui.ac.id/centos/5.4/os/i386/
enabled=1
gpgcheck=1
gpgkey=ftp://kambing.ui.ac.id/centos/RPM-GPG-KEY-CentOS-5

[Update]
name=CentOS
baseurl=ftp://kambing.ui.ac.id/centos/5.4/updates/i386/
enabled=1
gpgcheck=1
gpgkey=ftp://kambing.ui.ac.id/centos/RPM-GPG-KEY-CentOS-5

——————————— Config end ———————————————
Kalau sudah selesai, simpan konfigurasi dengan menekan tombol Ctrl + O lalu tekan tombol ENTER dan dilanjutkan dengan menekan tombol Ctrl + X untuk keluar dari editor nano.

Langkah selanjutnya adalah mengupdate repository dengan perintah :

[root@server1 support]# yum update

Tunggu sampai proses update repository dari server kambinng.ui.ac.id selesai.