Ldap啟程 因為什麼都沒所以要安裝
coentos7系統
當你只有系統時...
yum install firewalld firewalld-config -y
啟動
systemctl start firewalld
停止
systemctl stop firewalld
重新啟動
service firewalld restart
設定開機啟動
systemctl enable firewalld
更新防火牆規則
firewall-cmd --reload
查看狀態
systemctl status firewalld
查看防火牆規則
firewall-cmd --zone=public --list-all
安裝Apache常用擴充套件包:
# yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql
#rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm
#yum -y install yum-utils
當你只有系統時...
EPEL(Extra Packages for Enterprise Linux)是一個由 Fedora Special Interest Group 社群所維護的套件庫,其主要目的是提供各種企業級的 Linux 一些額外的高品質套件,這個套件庫可用於 Red Hat Enterprise Linux(RHEL)、CentOS 與 Scientific Linux(SL)等。
有些安裝需增加 EPEL 套件庫
安裝EPEL
# yum install epel-release
yum install firewalld firewalld-config -y
啟動
systemctl start firewalld
停止
systemctl stop firewalld
重新啟動
service firewalld restart
設定開機啟動
systemctl enable firewalld
更新防火牆規則
firewall-cmd --reload
查看狀態
systemctl status firewalld
查看防火牆規則
firewall-cmd --zone=public --list-all
-----------防火牆 firewalld
安裝
參考資料
https://zmesinformation.blogspot.tw/2016/02/centos7-firewalld.html
--------------安裝 apache
Server version: Apache/2.4.6 (CentOS)
Server version: Apache/2.4.6 (CentOS)
# yum –y install httpd
啟動
# systemctl start httpd.service
設定開機啟動
# systemctl enable httpd.service
防火牆設定
# firewall-cmd --permanent --zone=public
--add-service=http
# firewall-cmd --permanent --zone=public
--add-service=https
# firewall-cmd --reload
限制/移除IP(白名單)
firewall-cmd --zone=public \
--add-rich-rule='rule family="ipv4" source address="120.126.195.118" accept' \
--permanent
firewall-cmd --zone=public \
--remove-rich-rule='rule family="ipv4" source address="120.126.192.100" accept' \
--permanent
限制/移除IP(白名單)
firewall-cmd --zone=public \
--add-rich-rule='rule family="ipv4" source address="120.126.195.118" accept' \
--permanent
firewall-cmd --zone=public \
--remove-rich-rule='rule family="ipv4" source address="120.126.192.100" accept' \
--permanent
安裝Apache常用擴充套件包:
# yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql
重新啟動
# systemctl restart httpd.service
-----------安裝PHP 7.1.11
#rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm
#yum -y install yum-utils
安裝7.1版本
yum-config-manager --enable
remi-php71
# yum -y install php
php-opcache
&&&&&&&&&&&&&&
# wget -q http://rpms.remirepo.net/enterprise/remi-release-7.rpm
# wget -q https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# rpm -Uvh epel-release-latest-7.noarch.rpm
# rpm -Uvh remi-release-7.rpm
# yum-config-manager –enable remi-php71
安裝PHP常用擴充套件組包:
# yum -y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc php-devel
&&&&&&&&&&&&&&
# wget -q http://rpms.remirepo.net/enterprise/remi-release-7.rpm
# wget -q https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# rpm -Uvh epel-release-latest-7.noarch.rpm
# rpm -Uvh remi-release-7.rpm
# yum-config-manager –enable remi-php71
安裝PHP常用擴充套件組包:
# yum -y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc php-devel
重新啟動
#systemctl restart httpd.service
yum 安裝
- 安裝: yum install (你的軟體)
- 啟動: systemctl start (你的軟體)
- 開機啟動: systemctl enable (你的軟體)
- 防火牆: firewall-cmd --add-service="(你的服務)";
- firewall-cmd --permanent
--add-service="(你的服務)"
--------------------------------------------
Php 連線 LDAP server
SELinux不允許你的httpd守護進程與同一台機器上的LDAP服務器進行通信。
即使在firewalld中啟用了ldaps
使用以下命令來檢查httpd的SELinux配置
getsebool -a | grep httpd
要通過httpd:啟用SELinux網絡連接
setsebool -P httpd_can_network_connect on
無需重啟Apache
留言
張貼留言