Archive

Posts Tagged ‘install’

Ubuntu:Creating an unattended install

September 29, 2012 2 comments

Creating an unattended install consists of the following steps:

  • Create a configuration file, ks.cfg, using the GUI Kickstart tool.
  • Extract the files from the Ubuntu install ISO.
  • Add the ks.cfg file to the install disk and alter the boot menu to add automatic install as an install option.
  • Reconstitute the ISO file.

Kickstart tool is in the Ubuntu repositories, so search for it using the package manager or install it via the command line, as follows:

# apt-get install system-config-kickstart

Once installed, the Kickstart GUI tool should place itself in the System Tools menu of the application launcher. Launching it, you will be presented with a configuration page. Modify according to your requirment.

Now save the Kickstart configuration file. By default it is called ks.cfg, but you can give it any name. It’s a good idea to check over the configuration file manually by launching it in a text editor. We now need to copy the files from the Ubuntu install CD-ROM into a directory on the hard disk. Download the alternative install ISO (rather than the live CD) from the Ubuntu website and place it in your home directory. Mount this disk from the command line:

In Terminal:

 # mkdir iso_mount
 # mount -o loop ubuntu-10.04.4-alternate-i386.iso /media/iso_mount

This makes the files inside the ISO accessible via the directory iso_mount. Note that you can browse this directory using a file manager, but we’d recommend doing the actual file copying from the command line because hidden files and directories must be preserved. Copy the files to a directory inside your home directory and make them writable with:

In Terminal:

 # mkdir ubuntu_files
 # rsync -a /media/iso_mount/ ubuntu_files/
 # chmod -R 777 ubuntu_files

Place the Kickstart file that you have created into the ubuntu_files directory. Now we have to tell the install system where to find the Kickstart configuration file when it boots. Load text.cfg, located in the isolinux directory, into a text editor. This file contains the menu options that you first see when you boot an Ubuntu installation disk. Locate the menu options for a standard install and then cut and paste them so that you have a second copy. We’re going to alter it so that it looks like this: Add the following script at the top, below “default live” line.

label autoinstall 
  menu label ^Automatically Install Ubuntu 
  kernel /install/vmlinuz 
  append  file=/cdrom/preseed/ubuntu.seed initrd=/install/initrd.gz
  ks=cdrom:/ks.cfg -- 

We’ve altered the label and title of this new menu entry, added a reference to the location of the Kickstart file and removed the ‘quiet’ flag so that we get lots of progress information. This constitutes the entirety of the changes we have to make, and we can now re-create the ISO file.

In Terminal:

 # cd ubuntu_files
 # mkisofs -D -r -V “$IMAGE NAME” -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -input-charset iso8859-1 -o ~/autoinstall.iso .
Note: “.” Dot at the end of the above command is must which intimate the end of command.
Now write this bootable iso file to CD and start unattended ubuntu installation.
                                          Thank You


SVN installation on ubuntu

July 12, 2012 Leave a comment

*To install svn in ubuntu

Command: apt-get install subversion libapache2-svn apache2

*create a sunversion repository

svnadmin create /path/to/repos/project

Command: svnadmin create /var/svn/test

*To access the Subversion repository via WebDAV protocol, you must configure your Apache 2 web server

Command: gedit /etc/apache2/sites-available/default

Add the following snippet between the <VirtualHost> and </VirtualHost> elements

<Location /svn>

DAV svn

SVNPath /home/svn/test (Set this to the path to your repository)

AuthType Basic

AuthName “Your repository name”

AuthUserFile /etc/subversion/passwd

Require valid-user

</Location>

*To create a very first user on the repository

Command: htpasswd -c /etc/subversion/passwd user_name

*To add additional users omit the “-c” option as this option replaces the old file

Command: htpasswd /etc/subversion/password user_name

*To create a user with encrypted password, use -m option, which specifies MD5 encryption of the password

Command: htpasswd -m /etc/subversion/passwd user_name

*Restart apache

Command: /etc/init.d/apache2 restart

Browse to http://YOUR_SERVER/svn, A successful install should prompt for your domain credentials and then show:-

svn – Revision 0: /
Powered by Subversion version 1.6.6 (r40053).

Share your thoughts by comments!

Categories: Linux Tags: , , , ,

Installing Oracle 11gR1 on Ubuntu 10.04

June 30, 2012 Leave a comment

Updating the packages on the System:

$ sudo su
# apt-get update

Once this is done, reboot the server so we’re sure that all the changes take effect.

Getting Required Packages:

$ sudo su

# apt-get install build-essential

# apt-get install libaio1

# apt-get install gawk

# apt-get install ksh

# apt-get install libmotif3

# apt-get install alien

# apt-get install libtool

# apt-get install lsb-rpm

# apt-get install gcc

# apt-get install make

# apt-get install binutils

# apt-get install rpm

some packages may be already installed, no need to worry about that, make sure all the above mentioned packages were installed.

Server Preparations:

update the shell

# cd /bin
# ls -l /bin/sh
lrwxrwxrwx 1 root root 4 2008-04-28 19:59 /bin/sh -> dash
# ln -sf bash /bin/sh
# ls -l /bin/sh
lrwxrwxrwx 1 root root 4 2008-05-01 22:51 /bin/sh -> bash

setup some users, and create some links

Add users and groups

# set -o vi
# addgroup oinstall
Adding group `oinstall' (GID 1001) ...
Done.

# addgroup dba
Adding group `dba' (GID 1002) ...
Done.
# addgroup nobody
Adding group `nobody' (GID 1003) ...
Done.
# usermod -g nobody nobody
# useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle
# passwd oracle
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
# mkdir /home/oracle
# chown -R oracle:dba /home/oracle

Create symbolic links:

# ln -s /usr/bin/awk /bin/awk

# ln -s /usr/bin/rpm /bin/rpm

# ln -s /usr/bin/basename /bin/basename

# mkdir /etc/rc.d

# for i in 0 1 2 3 4 5 6 S ; do ln -s /etc/rc$i.d /etc/rc.d/rc$i.d; done

Create the ORACLE_BASE directory:

# mkdir -p /u01/app/oracle
# chown -R oracle:dba /u01
Now we need to change some config files :

/etc/sysctl.conf – make sure that the following parameters are set to these values. These lines should all be placed at the end of the file.

fs.file-max = 6815744

kernel.shmall = 2097152

kernel.shmmax = 2147483648

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

net.core.rmem_default = 4194304

net.core.rmem_max = 4194304

net.core.wmem_default = 1048576

net.core.wmem_max = 1048576

net.ipv4.ip_local_port_range = 9000 65535

fs.aio-max-nr = 1048576

/etc/security/limits.conf – add these settings to the end of the file .

oracle soft nproc 2047

oracle hard nproc 16384

oracle hard nofile 65536

racle soft nofile 1024

/etc/pam.d/login – add the following line at the end of the file.

session required /lib/security/pam_limits.so in order to make sure that all of these settings had taken effect, Reboot the system.

# reboot

Installing the Oracle Software

Login in oracle user account and add oracle user to sudo user.

Now we need to make sure that the server is running in the correct runlevel, to check run the following command.

$ sudo runlevel
N 2

The last number in the output of the runlevel command is the current runlevel.
The server is currently at runlevel 2, we need it to be at 3 so :

$ sudo init 3
$ sudo runlevel
2 3

Copy oracle software to home folder.

Then enter into oracle11gr1 folder.

$ cd /home/oracle/oracle11gr1/

Set installer file “runinstaller” to executable mode.

$ chmod +x runinstaller

Run the installer file.

$ ./runInstaller

After executing the oracle installer, Oracle 11gR1 installation starts with the following window:

In the above window, take note of Oracle Home Location, which you need set as oracle home path in

In the above window, take note of Oracle Home Location, which you need set as oracle home path in /etc/profile file.

Set the Global Database Name and Database Password as follows.

Set the Global Database Name and Database Password as follows.

The password you set is common for all accounts like SYS, SYSTEM, SYSMAN and DBSNMP.

Click NEXT to continue installation.

This is the default path for oracle inventory directory to store product inventory data.

Oinstall is the default group name for oraInventory folder.

Click NEXT to continue installation.

Some Prerequisite Checks will run and you will see the following window.

Dont worry about the Warnings and Requirements.

Click the check box in status coloumn and make sure Warnings and Not executed are changed to user verified as follows.

Click NEXT to continue installation.

No changes in following window.

Click NEXT to continue installation.

Click INSTALL for Database installation as follows.

After completion of database installation, Automatically Configuration Assistants window will open as follows.

Currently Configuration Assistants installation in progress.

At the end, both Oracle Net Configuration Assistant and Oracle Database Configuration Assistance status should be succeeded.

Following window will open automatically after the completion of Configuration Assistants installation.

Take note of System identifier(SID) name and Click OK to complete the installation.

Following window will open automatically to intimate to run Configuration Scripts

Follow the steps as mentioned in above window to run the scripts.

To run orainstRoot.sh script follow the steps:

In terminal, login as root user.

$ su root

enter root password to login.

Enter into /oraInventory folder

# cd u01/app/oraInventory/

Run the orainstRoot.sh

#./orainstRoot.sh

To run root.sh script follow the steps:

Enter into /db_1 folder

# cd u01/app/oracle/product/11.1.0/db_1/

Run the root.sh

# ./root.sh

After running /root.sh, it will ask to enter the pathname for local bin directory.

Copy the Oracle Home Path shown above and paste as follows.

Press ENTER to complete the script configuration.

Return back to Configuration Scripts window andclick OKto finish.

Finally conclusion window will open automatically with successful message.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Click EXIT to finish the oracle installation.

To start listener control service, go to /etc/profile file and set oracle path.

Add the following path to /etc/profile file.

In terminal, type

$ sudo gedit /etc/profile

Add the following Path to end of the file.

export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1

export PATH=$PATH:/u01/app/oracle/product/11.1.0/db_1/bin

export ORACLE_SID=oracle

export LD_LIBRARY_PATH=/var/instantclient

Save and close.

To start database service, go to /etc/oratab file and edit.

n terminal, type

$ sudo gedit /etc/oratab

By default following line will be as follows.

oracle:/u01/app/oracle/product/11.1.0/db_1:N

Make changes as follows.

oracle:/u01/app/oracle/product/11.1.0/db_1:Y

Save and close.

Finally in order to make sure that all of these settings had taken effect, LOGOUT the system.

ThankYou

Categories: Linux Tags: , , ,

Samba:Share files & folders between linux and windows

December 21, 2010 Leave a comment

One of the best ways to share folders and files on Ubuntu & windows is to use the free open source software, Samba. Once samba installed and setuped, any Windows Computer will be able to easily connect and copy files to and from your Ubuntu system just like it was another Windows Computer.
With Samba, you are not limited to just file sharing. Printer sharing can also be setup allowing Windows computer to access and print to an installed printer on your Ubuntu computer.

Easy way to install samba:

In ubuntu, just right click the folder, that you want to share with windows system. After right clicking, options will be listed, in that at the bottom, click the sharing options. A popup window will open. In that you enter the name by which that folder to shared and enable the check box “Allow other’s to creat and delete files” if user’s in LAN want to edit or change the folder.Then click creat share.

If already samba installed means, share folder will be created, otherwise a popup window will help you to install samba. In that popup window, you will be asked to install the samba service. Just click the “install service” so that samba will be installed from synaptic package manager.

After installing samba in ubuntu system you can share folder with window system.

Now while creating a share folder, for each and every folder a popup window that ask you to set permission for that folder. in that popup window an option “add the permission automatically” is displayed, just click that option so that permission will be automatically created to that folder.

To install in Terminal:
$ sudo apt-get install samba smbfs

But sometimes an error will be shown like this “Failed to execute child process “testparm” (No such file or directory)”.

Its a small problem, to rectify this, just go to terminal and type
$ apt-get upgrade or $ apt-get upgrade samba

If you logined as user means add “sudo” at the starting of above command
$ sudo apt-get upgrade

Now restart the samba service. In terminal type
$ sudo /etc/init.d/samba restart

Ubuntu Linux: Uninstall / Remove Any Installed Software

September 23, 2010 Leave a comment

Both Ubuntu and Debian Linux provide command line as well as GUI tools to delete / remove binary packages.

GUI Package Management Tool:

synaptic is graphical management tool of software packages. It allows you to perform all actions of the command line tool apt-get in a graphical environment. This includes installing, upgrading, downgrading and removing of single packages or even upgrading your whole system.

Just click on System > Administration > Synaptic Package Manager

Now you can select any package and click on Mark for Removal popup meni. You can also start GUI tool from command line, enter:

$ synaptic &

Command Line Package Management Tool:

apt-get is the command-line tool for handling packages. It is used for adding / removing / updating packages.

Uninstall / Delete / Remove Package

Just use the following syntax:
sudo apt-get remove {package-name}

For example remove package called mplayer, enter:

$ sudo apt-get remove mplayer

Remove package called lighttpd along with all configuration files, enter:

$ sudo apt-get --purge remove lighttpd

To list all installed package, enter:\

dpkg --list
dpkg --list | less
dpkg --list | grep -i 'http'

Share your thoughts by commemts!