Linux Basics And Apache Installation

Slides:



Advertisements
Similar presentations
1 Configuring Internet- related services (April 22, 2015) © Abdou Illia, Spring 2015.
Advertisements

Chapter Apache Installation on Linux. Acknowledgement The contribution made by Darrin Morison is acknowledged.
Homework 5b: Samba. Computer Center, CS, NCTU 2 Network-based File Sharing (1)  NFS (UNIX-based) mountd is responsible for mount request nfsd and nfsiod.
1 Configuring Web services (Week 15, Monday 4/17/2006) © Abdou Illia, Spring 2006.
CIS 240 Introduction to UNIX Instructor: Sue Sampson.
1 實驗十:以 Linux 架設 Internet/Intranet 伺服 器 教師: 助教:. 2 Outline  Background  Linux system  Popular Internet services  Internet services  Internet  HTTP.
Configuring a Web Server. Overview  Understand how a Web server works  Install IIS (Internet Information Services) and Apache Web servers  Examine.
How Clients and Servers Work Together. Objectives Learn about the interaction of clients and servers Explore the features and functions of Web servers.
CP476 Internet Computing Browser and Web Server 1 Web Browsers A client software program that allows you to access and view Web pages on the Internet –Examples.
Electronic Commerce Last Week Internet utility programs
APACHE SERVER By Innovationframes.com »
SquirrelMail for Webmail AfNOG 2013 Scalable Internet Services (SS-E) Presented by Michuki Mwangi Lusaka, Zambia (Original Materials by Joelja)
CMSC 691X – Summer 2002 Project By Pravin D’Souza.
A crash course in njit’s Afs
Linux Operations and Administration
TOPIC 1 – SERVER SIDE APPLICATIONS IFS 234 – SERVER SIDE APPLICATION DEVELOPMENT.
Web Server Configuration Alokes Chattopadhyay Computer & Informatics Centre IIT Kharagpur.
1 Homework / Exam Exam 3 –Solutions Posted –Questions? HW8 due next class Final Exam –See posted schedule Websites on UNIX systems Course Evaluations.
Web Servers Web server software is a product that works with the operating system The server computer can run more than one software product such as .
Chapter 10 – UNIX. History In late 1960s, two employees of Bell Labs (Ken Thompson & Dennis Ritchie) designed a new operating system to overcome the constraints.
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
An introduction to Apache. Different Types of Web Servers Apache is the default web server for may Unix servers. IIS is Microsoft’s default web server.
1 John Magee 9 November 2012 CS120 Lecture 17a: Publishing Web pages.
VsFTP in Linux. Introduction to FTP The File Transfer Protocol (FTP) is used as one of the most common means of copying files between servers over the.
SAMBA Integrating Linux and Window. What is Samba? Free suite of programs that enables flavors of UNIX to work with other operating systems such as OS/2.
Web Services CSCI N321 – System and Network Administration Copyright © 2007,2008 by Scott Orr and the Trustees of Indiana University.
HOW WEB SERVER WORKS? By- PUSHPENDU MONDAL RAJAT CHAUHAN RAHUL YADAV RANJIT MEENA RAHUL TYAGI.
SUSE Linux Enterprise Desktop Administration Chapter 12 Administer Printing.
1 Apache. 2 Module - Apache ♦ Overview This module focuses on configuring and customizing Apache web server. Apache is a commonly used Hypertext Transfer.
Samba Advanced System Administration Course James Lwali University computing Centre Ltd, University of Dar es salaam,
1 Apache and Virtual Sites and SSL Dorcas Muthoni.
FTP Server and FTP Commands By Nanda Ganesan, Ph.D. © Nanda Ganesan, All Rights Reserved.
Hands On Networking Network Applications Ram P Rustagi, ISE Dept Kundan Kumar, MCA Dept Manini Sahoor, MCA Dept Ravi Teja, MCA Dept Sourav.
Sys Admin Course NFS and SAMBA Fourie Joubert. Sys Admin Course NFS NFS is the Network File System It allows Linux systems to share a file system, or.
Apache Web Server Quick and Dirty for AfNOG 2015 (Originally by Joel Jaeggli for AfNOG 2007) ‏
Cosc 4750 Configuring httpd, Mysql, And Samba. defaults By default httpd demean will startup and work User directories are turned off Default directory.
Linux Services Configuration
Free Powerpoint Templates Page 1 Free Powerpoint Templates Users and Documents.
WEB SERVER SOFTWARE FEATURE SETS
17 Establishing Dial-up Connection to the Internet Using Windows 9x 1.Install and configure the modem 2.Configure Dial-Up Adapter 3.Configure Dial-Up Networking.
Web Server Administration Chapter 6 Configuring a Web Server.
VIRTUAL HOSTING WITH PureFTPd And MYSQL (Quota And Bandwidth Management) BY Odoh Kenneth Emeka Sun Yu Patrick Appiah.
(ITI310) By Eng. BASSEM ALSAID SESSIONS 10: Internet Information Services (IIS)
Multi-Domain Hosting CPTE 212 “Missing Slides” for 1/22/2015 John Beckett.
Web Server Administration Chapter 6 Configuring a Web Server.
PRESENTED BY ALI NASIR BITF13M040 AMMAR HAIDER BITF13M016 SHOIAB BAJWA BITF13M040 AKHTAR YOUNAS BITF13M019.
1 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com Embedded Linux Training System.
Web and Proxy Server.
Application Layer Functionality and Protocols
Distributed Control and Measurement via the Internet
Guide to Linux Installation and Administration, 2e
Apache web server Quick overview.
Chapter 9 Router Configuration (Ospf, Rip) Webmin, usermin Team viewer
Chapter 5 Linux Services
Ftp File and Print Server
SquirrelMail for Webmail
Exercise 7 Samba.
Unix System Administration
SUBMITTED BY: NAIMISHYA ATRI(7TH SEM) IT BRANCH
Lab 1 introduction, debrief
INSTALLING AND SETTING UP APACHE2 IN A LINUX ENVIRONMENT
IIS.
Web Programming Essentials:
Configuring Internet-related services
LING 408/508: Computational Techniques for Linguists
APACHE WEB SERVER.
1.3 Given a scenario, apply appropriate Microsoft command line tools
Web Servers (IIS and Apache)
Computer Networks Protocols
RHCSA Study Prep.
Presentation transcript:

Linux Basics And Apache Installation 01:09:18 1

Operating System 01:09:18 2

Operating System 01:09:18 3

Operating System 01:09:18 4

Operating System Duties Process Management Memory Mgmt I/O Managemnt File Management 01:09:18 5

Operating System 01:09:18 6

Enable root Login in Ubuntu 14.04 sudo -i passwd root /etc/lightdm/lightdm.conf [SeatDefaults] greeter-session=unity-greeter user-session=ubuntu greeter-show-manual-login=true

Enable root Login in Ubuntu Desktop 14.04 Edit /etc/gdm/custom.conf file and include AllowRoot=true. sudo passwd -dl root (to disable)

dd if=/path/to/ubuntu.iso of=/dev/sdb bs=1M Create bootable USB umount /dev/sdb dd if=/path/to/ubuntu.iso of=/dev/sdb bs=1M 01:09:19 10

File System A file system or filesystem is used to control how data is stored and retrieved. The structure and logic rules used to manage the groups of information and their names is called a "file system". 01:09:19 11

File System of Linux

LINUX DIRECTORY STRUCTURE

File System Linux uses Ext2, Ext3, Ext4 01:09:19 14

File System Ext2 stands for second extended file system. It was introduced in 1993. Developed by Rémy Card. 01:09:19 15

File System Ext2 Ext2 stands for second extended file system. It was introduced in 1993. Developed by Rémy Card. Ext2 does not have journaling feature Maximum individual file size can be from 16 GB to 2 TB Overall ext2 file system size can be from 2 TB to 32 TB 01:09:19 16

File System EXT3 Ext3 stands for third extended file system. It was introduced in 2001. Developed by Stephen Tweedie The main benefit of ext3 is that it allows journaling Maximum individual file size can be from 16 GB to 2 TB Overall ext3 file system size can be from 2 TB to 32 TB

File System EXT4 Ext4 stands for fourth extended file system. It was introduced in 2008. \Maximum individual file size can be from 16 GB to 16 TB Overall maximum ext4 file system size is 1 EB (exabyte). 1 EB = 1024 PB (petabyte). 1 PB = 1024 TB (terabyte).

Formating drive and usb #fdisk -l # mkfs.ext4 /dev/device 01:09:19 19

File System

File System

File System

File System

Formating drive and usb umount /dev/sda2 tune2fs -j /dev/sda2 mount /dev/sda2 /home

Source List To Add source list /etc/apt/sources.list 3rd pary installation /etc/apt.sourceslist.d 01:09:19 25

Source List deb http://ch.archive.ubuntu.com/ubuntu/ saucy main restricted deb-src http://ch.archive.ubuntu.com/ubuntu/ saucy main restricted deb file:/mnt/debian-dvd/ wheezy main contrib

System back add-apt-repository -y ppa:nemh/systemback sudo apt-get update sudo apt-get install systemback

Linux Basic Commands ls cp [option(s)] sourcefile targetfile mv [option(s)] sourcefile targetfile rm [option(s)] file(s) -r . Deletes any existing subdirectories cd [options(s)] [directory] mkdir [option(s)] directoryname rmdir [option(s)] directoryname

Linux Basic Commands ln [option(s)] sourcefile targetfile chown [option(s)] username.group file(s) R- Changes files and directories in all subdirectories. chgrp [option(s)] groupname file(s) adduser user group

Linux Basic Commands chmod [options] mode file(s) u-user g-group o-others For access, access is granted by the + symbol and denied by the – symbol. r-read ,w-write ,x- execute

Linux Basic Commands grep [option(s)] searchstring filenames mount [option(s)] [<device>] mountpoint du [option(s)] [path] -h human redable free [option(s)]

Linux Basic Commands kill [option(s)] process ID ping [option(s)] host name|IP address

Setting Proxy export http_proxy="http://usrname:passwrd@host:port" /etc/environment http_proxy=http://127.0.0.1:5865 /etc/apt/apt.conf Acquire::http::Proxy "http://127.0.0.1:5865";

Mount command Mount -t <file system ? <souce> <dest> Fdisk -l

Netwoking in Ubuntu sudo vi /etc/network/interface iface eth0 inet static address 192.168.3.3 netmask 255.255.255.0 gateway 192.168.3.1 dns-search example.com dns-nameservers 192.168.3.45 192.168.8.10

Networking sudo /etc/init.d/networking restart Or Reboot.

Networking #ip addr show #Ifconfig # ip addr del 192.168.50.5/24 dev eth1 # ip link set eth1 up # ip link set eth1 down

Networking # ip route show #ping <IP>

Web Server The term web server can refer to either the hardware (the computer) or the software (the computer application) that helps to deliver web content that can be accessed through the Internet. A user agent, commonly a web browser or web crawler, initiates communication by making a request for a specific resource using HTTP and the server responds with the content of that resource 39 39

Web Server 40 40

Web Server 41 41

Web Server 42 42

Popular Web Server Apache HTTP Server (open source) Microsoft Internet Information Services (IIS) NGINX, Inc (open source) Google -GWS Sun Java System Web Server TEQIP_GEC_WAYANAD_25_June 43 43

Popular Web Server 44 44

LAMP LAMP (Linux, Apache, MySQL, PHP/Perl/Python) is a package that contains a web server (Apache). This is a piece of software that actually runs your web application. Frameworks are, in short, libraries that help you develop faster.

LAM

LAMP

Apache Apache httpd has been the most popular web server on the Internet since April 1996, and celebrated its 17th birthday as a project this February. The Apache HTTP Server ("httpd") is a project of The Apache Software Foundation. open-source HTTP server for modern operating systems including UNIX and Windows NT 48 48

Apache 49 49

Apache Apache httpd 2.4.25 (released 2016-12-20) 50 50

Apache2 apt-get -y install apache2 vi /etc/apache2/conf-enabled/security.conf # line 26: change ServerTokens Prod # line 37: change ServerSignature Off

Apache2 vi /etc/apache2/mods-enabled/dir.conf # line 2: add file name that it can access only with directory's name DirectoryIndex index.html index.htm

Apache2 vi /etc/apache2/apache2.conf # line 70: add server name ServerName www.srv.world

Apache2 vi /etc/apache2/sites-enabled/000-default.conf # line 11: change admin email address ServerAdmin webmaster@srv.world /etc/init.d/apache2 restart 

Apache2 http://(your server's hostname or IP address)/

Supporting PHP pages GECTCR_13_ JAN_2016 56 56

Apache2-PHP # apt-get -y install php5 php5-cgi libapache2-mod-php5 php5-common php-pear  #a2enconf php5-cgi.conf  #/etc/init.d/apache2 restart 

Apache2-PHP vi /var/www/html/index.php <html> <body> <div style="width: 100%; font-size: 40px; font-weight: bold; text-align:center;"> <?php       print Date("Y/m/d"); ?> </div> </body> </html>

Apache2-Enable Userdir # a2enmod userdir   /etc/init.d/apache2 restart  mkdir ~/public_html   vi ~/public_html/index.html <html> <body> <div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;"> UserDir Test Page </div> </body> </html>

Virtual Hosting GECTCR_13_ JAN_2016 60 60

Virtual Hosting Virtual hosting is a method for hosting multiple domain names (with separate handling of each name) on a single server (or pool of servers) This allows one server to share its resources, such as memory and processor cycles, without requiring all services provided to use the same host name. 61 61

Virtual Hosting One widely used application is shared web hosting. Shared web hosting prices are lower than a dedicated web server because many customers can be hosted on a single server. 62 62

Apache2-Virtual Hostings # vi /etc/apache2/sites-available/virtual.host.conf # create new for virtualhost <VirtualHost *:80> ServerName www.virtual.host ServerAdmin webmaster@virtual.host DocumentRoot /home/ubuntu/public_html ErrorLog /var/log/apache2/virtual.host.error.log </VirtualHost>

Apache2-Virtual Hostings #a2ensite virtual.host  /#etc/init.d/apache2 restart 

Apache2-Virtual Hostings $ mkdir ~/public_html  vi ~/public_html/index.html <html> <body> <div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;"> Virtual Host Test Page </div> </body> </html>

Basic Authentication A simple user ID and password-based authentication scheme, and provides the following: To identify which user is accessing the server To limit users to accessing specific pages (identified as Universal Resource Locators, URLs 66 66

SSL and Certificates The Secure Socket Layer protocol was created by Netscape to ensure secure transactions between web servers and browsers. 67 67

SSL Secure Sockets Layer (SSL), are cryptographic protocols that provide communication security over the Internet. 68 68

SSL GECTCR_13_ JAN_2016 69 69

SSL GECTCR_13_ JAN_2016 70 70

SSL Communication 71 71

Apache2 -SSL Settings vi /etc/apache2/sites-available/default-ssl.conf # line 3: change to admin email ServerAdmin webmaster@gecskp.ac.in # line 32,33: change to the one created in [1] SSLCertificateFile /etc/ssl/private/server.crt SSLCertificateKeyFile /etc/ssl/private/server.key

Apache2 -SSL Settings # a2ensite default-ssl # a2enmod ssl #/etc/init.d/apache2 restart  

SSL WEBSITES www.gmail.com www.yahoo.com www.onlinesbi.com www.irctc.co.in Etc etc etc....... 74 74

Apache2 -Use Basic Auth # apt-get -y install apache2-utils # vi /etc/apache2/sites-available/auth-basic.conf # create new <Directory /var/www/html/auth-basic> AuthType Basic AuthName "Basic Authentication" AuthUserFile /etc/apache2/.htpasswd require valid-user </Directory>

Apache2 -Use Basic Auth # htpasswd -c /etc/apache2/.htpasswd test # mkdir /var/www/html/auth-basic  # /etc/init.d/apache2 restart  # vi /var/www/html/auth-basic/index.html <html> <body> <div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;"> Test Page for Basic Auth </div> </body> </html>

Webserver & Database GECTCR_13_ JAN_2016 77 77

Install MySQL # apt-get -y install mysql-server #/etc/init.d/mysql start # mysql -u root -p  mysql> select user,host,password from mysql.user; 

Install phpMyAdmin # apt-get -y install phpmyadmin # vi /etc/phpmyadmin/apache.conf # near line 8: add lines below Require ip 127.0.0.1 10.0.0.0/24 # /etc/init.d/apache2 restart 

PhpMyAdmin PPA sudo add-apt-repository ppa:nijel/phpmyadmin sudo apt-get update

Install phpMyAdmin Create db connect php code

SAMBA SERVER

SAMBA SERVER

SAMBA SERVER # apt-get -y install samba # mkdir /home/share # chmod 777 /home/share   

SAMBA SERVER # vi /etc/samba/smb.conf # near line 25: add unix charset = UTF-8 # line 30: change (Windows' default) workgroup = WORKGROUP # line 51: uncomment and change IP address you allow interfaces = 127.0.0.0/8 10.0.0.0/24

SAMBA SERVER # line 58: uncomment bind interfaces only = yes # line 60: add (no auth) map to guest = Bad User

SAMBA SERVER # add at the last line [Share]# any name you like    path = /home/share# shared directory    writable = yes# writable    guest ok = yes# guest OK    guest only = yes# guest only    create mode = 0777# fully accessed    directory mode = 0777# fully accessed    share modes = yes# warn if some people access to a file

SAMBA SERVER # initctl restart smbd 

SAMBA SERVER # groupadd security # mkdir /home/security # chgrp security /home/security  # chmod 770 /home/security  # vi /etc/samba/smb.conf

SAMBA SERVER # line 60: comment out # map to guest = Bad User

SAMBA SERVER [Security]# any name you like path = /home/security    writable = yes    create mode = 0770    directory mode = 0770    share modes = yes    guest ok = no# guest not allowed    valid users = @security# allow only security group

SAMBA SERVER # smbpasswd -a trusty # add a user in Samba # usermod -G security trusty  # initctl restart smbd 

FTP Server

FTP Server # apt-get -y install vsftpd #vi /etc/vsftpd.conf

FTP Server # line 29: uncomment write_enable=YES # line 97,98: uncomment ( allow ascii mode transfer ) ascii_upload_enable=YES ascii_download_enable=YES

FTP Server # line 120: uncomment ( enable chroot ) chroot_local_user=YES # line 121: uncomment ( enable chroot list ) chroot_list_enable=YES

FTP Server # line 123: uncomment ( enable chroot list ) chroot_list_file=/etc/vsftpd.chroot_list # line 129: uncomment ls_recurse_enable=YES

FTP Server # add at the last line # specify root directory ( if don't specify, users' home directory equals FTP home directory) local_root=public_html # turn off seccomp filter seccomp_sandbox=NO

FTP Server #vi /etc/vsftpd.chroot_list # add users you allow to move over their home directory test

FTP Server #initctl restart vsftpd

Govt.Engg.College Sreekrishnapuram Palakkad 9539601112 SIJO S VADAKKAN Govt.Engg.College Sreekrishnapuram Palakkad 9539601112 01:09:19 GEC KANNR _JAN_2017 101 101