Showing posts with label Installation Task. Show all posts
Showing posts with label Installation Task. Show all posts

Friday, April 11, 2008

Insallation of Shoutcast

What is shoutcast?

SHOUTcast is Nullsoft's Free Winamp-based distributed streaming audio system. Thousands of broadcasters around the world are waiting for you to tune in and listen. You can start your own radio station and stream music and live shows. See an example of hundreds of world-wide stations at shoutcast.com

-------------------------------

How do we install shoutcast?

Generally you dont want to run shoutcast as root as that can be really bad and a security issue, instead we'll create a shoutcast user:

1.) Login to root through SSH on the server.
2.) adduser shoutcast
3.) passwd shoutcast

Now it will ask for a new password set this and remember it.

Installing shoutcast

Lets grab shoutcast from nullsoft:

1) wget http://www.shoutcast.com/downloads/sc1-9-2/shoutcast-1-9-2-linux-glibc6.tar.gz

Lets extract shoutcast:
2) tar -zxvf shoutcast-1-9-2-linux-glibc6.tar.gz

Lets tidy up the directory:
3) rm -rf shoutcast-1-9-2-linux-glibc6.tar.gz
mv shoutcast-1-9-2-linux-glibc6 shoutcast
cd shoutcast

Shoutcast has now been installed!


How to configure shoutcast?

Now we need to edit the configuration file.

pico sc_serv.conf
or you can use vi which I prefer, a bit more advanced to use.
vi sc_serv.conf

Ok lets set some important configureation options. Change these settings in the file:
MaxUser
Password
PortBase

uncomment AdminPassword and set an admin password.

Now at this point you can go threw the settings and change them to what you want or you can save and start shoutcast and it will work perfectly.

to save crtl+x (if using pico) or :wq if using vi

How do i start shoutcast?

./sc_serv sc_serv.conf

--------------------------------------------



Inatall NoBody Check

Download
Nobody Check is available for download free here: nobody_check.tar.gz


Installation Script: NEW
Install Nobody Check has never been easier.

1) Login to your server as the root user through shell
2) wget http://www.webhostgear.com/projects/nobodycheck/install.sh
3) chmod +x install.sh
4) ./install.sh
Wait for the installer to finish
5) rm -f install.sh
6) Open the /usr/local/nobody_check/nc.conf and put in your email address and select your options

Demo Nobody Check now!
While we can't run an actual demo of the script we can provide you with the output it produces so you get the idea of how it works.

- Email Detection Result
- Shell Scan Result


Documentation
- readme which answers many questions
- changelog


Licensing
Nobody Check is Copyright of Wave Point Media Inc. and WebHostGear. All rights reserved. We express no warranty or liability if you use this tool. This script may not be copied, altered or redistributed unless you have explicit written permission from Wave Point Media Inc.

Also feel free to ask questions in our forums in our official Nobody Check support thread here.

Stay Updated New Releases
Join our mailing list and get details when we make product changes. We're frequently changing this script, adding new features and fixing bugs - we highly suggest joining the mailing list. We will never send you spam or sell your address.

PhpMyAdmin Installation Step by Step

This is a step-by-step tutorial for installation of phpMyAdmin on your shared/reseller/dedicated hosting space using FTP access or shell access.

1.ftp::Download the latest version from http://www.phpmyadmin.net/home_page/downloads.php.

The latest version is at the top. You can download the .zip file.

Shell::wget
http://mesh.dl.sourceforge.net/sourceforge/phpmyadmin/phpMyAdmin-2.9.0-rc1.tar.gz

2. ftp ::Extract the contents of the .zip file using a program like winrar.

shell:: tar -zxvf phpMyAdmin-2.9.0-rc1.tar.gz

3. [Optional] You may want to delete unneeded language files. This saves time while uploading. Go into ‘lang’ folder and delete all files except a) all the .sh files and b) the three .php files having names starting w/ ‘english’.

4. In this tutorial scope, we are going to have phpMyAdmin access and control all the tables in a single database that you are going to create.

a. Create a DB using cPanel

b. Create MySQL username and a password for this user

c. Assign all privileges to this user to access the DB

5. Edit the config.inc.php file.

a. Usually it is ‘localhost’.

$cfg[’Servers’][$i][’host’] = ‘localhost’; // MySQL hostname or IP address

b. Enter MySQL user you created in step 4 b.

$cfg[’Servers’][$i][’controluser’] = ‘MySQL_user’; // MySQL control user

settings

c. Enter MySQL user’s password that you created in step 4 b.

$cfg[’Servers’][$i][’controlpass’] = ‘MySQL_pass’; // access to the

“mysql/user”

d. Save the file and close it.

6. ftp::Log into your web space using a FTP client and create a directory, say phpmyadmin under public_html. Upload all the content into the directory created.

Shell:: For the convient move the phpMyAdmin fodler to phpmyadmin using following command under your public_html folder

mv phpMyAdmin-2.9.0-rc1 phpmyadmin

7. Installation is complete. Simply point your browser to the directory where you installed phpMyAdmin and you should be able to start using it.

8. Important: Password protect the directory where you installed phpMyAdmin or else anyone will be able to access it! You can do that using the admin panel that your host provides.

-- Dhananjay

Install Bandwidth manager on linux server

Install Bandwidth manager on linux server

cd /usr/local/src
[/usr/local/src]#wget http://www.gropp.org/bwm-ng/bwm-ng-0.5.tar.gz
[/usr/local/src]tar -zxf bwm-ng-0.5.tar.gz
[/usr/local/src]#cd bwm-ng-0.5
[/usr/local/src/bwm-ng-0.5]#./configure; make; make install
/usr/local/src/bwm-ng-0.5]# bwm-ng

it will show you following action
bwm-ng v0.5 (probing every 0.500s), press 'h' for help
input: /proc/net/dev type: rate
/ iface Rx Tx Total
===========================================================================
lo: 0.00 KB/s 0.00 KB/s 0.00 KB/s
eth0: 8.24 KB/s 17.83 KB/s 26.07 KB/s
---------------------------------------------------------------------------
total: 8.24 KB/s 17.83 KB/s 26.07 KB/s


Tuesday, April 8, 2008

Install Chkrootkit

cd /root

wget ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz

tar xvzf chkrootkit.tar.gz

mv chkrootkit-* chkrootkit

cd chkrootkit

make sense

SIM (System Integrity Monitor)

How to Install SIM

Login to your server via SSH as root.

wget http://www.r-fx.org/downloads/sim-current.tar.gz

tar xvfz sim-3*.gz

cd sim-3.0

./install.sh -i

Type

sim -j

If ifconfig is not eth0 (eg eth1, or venet0)

nano -w /etc/conf.sim

Installation of APF

cd /usr/local/src
wget http://rfxnetworks.com/downloads/apf-current.tar.gz
tar -zxf apf-current.tar.gz
cd apf-0.*
./install.sh

Now edit config file
vi /etc/apf/conf.apf
Scroll down to the “Common ingress (inbound) TCP ports section. At this point you need to find the correct configuration for your control panel.

IG_TCP_CPORTS=”20,21,22,25,26,53,80,110,143,443,465,993,995,2082,2083,2086,2087,2095,2096″
IG_UDP_CPORTS=”21,53,873″

EGF=”1″
EG_TCP_CPORTS=”21,22,25,26,27,37,43,53,80,110,113,443,465,873,2089″
EG_UDP_CPORTS=”20,21,37,53,873″

save the file
start apf
apf -s
If everything still works then edit the config file and turn dev mode off. Make sure you can start a new ssh session before changing dev mode off. If you are kicked out you need to go back and look at what caused the problem!
DEVEL_MODE=”0″

restart APF
apf -r

Installation of Eaccelerator

cd /usr/local/src
mkdir ea
cd ea
wget http://kent.dl.sourceforge.net/sourc…r-0.9.5.tar.gz

tar zxvf eaccelerator-0.9.5.tar

cd eaccelerator-0.9.5

export PHP_PREFIX=”/usr”
$PHP_PREFIX/bin/phpize
./configure –enable-eaccelerator=shared –with-php-config=$PHP_PREFIX/bin/php-config
make
make install

For PLESK: vi /etc/php.ini

For CPANEL: vi /usr/local/lib/php.ini

If Zend is already installed, vi /usr/local/Zend/etc/php.ini

Find this:

;Windows Extensions

Above this, comment out the PHPA or ZEND lines if you have them. Replace them with this:

zend_extension=”/usr/local/src/ea/eaccelerator-0.9.5/modules/eaccelerator.so”
eaccelerator.shm_size=”16″
eaccelerator.cache_dir=”/tmp/eaccelerator”
eaccelerator.enable=”1″
eaccelerator.optimizer=”1″
eaccelerator.check_mtime=”1″
eaccelerator.debug=”0″
eaccelerator.filter=”"
eaccelerator.shm_max=”0″
eaccelerator.shm_ttl=”0″
eaccelerator.shm_prune_period=”0″
eaccelerator.shm_only=”0″
eaccelerator.compress=”1″
eaccelerator.compress_level=”9″

mkdir /tmp/eaccelerator

chmod 0777 /tmp/eaccelerator

service httpd restart

How to install Zend Optimizer

For i386


wget http://downloads.zend.com/optimizer/3.0.2/ZendOptimizer-3.0.2-linux-glibc21-i386.tar.gz
tar xvfz ZendOptimizer-3.0.2-linux-glibc21-i386.tar.gz
cd ZendOptimizer-3.0.2-linux-glibc21-i386
./install.sh

For x86_64
wget http://downloads.zend.com/optimizer/3.0.1/ZendOptimizer-3.0.1-linux-glibc23-x86_64.tar.gz
tar xvfz ZendOptimizer-3.0.1-linux-glibc23-x86_64.tar.gz
cd ZendOptimizer-3.0.1-linux-glibc23-x86_64
./install.sh

How to Install Mod_evasive

cd /root

wget http://www.zdziarski.com/projects/mod_evasive/mod_evasive_1.10.1.tar.gz

tar xvfz mod_ev*

cd mod_evasive*

CPANEL & Apache 1

/usr/local/apache/bin/apxs -i -a -c mod_evasive.c

/etc/init.d/httpd restart

CPANEL & Apache 2

/usr/local/apache/bin/apxs -i -a -c mod_evasive20.c

/etc/init.d/httpd restart

PLESK & Apache 1

/usr/sbin/apxs -i -a -c mod_evasive.c

/etc/init.d/httpd restart

PLESK & Apache 2

/usr/sbin/apxs -i -a -c mod_evasive20.c

/etc/rc.d/init.d/httpd restart

How to Install RvSkin

Installation

Create a account from whm called rvskin.com

1. SSH as root to server that was registered while purchasing the license and run:

mkdir /root/rvadmin

cd /root/rvadmin

wget http://download.rvglobalsoft.com/download.php/download/rvskin-auto/saveto/rvauto.tar.bz2; bunzip2 -d rvauto.tar.bz2; tar -xvf rvauto.tar; perl /root/rvadmin/auto_rvskin.pl

Answer a couple of questions on your shell, and wait until it finishes. First installation will take 2- 5 minutes to install. Installer will create a new hosting account ‘rvadmin’. Don’t terminate it. It will be used for internal RVSkin configuration management.

2. Log in to RVSkin Manager. Both root and reseller are able to access RVSkin Manager in WHM / Add-ons (at the bottom left menu). If you cannot find the RVSkin Manager menu, please close WHM and open it again.

If there is no messages display on the skin, please run this command on your SSH.

rm -f /usr/local/cpanel/Cpanel/rvversion
perl /root/rvadmin/auto_rvskin.pl

3. In RVSkin Manager:

* Set global configuration
* Set default language
* Create defaul feature list for user and for reseller
* Set tweak setting, reseller feature control, body links, top links, help, tutorial links, and etc.
* Test configuration setting in 2 hosting accounts.
* rvadmin: this account can consider to be account belong to root
*reseller’s client: this account will reflect setting from reseller skin manager. If it is not configued, it will remain anonymous.

4. Change user cPanel to RVSkin themes
5. Change cPanel language to the new language

Saturday, April 5, 2008

Installing IonCube Loader

1. Download the program and store it on your server using wget or FTP.

http://www.ioncube.com/loader_download.php

2. Unpack the program
tar -zxvf ioncube_loaders.tar.gz

3. cd ioncube

4. copy ioncube-install-assistant.php to a web directory such as your hosting directory and open it in your browser window.
cp ioncube-install-assistant.php /home/userdirectoryhere/www

5. Now lets move the iconcube directory to a permanent location:

cd ..
mv ioncube /usr/local

6. Now that you know the location of php.ini you need to edit it.
pico /usr/local/lib/php.ini

Now find where other zend extentions are in the file.
ctrl + w: zend_extension

Paste in your new line for ioncube loader
zend_extension = /usr/local/ioncube/ioncube_loader_lin_4.3.so

(NOTE) Check php version if it is 5.2 then entry should be ioncube_loader_lin_5.2.so

7. Save the changes
ctrl + X then Y and enter

8. Restart the web server to take effect.
/etc/init.d/httpd restart


-- Dhananjay Sonawane

Nagios Installation and Configuration

Nagios Installation and Configuration


You can use the following steps to install and configure Nagios.

Create the base directory where you would like to install Nagios.
mkdir /usr/local/nagios

Add a new user (and group) to your system.
adduser nagios

Download Nagois 1.0.
wget http://internap.dl.sourceforge.net/sourceforge/nagios/nagios-1.0.tar.gz
tar -zxvf nagios-1.0.tar.gz
cd nagios-1.0

Run the configure script.
./configure –prefix=/usr/local/nagios –with-cgiurl=/nagios/cgi-bin
–with-htmurl=/nagios/ –with-nagios-user=nagios –with-nagios-grp=nagios

Compile Nagios and the CGIs.
make all

Install the binaries and HTML files (documentation and main web page).
make install

Install the sample init script to /etc/rc.d/init.d/nagios.
make install-init

Installing the Plugins
——————————-

In order for Nagios to be of any use to you, you’re going to have to download
and install some plugins. Plugins are scripts or binaries which perform all
the service and host checks that constitute monitoring

Download and install the Nagios Plugins.
wget
http://aleron.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.3.1-1.9.i386.rpm
rpm -Ivh nagios-plugins-1.3.1-1.9.i386.rpm

Configuring Nagios
—————————

Nagios is compiled and installed. Now we have to configure it or in other
words define objects (hosts, services, etc.) that should be monitored.

The main configuration file (/usr/local/nagios/etc/nagios.cfg) contains a
number of directives that affect how Nagios operates. This config file is
read by both the Nagios process and the CGIs. This is a sample nagios.cfg

—————————————————————————————————————–
log_file=/usr/local/nagios/var/nagios.log
cfg_file=/usr/local/nagios/etc/checkcommands.cfg
cfg_file=/usr/local/nagios/etc/misccommands.cfg
cfg_file=/usr/local/nagios/etc/contactgroups.cfg
cfg_file=/usr/local/nagios/etc/contacts.cfg
cfg_file=/usr/local/nagios/etc/dependencies.cfg
cfg_file=/usr/local/nagios/etc/escalations.cfg
cfg_file=/usr/local/nagios/etc/hostgroups.cfg
cfg_file=/usr/local/nagios/etc/hosts.cfg
cfg_file=/usr/local/nagios/etc/services.cfg
cfg_file=/usr/local/nagios/etc/timeperiods.cfg
resource_file=/usr/local/nagios/etc/resource.cfg
status_file=/usr/local/nagios/var/status.log
nagios_user=nagios
nagios_group=nagios
check_external_commands=1
command_check_interval=45s
command_file=/usr/local/nagios/rw/nagios.cmd
comment_file=/usr/local/nagios/var/comment.log
downtime_file=/usr/local/nagios/var/downtime.log
lock_file=/usr/local/nagios/var/nagios.lock
temp_file=/usr/local/nagios/var/nagios.tmp
log_rotation_method=d
log_archive_path=/usr/local/nagios/archives
use_syslog=0
log_notifications=1
log_service_retries=1
log_event_handlers=1
log_initial_states=1
log_external_commands=1
log_passive_service_checks=1
inter_check_delay_method=s
service_interleave_factor=s
max_concurrent_checks=0
service_reaper_frequency=1
sleep_time=1
service_check_timeout=30
host_check_timeout=30
event_handler_timeout=30
notification_timeout=30
ocsp_timeout=5
perfdata_timeout=5
retain_state_information=1
state_retention_file=/usr/local/nagios/var/status.sav
retention_update_interval=60
use_retained_program_state=0
interval_length=20
use_agressive_host_checking=0
execute_service_checks=1
accept_passive_service_checks=1
enable_notifications=1
enable_event_handlers=1
process_performance_data=0
obsess_over_services=0
check_for_orphaned_services=0
check_service_freshness=1
freshness_check_interval=60
aggregate_status_updates=1
status_update_interval=15
enable_flap_detection=1
low_service_flap_threshold=5.0
high_service_flap_threshold=20.0
low_host_flap_threshold=5.0
high_host_flap_threshold=20.0
date_format=us
illegal_object_name_chars=`~!$%^&*|’”<>?,()=
illegal_macro_output_chars=`~$&|’”<>
admin_email=you@yourdomain.com
admin_pager=you@yourdomain.com
——————————————————————————————

Add the list of servers that you want to monitor in
/usr/local/nagios/etc/hosts.cfg

——————————————————————————————
# ’server42′ host definition
define host{
use generic-host
host_name (server hostname)
alias (hostname)
address IP Address
check_command check-host-alive
max_check_attempts 10
notification_interval 120
notification_period 24×7
notification_options d,u,r
}
# ’server43…..

——————————————————————————————

Edit /usr/local/nagios/etc/hostgroups.cfg to add all the servers.

——————————————————————————————
define hostgroup{
hostgroup_name tchosting
alias TotalChoice
contact_groups tchosting
members server40,server41,server42
}
—————————————————————————————–

To setup email and pager notifications edit
/usr/local/nagios/etc/contacts.cfg to add your contact info.

—————————————————————————————–
define contact{
contact_name DAN
alias DAN
service_notification_period 24×7
host_notification_period 24×7
service_notification_options n
host_notification_options d,u,r
service_notification_commands notify-by-email
host_notification_commands host-notify-by-email
email dan_sonawane@gmail.com
}
—————————————————————————————–

The contact name must be a member of contact group. Edit
/usr/local/nagios/etc/contactgroups.cfg to add your name.



-- Dhananjay Sonawane

zlib installation

zlib installation

  1. wget http://www.zlib.net/zlib-1.2.3.tar.gz
    tar -zxvf zlib-1.2.3.tar.gz
  2. cd zlib-1.2.3
  3. ./configure
  4. make
  5. make install

Sunday, March 16, 2008

RootCheck Installation

RootCheck scans the system looking for possible trojans ,scans the ports for malicious activity ,and checks for rootkits,and also the logs,permissions and more.
Installation Instructions
Rootcheck is a very simple software. Just unpack, compile and execute it. It will scan the system and print if it found or not any rootkit.
Login to your server and su to root.
tar -xvzf rootcheck-0.7.tar.gz
cd rootcheck-0.7
make all
./ossec-rootcheck
There is also an example file that explains the different options for root checkMore Information about rootcheck is available at http://www.ossec.net/

Rkhunter Installation

Rkhunter is a very useful tool that is used to check for trojans, rootkits, and other security problems. This tutorial will touch on installing and setting up a daily report for rkhunter.Installing:

tar -zxvf rkhunter-1.1.1.tar.gz
cd rkhunter-1.1.1
./installer.sh
Now you can run a test scan with the following command:
/usr/local/bin/rkhunter -c
How to setup a daily scan report?
pico /etc/cron.daily/rkhunter.sh
add the following replacing your email address:
#!/bin/bash
(/usr/local/bin/rkhunter -c --cronjob 2>&1 mail -s "Daily Rkhunter Scan Report" email@domain.com)
chmod +x /etc/cron.daily/rkhunter.sh
I just got a false positive!! What do i do?
False positives are warnings which indicates there is a problem, but aren't really a problem. Example: some Linux distro updated a few common used binaries like `ls` and `ps`. You (as a good sysadmin) update the new packages and run (ofcourse) daily Rootkit Hunter. Rootkit Hunter isn't yet aware of these new files and while scanning it resports some "bad" files. In this case we have a false positive. You could always have your datacenter or a system administrator check out the server to verify that it is not compromised.
More information on rkhunter can be found here: http://www.rootkit.nl

Friday, March 14, 2008

How can I install a Perl Module ?

On a server with CPanel, you can log into the WHM and install it there. If that for some reason doesn't work for you, you can log into the shell as root and install it via the command line. Once logged in, from any directory, type: echo "HTML::Template" /usr/local/cpanel/whostmgr/bin/perlmod -i (in this case, the module we want to install is HTML::Template).
On a RedHat server, you can install it with up2date if you know the name of the RPM. If you don't know it you can run 'up2date --showall grep -i perl'. Then select the RPM you want and install it via up2date.
If the module you want still isn't present you can install it manually via CPAN. Note that these modules are completely unsupported. If you wish to procede with the installation you can run 'perl -MCPAN -e shell' and interactively install the module. For example if you wanted to install Time::HiRes you would type 'install Time::HiRes' on the CPAN prompt.

How can I install cpanel within a VPS?

How can I install cpanel within a VPS?

1 The yum package MUST be installed before installing, the installer will not run without it. (centos/rhel/fedora/RH)

2 Add the line: "exclude=dev* udev* spamassassin* httpd* mod_ssl* perl* mysql* php* kernel*"

to /etc/yum.conf

3 Run rpm -qa and look for any entries beginning with "httpd" "mod_ssl" "mysql" "openldap" (if you wish to install openldap, you can install it later, installing it at this time, will cause problems with exim) & "php" and then use rpm -e to remove them (and all their dependencies).

4 RPMs that conflict with the cpanel services can be set to not install by editing /vz/template/distroname/distroversion/config/ostemplate.list

5 It is of extreme usefulness to add sshd to ON_SERVICES in /vz/template/centos/4/config/install-post

6 Make sure you are logged in as root and type:

# cd /home

# wget http://layer1.cpanel.net/latest

Note: For FreeBSD, you need to download and untar the latest installer package from http://www.cpanel.net/.

# sh latest

How can I install Zend Optimizer on my Cpanel server?

Login into the server via ssh and run the following command:

root@cpdemo [~]# /scripts/installzendopt

This will start an ncurses based installer. The defaults should all be correct and you will only have to acknowledge each question.

Monday, March 10, 2008

Installing mod_evasive

Installing mod_evasive (formally known as mod_dosevasive)
Login too your server and execute

cd /usr/local/src
wget http://www.zdziarski.com/projects/mod_evasive/mod_evasive_1.10.1.tar.gz
tar -zxvf mod_evasive_1.10.1.tar.gz
cd mod_evasive

For apache 2.0.x
/usr/sbin/apxs -cia mod_evasive20.c

Then add add this too httpd.conf

DOSHashTableSize 3097
DOSPageCount 6
DOSSiteCount 100
DOSPageInterval 2
DOSSiteInterval 2
DOSBlockingPeriod 600

For apache 1.3.x

usr/local/apache/bin/apxs -cia mod_evasive.c

Then add this too httpd.conf

DOSHashTableSize 3097
DOSPageCount 6
DOSSiteCount 100
DOSPageInterval 2
DOSSiteInterval 2
DOSBlockingPeriod 600

Now just restart apache and the installation is complete.
/etc/init.d/httpd restart