0% found this document useful (0 votes)
168 views4 pages

Commandes Installation

This document summarizes the steps to install and configure a mail server on a Linux system. It removes old services, installs new packages and services including PHP, PostgreSQL, and Java. It configures PostgreSQL, installs and configures a mail application called bluemail1, sets permissions and ownerships, and configures the web server. The final sections provide an IP address and login credentials for the mail web interface.

Uploaded by

Bilal Prood
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
168 views4 pages

Commandes Installation

This document summarizes the steps to install and configure a mail server on a Linux system. It removes old services, installs new packages and services including PHP, PostgreSQL, and Java. It configures PostgreSQL, installs and configures a mail application called bluemail1, sets permissions and ownerships, and configures the web server. The final sections provide an IP address and login credentials for the mail web interface.

Uploaded by

Bilal Prood
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

###################################################################################

########
# etpe 1
#
###################################################################################
########
# 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*;
yum -y remove postgresql*
rm -fr /var/bluemail1
rm -fr /var/lib/pgsql/9.6/data/*
# 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;
# 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 remi-release-6*.rpm epel-release-latest-6.noarch.rpm

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;

# 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;

###################################################################################
########
# etpe 2
#
###################################################################################
########
su -c psql - postgres;
CREATE ROLE mailer2 PASSWORD 'X1nd9r1_' SUPERUSER CREATEDB CREATEROLE INHERIT
LOGIN;
ALTER USER postgres WITH PASSWORD 'X1nd9r1_';
\q

rm -f /var/lib/pgsql/9.6/data/pg_hba.conf
cp /var/Files-install/pg_hba.conf /var/lib/pgsql/9.6/data/pg_hba.conf #md5
service postgresql-9.6 restart

psql -d postgres -U mailer2 -W

CREATE DATABASE bluemail_system;


CREATE DATABASE bluemail_lists;
\q

psql -Umailer2 -d bluemail_system -a -f /var/BASEv5/bluemail_system_template.sql

###################################################################################
########
# etpe 3
#
###################################################################################
########
cd /var/
unzip bluemail*
#mv /var/bluemail1_181006/bluemail1 /var/bluemail1
#rm -fr bluemail1_181006
#chmod -R 777 /var/bluemail
chmod -R 777 /var/bluemail1
#rm -f /var/bluemail/applications/bluemail/configs/namecheap.ini
#rm -f /var/bluemail/applications/bluemail/configs/databases.ini
#cp /var/Files-install/namecheap.ini /var/bluemail/applications/bluemail/configs/
#cp /var/Files-install/databases.ini /var/bluemail/applications/bluemail/configs/
rm -f /var/bluemail1/applications/bluemail/configs/namecheap.ini
rm -f /var/bluemail1/applications/bluemail/configs/databases.ini
cp /var/Files-install/namecheap.ini /var/bluemail1/applications/bluemail/configs/
cp /var/Files-install/databases.ini /var/bluemail1/applications/bluemail/configs/
rm -f /etc/php.ini
cp /var/Files-install/php.ini /etc
#chown -R apache:apache /var/bluemail/
#chown -R apache:apache /var/bluemail/tmp/*;
#chown -R apache:apache /var/bluemail/tmp/logs/;
chown -R apache:apache /var/bluemail1/
chown -R apache:apache /var/bluemail1/tmp/*;
chown -R apache:apache /var/bluemail1/tmp/logs/;
service iptables stop
service httpd restart
###################################################################################
########
# etpe 4
#
###################################################################################
########

rm -f /etc/yum.repos.d/remi.repo #ba9i
cp /var/Files-install/remi.repo /etc/yum.repos.d/ #ba9i
# create a file /etc/httpd/conf.d/mailtng.conf #ba9i
cp /var/Files-install/mailtng.conf /etc/httpd/conf.d/ #ba9i
service httpd restart;
rm -f /var/lib/pgsql/9.6/data/pg_hba.conf
cp /var/Files-install/pg_hba.conf /var/lib/pgsql/9.6/data/
service postgresql-9.6 restart
rm -f /var/lib/pgsql/9.6/data/postgresql.conf
cp /var/Files-install/postgresql.conf /var/lib/pgsql/9.6/data/
service postgresql-9.6 restart
yum -y install epel-release
yum -y update
yum -y install phpPgAdmin httpd
rm -f /etc/httpd/conf.d/phpPgAdmin.conf
cp /var/Files-install/phpPgAdmin.conf /etc/httpd/conf.d/
service httpd start
chkconfig httpd on
rm -f /etc/phpPgAdmin/config.inc.php
cp /var/Files-install/config.inc.php /etc/phpPgAdmin/
rm -f /etc/httpd/conf/httpd.conf
mv /var/Files-install/httpd.conf /etc/httpd/conf/httpd.conf
service postgresql-9.6 restart
service httpd restart

###################################################################################
########
# etpe 5
#
###################################################################################
########

###################################################################################
########
# etpe 7
#
###################################################################################
########
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 jdk1.8.0_131/

alternatives --install /usr/bin/java java /opt/jdk1.8.0_131/bin/java 2


alternatives --config java
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

export JAVA_HOME=/opt/jdk1.8.0_131
export JRE_HOME=/opt/jdk1.8.0_131/jre
export PATH=$PATH:/opt/jdk1.8.0_121/bin:/opt/jdk1.8.0_131/jre/bin
cd /
FIN

cd /var/bluemail1/
chown -R apache:apache *
chmod -R 777 *

IP :

login web : admin/admin

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy