Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - bullten

Pages: [1]
1
PHP / Install php 7.2.4 and php-fpm on centos web panel
« on: March 30, 2018, 10:47:33 AM »
Quote
mkdir bullten
cd bullten
wget http://am1.php.net/distributions/php-7.2.4.tar.gz
tar zxvf php-7.2.4.tar.gz
cd php-7.2.4

Quote
./configure --with-bz2 \
   --prefix=/usr/local/php \
   --with-apxs2=/usr/local/apache/bin/apxs \
   --with-curl \
   --with-libdir=/usr/lib64 \
   --with-config-file-path=/usr/local/php \
   --with-config-file-scan-dir=/usr/local/php/php.d \
   --with-iconv \
   --with-gd \
   --with-jpeg-dir=/usr/local/php \
   --with-png-dir \
   --with-freetype-dir=/usr/local/php \
   --with-kerberos \
   --enable-fpm \
   --enable-mbstring \
   --with-mhash \
   --with-mysqli \
   --with-sqlite3 \
   --with-mysqli=mysqlnd \
   --with-mysql-sock=/var/lib/mysql/mysql.sock \
   --with-xsl \
   --with-pspell \
   --with-openssl \
   --with-gettext \
   --with-pcre-regex \
   --with-libxml-dir=/usr/local/php \
   --with-pdo-mysql \
   --with-pic \
   --with-pear=/usr/local/php/pear \
   --with-gmp \
   --enable-zip \
   --with-zlib \
   --enable-inline-optimization \
   --enable-mbregex \
   --enable-opcache \
   --enable-fpm \
   --enable-posix \
   --enable-calendar \
   --enable-bcmath \
   --enable-exif \
   --enable-phar \
   --enable-ftp \
   --enable-pdo \
   --enable-soap \
   --enable-sockets \
   --enable-intl \
   --with-xmlrpc \
   --without-pdo-sqlite
   
Quote
make && make install

Quote
rm -rf /usr/local/php/php.d/ioncube.ini
rm -rf /usr/local/php/php.ini
cp php.ini-production /usr/local/php/php.ini
rm -rf /usr/local/bin/php
ln -s /usr/local/php/bin/php /usr/local/bin/php
cp /root/bullten/php-7.2.4/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
chmod +x /etc/init.d/php-fpm

Quote
cd /usr/local/php/etc
cp php-fpm.conf.default php-fpm.conf
nano php-fpm.conf

uncomment below lines
Quote
pid = run/php-fpm.pid
error_log = log/php-fpm.log

Quote
cd php-fpm.d
cp www.conf.default yourdomain.com.conf
nano yourdomain.com.conf

change to yourusername and edit other lines as needed.

Quote
user = yourusername
group = yourusername

Quote
mkdir -p /usr/local/php/log/


edit your vhost file and add the below lines just below scripalias

Quote
<LocationMatch "^/(.*\.php(/.*)?)$">
        ProxyPass fcgi://127.0.0.1:9000/home/yourusername/public_html/$1
    </LocationMatch>


nano /usr/local/apache/conf/httpd.conf
uncomment the below line
LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so

service php-fpm start
service php-fpm restart
service php-fpm status
service php-fpm stop






2
Other / Denying Installation Upon Invalid Hostname
« on: February 06, 2018, 05:33:40 PM »
Hello,

The script developers should not allow installation of CWP upon invalid hostname like domain.com.

FQDN should be followed.

https://en.wikipedia.org/wiki/Fully_qualified_domain_name

3
How to / Disable SuPHP And Use DSO with Apache 2.4.28 and PHP 5.6.33
« on: January 25, 2018, 07:39:35 PM »
Quote
rm -rf /tmp/apache-build
mkdir -p /tmp/apache-build
cd /tmp/apache-build

Quote
wget http://www.eu.apache.org/dist//httpd/httpd-2.4.28.tar.gz
wget http://www.eu.apache.org/dist//apr/apr-1.6.3.tar.gz
wget http://www.eu.apache.org/dist//apr/apr-util-1.6.1.tar.gz


Quote
tar zxvf httpd-2.4.28.tar.gz
tar zxvf apr-1.6.3.tar.gz
tar zxvf apr-util-1.6.1.tar.gz


Quote
cd /tmp/apache-build/apr-1.6.3
make distclean
./configure
make
make install

Quote
cd /tmp/apache-build/apr-util-1.6.1
make distclean
./configure --with-apr=/usr/local/apr/
make
make install

Quote
cd /tmp/apache-build/httpd-2.4.28
rm -rf /usr/local/apache/conf/httpd.conf
make distclean
./configure --enable-so --prefix=/usr/local/apache --with-mpm=prefork --enable-ssl --enable-unique-id --enable-ssl=/usr/include/openssl --enable-rewrite  --enable-deflate --enable-suexec --with-suexec-docroot="/home" --with-suexec-caller="nobody" --with-suexec-logfile="/usr/local/apache/logs/suexec_log" --enable-asis --enable-filter --with-pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr --enable-headers --enable-expires --enable-proxy --enable-cgi --enable-rewrite --enable-speling
make && make install
echo "Include /usr/local/apache/conf/sharedip.conf" >> /usr/local/apache/conf/httpd.conf
echo "Include /usr/local/apache/conf.d/*.conf" >> /usr/local/apache/conf/httpd.conf
sed -i "s|DirectoryIndex index.html|DirectoryIndex index.php index.html|g" /usr/local/apache/conf/httpd.conf
mv /usr/local/apache/conf.d/suphp.conf /usr/local/apache/conf/suphp.conf


Quote
cd /tmp/php-build/
wget http://fr2.php.net/distributions/php-5.6.33.tar.gz
tar zxvf php-5.6.33.tar.gz
cd php-5.6.33
make distclean
./configure --with-apxs2=/usr/local/apache/bin/apxs --with-zlib --enable-soap --enable-exif --with-config-file-path=/usr/local/php --with-config-file-scan-dir=/usr/local/php/php.d   --enable-phar --enable-bcmath --enable-calendar --with-curl --with-iconv --with-mysql --with-mysqli --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-mcrypt --with-gettext --with-xsl --with-xmlrpc --with-pdo-mysql=mysqlnd --enable-posix --enable-ftp --with-openssl --enable-mbstring --with-jpeg-dir=/usr --with-freetype-dir=/usr --with-kerberos --with-xsl --with-bz2 --enable-sockets --enable-zip --with-gd --enable-sockets --with-pcre-regex --libdir=/usr/lib64 --disable-cgi --with-mysql-sock=/var/lib/mysql/mysql.sock
make && make install
rm -rf /usr/local/php/php.ini
cp php.ini-production /usr/local/php/php.ini
sed -i "s|.*modules/libphp5.so.*||g" /usr/local/apache/conf/httpd.conf


Quote
wget --output-document="/usr/local/apache/conf.d/php.conf" http://dl-package.bullten.in/cwp/files/dso/php.txt


uncomment
Quote
LoadModule proxy_module modules/mod_proxy.so
LoadModule rewrite_module modules/mod_rewrite.so

Quote
ln -s /usr/local/apache/bin/httpd /usr/sbin/httpd
service httpd restart

Quote
chmod 755 /home/user/public_html

4
Apache / Protect Your Server Against Symlink Attack
« on: January 15, 2018, 09:15:43 PM »
Hello,

Cloudlinux released kernel based patch for free to protect server against symlink attack

https://www.cloudlinux.com/kernelcare-blog/entry/symlink-protection-patchset-centos-6-7-kernelcare

[root@localhost ~]# kcarectl --info
kpatch-state: patch is applied
kpatch-for: Linux version 3.10.0-514.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Tue Nov 22 16:42:41 UTC 2016
kpatch-build-time: Fri Dec  8 11:14:03 2017
kpatch-description: 223-free;

Pages: [1]