Update
This commit is contained in:
49
Centos7-Pmaker/Vagrantfile
vendored
Normal file
49
Centos7-Pmaker/Vagrantfile
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
VAGRANTFILE_API_VERSION = "2"
|
||||
|
||||
nodes = [
|
||||
{ hostname: 'LAB-PMAKER-01', box: 'generic/centos7', ip: '192.168.1.201' }
|
||||
]
|
||||
|
||||
unless Vagrant.has_plugin?("vagrant-reload")
|
||||
puts 'Installing vagrant-reload Plugin...'
|
||||
system('vagrant plugin install vagrant-reload')
|
||||
end
|
||||
|
||||
unless Vagrant.has_plugin?("vagrant-proxyconf")
|
||||
puts 'Installing vagrant-proxyconf Plugin...'
|
||||
system('vagrant plugin install vagrant-proxyconf')
|
||||
end
|
||||
|
||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||
nodes.each do |node|
|
||||
config.vm.define node[:hostname] do |node_config|
|
||||
node_config.vm.hostname = node[:hostname]
|
||||
node_config.vm.box = node[:box]
|
||||
node_config.vm.network "public_network", ip: node[:ip]
|
||||
#node_config.vm.network "private_network", type: "dhcp"
|
||||
node_config.vm.synced_folder('files/', '/Vagrantfiles', type: 'rsync')
|
||||
config.vm.provision "shell", path: "scripts/install.sh"
|
||||
config.vm.provision :reload
|
||||
config.vm.provision "shell", path: "scripts/pmaker.sh"
|
||||
config.vm.provision "shell", inline: "echo 'INSTALLER: Installation Terminee, Centos 7 LAMP pret a etre utilise !!!'"
|
||||
end
|
||||
end
|
||||
|
||||
config.vm.provider :vmware_esxi do |esxi|
|
||||
esxi.esxi_hostname = '192.168.1.145'
|
||||
esxi.esxi_username = 'root'
|
||||
esxi.esxi_password = '20-Constructions-16'
|
||||
esxi.esxi_hostport = 22
|
||||
esxi.esxi_virtual_network = 'VM Network'
|
||||
esxi.esxi_disk_store = 'datastore1'
|
||||
esxi.guest_guestos = 'centos7-64'
|
||||
esxi.resource_pool = '/'
|
||||
esxi.guest_memsize = '8192'
|
||||
esxi.guest_numvcpus = '4'
|
||||
esxi.guest_nic_type = 'VMXNET3'
|
||||
esxi.guest_disk_type = 'thick'
|
||||
esxi.guest_boot_disk_size = 150
|
||||
esxi.guest_virtualhw_version = '15'
|
||||
esxi.guest_custom_vmx_settings = [['vhv.enable','TRUE'], ['floppy0.present','FALSE']]
|
||||
end
|
||||
end
|
120
Centos7-Pmaker/files/agent.cfg
Normal file
120
Centos7-Pmaker/files/agent.cfg
Normal file
@ -0,0 +1,120 @@
|
||||
# fusioninventory agent configuration
|
||||
|
||||
# all defined values match default
|
||||
# all commented values are examples
|
||||
|
||||
|
||||
#
|
||||
# Target definition options
|
||||
#
|
||||
|
||||
# send tasks results to an OCS server
|
||||
#server = http://server.domain.com/ocsinventory
|
||||
# send tasks results to a FusionInventory for GLPI server
|
||||
#server = http://server.domain.com/glpi/plugins/fusioninventory/
|
||||
server = http://glpi.exemple.lan/plugins/fusioninventory/
|
||||
# write tasks results in a directory
|
||||
#local = /tmp
|
||||
|
||||
#
|
||||
# Task definition options
|
||||
#
|
||||
|
||||
# disable software deployment tasks
|
||||
#no-task = deploy
|
||||
#tasks = inventory,deploy,inventory
|
||||
|
||||
#
|
||||
# Target scheduling options
|
||||
#
|
||||
|
||||
# maximum delay before first target, in seconds
|
||||
delaytime = 3600
|
||||
# do not contact the target before next scheduled time
|
||||
lazy = 0
|
||||
|
||||
#
|
||||
# Inventory task specific options
|
||||
#
|
||||
|
||||
# do not list local printers
|
||||
# no-category = printer
|
||||
# allow to scan user home directories
|
||||
scan-homedirs = 0
|
||||
# allow to scan user profiles
|
||||
scan-profiles = 0
|
||||
# save the inventory as HTML
|
||||
html = 0
|
||||
# timeout for inventory modules execution
|
||||
backend-collect-timeout = 30
|
||||
# always send data to server
|
||||
force = 0
|
||||
# additional inventory content file
|
||||
additional-content =
|
||||
|
||||
#
|
||||
# Package deployment task specific options
|
||||
#
|
||||
|
||||
# do not use peer to peer to download files
|
||||
no-p2p = 0
|
||||
|
||||
#
|
||||
# Network options
|
||||
#
|
||||
|
||||
# proxy address
|
||||
proxy =
|
||||
# user name for server authentication
|
||||
user =
|
||||
# password for server authentication
|
||||
password =
|
||||
# CA certificates directory
|
||||
ca-cert-dir =
|
||||
# CA certificates file
|
||||
ca-cert-file =
|
||||
# do not check server SSL certificate
|
||||
no-ssl-check = 0
|
||||
# connection timeout, in seconds
|
||||
timeout = 180
|
||||
|
||||
#
|
||||
# Web interface options
|
||||
#
|
||||
|
||||
# disable embedded web server
|
||||
no-httpd = 0
|
||||
# network interface to listen to
|
||||
httpd-ip =
|
||||
# network port to listen to
|
||||
httpd-port = 62354
|
||||
# trust requests without authentication token
|
||||
httpd-trust =
|
||||
|
||||
#
|
||||
# Logging options
|
||||
#
|
||||
|
||||
# Logger backend, either Stderr, File or Syslog (Stderr)
|
||||
logger = stderr
|
||||
# log file
|
||||
#logfile = /var/log/fusioninventory.log
|
||||
# maximum log file size, in MB
|
||||
#logfile-maxsize = 0
|
||||
# Syslog facility
|
||||
logfacility = LOG_USER
|
||||
# Use color in the console
|
||||
color = 0
|
||||
|
||||
#
|
||||
# Execution mode options
|
||||
#
|
||||
|
||||
# add given tag to inventory results
|
||||
tag =
|
||||
# debug mode
|
||||
debug = 0
|
||||
|
||||
# time to wait to reload config (0 means no reload, it's default value)
|
||||
# conf-reload-interval = 0
|
||||
|
19
Centos7-Pmaker/files/centreon.cfg
Normal file
19
Centos7-Pmaker/files/centreon.cfg
Normal file
@ -0,0 +1,19 @@
|
||||
################################################################################
|
||||
# COMMAND DEFINITIONS
|
||||
# Syntax:
|
||||
# command[]=
|
||||
#
|
||||
command[users]=/usr/lib64/nagios/plugins/check_users -w 5 -c 10
|
||||
command[load]=/usr/lib64/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
|
||||
command[check_load]=/usr/lib64/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
|
||||
command[swap]=/usr/lib64/nagios/plugins/check_swap -w 20% -c 10%
|
||||
command[root_disk]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p / -m
|
||||
command[usr_disk]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /usr -m
|
||||
command[var_disk]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /var -m
|
||||
command[zombie_procs]=/usr/lib64/nagios/plugins/check_procs -w 5 -c 10 -s Z
|
||||
command[total_procs]=/usr/lib64/nagios/plugins/check_procs -w 190 -c 200
|
||||
command[proc_named]=/usr/lib64/nagios/plugins/check_procs -w 1: -c 1:2 -C named
|
||||
command[proc_crond]=/usr/lib64/nagios/plugins/check_procs -w 1: -c 1:5 -C crond
|
||||
command[proc_syslogd]=/usr/lib64/nagios/plugins/check_procs -w 1: -c 1:2 -C syslog-ng
|
||||
command[proc_rsyslogd]=/usr/lib64/nagios/plugins/check_procs -w 1: -c 1:2 -C rsyslogd
|
||||
command[check_yum]=/usr/lib64/nagios/plugins/check_yum.py
|
7
Centos7-Pmaker/files/laravel-worker-workflow.ini
Normal file
7
Centos7-Pmaker/files/laravel-worker-workflow.ini
Normal file
@ -0,0 +1,7 @@
|
||||
[program:laravel-worker-workflow]
|
||||
user=apache
|
||||
directory=/opt/processmaker/
|
||||
command=/opt/processmaker/processmaker artisan queue:work --workspace=workflow
|
||||
stdout_logfile=/opt/processmaker/worker-workflow.log
|
||||
autostart=true
|
||||
autorestart=true
|
77
Centos7-Pmaker/files/phpMyAdmin.conf
Normal file
77
Centos7-Pmaker/files/phpMyAdmin.conf
Normal file
@ -0,0 +1,77 @@
|
||||
# phpMyAdmin - Web based MySQL browser written in php
|
||||
#
|
||||
# Allows only localhost by default
|
||||
#
|
||||
# But allowing phpMyAdmin to anyone other than localhost should be considered
|
||||
# dangerous unless properly secured by SSL
|
||||
|
||||
Alias /phpMyAdmin /usr/share/phpMyAdmin
|
||||
Alias /phpmyadmin /usr/share/phpMyAdmin
|
||||
|
||||
<Directory /usr/share/phpMyAdmin/>
|
||||
AddDefaultCharset UTF-8
|
||||
|
||||
<IfModule mod_authz_core.c>
|
||||
# Apache 2.4
|
||||
#<RequireAny>
|
||||
#Require ip 127.0.0.1
|
||||
#Require ip ::1
|
||||
#</RequireAny>
|
||||
Require all granted
|
||||
</IfModule>
|
||||
<IfModule !mod_authz_core.c>
|
||||
# Apache 2.2
|
||||
Order Deny,Allow
|
||||
Deny from All
|
||||
Allow from 127.0.0.1
|
||||
Allow from ::1
|
||||
</IfModule>
|
||||
</Directory>
|
||||
|
||||
<Directory /usr/share/phpMyAdmin/setup/>
|
||||
<IfModule mod_authz_core.c>
|
||||
# Apache 2.4
|
||||
#<RequireAny>
|
||||
#Require ip 127.0.0.1
|
||||
#Require ip ::1
|
||||
#</RequireAny>
|
||||
Require all granted
|
||||
</IfModule>
|
||||
<IfModule !mod_authz_core.c>
|
||||
# Apache 2.2
|
||||
Order Deny,Allow
|
||||
Deny from All
|
||||
Allow from 127.0.0.1
|
||||
Allow from ::1
|
||||
</IfModule>
|
||||
</Directory>
|
||||
|
||||
# These directories do not require access over HTTP - taken from the original
|
||||
# phpMyAdmin upstream tarball
|
||||
#
|
||||
<Directory /usr/share/phpMyAdmin/libraries/>
|
||||
Order Deny,Allow
|
||||
Deny from All
|
||||
Allow from None
|
||||
</Directory>
|
||||
|
||||
<Directory /usr/share/phpMyAdmin/setup/lib/>
|
||||
Order Deny,Allow
|
||||
Deny from All
|
||||
Allow from None
|
||||
</Directory>
|
||||
|
||||
<Directory /usr/share/phpMyAdmin/setup/frames/>
|
||||
Order Deny,Allow
|
||||
Deny from All
|
||||
Allow from None
|
||||
</Directory>
|
||||
|
||||
# This configuration prevents mod_security at phpMyAdmin directories from
|
||||
# filtering SQL etc. This may break your mod_security implementation.
|
||||
#
|
||||
#<IfModule mod_security.c>
|
||||
# <Directory /usr/share/phpMyAdmin/>
|
||||
# SecRuleInheritance Off
|
||||
# </Directory>
|
||||
#</IfModule>
|
30
Centos7-Pmaker/files/pmos.conf
Normal file
30
Centos7-Pmaker/files/pmos.conf
Normal file
@ -0,0 +1,30 @@
|
||||
<VirtualHost *:80>
|
||||
ServerName 127.0.0.1
|
||||
|
||||
DocumentRoot /opt/processmaker/workflow/public_html
|
||||
DirectoryIndex index.html index.php
|
||||
|
||||
ErrorLog /var/log/httpd/pm-error.log
|
||||
CustomLog /var/log/httpd/pm-access.log combined
|
||||
|
||||
<Directory /opt/processmaker/workflow/public_html>
|
||||
Options Indexes FollowSymLinks MultiViews
|
||||
AllowOverride All
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
Require all granted
|
||||
|
||||
ExpiresActive On
|
||||
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^.*/(.*)$ app.php [QSA,L,NC]
|
||||
</IfModule>
|
||||
</Directory>
|
||||
#PHP-FPM
|
||||
<FilesMatch "\.php">
|
||||
SetHandler "proxy:unix:/var/run/php-fpm/processmaker.sock|fcgi://localhost"
|
||||
</FilesMatch>
|
||||
|
||||
</VirtualHost>
|
15
Centos7-Pmaker/files/processmaker.conf
Normal file
15
Centos7-Pmaker/files/processmaker.conf
Normal file
@ -0,0 +1,15 @@
|
||||
[processmaker]
|
||||
user = apache
|
||||
group = apache
|
||||
listen = /var/run/php-fpm/processmaker.sock
|
||||
listen.mode = 0664
|
||||
listen.owner = apache
|
||||
listen.group = apache
|
||||
pm = dynamic
|
||||
pm.max_children = 100
|
||||
pm.start_servers = 20
|
||||
pm.min_spare_servers = 20
|
||||
pm.max_spare_servers = 50
|
||||
pm.max_requests = 500
|
||||
php_admin_value[error_log] = /var/log/php-fpm/processmaker-error.log
|
||||
php_admin_flag[log_errors] = on
|
41
Centos7-Pmaker/files/snmpd.conf
Normal file
41
Centos7-Pmaker/files/snmpd.conf
Normal file
@ -0,0 +1,41 @@
|
||||
#com2sec paranoid default EXEMPLE-PUB
|
||||
com2sec readonly default EXEMPLE-PRIV
|
||||
#com2sec readwrite default EXEMPLE-PRIV
|
||||
#group MyRWGroup usm readwrite
|
||||
group ROGroup v1 readonly
|
||||
|
||||
informsink 192.168.1.71 EXEMPLE-PRIV
|
||||
|
||||
# incl/excl subtree mask
|
||||
view all included .1 80
|
||||
view system included .iso.org.dod.internet.mgmt.mib-2.system
|
||||
view system included .1.3.6.1.4.1.2021.11
|
||||
view System included .1.3.6.1.2.1.1
|
||||
view System included .1.3.6.1.2.1.25.1.1
|
||||
|
||||
####
|
||||
# Finally, grant the 2 groups access to the 1 view with different
|
||||
# write permissions:
|
||||
|
||||
# context sec.model sec.level match read write notif
|
||||
access MyROSystem "" any noauth exact system none none
|
||||
access MyROGroup "" any noauth exact all none none
|
||||
access MyRWGroup "" any noauth exact all all none
|
||||
access ROGroup "" v1 noauth exact all none none
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
syslocation France (configure /etc/snmp/snmpd.local.conf)
|
||||
syscontact Root <administrateur@tips-of-mine.fr> (configure /etc/snmp/snmpd.local.conf)
|
||||
|
||||
# Check the / partition and make sure it contains at least 10 megs.
|
||||
|
||||
disk / 10000
|
||||
|
||||
# MUCH more can be done with the snmpd.conf than is shown as an
|
||||
# example here.
|
||||
exec .1.3.6.1.4.1.2021.54 hdNum /usr/local/bin/snmpdiskio hdNum
|
||||
exec .1.3.6.1.4.1.2021.55 hdIndex /usr/local/bin/snmpdiskio hdIndex
|
||||
exec .1.3.6.1.4.1.2021.56 hdDescr /usr/local/bin/snmpdiskio hdDescr
|
||||
exec .1.3.6.1.4.1.2021.57 hdInBlocks /usr/local/bin/snmpdiskio hdInBlocks
|
||||
exec .1.3.6.1.4.1.2021.58 hdOutBlocks /usr/local/bin/snmpdiskio hdOutBlocks
|
185
Centos7-Pmaker/scripts/install.sh
Normal file
185
Centos7-Pmaker/scripts/install.sh
Normal file
@ -0,0 +1,185 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo '.'
|
||||
echo ' /$$$$$$$$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$$ /$$ /$$ /$$$$$$ /$$ /$$ /$$$$$$$$'
|
||||
echo '|__ $$__/|_ $$_/| $$__ $$ /$$__ $$ /$$__ $$| $$_____/ | $$$ /$$$|_ $$_/| $$$ | $$| $$_____/'
|
||||
echo ' | $$ | $$ | $$ \ $$| $$ \__/ | $$ \ $$| $$ | $$$$ /$$$$ | $$ | $$$$| $$| $$ '
|
||||
echo ' | $$ | $$ | $$$$$$$/| $$$$$$ /$$$$$$| $$ | $$| $$$$$ /$$$$$$| $$ $$/$$ $$ | $$ | $$ $$ $$| $$$$$ '
|
||||
echo ' | $$ | $$ | $$____/ \____ $$|______/| $$ | $$| $$__/|______/| $$ $$$| $$ | $$ | $$ $$$$| $$__/ '
|
||||
echo ' | $$ | $$ | $$ /$$ \ $$ | $$ | $$| $$ | $$\ $ | $$ | $$ | $$\ $$$| $$ '
|
||||
echo ' | $$ /$$$$$$| $$ | $$$$$$/ | $$$$$$/| $$ | $$ \/ | $$ /$$$$$$| $$ \ $$| $$$$$$$$'
|
||||
echo ' |__/ |______/|__/ \______/ \______/ |__/ |__/ |__/|______/|__/ \__/|________/'
|
||||
echo '.'
|
||||
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: VM OK'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Debut MAJ'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
yum install epel-release -y
|
||||
|
||||
yum upgrade -y
|
||||
|
||||
yum upgrade -y
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Fin MAJ'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Debut ENV'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
echo ' - Desactivation SELINUX'
|
||||
|
||||
setenforce 0
|
||||
sed -i --follow-symlinks "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/sysconfig/selinux
|
||||
|
||||
echo ' - Parametrage'
|
||||
|
||||
echo LANG=fr_FR.utf-8 >> /etc/environment
|
||||
echo LC_ALL=fr_FR.utf-8 >> /etc/environment
|
||||
|
||||
echo ' - Timezone'
|
||||
|
||||
sudo timedatectl set-timezone Europe/Paris
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Fin ENV'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Debut AdminTools'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
echo ' - Installation composants'
|
||||
|
||||
yum install htop yum-utils nano mlocate -y
|
||||
|
||||
echo ' - Installation Supervision'
|
||||
|
||||
yum install python36-pip net-snmp yum-utils -y
|
||||
yum install nrpe nagios-plugins-* --skip-broken -y
|
||||
|
||||
echo ' - Configuration Supervision'
|
||||
|
||||
echo ' -- Modification du fichier : nrpe.cfg'
|
||||
|
||||
sed -i --follow-symlinks "s/allowed_hosts=127.0.0.1,::1/allowed_hosts=127.0.0.1,::1,192.168.1.71,centreon,centreon.tips-of-mine.lan/g" /etc/nagios/nrpe.cfg
|
||||
|
||||
echo ' -- Creation du fichier : centreon.cfg'
|
||||
|
||||
sudo mv /Vagrantfiles/centreon.cfg /etc/nrpe.d/centreon.cfg
|
||||
|
||||
echo ' -- Sauvegarde du fichier : snmpd.conf'
|
||||
|
||||
mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bak
|
||||
|
||||
echo ' -- Creation du fichier : snmpd.conf'
|
||||
|
||||
sudo mv /Vagrantfiles/snmpd.conf /etc/snmp/snmpd.conf
|
||||
|
||||
echo ' -- Creation du fichier : snmpd.conf'
|
||||
|
||||
echo ' - daemon Service'
|
||||
|
||||
systemctl daemon-reload
|
||||
|
||||
echo ' - Demarrage des services'
|
||||
|
||||
systemctl enable snmpd && systemctl start snmpd
|
||||
systemctl enable nrpe && systemctl start nrpe
|
||||
|
||||
echo ' - Installation Inventaire'
|
||||
|
||||
yum install fusioninventory-agent fusioninventory-agent-task-inventory -y
|
||||
|
||||
echo ' - Configuration Inventaire'
|
||||
|
||||
echo ' -- Creation du fichier : agent.cfg'
|
||||
|
||||
sudo mv /Vagrantfiles/agent.cfg /etc/fusioninventory/agent.cfg
|
||||
|
||||
echo ' - daemon Service'
|
||||
|
||||
systemctl daemon-reload
|
||||
|
||||
echo ' - Demarrage des services'
|
||||
|
||||
systemctl restart fusioninventory-agent && systemctl enable fusioninventory-agent
|
||||
|
||||
echo ' - Configuration SSH'
|
||||
|
||||
sed -i --follow-symlinks "s/#HostKey/HostKey/g" /etc/ssh/sshd_config
|
||||
sed -i --follow-symlinks "s/PasswordAuthentication no/PasswordAuthentication yes/g" /etc/ssh/sshd_config
|
||||
sed -i --follow-symlinks "s/UseDNS no/#UseDNS yes/g" /etc/ssh/sshd_config
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Fin AdminTools'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Debut Gestion Disque'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
echo ' - Configuration disque'
|
||||
sudo fdisk -u /dev/sda<<EOF
|
||||
p
|
||||
d
|
||||
2
|
||||
n
|
||||
p
|
||||
2
|
||||
|
||||
|
||||
t
|
||||
2
|
||||
8e
|
||||
w
|
||||
EOF
|
||||
|
||||
echo ' - Configuration disque LVM'
|
||||
|
||||
echo '===================================================================================================='
|
||||
sudo partx -u /dev/sda
|
||||
echo '===================================================================================================='
|
||||
sudo pvresize /dev/sda2
|
||||
echo '===================================================================================================='
|
||||
sudo pvscan
|
||||
echo '===================================================================================================='
|
||||
sudo vgdisplay
|
||||
echo '===================================================================================================='
|
||||
sudo lvdisplay
|
||||
echo '===================================================================================================='
|
||||
sudo lvextend -l +100%FREE -r /dev/centos_centos7/root
|
||||
echo '===================================================================================================='
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Fin Gestion Disque'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Reboot'
|
||||
echo '**********************'
|
||||
echo '.'
|
266
Centos7-Pmaker/scripts/pmaker.sh
Normal file
266
Centos7-Pmaker/scripts/pmaker.sh
Normal file
@ -0,0 +1,266 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo '.'
|
||||
echo ' /$$$$$$ /$$ /$$ /$$$$$$ /$$$$$$$$ /$$$$$$ /$$ /$$ /$$$$$$ /$$$$$$$$ /$$$$$$ /$$$$$$ /$$ /$$'
|
||||
echo '|_ $$_/| $$$ | $$ /$$__ $$|__ $$__//$$__ $$| $$ | $$ /$$__ $$|__ $$__/|_ $$_/ /$$__ $$| $$$ | $$'
|
||||
echo ' | $$ | $$$$| $$| $$ \__/ | $$ | $$ \ $$| $$ | $$ | $$ \ $$ | $$ | $$ | $$ \ $$| $$$$| $$'
|
||||
echo ' | $$ | $$ $$ $$| $$$$$$ | $$ | $$$$$$$$| $$ | $$ | $$$$$$$$ | $$ | $$ | $$ | $$| $$ $$ $$'
|
||||
echo ' | $$ | $$ $$$$ \____ $$ | $$ | $$__ $$| $$ | $$ | $$__ $$ | $$ | $$ | $$ | $$| $$ $$$$'
|
||||
echo ' | $$ | $$\ $$$ /$$ \ $$ | $$ | $$ | $$| $$ | $$ | $$ | $$ | $$ | $$ | $$ | $$| $$\ $$$'
|
||||
echo ' /$$$$$$| $$ \ $$| $$$$$$/ | $$ | $$ | $$| $$$$$$$$| $$$$$$$$| $$ | $$ | $$ /$$$$$$| $$$$$$/| $$ \ $$'
|
||||
echo '|______/|__/ \__/ \______/ |__/ |__/ |__/|________/|________/|__/ |__/ |__/ |______/ \______/ |__/ \__/'
|
||||
echo '.'
|
||||
|
||||
echo '.'
|
||||
echo ' /$$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$$ /$$$$$$ /$$$$$$'
|
||||
echo '| $$__ $$| $$__ $$ /$$__ $$ /$$__ $$| $$_____/ /$$__ $$ /$$__ $$'
|
||||
echo '| $$ \ $$| $$ \ $$| $$ \ $$| $$ \__/| $$ | $$ \__/| $$ \__/'
|
||||
echo '| $$$$$$$/| $$$$$$$/| $$ | $$| $$ | $$$$$ | $$$$$$ | $$$$$$'
|
||||
echo '| $$____/ | $$__ $$| $$ | $$| $$ | $$__/ \____ $$ \____ $$'
|
||||
echo '| $$ | $$ \ $$| $$ | $$| $$ $$| $$ /$$ \ $$ /$$ \ $$'
|
||||
echo '| $$ | $$ | $$| $$$$$$/| $$$$$$/| $$$$$$$$| $$$$$$/| $$$$$$/'
|
||||
echo '|__/ |__/ |__/ \______/ \______/ |________/ \______/ \______/'
|
||||
echo ' '
|
||||
echo ' /$$ /$$ /$$$$$$ /$$ /$$ /$$$$$$$$ /$$$$$$$'
|
||||
echo ' | $$$ /$$$ /$$__ $$| $$ /$$/| $$_____/| $$__ $$'
|
||||
echo ' | $$$$ /$$$$| $$ \ $$| $$ /$$/ | $$ | $$ \ $$'
|
||||
echo ' | $$ $$/$$ $$| $$$$$$$$| $$$$$/ | $$$$$ | $$$$$$$/'
|
||||
echo ' | $$ $$$| $$| $$__ $$| $$ $$ | $$__/ | $$__ $$'
|
||||
echo ' | $$\ $ | $$| $$ | $$| $$\ $$ | $$ | $$ \ $$'
|
||||
echo ' | $$ \/ | $$| $$ | $$| $$ \ $$| $$$$$$$$| $$ | $$'
|
||||
echo ' |__/ |__/|__/ |__/|__/ \__/|________/|__/ |__/'
|
||||
echo '.'
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Debut HTTPD'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
echo ' - Installation'
|
||||
|
||||
sudo yum install httpd mod_ssl -y
|
||||
|
||||
sudo sed -i 's@#LoadModule expires_module modules/mod_expires.so@LoadModule expires_module modules/mod_expires.so@' /etc/httpd/conf/httpd.conf ;
|
||||
sudo sed -i 's@#LoadModule rewrite_module modules/mod_rewrite.so@LoadModule rewrite_module modules/mod_rewrite.so@' /etc/httpd/conf/httpd.conf ;
|
||||
sudo sed -i 's@#LoadModule deflate_module modules/mod_deflate.so@LoadModule deflate_module modules/mod_deflate.so@' /etc/httpd/conf/httpd.conf ;
|
||||
sudo sed -i 's@#LoadModule vhost_alias_module modules/mod_vhost_alias.so@LoadModule vhost_alias_module modules/mod_vhost_alias.so@' /etc/httpd/conf/httpd.conf ;
|
||||
sudo sed -i 's@#LoadModule filter_module modules/mod_filter.so@LoadModule filter_module modules/mod_filter.so@' /etc/httpd/conf/httpd.conf ;
|
||||
|
||||
echo ' - Configuration service'
|
||||
|
||||
sudo systemctl enable httpd && sudo systemctl start httpd
|
||||
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Fin HTTPD'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Debut MySQL'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
echo ' - Installation'
|
||||
|
||||
sudo mv /Vagrantfiles/mariadb.repo /etc/yum.repos.d/mariadb.repo
|
||||
|
||||
sudo yum install mariadb-server MariaDB-backup mariadb -y
|
||||
|
||||
echo ' - Configuration'
|
||||
|
||||
sudo passwd root<<EOF
|
||||
P@ssw0rds
|
||||
P@ssw0rds
|
||||
EOF
|
||||
|
||||
sudo systemctl start mariadb<<EOF
|
||||
P@ssw0rds
|
||||
EOF
|
||||
|
||||
sudo /usr/bin/mysqladmin -u root password 'P@ssw0rds'
|
||||
|
||||
sudo mysql_secure_installation<<EOF
|
||||
P@ssw0rds
|
||||
n
|
||||
y
|
||||
n
|
||||
y
|
||||
y
|
||||
EOF
|
||||
|
||||
sudo tee /etc/my.cnf.d/pmaker.cnf <<-EOF
|
||||
optimizer_switch = derived_merge=off
|
||||
sql_mode= ""
|
||||
EOF
|
||||
|
||||
echo ' - Configuration service'
|
||||
|
||||
systemctl enable mariadb
|
||||
systemctl start mariadb
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Fin MySQL'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Debut PHP'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
echo ' - Installation'
|
||||
|
||||
rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm
|
||||
|
||||
yum-config-manager --enable remi-php71
|
||||
|
||||
yum install php -y
|
||||
yum install php-mysql php-fpm php-opcache php-mysqlnd php-pdo php-gd php-ldap php-odbc php-pear php-xml -y
|
||||
yum install php-xmlrpc php-cli php-mbstring php-soap curl curl-devel php-pear-CAS php-imap php-apcu php-pecl-apcu php-mcrypt -y
|
||||
|
||||
echo '============================================================'
|
||||
sudo php -m
|
||||
echo '============================================================'
|
||||
|
||||
sudo sed -i '/short_open_tag = Off/c\short_open_tag = On' /etc/php.ini
|
||||
sudo sed -i '/post_max_size = 8M/c\post_max_size = 24M' /etc/php.ini
|
||||
sudo sed -i '/upload_max_filesize = 2M/c\upload_max_filesize = 24M' /etc/php.ini
|
||||
sudo sed -i '/;date.timezone =/c\date.timezone = Europe/Paris' /etc/php.ini
|
||||
sudo sed -i '/expose_php = On/c\expose_php = Off' /etc/php.ini
|
||||
|
||||
sudo systemctl start php-fpm.service && sudo systemctl enable php-fpm.service
|
||||
|
||||
sudo mv /Vagrantfiles/processmaker.conf /etc/php-fpm.d/processmaker.conf
|
||||
|
||||
sudo sed -i '/;opcache.enable_cli=0/c\opcache.enable_cli=1' /etc/php.d/opcache.ini
|
||||
sudo sed -i '/opcache.max_accelerated_files=4000/c\opcache.max_accelerated_files=10000' /etc/php.d/opcache.ini
|
||||
sudo sed -i '/;opcache.max_wasted_percentage=5/c\opcache.max_wasted_percentage=5' /etc/php.d/opcache.ini
|
||||
sudo sed -i '/;opcache.use_cwd=1/c\opcache.use_cwd=1' /etc/php.d/opcache.ini
|
||||
sudo sed -i '/;opcache.validate_timestamps=1/c\opcache.validate_timestamps=1' /etc/php.d/opcache.ini
|
||||
sudo sed -i '/;opcache.fast_shutdown=0/c\opcache.fast_shutdown=1' /etc/php.d/opcache.ini
|
||||
|
||||
sudo mv /Vagrantfiles/pmos.conf /etc/httpd/conf.d/pmos.conf
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Fin PHP'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Debut Supervisor'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
echo ' - Installation'
|
||||
|
||||
sudo yum install supervisor -y
|
||||
|
||||
sudo systemctl start supervisord && sudo systemctl enable supervisord
|
||||
|
||||
sudo mv /Vagrantfiles/laravel-worker-workflow.ini /etc/supervisord.d/laravel-worker-workflow.ini
|
||||
|
||||
sudo supervisorctl reread
|
||||
sudo supervisorctl update
|
||||
|
||||
sudo supervisorctl stop all
|
||||
sudo supervisorctl start all
|
||||
sudo systemctl stop supervisord.service && sudo systemctl start supervisord.service
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Fin Supervisor'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Debut PHPMyAdmin'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
echo ' - Installation'
|
||||
|
||||
yum -y install phpMyAdmin -y
|
||||
|
||||
echo ' - Configuration'
|
||||
|
||||
echo ' -- Creation du fichier : phpMyAdmin.conf'
|
||||
|
||||
sudo mv /Vagrantfiles/phpMyAdmin.conf /etc/httpd/conf.d/phpMyAdmin.conf
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Fin PHPMyAdmin'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
cd /var/www/html/
|
||||
|
||||
sudo tee info.php <<-EOF
|
||||
<?php
|
||||
phpinfo();
|
||||
?>
|
||||
EOF
|
||||
|
||||
echo ' - Restart service HTTPD'
|
||||
|
||||
systemctl restart httpd
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Debut Firewall'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
firewall-cmd --permanent --zone=public --add-service=http
|
||||
firewall-cmd --permanent --zone=public --add-service=https
|
||||
firewall-cmd --reload
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Fin Firewall'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Debut ProcessMaker'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
sudo mkdir -p /opt/processmaker && cd /opt/processmaker
|
||||
|
||||
sudo wget https://github.com/ProcessMaker/processmaker/releases/download/4.0rc1/processmaker4.0-rc1.tar.gz
|
||||
|
||||
sudo tar zxvf processmaker4.0-rc1.tar.gz
|
||||
|
||||
sudo chown -R apache:apache /opt/processmaker
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Fin ProcessMaker'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
cat > /etc/motd << EOF
|
||||
|
||||
/$$$$$$$$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$$ /$$ /$$ /$$$$$$ /$$ /$$ /$$$$$$$$
|
||||
|__ $$__/|_ $$_/| $$__ $$ /$$__ $$ /$$__ $$| $$_____/ | $$$ /$$$|_ $$_/| $$$ | $$| $$_____/
|
||||
| $$ | $$ | $$ \ $$| $$ \__/ | $$ \ $$| $$ | $$$$ /$$$$ | $$ | $$$$| $$| $$
|
||||
| $$ | $$ | $$$$$$$/| $$$$$$ /$$$$$$| $$ | $$| $$$$$ /$$$$$$| $$ $$/$$ $$ | $$ | $$ $$ $$| $$$$$
|
||||
| $$ | $$ | $$____/ \____ $$|______/| $$ | $$| $$__/|______/| $$ $$$| $$ | $$ | $$ $$$$| $$__/
|
||||
| $$ | $$ | $$ /$$ \ $$ | $$ | $$| $$ | $$\ $ | $$ | $$ | $$\ $$$| $$
|
||||
| $$ /$$$$$$| $$ | $$$$$$/ | $$$$$$/| $$ | $$ \/ | $$ /$$$$$$| $$ \ $$| $$$$$$$$
|
||||
|__/ |______/|__/ \______/ \______/ |__/ |__/ |__/|______/|__/ \__/|________/
|
||||
|
||||
|
||||
Bienvenue dans la version Centos 7 Linux.Apache.MySQL.PHP
|
||||
|
||||
- Apache 2.4, MySQL Mariadb 8 and PHP 7.1
|
||||
|
||||
|
||||
To test your environment is correctly working, just open following URL from your Host OS:
|
||||
http://localhost/info.php
|
||||
|
||||
EOF
|
Reference in New Issue
Block a user