Ioncube Loader AutoInstaller

Status
Not open for further replies.

GoonzNetwork

Active Member
174
2010
0
0
1.Create a file named ioncubeinstaller.sh
Code:
touch ioncubeinstaller.sh

2.Edit ioncubeinstaller
Code:
pico ioncubeinstaller.sh

3.Paste the following into it

Code:
#!/bin/bash

WHO=$(whoami)
if [ ${WHO} == "root" ]
then
echo "Script Initialized ..."
else
echo "You must be logged in as root to install ionCube Loader."
echo "Terminating ..."
exit 0
fi

echo "Changing directory"

cd /usr/local/

echo "Done."

if [ -e ioncube_loaders_lin_x86.tar.gz ]
then
rm -f ioncube_loaders_lin_x86.tar.gz
fi

echo "Downloading files"

wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz

echo "Done."

echo "Installing files"

tar -zxvf ioncube_loaders_lin_x86.tar.gz

echo "Done."

echo "Changing ownership"

chown -R root.root ioncube

echo "Done."

phpline=`php -v | grep ^PHP | cut -f2 -d " "| awk -F "." '{print "zend_extension=\"/usr/local/ioncube/ioncube_loader_lin_"$1"."$2".so\""}'`
phpinifile=`php -i | grep php.ini | grep ^Configuration | cut -f6 -d" "`

echo "Adding line $phpline to file $phpinifile"
echo "$phpline" >> $phpinifile

rm -f ioncube_loaders_lin_x86.tar.gz

echo "Ioncube installed sucessfully"

4.Save the file
Code:
press ctrl+x then type y then hit enter

5.Chmod the file to 0755
Code:
chmod 755 ioncubeinstaller.sh

6.Execute it
Code:
./ioncubeinstaller.sh

7.Delete the installer
Code:
rm -f ioncubeinstaller.sh
 
6 comments
For people who use cPanel on there systems.
Rebuild apache via WHM and you can select install IONCUBE amongst other usefull modules etc :)
 
Nice script ..
but this script installs only x86 version.
you can find which architecture the os is and then download the respective file
example :
PHP:
if $(uname -a | grep 'x86_64'); then
wget http://example.com/example_x86_64.zip

 
Status
Not open for further replies.
Back
Top