Script for installing lattest VerliHub (0.9.8e-r2) on CentOS

Moderator: TARA24

Script for installing lattest VerliHub (0.9.8e-r2) on CentOS

Postby TARA24 on 11 Jun 2010, 13:20

i will gona show you a script which installs you The Latest Verlihub Version (0.9.8e-r2).

In this Script are included also MYSQL, Lua-5.1.4, Luasocket-2.0.2 and Lua Plugin 1.8.1
Before we start you need to know the following:
1) You have to RUN this script as USER not as ROOT, this means your UserName should be added in SUDOERS.

2) If your UserName is not added in Sudoers you can simply do it with the following =>> TUTORIAL.

Why do we need SUDO?well sudo give you administrative privilleges to can safe compile and install programs(applications) on Linux.It is not a good idea to COMPILE or MAKE as ROOT, this have to do it your User.
Now that we are ready we can procced installing Latest VerliHub Using the following Script .
Create a new Empty File and Name it as "verlihub_installer_script" and add the following code inside of it:
Code: Select all
#!/bin/bash

## Script author TARA24
## Script Version 5.0

## Before we start we need a working directory...
mkdir ~/sources
mkdir ~/sources/verlihub-0.9.8e-r2

function strinput {
unset refstr
echo -n "$1"
read refstr
}

## Inform them about this script and the owner of it...
echo
echo " THIS SCRIPT IS BUILD TO INSTALL LATEST VERLIHUB VERSION. "
echo " LATEST VERSION OF VERLIHUB IS 0.9.8e-r2 "
echo " TESTED ON CentOS 5.4 and CentOS 5.5 "
echo " TO CAN PROCEED INSTALLING VERLIHUB-0.9.8E-r2 USING THIS SCRIPT "
echo " FIRST YOU HAVE TO ACCEPT THE AGREAMENTS "
echo " MORE INFO YOU CAN FIND ON http://kleinekevin.freeforumit.com ."
echo
echo " DO YOU AGREE?, PLEASE TYPE YES OR NO : "


if [ "$installtype" = "" ]
then
echo -n "(IF YOU TYPE OTHER THAN 'YES' THIS SCRIPT WILL BE AUTOMATICALLY ABORTED ) [yes/no] ?"
strinput
else
refstr=$installtype
fi

if [ "$refstr" = "yes" ]
then
echo "proceeding forward..."

## Preparing your system...
sudo yum -y update
sudo yum -y upgrade

## Installing the necessaries...
sudo yum -y install gcc gcc-c++ GeoIP GeoIP-devel pcre pcre-devel readline-devel
sudo yum -y install mysql mysql-server mysql-devel

## Next we configure MYSQL...
sudo /etc/init.d/mysqld start
sudo mysql_secure_installation

## What is current version?...
export version="0.9.8e-r2"

## Now download verlihub-0.9.8e-r2 , Lua-5.1.4 , Luasocket-2-0-2 and Lua-1.8.1...
cd ~/sources/verlihub-0.9.8e-r2
wget http://www.verlihub-project.org/download/verlihub-0.9.8e-r2.tar.bz2
wget http://www.lua.org/ftp/lua-5.1.4.tar.gz
wget http://luaforge.net/frs/download.php/2664/luasocket-2.0.2.tar.gz
wget http://sunet.dl.sourceforge.net/sourceforge/verlihub/lua-1.8.1.tar.gz

## Next we extract Verlihub , Lua-5.1.4 , LuaSocket and Lua-1.8.1...
tar -jxvf verlihub-0.9.8e-r2.tar.bz2
tar -zxvpf lua-5.1.4.tar.gz
tar -zxvpf luasocket-2.0.2.tar.gz
tar -zxvpf lua-1.8.1.tar.gz

## Next we configure and install VerliHub-0.9.8e-r2...
cd ~/sources/verlihub-0.9.8e-r2/verlihub* && ./configure && make && sudo make install && sudo make clean && sudo make distclean

## Next we configure and install Lua-5.1.4...
sudo yum -y install ncurses-devel
cd ~/sources/verlihub-0.9.8e-r2/lua-5.1.4 && make linux && sudo make install

## Next we configure and install  Luasocket-2.0.2...
cd ~/sources/verlihub-0.9.8e-r2/luasocket-2.0.2 && make && sudo make install
sudo ln /usr/local/lib/lua/5.1/socket/core.so /usr/local/lib/libluasocket.so
sudo ln /usr/local/lib/lua/5.1/mime/core.so /usr/local/lib/libluamime.so

## Next we configure and install Lua-1.8.1...
cd ~/sources/verlihub-0.9.8e-r2/lua-1.8.1 && ./configure --with-luasocket && make && sudo make install && sudo make clean && sudo make distclean

## Running Verlihub script ...
sudo vh_install

## Setting Up GeoIP...
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
gunzip GeoIP.dat.gz
sudo cp GeoIP.dat /var/lib/GeoIP/GeoIP.dat

## Running Verlihub for the fist time ...
sudo vh_runhub

echo
echo " Installation is done. and your Hub Is UP and Running "
echo
echo
echo " 88888    db    888b.    db    d88b   d8 "
echo "   8     dPYb   8  .8   dPYb     dP  dP8 "
echo "   8    dPwwYb  8wwK'  dPwwYb   dP  dPw8 "
echo "   8   dP    Yb 8  Yb dP    Yb d888    8 "
echo
echo
echo " Please visit http://kleinekevin.freeforumit.com "
echo
echo
fi

Now save this File and close it , then Open your Terminal and navigate to that file .
Once that you are there before you start you have to make this script executable, to do that type the following:
Code: Select all
sudo chmod 755 verlihub_installer_script

Now run it with this command:
Code: Select all
./verlihub_installer_script

And follow the steps carefully .
Have Fun .
~~~ Remember , by making a new Folder called SOURCES in your HOME folder and placing there all your downloaded Sources make's your job easyer ~~~
User avatar
TARA24
Site Admin
 
Posts: 282
Joined: 21 Jul 2009, 19:16

Return to Linux CentOS

Who is online

Users browsing this forum: No registered users and 1 guest

cron