Facebooktwittergoogle_plusredditpinterestlinkedin

Hi Everyone,

The purpose of this post is to teach you (the Open Source ERP Administrator) the Linux commands that are needed to ensure your open source ERP stays available, healthy, and fast.

Please note this post is a work in progress. If you need immediate assistance on one of the topics that is not complete yet, just let me know.

sudo — “SUper-user DO” allows users the ability to run programs with the security privileges  of another user. When you do not specify the user, the system assumes the root user. When running Ubuntu in AWS, you log in as the ubuntu user. This user has sudo privileges; therefore, if you want to do something that requires permissions, begin your command with sudo. An example includes “sudo apt-get update”.

apt-get — Ubuntu’s automated installer. Every time you install iDempiere, issue “sudo apt-get update” before you do anything else. Update makes sure you are pointed to the latest versions of Ubuntu’s extensive software library. Search for “apt-get” in my iDempiere installer script to see the common packages I install.

nano — Good and simple command line editor.

sed — If you want to append or replace text in a script, this is your command. My iDempiere installer script makes heavy use of sed to update configuration files for Tomcat application server, PostgreSQL database and Apache web server.

df — reports the amount of disk space available on a file system. This command is typically used as “df -h”. When iDempiere or ADempiere will not start or launch correctly, this is the first command I issue.

du — reports the size (disk usage) of directories. If you have run out of space on your server, this command will tell you the culprit. This command is typically used as “du -h”.

htop — The best version of top that I have used. http://htop.sourceforge.net/. I use this tool to help me understand what processes are using memory and CPU.

s3cmd — Tool to quickly and easily push iDempiere PostgreSQL backups from your server to Amazon’s S3 online storage. You can use s3cmd very much like rsync. See my iDempiere backup and restore scripts for examples of how I use s3cmd to maintain multiple backup copies of iDempiere in AWS S3. I also use s3cmd on a backup server to pull the most recent iDempiere backup and restore its data for testing and disaster recovery.

wget — Downloads files from somewhere on the Internet. You can use this command to download the latest ADempiere or iDempiere installer. See my iDempiere installer script for examples of wget.

hg — Mercurial source code repository commonly used with iDempiere. See my iDempiere installer script for how to clone your first repository of iDempiere.

grep -rnwi /opt/idempiere-server/log/ -e error — grep searches through files for text occurrenses. The -r option means recursive. The -n option shows the line number. The -w option means whole word. The -i option means case insensitive. You can also add –exclude=*.o or –include=*.{c,h} or –exclude-dir={dir1,dir2,*.dst} directly after the grep key world to limit results.

ifconfig — the Linux version of Windows’ ipconfig. Use this command to learn details about your network interfaces. You might use this command after you have installed ADempiere or iDempiere inside VirtualBox, and you want to know what IP was assigned to your iDempiere or ADempiere server.

Tools that I Use to Support Linux Servers

filezilla — a Windows tool that I use to transfer files between my Windows and Linux machines on AWS. Here is a video that illustrates how to set up filezilla for AWS.

sudo apt-get install -y lubuntu-desktop xrdp — this simple command installs a light-weight remote desktop for Linux. Lubuntu is the desktop. xrdp is the tool that makes the desktop directly accessible from a Windows Remote Desktop connection. This is very cool!!! If you were having trouble with a server and you need better eyes on the problem, having access to a local desktop gives you more option. If you installed iDempiere or ADempiere using this advice, you would make a copy of your server that is experiencing issues, use this command to install the desktop on your copied server, and troubleshoot the problem locally. There are three commands you need to issue to make use of your new desktop. The last one gives you ubuntu a password just in case one does not already exist.

  1. sudo sed -i ‘s=. /etc/X11/Xsession=#. /etc/X11/Xsession=’ /etc/xrdp/startwm.sh
  2. sudo sed -i ‘$ a\startlubuntu’ /etc/xrdp/startwm.sh
  3. sudo passwd ubuntu

What to do when iDempiere or PostgreSQL will not Work or Start

Here is what I recommend:

    1. Connect via ssh.
    2. Run “htop” to see if there is a process that is ‘killing’ your server.
    3. Run “df -h” to see if any file system has run out of space.
    4. If you are out of space, run “du -h” to see what directories are creating your issue.
    5. … if you are in this position and the above tools have not helped, reach out to me via chuck@chuboe.com.

I hope this helps!!!

Why consider Open Source ERP

Open source ERP gives you every opportunity to prove or disprove its ability to support your company’s ERP needs on a timeline that satisfies your organizational needs. With open source ERP, you do not face the same financial constraints nor do you face the same conflicts of interest as with commercial ERP. Instead, you invest in the appropriate skills and knowledge for your people and processes. Best of all – if open source ERP cannot solve your company’s needs, you can safely justify spending the additional $2K to $5K per person per year for life of your commercial ERP to help drive your organization’s success.

ADempiere vs iDempiere vs Openbravo vs Compiere

The ADempiere, iDempiere, Openbravo and Compiere environments are amazingly similar. iDempiere came from ADempiere. ADempiere and Openbravo came from Compiere. Compiere came from Jorg Janke. Jorg came from Oracle. As a result, iDempiere and ADempiere have much in common with Oracle’s ERP in terms of the financial feature set.

This is both good and bad. Good because iDempiere and ADempiere are quite capable to help a company grow beyond $500M USD. Bad because they tend to be more complex in that they account for multiple languages, accounting schemas, currencies, calendars, costing types, costing methods, etc…. If you are a growing organization, and you need a system that will grow with you, and you have the right internal talent/resources, iDempiere or ADempiere will be a big asset for you.

The biggest difference between these products is that ADempiere and iDempiere are pure open source. ADempiere and iDempiere make all feature available for free. Compiere and Openbravo hold back features behind a commercial or paid license.

iDempiere and ADempiere vs OpenERP

iDempiere/ADempiere (iD/AD) and OpenERP approach ERP from two very different directions. OpenERP comes out of the box with very simple options. If you are coming from QuickBooks, and you need a simple ERP system help you manage your business, OpenERP will look and feel comfortable.

iD/AD comes out of the box with every feature installed and configured to run a $200M+ USD business. If your business is growing rapidly, and you are willing to invest the time to learn an enterprise accounting system, then iD/AD will give you confidence.

Which one is best for you depends on your internal talent, growth and business complexity. Here is a post to help you learn more.

About Chuck Boecking: I am an ERP educator. I believe that open source ERP have achieved mainstream capabilities, and as a result, more companies can create greater efficiency across their organization. I started using the iDempiere code base in 2003. Back then, it was called Compiere. In 2006, I started my first multi-million dollar installation. Since then, ADempiere has helped me create great success with distribution and manufacturing companies all over the world. My vision of success is to find companies that can best use open source ERP to help them achieve a single, global instance that drives a discontinuous increase in profitability. I believe that organizations win when they own their technology.

If you have questions, comments or concerns, let me know. I definitely want your feedback.

You can contact me by phone using 512.850.6068.

My email is chuck@chuboe.com.

You can complete the form on this page.

Thank you for taking the time. I look forward to speaking with you.

Regards,
Chuck Boecking
http://www.linkedin.com/pub/chuck-boecking/10/970/17b

 

Facebooktwittergoogle_plusredditpinterestlinkedin

3 thoughts on “Linux Commands that Every Open Source ERP Admin Should Know

  • April 21, 2015 at 2:36 am
    Permalink

    Hi Chuck,

    I tried your commands (including the three commands you mentioned at the end) to install light-weight remote desktop on Ubuntu server in VirtualBox. When I tried using Windows 8 remote desktop to connect to it, I was able to see the login screen and log in successfully. But the screen is in grey, and nothing shows up.

    Thanks and best regards,

    Jason

    Reply
    • April 21, 2015 at 2:48 am
      Permalink

      Hi Jason,

      I use mate desktop now. Here are the commands:
      sudo apt-get install -y xrdp
      sudo apt-add-repository -y ppa:ubuntu-mate-dev/ppa
      sudo apt-add-repository -y ppa:ubuntu-mate-dev/trusty-mate
      sudo apt-get update
      sudo apt-get install -y ubuntu-mate-core ubuntu-mate-desktop
      sudo apt-get install -y chromium-browser gimp xarchiver
      echo mate-session> ~/.xsession
      sudo sed -i “s|port=-1|port=ask-1|” /etc/xrdp/xrdp.ini
      sudo service xrdp restart

      I hope this helps!

      Reply
  • April 22, 2015 at 5:12 am
    Permalink

    Thanks, Chuck. It works.

    Jason

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *