Difference between revisions of "Mirror Setup Process"

From CSLabsWiki
Jump to: navigation, search
(Major rewrite based off of the new Centos Server Setup)
m (fixed some formatting)
Line 1: Line 1:
 +
[[Category:Server Setup Documentation]]
 +
 
This page summarizes how [[Mirror]] was set up in Fall 2011.
 
This page summarizes how [[Mirror]] was set up in Fall 2011.
  
Line 26: Line 28:
  
 
===eth1===
 
===eth1===
 +
*Intel Corporation 82566DM-2 Gigabit Network Connection
 
*HWADDR=00:30:48:9A:DB:26
 
*HWADDR=00:30:48:9A:DB:26
 
*IPADDR=10.0.1.36
 
*IPADDR=10.0.1.36
  
 
===eth2===
 
===eth2===
 +
*Intel Corporation 82573L Gigabit Ethernet Controller
 
*HWADDR=00:30:48:9A:DB:27
 
*HWADDR=00:30:48:9A:DB:27
 
*IPADDR=10.0.0.14
 
*IPADDR=10.0.0.14
Line 44: Line 48:
  
 
===Added Custom PATH Variables===
 
===Added Custom PATH Variables===
*Added the following to <code>/etc/profile</code>
+
*Added the following to /etc/profile
<code><pre>
+
PATH=$PATH:/usr/sbin:/sbin
PATH=$PATH:/usr/sbin:/sbin
+
export PATH
export PATH
 
</pre></code>
 
 
<!--
 
<!--
 
===Installed and Configured [http://www.apcupsd.org/ APCUPSD]===
 
===Installed and Configured [http://www.apcupsd.org/ APCUPSD]===
Line 128: Line 130:
  
 
==Installed Apache==
 
==Installed Apache==
*Installed <code>httpd</code>
+
yum install httpd
**<code>yum install httpd</code>
 
  
*Modified <code>/etc/httpd/conf/httpd.conf</code>
+
*Modified /etc/httpd/conf/httpd.conf
 
<code><pre>
 
<code><pre>
 
(Replace)
 
(Replace)
Line 137: Line 138:
  
 
*Configured Apache to start on boot
 
*Configured Apache to start on boot
**<code>/sbin/chkconfig --levels 345 httpd on</code>
+
/sbin/chkconfig --levels 345 httpd on
  
 
*Started Apache
 
*Started Apache
**<code>/etc/init.d/httpd start</code>
+
service httpd start
  
 
====Modified logrotate settings====
 
====Modified logrotate settings====
*Edited <code>/etc/logrotate.d/httpd</code>
+
/etc/logrotate.d/httpd
 
<code><pre>
 
<code><pre>
 
/var/log/httpd/*log {
 
/var/log/httpd/*log {
Line 162: Line 163:
 
==Configure rsync to run as a daemon==
 
==Configure rsync to run as a daemon==
 
*Installed <code>xinetd</code>
 
*Installed <code>xinetd</code>
**<code>yum install xinetd</code>
+
yum install xinetd
  
*Enabled rsync <code>/etc/xinetd.d/rsync</code>
+
*Enabled rsync /etc/xinetd.d/rsync
 
<code><pre>
 
<code><pre>
 
# default: off
 
# default: off
Line 180: Line 181:
 
</pre></code>
 
</pre></code>
  
*Created configuration and shares for rsync daemon <code>/etc/rsyncd.conf</code>
+
*Created configuration and shares for rsync daemon /etc/rsyncd.conf
 
<code><pre>
 
<code><pre>
 
uid = nobody
 
uid = nobody
Line 205: Line 206:
 
</pre></code>
 
</pre></code>
  
*Created rsync motd <code>/etc/rsyncd.motd</code>
+
*Created rsync motd /etc/rsyncd.motd
 
<code><pre>
 
<code><pre>
 
###############################################################
 
###############################################################
Line 224: Line 225:
  
 
*Secured rsync
 
*Secured rsync
**<code>chown root.root /etc/rsyncd.*</code>
+
chown root.root /etc/rsyncd.*
**<code>chmod 600 /etc/rsyncd.*</code>
+
 
 +
chmod 600 /etc/rsyncd.*
  
 
*Restarted xinetd
 
*Restarted xinetd
**<code>servic xinetd restart</code>
+
servic xinetd restart
  
 
==Set Up Fedora Mirror Manager==
 
==Set Up Fedora Mirror Manager==
 
*Installed mirrormanager
 
*Installed mirrormanager
**<code>yum install mirrormanager-client</code>
+
yum install mirrormanager-client
  
 
*Configured mirrormanager
 
*Configured mirrormanager
**Modified <code>/etc/mirrormanager-client/report_mirror.conf</code>
+
**Modified /etc/mirrormanager-client/report_mirror.conf
 
<code><pre>
 
<code><pre>
 
[global]
 
[global]
Line 326: Line 328:
 
path=/var/www/html/pub/fedora-archive
 
path=/var/www/html/pub/fedora-archive
 
</pre></code>
 
</pre></code>
 
[[Category:Server Setup Documentation]]
 

Revision as of 16:58, 11 December 2011


This page summarizes how Mirror was set up in Fall 2011.

Install

See Centos Server Setup

CentOS 6.0 x64

  • 69 GB / - Software RAID 1
  • 1008 MB /boot - Software RAID 1
  • 4GB Swap

Setup

See Centos Server Setup

Raid

  • /dev/sd[abcdefg]
  • /dev/md0
  • Software RAID 6
  • /storage

Networking

eth0

  • Intel Corporation 82541PI Gigabit Ethernet Controller
  • HWADDR=00:1B:21:28:C8:48
  • IPADDR=128.153.145.19

eth1

  • Intel Corporation 82566DM-2 Gigabit Network Connection
  • HWADDR=00:30:48:9A:DB:26
  • IPADDR=10.0.1.36

eth2

  • Intel Corporation 82573L Gigabit Ethernet Controller
  • HWADDR=00:30:48:9A:DB:27
  • IPADDR=10.0.0.14

Set Up SSH Login Banner

/etc/issue.net

         _                 
  __ _  (_)__________  ____
 /  ' \/ / __/ __/ _ \/ __/
/_/_/_/_/_/ /_/  \___/_/   
                           

Added Custom PATH Variables

  • Added the following to /etc/profile
PATH=$PATH:/usr/sbin:/sbin
export PATH

Installed Apache

yum install httpd
  • Modified /etc/httpd/conf/httpd.conf
(Replace)
  • Configured Apache to start on boot
/sbin/chkconfig --levels 345 httpd on
  • Started Apache
service httpd start

Modified logrotate settings

/etc/logrotate.d/httpd

/var/log/httpd/*log {
    weekly
    rotate 1
    missingok
    notifempty
    sharedscripts
    postrotate
        /sbin/service httpd reload > /dev/null 2>/dev/null || true
    endscript
}

AWStats

Configure rsync to run as a daemon

  • Installed xinetd
yum install xinetd
  • Enabled rsync /etc/xinetd.d/rsync
# default: off
# description: The rsync server is a good addition to an ftp server, as it #   allows crc checksumming etc.
service rsync
{
    disable = no
    socket_type     = stream
    wait            = no
    user            = root
    server          = /usr/bin/rsync
    server_args     = --daemon
    log_on_failure  += USERID
}
  • Created configuration and shares for rsync daemon /etc/rsyncd.conf
uid = nobody
gid = nobody
use chroot = yes
max connections = 20
pid file = /var/run/rsyncd.pid
motd file = /etc/rsyncd.motd
log file = /var/log/rsync.log
transfer logging = yes
log format = %t %a %m %f %b
syslog facility = local3
timeout = 900
dont compress = *.gz *.tgz *.zip *.z *.Z *.rpm *.deb *.bz2
refuse options = checksum

[name]
  comment = Name of Repository
  path = /storage/repository
  exclude = lost+found/
  read only = true
  ignore nonreadable = yes
...
  • Created rsync motd /etc/rsyncd.motd
###############################################################

The Clarkson University mirror is located in Potsdam, NY, US.

This mirror is operated by the Clarkson Open Source Institute.
http://cosi.clarkson.edu/

If you have any questions or problems, please email
mirror-admin@cslabs.clarkson.edu.

Recent changes can be found at
http://status.cslabs.clarkson.edu/tag/mirror.

###############################################################
  • Secured rsync
chown root.root /etc/rsyncd.*
chmod 600 /etc/rsyncd.*
  • Restarted xinetd
servic xinetd restart

Set Up Fedora Mirror Manager

  • Installed mirrormanager
yum install mirrormanager-client
  • Configured mirrormanager
    • Modified /etc/mirrormanager-client/report_mirror.conf
[global]
# if enabled=0, no data is sent to the database
enabled=1
# server= is the URL to the MirrorManager XML-RPC interface
server=https://admin.fedoraproject.org/mirrormanager/xmlrpc


[site]
# if enabled=0, no data about this site is sent to the database
enabled=1
# Name and Password fields need to match the Site name and password
# fields you entered for your Site in the MirrorManager database at
# https://admin.fedoraproject.org/mirrormanager
name=Clarkson University
password=<PASSWORD GOES HERE>

[host]
# if enabled=0, no data about this host is sent to the database
enabled=1
# Name field need to match the Host name field you entered for your
# Host in the MirrorManager database at
# https://admin.fedoraproject.org/mirrormanager
name=mirror.clarkson.edu
# if user_active=0, no data about this category is given to the public
# This can be used to toggle between serving and not serving data,
# such enabled during the nighttime (when you have more idle bandwidth
# available) and disabled during the daytime.
# By not specifying user_active, the database will not be updated.
# user_active=1

[stats]
# Stats are only sent when run with the -s option
# and when this section is enabled.
# This feature is not presently implemented
enabled=0
apache=/var/log/httpd/access_log
vsftpd=/var/log/vsftpd.log
# remember to enable log file and transfer logging in rsyncd.conf
rsyncd=/var/log/rsyncd.log


# Content Categories
# These sections match the Categories for content tracked by MirrorManager.
#
# enabled=1 means information about this category will be sent to the database.
# enabled=0, no data about this host is sent to the database.  If the
# database already has information for you for this Category, it will
# remain unchanged.  This can be used to update the database after you
# have manually synced some infrequently-updated content, such as
# historical releases.
#
# path= is the path on your local disk to the top-level directory for this Category

[Fedora Linux]
enabled=1
path=/var/www/html/fedora/linux

[Fedora EPEL]
enabled=1
path=/var/www/html/epel

# lesser used categories below

[Fedora Web]
enabled=0
path=/var/www/html/pub/fedora/web

[Fedora Secondary Arches]
enabled=0
path=/var/www/html/pub/fedora-secondary

[Fedora Other]
enabled=0
path=/var/www/html/pub/alt

# historical content

[Fedora Core]
enabled=0
path=/var/www/html/pub/fedora/linux/core

[Fedora Extras]
enabled=0
path=/var/www/html/pub/fedora/linux/extras

[Fedora Archive]
enabled=0
path=/var/www/html/pub/fedora-archive