avatar

install Java in Ubuntu

October 20, 2013 in software

Install Java for firefox in Ubuntu

java_logoLets begin with verifying if Java is already installed in your computer.

Visit the official Java site www.java.com/en/ and click on Do I Have Java?

If you don’t have please keep reading.

Lets download Java:

Go back to the official website www.java.com/en/ and click on Free Java Download.

Now download the package fitting on your version of Linux (32 or 64 bit)

If you are not sure what kind of version you are running open a terminal and type:

uname -m

If the output is i686 it means that you are running on 32bit O.S. If you get x86_64 then you are running on a 64bit O.S.

Now that you have the correct package you need to extract the content into /usr/java. But first you need to create the folder. For that you will need root access

sudo mkdir -p /usr/java

Then move the java package into that folder

sudo mv ~/Downloads/jre-7u45-linux-i586.tar.gz /usr/java

Note. You need to change jre-7u45-linux-i586.tar.gz with the name of the package you download before

Now lets extract the package

cd /usr/java/

sudo tar xvf jre-7u45-linux-i586.tar.gz

Create a folder for firefox plugins

cd ~/.mozilla

mkdir plugins

At the end you need to create a symbolic link for the firefox plugins

for 32bit:

ln -s /usr/java/jre1.7.0_45/lib/i386/libnpjp2.so ~/.mozilla/plugins/

or for 64bit

ln -s /opt/java/jre1.7.0_45/lib/amd64/libnpjp2.so ~/.mozilla/plugins/

Note. You need to change jre1.7.0_45 with the directory name you create when you extract the package.

Restart Firefox and check again if java is working like you did on the beginning of this article.

A video tutorial is coming soon.

 

avatar

fstab in ubuntu

July 11, 2013 in Web Server

How to configure fstab in Ubuntu

what is fstab?

In fstab or FileSystemTABle,you will be able to find informations regarding all your mount points in your computer.

In other words is a list of disks and partitions and also include information regarding where they are mounted in your Operating System.

It maybe sounds a bit complicat right now but i think that you will be able to understand if you see an example.

I will post here an fstab file (you can find yours under /etc/fstab)

 

# <file system> <dir>         <type> <options>       <dump> <pass>
/dev/sda1         /                   ext4      defaults             1           1
/dev/sda2        /usr              ext4      defaults              1           1

/dev/sda4        /home         ext4       defaults             0            0
/dev/sda5         swap          swap    defaults              0           0
/dev/sdc1         /data2         ext4      defaults,auto     0           2
/dev/sdb1         /data            auto     defaults,auto     0           2

Lets check this table:

on the first column:

Here you can find informations regarding the hard drives and partitions. In this computer there are 3 Hard Drives sda1, sda2, sda3 . On the first hard drive the OS is installed and the other 2 hdds are there for some additional storage. The first hard drive is divided into partitions but the other hard drives are not in this example.

On the second column:

Here you can see where in your file system are mounted your hard drives and your partitions

On the third column:

You can specify here what is the file system of your partitions. Some of the options are: ext2, ext3, ext4, nfs, reiserfs, xfs, jfs, smbfs, iso9660, vfat, ntfs, swap, and auto. the auto   is my favourite because in that mode you let the O.S. decide what kind of file system is your partition. This is very useful for CD and DVD ROMS.

On the forth Column:

Here you can specify how the system will mount your drives and partitions. You can add more than 1 option with ","

auto -- file system will mount automatically at boot.

noauto -- the filesystem is mounted only when you want to mount it (you can the mount command)

exec -- allow the execution binaries that are on that partition (default).

noexec -- do not allow binaries to be executed on the filesystem.

ro -- mount the filesystem read only.

rw -- mount the filesystem read-write.

user -- permit any user to mount the filesystem

nouser -- only allow root to mount the filesystem (default).

suid -- allow the operation of suid, and sgid bits.

nosuid -- block the operation of suid, and sgid bits.

noatime -- do not update inode access times on the filesystem. Can help performance.

nodiratime -- do not update directory inode access times on the filesystem. Can help performance.

relatime -- update inode access times relative to modify or change time. Access time is only updated if the previous access time was earlier than the current modify or change time (similar to noatime, but doesn’t break mutt or other applications that need to know if a file has been read since the last time it was modified). Can help performance.

sync -- I/O should be done synchronously.

async -- I/O should be done asynchronously.

defaults -- this is the most used and it includes the default mount settings (equivalent to rw,suid,dev,exec,auto,nouser,async). I also like this one 😉

Fifth Column

This is where you tell to dump utility if it needs to be backuped or not. if its 0 the dump will ignore this one. if it is 1 the dump will include this drive in the backup process.

Sixth Column.

this is the priority on check disk and can be 0,1,2. the root file system must have 1 and that means high priority on check. the other can be 0 no check or 2 check after file system.

avatar

how to install Webmin on ubuntu

September 20, 2012 in Services

Install webmin on Ubuntu

what is Webmin?

Webmin is a great tool for unix system administrators. With Webmin you can easily config and manage a server from a web browser. You will be able to manage Users, Apache, mySQL, DNS, File system, Backup and many more

What you need in order to install Webmin

Since this is a web based tool you will need a web server like Apache. If you already have Apache installed please skip this step:

Ok lets install Apache.

You can install Apache2 from the Terminal by using:

sudo apt-get update

sudo apt-get install apache2

when the installation finish Apache is up and running and you can test that by point your web browser to http://localhost/

The default site will came up with a message that says “it works”.This html file is located under your local file system in folder /var/www/

Lets go on the next step "How to install webmin on Ubuntu"

avatar

Bash script for beginners

June 25, 2012 in Bash script

Bash scripting for beginners Part 1

What is Bash script?

A Bash script is mainly a set of commands that can be executed in a Terminal. You can create a Bash script file (filename.sh) and execute the set of commands inside that file as many times as you want. So if you want to execute a set of commands periodically then you should think "Bash script".

Bash script is more than that. You can actually use that as a programming language in order to create small programs that can be executed in a terminal.

And as they say the most easy way to learn a language is to create a program with that language and try to improve it. (I don’t really know if people say that, but that is the way of this tutorial.

So in this tutorial i will explain how to create bash scripts while you are creating a backup program.

Lets start Bash scripting

echo Comments

To do so, let’s create some folders that we will need in order to store our scripts and backups.

Open a terminal and type:

cd ~/Desktop

mkdir bash

cd bash

mkdir code

mkdir backup

Now go into "code" folder

cd code

Just before we start the backup program let’s create first a bash script for "Hello  World", so you can understand how to create and then execute a script.

In order to create a Bash script you will just need a text editor such as "gedit". You can use your favorite text editor but I will use gedit since this editor comes with Ubuntu.

Open a terminal and type:

gedit ~/Desktop/bash/code/helloworld.sh

enter the following text to gedit,

#!/bin/bash  
# Bash scripting with allaboutlinux.eu 
echo Hello World

press "save" and close gedit

Almost done! Now you have to make that file executable. Open a terminal and type:

chmod +x helloworld.sh

And now you are ready to execute your first Bash script. Open a terminal and type:

cd ~/Desktop/bash/code

./helloworld.sh

Now you should see "Hello World".

Just a quick explanation of the script:

You can use "#" in order to "comment" a line. So the line "# Bash scripting with allaboutlinux.eu" is just a comment and has nothing to do with the script. there is an exception to that rule that applies to the first line that starts with "#!" this line defines which interpreter to use. in this case we use bash.

You can use "echo" in order to print something in the terminal.

If you have understood everything in this part you can go to the next part where we will start making our backup program.


avatar

host a forum

March 26, 2012 in forum

How to create and host your own forum on Ubuntu.

Requirements

A web server With PHP Support. (In this tutorial I use Apache2)

SQL database. (In this tutorial i use Mysql and PhpMyadmin to configure Mysql)

If you already have Apache Php Mysql and Phpmyadmin installed then you are ready to go if not please follow these tutorials first (Lamp on ubuntu and Phpmyadmin)

Installation:

First we will need an empty database where our forum will store contents.

Read the rest of this entry →

avatar

How to run PHP on Ubuntu

March 21, 2012 in Php

How to run PHP on Ubuntu.

First of all you will need a web-server to host our PHP pages.

In this tutorial I ll use Apache2. You can install Apache2 from the Terminal by using:

sudo apt-get update
sudo apt-get install apache2

when the installation is finished, Apache is up and running and you can test that by pointing your web browser at http://localhost/

The default page will come up with a message "it works" and some more info.This html file is located under your local file system in folder /var/www/html/

Now you have to install PHP.

To install PHP and PHP support for Apache, just write the following in console:

Read the rest of this entry →

avatar

How to install WordPress 3.3 on ubuntu 11.10

March 20, 2012 in CMS

How to install WordPress 3.3.1 on Ubuntu

This is a full article on how to install WordPress on Ubuntu, that means you can use this guide even if you have a clean installation of Ubuntu, and I will try to keep it as simple as I can.

What you will need in order to install WordPress.

First of all you will need a LAMP Server(more information can be found here).

Lets set up our LAMP Server.

1. You have to install a Linux system(you can choose whatever you want. A guide on how to install Ubuntu can be found here).It doesn’t really matter if you choose a desktop or server edition but if you are planning to publish your WordPress website I strongly recommend to use a server edition of Ubuntu for example.

2. You will need Apache (more information can be found here)

3. You will need MySQL (more information can be found here)

4. You will need PhP (more information can be found here)

5. And last but not least you will need to download WordPress from official site.

Let’s go to the next Part and Install Lamp

avatar

Joomla 2.5.3 on Ubuntu

March 17, 2012 in CMS

How to install Joomla 2.5.3 on Ubuntu 11.10 Part 1

This is a full article on how to install Joomla on Ubuntu, that means that you can use this guide even if you have a clean installation of Ubuntu, and i will try to keep it as simply as i can.

What you will need in order to install Joomla

First of all you will need a LAMP Server(more information can be found here).

Lets set up our LAMP Server.

1. You have to install a Linux system(you can choose what ever you want. A guide on how to install Ubuntu can be found here).It doesn’t really matter if you choose a desktop or server edition but if you planning to publish your Joomla website i strongly recommend to use a server edition of Ubuntu for example.

2. You will need Apache (more information can be found here)

3. You will need MySQL (more information can be found here)

4. You will need PhP (more information can be found here)

5. And last but not least you will need to download Joomla from official site.

Lets start by installing Lamp:

avatar

LAMP

March 16, 2012 in Services

how to install LAMP on Ubuntu

What is LAMP?

LAMP is stand for Linux, Apache, Mysql, and PhP. Lamp is need it by the most popular cms like Drupal, Joomla, WordPress, etc. In order to install successfully one of those cms you have to install LAMP first.

How to install Lamp.

There is no specific way to install lamp. You can install one component at a time or you can use tasksel to install all of them at once. In order to install every component manually you have to follow the instructions on how to install every single one by clicking the following links: Apache, MySQL, PhP.

But here i will saw you an easier way to that, using tasksel!

Read the rest of this entry →

avatar

How to enable root password on Ubuntu

March 15, 2012 in Tips

How to enable root password on Ubuntu

During the installation of Ubuntu you can create a user and you can set a password for that user. Ubuntu also create a root user who can have full access to Ubuntu system. For example if you try to install a new software on Ubuntu from Graphic User Interface or from shell the Ubuntu will ask you for your password to do that. If you login with "root" user the Ubuntu will never ask you for passwords every time you do a change to the system.

But you cant login with "root" user until you set up a password for this user. To do so open a terminal and type

sudo passwd root

then type a password for "root" user. when done you can switch to "root" user by typing

su root

and by giving the password for "root" user

Now you have full access to your system.