#PEAR_Config 0.9 a:12:{s:7:"php_dir";s:67:"//pear/php";s:8:"data_dir";s:68:"//pear/data";s:7:"www_dir";s:67:"//pear/www";s:7:"cfg_dir";s:67:"//pear/cfg";s:7:"ext_dir";s:67:"//pear/ext";s:7:"doc_dir";s:68:"//pear/docs";s:8:"test_dir";s:69:"//pear/tests";s:9:"cache_dir";s:69:"//pear/cache";s:12:"download_dir";s:72:"//pear/download";s:8:"temp_dir";s:68:"//pear/temp";s:7:"bin_dir";s:63:"//pear";s:7:"man_dir";s:67:"//pear/man";}
|
Server IP : 99.192.176.69 / Your IP : 216.73.217.68 Web Server : Apache System : Linux platinumpuzzy2.eosdns.net 3.10.0-1160.71.1.el7.x86_64 #1 SMP Tue Jun 28 15:37:28 UTC 2022 x86_64 User : bbwcamhouse ( 1000) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /../etc/python/../python/../python/../python/../python/../ssl/../python/../../usr/src/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
#!/bin/bash
newuser=$1
CPUS=4
test -h /opt/include || ln -s /usr/include /opt/include
test -h /opt/lib || ln -s /usr/lib64 /opt/lib
#yum -ty install gdbm-devel bison byacc libtool flex autoconf automake freetype2-devel curl-devel libjpeg-devel libjpeg libpng libpng-devel libpng10-devel libpng10 libxml2 libxml2-devel openssl-devel.x86_64 freetype-devel.x86_64 libmcrypt-devel.x86_64 libmcrypt.x86_64 mcrypt.x86_64 mysql-devel.x86_64libxslt.x86_64 libxslt-devel.x86_64
#yum -y remove httpd httpd-devel php php-mysql apr
cd /usr/src/
#wget -O /usr/src/php.config.status fs01.mojohost.com/files/php/php.config.status && chmod 755 /usr/src/php.config.status
#wget -O /usr/src/httpd.config.status fs01.mojohost.com/files/php/httpd.config.status && chmod 755 /usr/src/httpd.config.status
wget fs01.mojohost.com/files/php/php-latest.tgz
wget fs01.mojohost.com/files/php/httpd-latest.tgz
wget fs01.mojohost.com/files/php/modsecurity-latest.tgz
phplatest="$(tar ztf php-latest.tgz |head -1|tr -d '/')"
phplatesttb="${phplatest}.tar.gz"
/bin/mv php-latest.tgz $phplatesttb
httplatest="$(tar ztf httpd-latest.tgz |head -1|tr -d '/')"
httplatesttb="${httplatest}.tar.gz"
/bin/mv httpd-latest.tgz $httplatesttb
msalatest="$(tar ztf modsecurity-latest.tgz |head -1|tr -d '/')"
msalatesttb="${msalatest}.tar.gz"
/bin/mv modsecurity-latest.tgz $msalatesttb
tar zxf $httplatesttb
tar zxf $phplatesttb
tar zxf $msalatesttb
cd /usr/src/$httplatest
make clean
../httpd.config.status && echo "$(date +%Y_%m_%d_%H_%M_%S) - config apache" >> /usr/src/mojo.install.log
if [ "`grep "config apache" /usr/src/mojo.install.log`" ];then
make -sj4 && echo "$(date +%Y_%m_%d_%H_%M_%S) - make apache" >> /usr/src/mojo.install.log
fi
if [ "`grep "make apache" /usr/src/mojo.install.log`" ];then
make install && echo "$(date +%Y_%m_%d_%H_%M_%S) - install apache" >> /usr/src/mojo.install.log
fi
/sbin/ldconfig
/bin/mv /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.original
/bin/cp /root/setup/httpd.conf /etc/httpd/conf/httpd.conf
/bin/cp /root/setup/httpd-mpm.conf /etc/httpd/conf/extra/httpd-mpm.conf
/bin/cp /root/setup/httpd /etc/rc.d/init.d/httpd
cd /usr/src/$phplatest
make clean
../php.config.status && echo "$(date +%Y_%m_%d_%H_%M_%S) - config php" >> /usr/src/mojo.install.log
if [ "`grep "config php" /usr/src/mojo.install.log`" ];then
make -sj4 && echo "$(date +%Y_%m_%d_%H_%M_%S) - make php" >> /usr/src/mojo.install.log
fi
if [ "`grep "make php" /usr/src/mojo.install.log`" ];then
make install && echo "$(date +%Y_%m_%d_%H_%M_%S) - install php" >> /usr/src/mojo.install.log
fi
/bin/cp /usr/src/$phplatest/php.ini-production /usr/local/lib/php.ini
This should be ok to remove
#wget -O /etc/init.d/httpd fs01.mojohost.com/files/php/httpd.init
#chmod 755 /etc/init.d/httpd
chkconfig httpd on
rm -rf /home/httpd/html/index.html*
echo "`hostname -s`" > /home/httpd/html/index.html
cd /usr/src/
mv /usr/local/lib/php/extensions/no-debug-non-zts-20131226/opcache.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/opcache.so.original
wget -O - http://fs01.mojohost.com/files/php/php-56-ioncube-zend.tgz|tar -Pzxf -
echo "
zend_extension= /usr/local/ioncube/ioncube_loader_lin_5.6.so
zend_extension=/usr/local/Zend/lib/ZendGuardLoader/ZendGuardLoader.so
zend_loader.enable=1
zend_loader.disable_licensing=0" >> /usr/local/lib/php.ini
mv /usr/local/lib/php.ini /usr/local/Zend/etc/ && ln -s /usr/local/Zend/etc/php.ini /usr/local/lib/php.ini
#wget https://github.com/SpiderLabs/ModSecurity/releases/download/v2.9.1/modsecurity-2.9.1.tar.gz
###wget http://www.modsecurity.org/download/modsecurity-2.9.1.tar.gz
#tar zxf modsecurity-2.7.0.tar.gz
/bin/cp -a /var/www/bui* /home/httpd/. -R
/bin/cp --backup /usr/bin/libtool /home/httpd/build/libtool
#cd /usr/src/$msalatest/;./configure
#make -sj4 && make install && apxs -e -a apache2/mod_security2.la && chmod 755 /usr/lib/apache/mod_security2.so
echo "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
/bin/cp -a /root/setup/conf.d /etc/httpd/
##include client.conf in /etc/httpd/conf/client.conf and touch the file
echo -e "\nInclude /etc/httpd/conf/${newuser}.conf\n" >> /etc/httpd/conf/httpd.conf
touch /etc/httpd/conf/${newuser}.conf
touch /etc/httpd/conf/${newuser}.conf.lan
mkdir -p /etc/httpd/nginx/conf
touch /etc/httpd/nginx/conf/vhost.conf
perl -pi -e 's~;date.timezone =~date.timezone = America/New_York~s' /usr/local/Zend/etc/php.ini
#greg added php logging
/bin/touch /var/log/php_mail.log;/bin/chmod 666 /var/log/php_mail.log;
perl -pi -e 's~^\;mail.log =~mail.log = /var/log/php_mail.log~g' /usr/local/Zend/etc/php.ini
wget -O /etc/logrotate.d/phpmail fs01.mojohost.com/files/phpmail.logrotate
chown -R nobody.nobody /etc/httpd/asl/data