Sunday, September 21, 2014

Linux service startup

http://www.linuxtopia.org/HowToGuides/services.html

How to find and configure the services which start when a Linux system boots up


A typical Linux system can be configured to boot into one of 5 different runlevels. During the boot process the init process looks in the /etc/inittab file to find the default runlevel. Having identified the runlevel it proceeds to execute the appropriate startup scripts located in the /etc/rc.d sub-directory.

For example if you have a runlevel of 5 configured then the init process will work through the list of startup scripts located in /etc/rc.d/rc5.d. These startup scripts start either with the letter "S" or "K" followed by a number and then a (hopefully) description word. For example the startup script for NFS (Networked File System) is typcically S60nfs whilst the stratup script for YUM system might be called K01yum.

Scripts that start with an "S" are invoked before those prefixed with a "K". The number in the filename controls the order in which the script will be executed with that group (either "S" or "K"). You wouldn't, for example, want to start NFS before the basic networking is up and running. It is also worth noting that the files in the rc.d sub-directories are not the actual scripts themselves but rather symbolic links to the actual files located in /etc/rc.d/init.d.

There are number of ways to control what services get started wihtout having to delve into the /etc/rc.d sub-directories yourself.

The command line tool chkconfig (usually located in /sbin) can be used to list and configure which services get started at boot time. To list all service settings run the following command:

    /sbin/chkconfig --list

This will display a long list of services showing whether or not they are started up at various runlevels. You may want to narrow the search down using grep. For example to list the entry for the HTTP daemon you would do the following:

    /sbin/chkconfig --list | grep httpd

which should result in something like:

    httpd           0:off   1:off   2:off   3:on    4:off   5:off    6:off

Alternatively you may just be interested to know what gets started for runlevel 3:

    /sbin/chkconfig --list | grep '3:on'

chkconfig can also be used to change the settings. If we wanted the HTTP service to start up when we at runlevel 5 we would issue the following command:

    /sbin/chkconfig --level 5 httpd on

A number of graphical tools are also available for administering services. On RedHat 9 you can run the following command:

    redhat-config-services

The equivalent command on RedHat Fedora Core is:

    system-config-services

The above graphical tools allow you to view which services will start for each runlevel, add or remove services for each runlevel and also manually start or stop services.

Another useful tool if you do not have a graphical desktop running or access via a remote server is the ntsysv command. ntsysv resides in /sbin on most systems. Whilst a convenient tool when you don't have an X server running the one draw back of ntsysv is that it only allows you to change the settings for the current runlevel.

Fail2ban notes



http://itswapshop.com/content/how-view-and-remove-banned-ips-fail2ban-ubuntu-1004

http://lintut.com/easy-steps-to-install-fail2ban-on-centos-6-5-protect-sshftp-using-fail2ban/


Enable EPEL means Extra Packages for Enterprise Linux

http://lintut.com/enable-epel-repository/

# wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm

IP Tables reference

http://wiki.centos.org/HowTos/Network/IPTables


bind9 reference

http://www.zytrax.com/books/dns/ch7/xfer.html#allow-notify

http://www.microhowto.info/howto/configure_bind_as_a_slave_dns_server.html

https://www.digitalocean.com/community/tutorials/how-to-setup-dns-slave-auto-configuration-using-virtualmin-webmin-on-ubuntu


RSync backup script

http://www.pointsoftware.ch/howto-local-and-remote-snapshot-backup-using-rsync-with-hard-links/

might have to modify script to allow for failure on space check.


Rescan SCSI bus on linux

http://www.cyberciti.biz/tips/vmware-add-a-new-hard-disk-without-rebooting-guest.html

echo "- - -" > /sys/class/scsi_host/host#/scan


Install LSI Tool on ESXi

Install LSI Tool on ESXi

http://mycusthelp.info/LSI/_cs/AnswerPreview.aspx?sSessionID=6624973237KEWXDGRIO%5B%5BVFPOJVD%5BZDFFLWTOSCF&inc=7968

Remeber to add hosts entry on server for esx box name

Remove trend micro

Remove trend micro

http://esupport.trendmicro.com/Pages/How-do-I-remove-old-or-new-versions-of-Trend-Micro-products-in-my-comp.aspx

indows Vista or Windows 7
  1. Select your Windows operating system version to download the Trend Micro Diagnostic Toolkit.
  2. http://esupport.trendmicro.com/media/10278586/EN-1037161_05.jpg
Uninstall software

Saturday, September 20, 2014

Fix for Event ID 6398 due to CEIP Data Collection for SharePoint Foundation

To isolate event

Go to Central Admin - monitoring - review job definitions - job history (left) and change the view (right) to Failed jobs. Click on Failed link and you should get similar error messages logged. Review the job (check configuration) to fix and if not needed disable it.


Then to fix 

http://support.microsoft.com/kb/2616940

You can implement the following workaround to disable the CEIP Data Collection Job.

1.) Launch an elevated SharePoint 2010 Management Shell

2.) Run the following command to find out the current status of CEIP at the Farm and Site level

Get-SPBrowserCustomerExperienceImprovementProgram -Farm <- This will return the status of the Browser CEIP at the farm level
(Get-SPFarm).CEIPEnabled <- This will return the status of the CEIP at the farm level
(Get-SPWebApplication).BrowserCEIPEnabled <- This will return the status of the CEIP at the site level

3.) If CEIP is enabled, run the following commands to disable CEIP at the Farm and Site level

Set-SPBrowserCustomerExperienceImprovementProgram -Farm -Enable:$FALSE
Set-SPBrowserCustomerExperienceImprovementProgram -WebApplication "SBS SharePoint" -Enable:$FALSE

4.) Next, open SharePoint 2010 Central Administration

5.) Click System Settings

6.) Click Configure Privacy Options under Farm Management

7.) Under the section Customer Experience Improvement Program, select the radio button for 'No, I don't wish to participate.' and then click OK.

8.) Next, disable the CEIP Data Collection job by running the following command

Get-SPTimerJob job-ceip-datacollection | Disable-SPTimerJob

9.) Run IISRESET /noforce from an elevated command prompt.