Services & Settings.

Slides:



Advertisements
Similar presentations
Introduction to Linux Linux startup process Unix Shells and scripts.
Advertisements

Chapter 9: Understanding System Initialization The Complete Guide To Linux System Administration.
FreeBSD startup and repair AfNOG 2007 Abuja, Nigeria Hervey Allen Materials from Brian Candler.
LinuxChix System Startup and Recovery. What happens at startup? ● The BIOS loads and runs the MBR ● A series of "bootstrap" programs are loaded – see.
Web Application Server Apache Tomcat Downloading and Deployment Guide.
20-753: Fundamentals of Web Programming 1 Lecture 11: Web Server Case Study Fundamentals of Web Programming Lecture 11: Web Server Case Study.
Chapter Apache Installation on Linux. Acknowledgement The contribution made by Darrin Morison is acknowledged.
Apache Installation by Jack Davis. Web Servers The Apache HTTP Server is the most widely used web server on the Internet. Apache is fast, free, and full-featured.
Linux Boot Up Process Bootstrapping –Bootstrapping is the standard term for “ starting up a computer”. During bootstrapping, the kernel is loaded into.
CIS 240 Introduction to UNIX Instructor: Sue Sampson.
Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from
Processes & Daemons Chapter IV / Part III. Commands Internal commands: alias, cd, echo, pwd, time External commands, code is in a file: grep, ls, more.
Network File System Joe Paulowskey Joe Paulowskey Susan Mulholland Joe Woulfe.
SquirrelMail for Webmail AfNOG 2013 Scalable Internet Services (SS-E) Presented by Michuki Mwangi Lusaka, Zambia (Original Materials by Joelja)
Linux Operations and Administration
AppCMD Quick Reference Guide for IIS 7 installed on Win2k8 Servers.
A Practical Guide to Fedora and Red Hat Enterprise Linux Unit 10: Basic Apache Configuration and Management Chapter 26: Apache (httpd): Setting Up a Web.
Booting and boot levels
Apache Server The Apache Server Apache is a WWW server that implements the HTTP protocol. Apache runs as a daemon. This means that it is a resident.
Basic Service & Settings pmli. Basic Service e.g. http, ftp, etc.
2/19/2003 Lecture 3 Computer System Administration Lecture 3 Setup (continued)
1 Apache. 2 Module - Apache ♦ Overview This module focuses on configuring and customizing Apache web server. Apache is a commonly used Hypertext Transfer.
Linux Services Muhammad Amer. 2 xinetd Programs  In computer networking, xinetd, the eXtended InterNET Daemon, is an open-source super-server daemon.
Basic Router Configuration 1.1 Global configuration Cisco allows us to configure the router to support various protocols and interfaces. The router stores.
Apache, MySQL and PHP Installation and Configuration Chapter 1 Apache Installation and Configuration.
Apache Web Server Quick and Dirty Evelyn NAMARA for AfNOG 2014 (Originally by Joel Jaeggli for AfNOG 2007) ‏
UNIT - III. Time Server It is a daemon that runs on one machine and to which other systems synchronize their system clocks. It is a service that provides.
 Apache 2.2 › /usr/ports/www/apache22 › apache22_enable="YES" (/etc/rc.conf) › /usr/local/etc/rc.d/apache22 start  MySQL 5.0 › /usr/ports/databases/mysql50-server.
Apache Web Server Quick and Dirty Kevin G. Chege for AfNOG 2013 (Originally by Joel Jaeggli for AfNOG 2007) ‏
©John Samuel 2008 Introduction to PHP. ©John Samuel 2008 Objectives At the end of this class the student will be able to; Create and run a simple php.
Linux Operations and Administration
Basic Service & Settings xclin. Computer Center, CS, NCTU 2 If you want to transfer a file…
Presented by Lonnye Bower Fardin Khan Chris Orona APACHE WEB SERVER.
Lab 8 Overview Apache Web Server. SCRIPTS Linux Tricks.
Module 4 DNS Installation. DNS Software BIND (80+ %) Berkeley Internet Name Domain NSD (Name Server Daemon)
Configuring Novell GroupWise ® on SuSE LINUX Randy Brown GroupWise Dedicated Support Engineer, Novell Inc. Matt Preston GroupWise Support.
Planning, configuring, running and maintaining a web server -1.
Sys Admin Course Service Management Fourie Joubert.
1 Figure 6-5: Turning Off Unnecessary Services Unnecessary Services  Operating system vendors used to install many services by default  This made them.
Package Administration 3/14/ Software package administration adds software to systems and removes software from systems Sun and its third-party.
Installing VERITAS Cluster Server. Topic 1: Using the VERITAS Product Installer After completing this topic, you will be able to install VCS using the.
LINUXCHIX WEBMAIL. Software run by an ISP or online service that provides access to send, receive, and review using only your Web browser. Users.
AfNOG-2003 Domain Name System (DNS) Ayitey Bulley Setting up an Authoritative Name Server.
Apache Web Server v. 2.2 Reference Manual Chapter 2 Starting Apache.
CACI Proprietary Information | Date 1 Upgrading to webMethods Product Suite Name: Semarria Rosemond Title: Systems Analyst, Lead Date: December 8,
PRESENTED BY ALI NASIR BITF13M040 AMMAR HAIDER BITF13M016 SHOIAB BAJWA BITF13M040 AKHTAR YOUNAS BITF13M019.
Fundamental of Databases
Chap-I Network and System Configuration in Linux
Section 4 – Link Access Module (Lam) aka Data Adapters
NTP, Syslog & Secure Shell
Working With TFTP.
File Transfer Protocol
DHCP server & Client Objectives Contents
SUBMITTED BY: NAIMISHYA ATRI(7TH SEM) IT BRANCH
FreeBSD startup and repair
June 2011 David Front Weizmann Institute
Network Services.
Introduction to Ansible
OPS235: Week 1 Installing Linux (Lab1: Investigations 4 - )
Computer System Administration Homework 3 – File Server
Periodic Processes.
Periodic Processes.
Services & Settings.
System Administration Practice Homework2 - File System Server
APACHE WEB SERVER.
Services & Settings cyen.
CST8177 Scripting 2: What?.
Services Management frank.
Services & Settings lctseng.
Presentation transcript:

Services & Settings

Basic Services

Common Flow of Running a Service Installation Through ports, packages, or source tarballs pkg install kde4 Configuration Service specific configuration file(s) /etc/rc.conf kdm4_enable="YES" Start rc.d/* /usr/local/etc/rc.d/kdm4 start service kdm4 start Maintenance Updating、Restarting

Configuration Files (1/3) Local installed programs’ configuration files are located under /usr/local/etc Daemon → program-name.conf pure-ftpd.conf user-program → program-namerc vimrc screenrc Default config file usually installed with .sample or .default suffix pure-ftpd.conf.sample or different suffix for different purpose php.ini-dist php.ini-recommended copy and rename before use it

Configuration Files (2/3) A program with multiple config files are usually located in /usr/local/etc/program-name/ apache* postfix Most configuration files have clear comment at the beginning or before each description Most popular styles key <space>value key = value Read documents to know each option’s meaning # pure-ftpd.conf # IP address/port to listen to (default=all IP and port 21) Bind 127.0.0.1,21 # Fork in background Daemonize yes 5

Configuration Files (3/3) Some with local effectiveness (e.g. http server) Markup language-like <directory /path> setting-for-this-path… </directory> Samba、rsync、devfs… [xxxx] settings… [yyyy] settings….

Scripts for starting / stopping a service RC Script Scripts for starting / stopping a service

What does RC means? Run Commands (RunCom) Command scripts for auto-reboot and daemon startup rc(8) https://www.freebsd.org/doc/handbook/configtuning-rcd.html

Why do we need RC Script? Start services on system startup Starting and Stopping services in a standard way Without rc /usr/local/sbin/pure-ftpd -g /var/run/pure-ftpd.pid -A -c50 -B -C8 -D -fftp -H -I15 -lpam -lunix -L10000:8 -m4 -s -U133:022 -u100 -k99 -Z v.s. With rc service pure-ftpd start

RC Script Dependency between each service is described in header of the script rcorder is used to find out dependency ordering of each script Each rc script defines what to do when start / stop … /etc/rc.subr defines what to do & check before / after start stop …. rc.subr(8)

Inside the RC Script Example: /etc/rc.d/inetd for rcorder(8) to sort. need to be included by every RC script. what to do with start/stop/....

How to use rc script (1/2) Example: ntpd After booting… (rc.conf) Pidfile: Record (master) process id of the service Start / Stop / Restart (Start after stop) An easy way to access: “service” $ service ntpd start/stop/restart/reload/… Search /etc/rc.d and /usr/local/etc/rc.d nctucs [~] -wangth- /etc/rc.d/ntpd Usage: /etc/rc.d/ntpd [fast|force|one|quiet](start|stop|restart|rcvar|enabled|fetch|status|poll) nctucs [~] -wangth- cat /var/run/ntpd.pid 660 nctucs [~] -wangth- ps aux | grep ntp root 660 0.0 0.4 26132 18052 - Ss 9Sep17 1:27.13 /usr/sbin/ntpd -g -c /etc/ntp.conf -p /var/run/ntpd.pid -f /var/db/ntpd.drift

How to use rc script (2/2) Status Reload [one | fast | force] Check the service is running or not Reload Reload configuration file if the service support [one | fast | force] One Skip the check of rcvar="YES" Start the service even if XXXX_enable="NO" Force Force start the service Ignore any error it encountered (no prerequisite test) ignore rcvar="YES" and set rc_force="YES" Fast Skip the check for an existing running process (pid check) Set rc_fast="YES"

Local installed service Use path-to-rcscript rcvar command to know which variable should set to “YES” to enable this service For further information, read comments from that script /usr/local/etc/rc.d/pure-ftpd nctucs [~] -wangth- /usr/local/etc/rc.d/pure-ftpd rcvar # pureftpd # pureftpd_enable="no" # (default: "") # Add the following lines to /etc/rc.conf to enable pure-ftpd: # # pureftpd_enable="yes" # pureftpd_flags="<set as needed>" # Add the following lines to /etc/rc.conf to enable pure-authd daemon: # pureftpd_authd_enable="yes" # pureftpd_authdscript="/full/path/to/auth_script" # pureftpd_authsocket="/var/run/ftpd.sock" # Add the following lines to /etc/rc.conf to enable uploadscript daemon: # pureftpd_upload_enable="yes" # pureftpd_uploadscript="/full/path/to/upload_script"