Spread the love

كل ما تحتاجه لتتبيت bl هو دومين و سرفر كلوود عند البدء في سوف تاخد سرفر بنظامcentos 6 تم تقوم بلصق الاكواد داخل شاشة putty

remove old services

yum remove -y httpd;
yum remove -y libopendkim; yum remove -y opendkim; yum remove -y postfix; yum remove -y php;
rm -rf /etc/httpd;
rm -rf /etc/opendkim*;

install new services

yum install -y openssh-clients;
yum install -y glibc.i686;
yum install -y pam.i686 pam;
yum install -y nano;
yum install -y rsync;
yum install -y wget;
yum install -y xinetd;
yum install -y gcc;
yum install -y make;
yum install -y httpd;
yum install -y perl;
yum install -y mod_ssl;
yum install -y zip;
yum install -y unzip;
yum update -y;

stop firewall

service iptables stop;

disable selinux

setenforce 0;
setenforce Disabled;

install php

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
wget http://rpms.remirepo.net/enterprise/remi-release-6.rpm

rpm -Uvh epel-release-latest-6.noarch.rpm

rpm -Uvh remi-release-6*.rpm

nano /etc/yum.repos.d/remi.repo

yum install -y php;
yum install -y php-pgsql;
yum install -y php-mysql;
yum install -y php-common;
yum install -y php-pdo;
yum install -y php-opcache;
yum install -y php-mcrypt;
yum install -y php-imap;
yum install -y php-mbstring;
yum install -y php-xmlrpc;
yum install -y cronie;
yum –enablerepo=remi install -y php-pecl-ssh2;
yum –disablerepo=epel -y update ca-certificates;
rm -rf /home/epel-release-6-8.noarch.rpm /home/remi-release-6*.rpm;

nano /etc/httpd/conf.d/bluemail.conf

put this content in it and CHANGE domain.com with your main domain ( don’t forget to create subdomain app in your domain provider )

ServerName app.yourdomain.com DocumentRoot “/var/bluemail/” AllowOverride all Options Indexes FollowSymLinks ExecCGI AddHandler cgi-script .cgi .pl Order Deny,Allow Allow from all

nano /etc/httpd/conf/httpd.conf
NameVirtualHost *:80

nano /etc/sysconfig/network



cd /var/

unzip bluemail.zip

service httpd restart;


Postgresql Installation script

cd /home;
rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-6-x86_64/pgdg-centos96-9.6-3.noarch.rpm;
yum -y update;
yum -y install postgresql96-server postgresql96-contrib;
service postgresql-9.6 initdb;
service postgresql-9.6 start;
chkconfig postgresql-9.6 on;

su -c “psql” – postgres; # then enter password # HAk3TpuD@VkJPw8s

for exit enter control C

Ctrl C

nano /var/lib/pgsql/9.6/data/pg_hba.conf

“local” is for Unix domain socket connections only

loca all all md5

IPv4 local connections:

host all all md5

IPv6 local connections:

host all all ::1/128 md5

service postgresql-9.6 restart;

nano /var/lib/pgsql/9.6/data/postgresql.conf;

change #listen_addresses = ‘localhost’ to listen_addresses = ‘*’ //port 5450 postgre

change #port = 5432 to port = 5432

service postgresql-9.6 restart;

install phpPgAdmin

yum -y install epel-release;
yum -y update;
yum -y install phpPgAdmin httpd;


nano /etc/httpd/conf.d/phpPgAdmin.conf;

empty the file and write this content in it

Alias /phpPgAdmin /usr/share/phpPgAdmin

Order deny,allow Allow from all

service httpd restart;
chkconfig httpd on;

configure pgAdmin

nano /etc/phpPgAdmin/config.inc.php;

change $conf[‘servers’][0][‘host’] = ”; to $conf[‘servers’][0][‘host’] = ‘localhost’;

change $conf[‘extra_login_security’] = true; to $conf[‘extra_login_security’] = false;

change $conf[‘owned_only’] = false; to $conf[‘owned_only’] = true;

service postgresql-9.6 restart
service httpd restart

service iptables stop;

Username: admin
Password: HAk3TpuD@VkJPw8s

Create database

psql -U admin -d bluemail_system -a -f /var/bluemail_system.sql

psql -U admin -d bluemail_lists -a -f /var/bluemail_lists.sql

nano /etc/php.ini

memory_limit = 2000M 
post_max_size = 2000M 
upload_max_filesize = 2000M
max_file_uploads = 200

short_open_tag = On

—————–Edit by FTP ——————–
nano /var/bluemail/applications/bluemail/configs/databases.ini
nano /var/bluemail/applications/bluemail/configs/namecheap.ini
for edit

master.user = admin
master.password = HAk3TpuD@VkJPw8s

Edit Password Master
mailtng_system => Schema => admin => Tables => ueser

after click on Browse => Edit => password

for create a password for md5 enter the website


yum -y update
service iptables stop;
service network restart
service httpd restart;
service postgresql-9.6 restart;

cd /opt/
wget –no-cookies –no-check-certificate –header “Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie” “http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz”

tar xzf jdk-8u131-linux-x64.tar.gz
cd /opt/jdk1.8.0_131/
alternatives –install /usr/bin/java java /opt/jdk1.8.0_131/bin/java 2
alternatives –config java

Enter to keep the current selection[+], or type selection number: 1

alternatives –install /usr/bin/jar jar /opt/jdk1.8.0_131/bin/jar 2
alternatives –install /usr/bin/javac javac /opt/jdk1.8.0_131/bin/javac 2
alternatives –set jar /opt/jdk1.8.0_131/bin/jar

alternatives –set javac /opt/jdk1.8.0_131/bin/javac

chown -R apache:apache /var/bluemail
chown -R apache:apache /var/bluemail/tmp/*
chown -R apache:apache /var/bluemail/tmp/logs/

—– End – or After reboot ———

chown -R apache:apache /var/bluemail
chown -R apache:apache /var/bluemail/tmp/*
chown -R apache:apache /var/bluemail/tmp/logs/
export JAVA_HOME=/opt/jdk1.8.0_131
export JRE_HOME=/opt/jdk1.8.0_131/jre
export PATH=$PATH:/opt/jdk1.8.0_131/bin:/opt/jdk1.8.0_131/jre/bin

yum -y update;
service iptables stop;
service network restart;
service httpd restart;
service postgresql-9.6 restart;