forked from Genaker/Magento-Linux-Installation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-xhproff-hosted.sh
61 lines (37 loc) · 1.31 KB
/
install-xhproff-hosted.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
# Install XHProf selfhosted
git clone "https://github.com/tideways/php-xhprof-extension.git"
cd php-xhprof-extension
phpize
./configure
make
sudo make install
## Configure the extension to load with this PHP INI directive
echo "extension=tideways_xhprof.so" > /etc/php.d/99-profiler.ini
##
cd /var/www/html/
git clone https://github.com/phacility/xhprof
HTML_PATH="/var/www/html/xhprof/xhprof_html"
# USAGE https://github.com/tideways/php-xhprof-extension#usage
##ADDITIONAL_CONFIG##ADDITIONAL_CONFIG
cat > /etc/nginx/conf.d/xhprof.conf.part<<EOF
location ^~ /xhprof_html/ {
root /var/www/html/xhprof/;
include /etc/nginx/fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/html/xhprof\$fastcgi_script_name;
fastcgi_pass fastcgi_backend;
location ~ ^.*\.(css|js|gif)$ {}
}
EOF
sudo sed -i 's/##ADDITIONAL_CONFIG/##ADDITIONAL_CONFIG \n include \/etc\/nginx\/conf.d\/xhprof.conf.part;/g' /etc/nginx/conf.d/magento.conf
cd /var/www/html/
git clone https://github.com/perftools/xhgui.git
cd xhgui
yum -y install gcc php-pear php-devel
sudo pecl install mongodb
echo "extension=mongodb.so" > /etc/php.d/88-mongo.ini
composer install --ignore-platform-reqs
php install.php
sudo service php-fpm restart
# error_reporting(E_ALL ^ E_DEPRECATED) fix error