linux installation.pdf

219 views 18 slides Sep 17, 2022
Slide 1
Slide 1 of 18
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18

About This Presentation

Configuration of Linux installation in networking assignment


Slide Content

Computer Network
Assignment. (1)
Activity/ Linux Installation & Commands

Submitted By
M.Shoaib Hussain (15321)

Submitted To
Sir Syed Naqi Abbas

BS (Computer Science)
6
th
Semester (D)
Spring-2022

Riphah International University
Faisalabad Campus

.
Linux Installation and operating environment :


1. Linux installation
I have already installed ubuntu on virtual box in my laptop during installation I passed
through many step and phases

Device name DESKTOP-6A8AIL2
Processor Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz 2.60 GHz
Installed RAM 4.00 GB (3.89 GB usable)
Device ID 7ED24DAF-2EDA-4B50-A4C1-741334EC8102
Product ID 00331-10000-00001-AA077
System type 64-bit operating system, x64-based processor
Pen and touch No pen or touch input is available for this display

2. Creating user
Mshoaib



3. Creating user groups

4. Setting permissions for the home directory of users
1. chmod +rwx filename to add permissions.
2. chmod -rwx directoryname to remove permissions.
3. chmod +x filename to allow executable permissions.
4. chmod -wx filename to take out write and executable permissions.
5.Important files and directories in Linux and their use
Although organizations have made strides toward consistency via standards such as the Linux
Filesystem Hierarchy Standard (FHS), different Linux distributions still have somewhat different
directory structures. The following rendering exemplifies a typical Red Hat effort toward
standardization of where files are stored according to type and use.
Directory Description
/bin All binaries needed for the boot process and to run the
system in single-user mode, including essential commands
such as cd, ls, etc.
/boot Holds files used during the boot process along with the
Linux kernel itself
/dev Contains device files for all hardware devices on the system
/etc Files used by application subsystems such as mail, the
Oracle database, etc.
/etc/init.d Contains various service startup scripts
/etc/profile.d Holds application setup scripts run by /etc/profile upon
login
/etc/rc.d Contains subdirectories which contain run level specific
scripts
/etc/rc.d/init.d run level initialization scripts
/etc/rc.d/rc?.d Where ??? is a number corresponding to the default run
level. Contains symbolic links to scripts which are in
/etc/rc.d/init.d. for services to be started and stopped at the
indicated run level.
/etc/skel Holds example dot files used to populate a new user's home
directory.
/etc/X11 Contains subdirectories and configuration files for the X
Window system
/home User home directories
/lib Some shared library directories, files, and links
/mnt The typical mount point for the user-mountable devices
such as floppy drives and CDROM

6. Configuring Apache server and Apache Tomcat
Although different distributions will require slightly different configurations, these instructions
describe the basic process for most flavors of Linux
1 - Create a low privilege user
Running Tomcat as root introduces the unnecessary risk that a compromised Tomcat instance
could yield control over your entire server. Thus, creating a user with low privileges to run
Tomcat should be standard practice when installing new instances.
2 - Download the latest binary release
While there are a number of distribution-specific Tomcat packages available, the quality of these
releases varies.
Unless you are using one of the better maintained releases (for example, the Ubuntu/Debian
package, which is maintained by MuleSoft's own Jason Brittain, author of O'Reilly's The
Definitive Guide to Apache Tomcat and lead developer of ), downloading the latest release
directly from Apache is the only way to be sure that you are getting the latest bug and stability
fixes.
3 - Move distribution into place and uncompress
Next, copy Tomcat to the directory you want to install it in, and extract the package:
# cp apache-tomcat-6.x.x.tar.gz CurrentDirectory/NewHome
# cd $NewHome
# tar zxvf apache-tomcat-6.0.29.tar.gz
4 - Change permissions
Finally, change the permissions of the folder to allow the user you created to run Tomcat in step
one to read and write to the folder (you'll need root access again)
# chown -R tomcat apache-tomcat-6.0.29

5 - Start Tomcat
You should now be able to start Tomcat from the command line by running startup.sh, the start
script included with Tomcat, or by running catalina.sh with the 'start' parameter



7. Configuring database using Postgresql.
The Cloud Manager installation pattern includes a postgresql-server package. This package can
be installed with Cloud Manager on the local host by default. No matter when it is installed,
however, a PostgreSQL ORDBMS is required for Cloud Manager. This product uses a dedicated
database in PostgreSQL to store all of its data.
This section helps you to prepare the information you need to configure the PostgreSQL instance
you use for Cloud Manager.
1.Ensure that you know the information you are prompted to provide during the PostgreSQL
configuration:
• Database server
• Autoconfigure an unconfigured PostgreSQL installation?
• Database server port
• Create a new PostgreSQL database?
• Use an existing PostgreSQL database
2. At the Cloud Manager Application Server, run the Cloud Manager Application configuration
tool:
/opt/netiq/cloudmanager/configurator/config
3.Specify 1 to configure the Cloud Manager Application Server, then enter f to finish the
selection and move to the PostgreSQL Database Connection segment of the script.
POSTGRESQL DATABASE CONNECTION
This segment of the configuration utility lets you provide PostgreSQL
authentication information to be used by NetIQ Cloud Manager (NCM)
If you want to install Postgres to a local database and Postgres has not been configured, you can
choose to configure Postgres automatically.

If you choose to install to an existing Postgres server, you need the
following information:
- The Postgres server IP Address and the port where the service is running
- A username with permission to create the NCM database and user
or
The database name you want to populate, along with a username with write
permission to that database.
Press <RETURN> to continue...
4. Follow the prompts to complete the PostgreSQL configuration. Use the information you
collected in as the script prompts you.The configuration tool checks the database server and
the database instance you specify, using the newly-defined credentials to ensure that the
database instance and the database user can be created.
Self-study questions for students:
1. List the stages the of Linux boot process
• BIOS: Basic Input Output System.
• MBR: Master Boot Record.
• GRUB: Grand Unified Bootloader.
• Kernel: Linux Core Operating System.
• Init: Executes The Run Level System Application Init.
• Run-Level: Main Application Software starts execution.

2. What is run level? What are the predefined run levels?
A run level is a state of init and the whole system that defines what system services are
operating. Run levels are identified by numbers. Some system administrators use run
levels to define which subsystems are working, e.g., whether X is running, whether the
network is operational, and so on
• 0 – System halt i.e the system can be safely powered off with noactivity.
• 1 – Single user mode.
• 2 – Multiple user mode with no NFS(network file system).
• 3 – Multiple user mode under the command line interface and not under the graphical
user interface.
• 4 – User-definable.
• 5 – Multiple user mode under GUI (graphical user interface) and this is the standard
runlevel for most of the LINUX based systems.
• 6 – Reboot which is used to restart the system.

3. Find out the run level of your computer
To find out the system runlevel, open your Terminal and run the following command:
$ runlevel

4. Find out the kernel version of your machine
Launch a terminal window, then enter the following
uname –r

5. What are NIS and NFS?
The Network Information Service (NIS) and Network File System (NFS) are services that
allow you to build distributed computing systems that are both consistent in their appearance
and transparent in the way files and data are shared. NIS provides a distributed database
system for common configuration files.
6. What is the use of RPM? List various options of rpm command
withsyntax

RPM command is used for installing, uninstalling, upgrading, querying, listing, and
checking RPM packages on your Linux system. RPM stands for Red Hat Package Manager.
With root privilege, you can use the rpm command with appropriate options to manage the
RPM software packages
Option Usage
-a, --all Query all packages
-c, --configfiles List configuration files
--changelog List changelog entries
--conflicts List capabilities this package conflicts with
-d, --docfiles List documentation files
--dump Dump out extra information on files.
-f, --file filename Query for packages owning given file
--filesbypapkg List all files in each selected package
--fileid md5_id Query for the package with the given MD5 digest
-g, --group
group_name
Query packages in the given group
--hdrid sha1_header_id Query for the package with the given header identifier number, in SHA1
format
-i, --info Display a lot of package information including description
--last

7. State the purpose of the following files and directories:
a. /home
A home directory, also called a login directory, is the directory on Unix-like operating systems
that serves as the repository for a user's personal files, directories and programs. It is also the
directory that a user is first in after logging into the system.
b. /boot
/boot or 'Boot' folder contains the linux boot configuration files. This is one of the MOST
important folder. Removing anything from this directory or a file getting corrupted will result in
a OS crash after reboot. You system won't be able to boot without files in the /boot directory.

c. /dev
/dev is the location of special or device files. It is a very interesting directory that highlights one
important aspect of the Linux filesystem - everything is a file or a directory.
d. /usr
Purpose. The /usr/local hierarchy is for use by the system administrator when installing software
locally. It needs to be safe from being overwritten when the system software is updated. It may
be used for programs and data that are shareable amongst a group of hosts, but not found in /usr
e. /mnt
The /mnt directory exists on all Linux systems, and it is intended specifically for use as a mount
point for temporary media like floppy disks or CDROMs. It may be empty, or it may contain
subdirectories for mounting individual devices. Linux does not require you to use /mnt as the
mount point for other file systems.
f. /media
The /media directory contains subdirectories where removable media devices inserted into the
computer are mounted. For example, when you insert a CD into your Linux system, a directory
will automatically be created inside the /media directory. You can access the contents of the CD
inside this directory
g. /etc
The /etc hierarchy contains configuration files. A "configuration file" is a local file used to
control the operation of a program; it must be static and cannot be an executable binary. It is
recommended that files be stored in subdirectories of /etc rather than directly in /etc .

h. /bin
The /bin directory contains binaries for use by all users. The '/bin' directory also contains
executable files, Linux commands that are used in single user mode, and common commands
that are used by all the users, like cat, cp, cd, ls, et
i. /usr/bin
/usr/bin is a standard directory on Unix-like operating systems that contains most of the
executable files (i.e., ready-to-run programs) that are not needed for booting (i.e., starting) or
repairing the system.
j. /etc/fstab
The /etc/fstab file is a system configuration file that contains all available disks, disk partitions
and their options. Each file system is described on a separate line. Each line contains six fields
separated by one or more spaces or tabs
k. .bashrc
A bashrc file is shell script that Bash runs whenever it is started. Along with setting in the OS,
the bashrc helps determine how your command line interface (CLI) or Terminal app looks and
acts.

2. Networking commands in Linux
Execute the following commands and write their output
✓ ping :

✓ hostname:

traceroute:


✓ netstat:

✓ netstat -t:


✓ netstat -s-t:

✓ netstat -i:


✓ ifconfig:

✓ who:



✓ whoami:

✓ nmap:


✓ tcpdump: