Howto install Joomla on your very own Ubuntu Server

Credits for the one who earns it ...

I found this article on the internet and found it so interesting that I copied it to this blog.
Thanks for the person who wrote it : Mr Percival on the following link: http://www.parcival.org/2006/07/14/howto-install-joomla-on-your-very-own-ubuntu-server/
July 14, 2006 on 12:58 pm | In Computing |

You have a spare computer, you know that Joomla is a fairly powerful CMS, that Ubuntu is a really nice Linux distribution, and you’d like to combine all these things. So here is how it’s being done:

Make sure you are firewalled

We are going to install various services that can be accessed from users all over your network. However, I assume you want to keep out unwanted guests from the internet. Before you proceed, make sure that all ports are firewalled that connect you with the internet and no critical forwarding is active.

Download the necessary software

Download the Ubuntu server edition and the latest stable Joomla CMS.

Install Ubuntu

Burn the downloaded Ubuntu image onto a CD-R with your favorite CD writing program. (in most cases, burning an image to a CD is somewhere in the advanced section) On your spare computer boot from the newly created CD and pick the ‘Install LAMP’ option. This will install the Linux Apache Mysql PHP environment we are going to need to host our Joomla testsite.

Disclaimer: In the following sections, you are going to see the sudo command a couple times. sudo is used in Linux (and in Ubuntu particularly) so that an ordinary user can get admin/root privileges to maintain the system. I created a true root account (sudo passwd) in my Ubuntu so I don’t have to mess with sudo all the time. I tried to put the sudo into the following code wherever necessary, but I probably forgot it a couple times. If you want to execute a command and your Ubuntu refuses to do it, you probably need to add a sudo in front of it. :D

Upgrade Ubuntu

Free software is good, but it also has security problems just like any software that is being written. However, the good thing about free software is that those problems are minimal if you regularly update it. Luckily, this is fairly easy with Ubuntu, all you need is two commands:


#This will check online for the latest
#software packages and security fixes
sudo aptitude update
#This will download the latest packages of
#the software you already have installed
sudo aptitude upgrade

Repeat this regularly to ensure you have always the latest software and are protected from known exploits.

Optional: Add software that makes life easier

Sitting in front of that bare Linux screen may not exactly be what you consider to be fun and you probably want to manage and edit things from your own main desktop computer. To do so we need to install two more things and you can manage everything from your Mac/Windows/Linux computer. OpenSSH allows an encrypted = secure remote connection to your Ubuntu server. Samba allows you to access shares on your Ubuntu server similarly to remote Windows shares. We proceed to install:

sudo aptitude install ssh samba

You can also solely type sudo aptitude and browse a GUI to add/remove software if you prefer that.

Now you can remotely access your Ubuntu server with your Ubuntu username and password.

On a Mac, open the Terminal application (it’s in Utilities) and enter

ssh your_username@ubuntus_IP_address

On a Linux computer, proceed the same as on the Mac - I believe you already know where your terminal is. ;)

On a Windows computer, install putty and use this tool to connect to your Ubuntu server.

Now we still need to configure Samba so we are able to easily upload files onto our Ubuntu server. For this purpose we are going to edit /etc/samba/smb.conf with the nano editor (if it hasn’t been installed yet, do it with aptitude as explained above):

sudo nano -w /etc/samba/smb.conf

Now in this file you specifically want to pay attention to the to the homes share:

[homes]
comment = Home Directories
browseable = yes
writable = yes

Before anyone can do anything with Samba, we also have to create the necessary Samba account first:

smbpasswd -a your_username

This will enable access for remote users to their home directories. Let’s assume Slartibartfast has a Windows computer where he logs in with his name and password. He also has an account on your Ubuntu server with the same username and password and obviously also a matching Samba account. If that’s the case, Slartibartfast will be able to find in his Ubuntu home directory in his Explorer’s network neighborhood. (Mac Users: just hit Apple-K to mount the Samba share)

Setting up a place for your files to reside

Okay, now we have the Apache webserver installed. You can verify if it’s up and running by pointing your webbrowser to the IP address of your Ubuntu machine, e.g. http://192.168.0.1 This should load the generic Apache welcome site in your browser.

Next we need a place where you can store your (Joomla) files so they are being displayed when you attempt to open your site with your browser. In Ubuntu this is being done by creating a public_html directory in your /home directory. So do

mkdir public_html

in a terminal in your home directory or mount the samba share and create the directory in the file browser of your prference. When you have it, extract your Joomla files into it so that the index.php file and its fellows come to reside in your shiny new public_html.

In your home directory, also recursively set the proper read/write permissions (this is to ensure that Joomla can write the settings to disk):

chmod -R ugo+rwx public_html/

If it worked, the command ls -l will display read/write/execute permissions for all users on your public_html folder.

Next we are going to check if we can access the site in our web browser by adressing it with the proper username in the URL.


#generic
http://your_ubuntu_IP/~username
#example for user Slartibartfast
http://192.168.0.1/~Slartibartfast

Now you should be greeted with the screen that lets you start with the Joomla configuration. Before we can start the Joomla configuration, there is one important step left.

Create the necessary database

Joomla stores its content in a database, so we still need to setup the MySQL database in Ubuntu. First we need to create a valid MySQL user: (see also this and this chapter of the MySQL documentation)


#first we log into the MySQL shell
mysql --user=root mysql
#now we create same user TWICE
GRANT ALL PRIVILEGES ON *.* TO 'your_username'@'localhost' IDENTIFIED BY 'your_password' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'your_username'@'%' IDENTIFIED BY 'your_password' WITH GRANT OPTION;
#we exit the MySQL shell again
exit

According to mkr it’s also okay to add only the localhost user as long as the Apache, PHP and MySQL are hosted on the same machine. I haven’t tested that, but it does make sense. :)
Furthermore, it’s also wise to set a password for the root user in MySQL:


mysql -u root
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyPW');
exit

Once we have the user we need to create the tables that belong to him/her: (see also the Ubuntu server guide on Joomla)


#we create the database for your user
mysqladmin -u your_username -p create your_database_name
#we log into our database
mysql -u db_user -p
#we set the priviledges
GRANT ALL PRIVILEGES ON your_database_name.* TO 'your_username' IDENTIFIED BY 'your_password';
#we activate the new permissions
flush privileges;
#we leave the MySQL shell again
exit

Optional: phpmyadmin

You may be one of those users who doesn’t like managing MySQL databases in a terminal very much. Well, you are in good company. If you prefer to manage your MySQL from now on by means of your webbrowser, those additional steps will take you there:

nano -w /etc/apt/sources.list

remove the comment marks for the universe repository. This will allow you to install phpmyadmin:

aptitude update
aptitude search phpmyadmin
aptitude install phpmyadmin

After that you can connect to your MySQL Server and do all admin tasks by visiting the URL

http://localhost/phpmyadmin/

This is it

Now you should be able to setup Joomla in your webbrowser and start developping your website. If you ever feel like shutting down your server or rebooting it, this is how it’s being done:

#shutdown and turn off
shutdown -h now
#reboot
shutdown -r now

If you want to upload your website later on a professionally hosted machine where it’s accessible to the entire world, you need to perform the following steps:

  • In your Joomla settings, reconfigure the database name, database username, and database password to match the values provided by the hosting company. (see also the Joomla FAQ)
  • Load your files in public_html into the corresponding location provided by your hosting company by means of an FTP program.
  • Export your database as SQL syntax. Paste and execute the syntax into the database provided by your hosting company.
  • If everything went well, your Joomla should now properly work on the hosting company’s server.

With your little Ubuntu server you could also keep hosting your Joomla yourself and make it accessible to the entire world if you open the port in your firewall that Apache listens to. However, if you decide to do this be prepared to get attacked by those sick minds who have fun ruining other people’s property, so don’t do it yourself unless you are skilled enough to handle that kind of server yourself.

Update on hosting

I am done with my Joomla project and I am thrilled about it. However, I ran into a problem I originally did not consider: version conflicts. Doing your Joomla project on your Ubuntu server is a nice thing since you have a wonderful development environment - you have the latest stable version of everything. However, my hosting company does not. When I uploaded Joomla and wanted to make it run there, I first had to wade through a series of “has been depreceated” errors. Slowly I understand why one would want to host his websites on his very own server - it saves a couple headaches.

Brother DCP-6690CW Nice-To-Knows

This hawtoe to document some things about the nice A3 printer, new from brother...

Nicely installed ... but always those firewalls.
Those who created the need for a firewall should be ....

But back to the facts ...

After installation it may be (you may be dammned sure you will have to ... ) required to configure the firewall.
On the Brother support web site there is a document on it in the FAQ.
This document is based on the **-Windows Firewall ...
But you must configure your computer to be open for local area network traffic on the ports 54925 and 137, both for the UDP protocol and duplex ... so in and out ... otherwise configure one for the inward and one for the outbound traffic.

An other problem I am currently looking in to is what makes the pc's on which you installed the Brother software register themselves with the printer. This is a problem that you encounter when you want to scan a document from the DCP to a pc on which the soft was installed.

Keep U posted.
Me

Ubuntu Server - Setting root password

By default Ubuntu Server has no password set for the root account. The account is locked until you set the password for the account.

This is done by executing the following command in a shell:

sudo passwd root

Then you have to enter the same password twice. From now on a su - will work ...

Ubuntu/Linux Server - Switch between tty's

Well for those not used to it and are always working on boring windows displays in stead of performant - back to basics and essentials - character based screens ...
There seem to be six of them.
At startup you are by default using the first.
By pressing ctrl-alt-Fx you can select any of the six tty's.
Ctrl-Alt-F2 will go to the second tty
Ctrl-Alt-F1 will go back to the first (the default in use)

Ubuntu - server - setting fixed ip adress iso dhcp

If Your Ubuntu System has set to use DHCP, you will want to change it to a static IP address here is simple tip

open the /etc/network/interfaces file.

sudo vi /etc/network/interfaces

If you are using DHCP for your primary network card which is usually eth0, you will see the following lines

auto eth0
iface eth0 inet dhcp

As you can see, it’s using DHCP right now. We are going to change dhcp to static, and then there are a number of options that should add and here is the example and you can change these settings according to your network settings.

auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

Restart the neworking service using the following command

sudo /etc/init.d/networking restart

Client language used with Oracle Forms

Context
Forms application hosted on a forms server
Client is running jinitiator.
Language is set for the default functions to the local language.
Problem
control end user language to be somethng for example english
Solution
set NLS_LANG in the client environment to for example AMERICAN_AMERICA.WE8ISO8859P1

Oracle Forms Icons

The icons displayed in Oracle Forms (web) are defined by the following parameters:
- The imagebase definition in the formsweb.cfg file
- the name of the icon set on item level in the form
- the definitions for the their use in the registry.dat file ($ORALCE_HOME/java/oracle/forms/registry/registry.dat

Imagebase


Name used in items

Registry.dat
Look for the following settings:

#
# The Application Level icon files are relative to the DOCUMENTBASE
# example: icons/
# or an absolute URL.
# example: http://www.forms.net/~luser/d2k_project/
#
default.icons.iconpath=
default.icons.iconextension=gif



From the documentation: ( http://www.di.unipi.it/~ghelli/didattica/bdl/A97329_03/web.902/a92175/chap03.htm#1030692 )
--------------

Icons

When deploying an Oracle9iAS Forms Services application, the icon files used must be in a Web-enabled format, such as JPG or GIF (GIF is the default format).

By default, the icons are found relative to the DocumentBase directory. That is, DocumentBase looks for images in the directory relative to the base directory of the application start HTML file. As the start HTML file is dynamically rendered by the Forms Servlet, the forms90 directory becomes the document base.

For example, if an application defines the icon location for a button with myapp/, then the icon is looked up in the directory forms90/myapp.

To change the default location, you can set the imageBase parameter to codebase in the formsweb.cfg configuration file. Alternatively, you can change the default.icons.iconpath value of the registry.dat file in the forms90/java/oracle/forms/regsitry directory.

Setting the imageBase parameter to codebase enables Oracle9i Forms to search the forms90/java directory for the icon files. Use this setting if your images are stored in a Java archive file. Changing the image location in the registry.dat configuration file is useful if you want to store images in a central location independent of any application and independent of the Oracle9i Forms installation.

---------------

Icons in Jars: from the same documentation:

Storing Icons in a Java Archive

If an application uses a lot of custom icon images, it is recommended you store icons in a Java archive file and set the imageBase value to codebase. The icon files can be zipped to a Java archive via the Jar command of any Java Development Kit (JDK).

For example, the command Jar -cvf myjar.jar *.gif zips all files with the extension .gif into an archive file with the name myico.jar.

In order for Oracle9i Forms to access the icon files stored in this archive, the archive needs to be stored into the forms90/java directory. Also, the name of the archive file must be part of the archive tag used in the custom application section of the formsweb.cfg file (for example, archive_jini=f90all_jinit.jar, myico.jar). Now, when the initial application starts, the icon files are downloaded to and permanently stored on the client until the archive file is changed.

Note: As Oracle9i Forms default icons (for example, icons present in the default smart icon bar) are part of the f90all.jsr file, you do not need to deploy them.

Creating a service on redhat linux / Oracle enterprise linux

Question

How to start a certain application automatically for example at startup of the machine, it is required to define it as a service.

Well ...

This can be achieved 4 rather easy steps:
  • Create a script that performs everything required to start and stop the application, including the setting of the environment;
  • Save the script in the /etc/init.d directory
  • Give the script the permissions to execute
    chmod u+x
  • install the service
    chkconfig --add
The tricks are inside the script.

Start and Stop logic in the script
When a service is started the start keyword is passed as parameter $1 to the script. When the service is stopped the stop keyword is passed.

Runlevel and Runorder arguments
In the script a lines identify at what runlevel and in which sequence the service should be started or stopped.
#chkconfig: 2345 80 05
This line is composed of the chkconfig keyword followed by three paramters:
  • the first indicates at what runlevels the service should be started
  • the second indicates what the priority is (scriptsequence) at startup
  • the third indicates the priority when stopping

Description of the service

To set the description of the service enter a line like the following in the script
#description: Oracle 8 Server


Further details

iDS on Oracle Enteriprise Linux

Symptom of the problem : launching any script causes 'segmentation fault'. Even tnsping gives this error.

Found on the internet that this has to do with a setting of grub.conf (/boot/grub/grub.conf had to add noexec=off to the line of the kernel)

This is not the solution however.

Installation forms server on Oracle Enterprise Linux

I got a problem with a missing library which caused forms server not to be able to run.
I guess this was also the source of a frm-92101 problem cause after solution the frm message did not occure anymore.

Installation was on Oracle Enterprise Linux which is based on a redhat distribution but which does not contain the library libXm.so.2. (open motif library)
Just install this library and a number of problems seem to vanish.