In today tutorial, we want to show how to run multiple PHP versions with apache on CentOS 7 linux.
- Installing Smokeping On CentOS 5.x and 6.x; CentOS 7.x. Installing TCPPing and HPing on CentOS 7.x; Linux deprecated ifconfig commands in CentOS 7; rsyslog Configuration with multiple hosts on CentOS 7.x; Debian / Ubuntu. Debian 7.x/8.x & Ubuntu 14.04 LTS. Configure Debian 7.x/8.x and Ubuntu 14.04 LTS Boxes with Smokeping.
- Jan 25, 2019 How To Install And Configure Smokeping On Centos 7. Firewall-cmd -list-services We use the following to see services whose ports are open and see open ports firewall-cmd -list-all To add a service to the firewall, we use the following command, in which case the service will use any port to.
- May 26, 2019 Install Centos 7 On Virtualbox; On this page. Monitoring Network Latency With Smokeping (Debian Etch) 3 Configuring Smokeping; Sep 15, 2017 - 今回は Docker を使わず、CentOS7 上に直接、Smokeping を. CentOS7 に Smokeping をインストールする. Yum -y install httpd smokeping. I need some help from the Centos gurus.
it’s very practical and common to have multiple php versions and run it simultaneously with apache on a single server.
maybe you have a php script and want to test it with multiple php version. in such case this article is for you.
Lets explain how it’s possible to run multiple versions.
when we request a .php page from apache, it will refer to “SetHandler application/x-httpd-php” to know which module should be loaded to handle php script. the point is that here, php is under apache control.
in our scenario, things go different. here we use standalone php process called php-fpm. php-fpm is a php daemon that is configured to respond to FCGI requests.
so we start and stop php-fpm and apache independently.
in our scenario, things go different. here we use standalone php process called php-fpm. php-fpm is a php daemon that is configured to respond to FCGI requests.
so we start and stop php-fpm and apache independently.
Introduction Tracking network latency should be an integral of anyone’s server management routine. It is essential that you monitor this regularly so you can get a better picture of your server’s health and performance. It can help you determine if your network is overloaded or indicate if there is an incorrect router configuration or downed. Install Smokeping. Before installing smokeping, you will need to install the Nginx web server with fcgiwrap and sendmail as its prerequisites.
Mamp pro 4 3. Here is our environment:
OS: CentOS 7 linux on VMWare
Firewall: enabled
SELinux: enforcing
PHP versions: 5.6 and 7.2
Firewall: enabled
SELinux: enforcing
PHP versions: 5.6 and 7.2
1- Install prerequisites
before installing and running two php versions, we need to install apache and some repository. so execute these commands:
2- Install multiple php versions
php-fpm is available in remi repository. so we install this repo and then after multiple php versions:
then make sure both versions are stopped:
3- Configure SELinux
to allow selinux run php-fpms scripts, run these commands:
4- Configure php-fpm
by default, each php-fpm version is listening on port 9000. because we want to run multiple php versions, we need to change default port:
now run two php-fpms:
now we need to make script wrapper to call php56-cgi and php72-cgi:
then we set executable bit on both scripts:
5- Configure apache
Here we create two path. one for php-fpm56 and another for php-fpm72. you can change these paths with your own:
then we put two php script on these two paths to test:
6- Start services
Now we enable and start apache and php-fpm services:
7- Configure firewall
we need to open port 80 to access apache. so run these commands:
Now refer to these address and you must see php_info page with two different versions:
SmokePing 是一套相當實用的網路監督工具, 畫出的圖片也很漂亮。雖然要安裝 SmokePing 比較麻煩, 但只要透過 yum 安裝 SmokePing 所需的套件就方便很多了, 以下是 RHEL 及 CentOS 安裝及配置 SmokePing 的方法。
首先啟用 EPEL Repo:
接著安裝 SmokePing 所需的套件:
# yum install perl httpd httpd-devel mod_fcgid rrdtool perl-CGI-SpeedyCGI fping rrdtool-perl perl-Sys-Syslog
然後安裝以下 CPAN 模組:
# yum install perl-CPAN perl-local-lib perl-Time-HiRes
安裝編譯器, 用作編譯 SmokePing 原始碼:
—————————————————————————————————————–
安裝好所需的套件後, 現在到官網下載 SmokePing 原始碼安裝, 目前最新的版本是 2.6.11:
# wget http://oss.oetiker.ch/smokeping/pub/smokeping-2.6.11.tar.gz
解壓縮原始碼:
安裝 SmokePing 所需的 Perl 模組, 以及編譯 SmokePing:
Centos 7 Install Nginx
# cd smokeping-2.6.11/
# ./setup/build-perl-modules.sh
# mkdir /opt/smokeping
# cp -R thirdparty /opt/smokeping/
# ./configure –prefix=/opt/smokeping
# make install
# ./setup/build-perl-modules.sh
# mkdir /opt/smokeping
# cp -R thirdparty /opt/smokeping/
# ./configure –prefix=/opt/smokeping
# make install
Centos 7 Install Ifconfig
安裝好 SmokePing 後, 現在是配置 SmokePing 的設定檔, 輸入以下指令:
Install Smokeping On Centos 7
2 | # for foo in *.dist; do cp $foo 'basename $foo .dist'; done |
然後開啟 Apache 的設定檔 httpd.conf:
# vi /etc/httpd/conf/httpd.conf
找到設定 DirectoryIndex 的一行, 加入 smokeping.fcgi 及AddHandler 部份, 例如:
DirectoryIndex index.html index.html.var smokeping.fcgi
AddHandler cgi-script .cgi
AddHandler cgi-script .cgi
開啟 /etc/httpd/conf.d/smokeping.conf 檔案, 改成這樣:
2 | Options+ExecCGI |
執行以下指令, 建立 SmokePing 儲存資料目錄及設定權限:
# mkdir /opt/smokeping/img
# mkdir /opt/smokeping/data
# mkdir /opt/smokeping/var
# mkdir /opt/smokeping/cache
# chown -R apache:apache /opt/smokeping/img
# chown -R apache:apache /opt/smokeping/cache
# ln -s /opt/smokeping/htdocs /var/www/html/smokeping
# ln -s /opt/smokeping/img /var/www/html/smokeping
# ln -s /opt/smokeping/cache /var/www/html/smokeping
# chmod 600 /opt/smokeping/etc/smokeping_secrets
# chmod 600 /opt/smokeping/etc/smokeping_secrets.dist
# chown -R apache:apache /var/www/html/smokeping
# mkdir /opt/smokeping/data
# mkdir /opt/smokeping/var
# mkdir /opt/smokeping/cache
# chown -R apache:apache /opt/smokeping/img
# chown -R apache:apache /opt/smokeping/cache
# ln -s /opt/smokeping/htdocs /var/www/html/smokeping
# ln -s /opt/smokeping/img /var/www/html/smokeping
# ln -s /opt/smokeping/cache /var/www/html/smokeping
# chmod 600 /opt/smokeping/etc/smokeping_secrets
# chmod 600 /opt/smokeping/etc/smokeping_secrets.dist
# chown -R apache:apache /var/www/html/smokeping
現在建立 SmokePing 的設定檔, 要根據自己的需要修改某些設定:
範例檔案:
2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100 102 104 106 108 110 112 114 116 118 120 122 124 126 128 130 132 134 | contact=you@youremail.com mailhost=SMTP Server(Ignore ifyou donothave smtp server) # NOTE: do not put the Image Cache below cgi-bin # since all files under cgi-bin will be executed .. this is not imgcache=/opt/smokeping/cache datadir=/opt/smokeping/data cgiurl=http://some.url/smokeping.cgi tmail=/opt/smokeping/etc/tmail.dist syslogfacility=local0 # disable this to revert to the old behaviour to=you@youremail.com type=loss pattern=>0%,*12*,>0%,*12*,>0% pings=20 # consfn mrhb steps total AVERAGE0.511008 MIN0.5124320 AVERAGE0.5144720 MIN0.5144720 ***Presentation *** template=/opt/smokeping/etc/basepage.html.dist +charts menu=Charts sorter=StdDev(entries=>4) menu=Std Deviation sorter=Max(entries=>5) menu=by Max sorter=Loss(entries=>5) menu=Loss sorter=Median(entries=>5) menu=by Median height=50 height=200 'Last 30 Hours'30h 'Last 400 Days'400d #+ hierarchies #title = Host Owner #title = Location ***Probes *** +FPing binary=/usr/sbin/fping ***Slaves *** +boomer color=0000ff +slave2 color=00ff00 ***Targets *** probe=FPing menu=Top remark=Welcome tothe SmokePing website of xxx Company. Here you will learn all about the latency of our network. +Server title=google.com host=www.google.com |
Full monteverdi torrent. 然後啟動 httpd:
設定 SmokePing 開機自動啟動, 需要下載 SmokePing 的開機 script 到 /etc/init.d/ 目錄, 及設定可執行權限:
# cd /etc/init.d/
# wget http://oss.oetiker.ch/smokeping/pub/contrib/smokeping-start-script
# chmod 755 smokeping-start-script
# wget http://oss.oetiker.ch/smokeping/pub/contrib/smokeping-start-script
# chmod 755 smokeping-start-script
將 smokeping-start-script 第 10 行的 SMOKEPING binary 檔位置, 改成這樣:
Install Kubectl On Centos 7
SMOKEPING=/usr/local/smokeping/bin/smokeping
Centos 7 Install Gnome
最後啟動 SmokePing 便完成了: