centos7 php开发环境安装(一)

准备工作

防火墙

systemctl status firewalld        看到active(running)就意味着防火墙打开了

systemctl stop firewalld          看到inactive(dead)就意味着防火墙关闭了

systemctl start firewalld          打开防火墙

systemctl disable firewalld        重启后防火墙还是处于关闭的状态

systemctl enable firewalld        重启不会恢复到原来的状态

systemctl restart firewalld.service  重启防火墙

防火墙端口开放与关闭

firewall-cmd --zone=public --add-port=80/tcp --permanent

firewall-cmd --zone=public --add-port=443/tcp --permanent

firewall-cmd --zone=public --add-port=22/tcp --permanent

firewall-cmd --zone=public --add-port=21/tcp --permanent

firewall-cmd --zone=public --add-port=53/udp --permanent

firewall-cmd --zone=public --remove-port=80/tcp --permanent

firewall-cmd --zone=public --remove-port=443/tcp --permanent

firewall-cmd --zone=public --remove-port=22/tcp --permanent

firewall-cmd --zone=public --remove-port=21/tcp --permanent

firewall-cmd --zone=public --remove-port=53/udp --permanent

firewall-cmd --zone=public --add-port=4400-4600/udp --permanent

firewall-cmd --zone=public --add-port=4400-4600/tcp --permanent

netstat -ntlp            //查看当前所有tcp端口·

netstat -ntulp |grep 80   //查看所有80端口使用情况·

netstat -an | grep 3306   //查看所有3306端口使用情况·

查看一台服务器上面哪些服务及端口

netstat  -lanp

查看一个服务有几个端口。比如要查看mysqld

ps -ef |grep mysqld

查看某一端口的连接数量,比如3306端口

netstat -pnt |grep :3306 |wc

查看某一端口的连接客户端IP 比如3306端口

netstat -anp |grep 3306

netstat -an 查看网络端口

更新yum源 常用安装依赖

yum install epel-release  -y

yum update

yum install -y gcc gcc-c++ pcre pcre-devel openssl openssl-devel zlib zlib-devel

yum -y install ncurses-devel

yum -y install wget vim pcre pcre-devel openssl openssl-devel libicu-devel gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel ncurses ncurses-devel curl curl-devel krb5-devel libidn libidn-devel openldap openldap-devel nss_ldap jemalloc-devel cmake boost-devel bison automake libevent libevent-devel gd gd-devel libtool* libmcrypt libmcrypt-devel mcrypt mhash libxslt libxslt-devel readline readline-devel gmp gmp-devel libcurl libcurl-devel openjpeg-devel

原文地址:https://www.cnblogs.com/ddf128/p/12123817.html

时间: 2024-08-30 10:13:44

centos7 php开发环境安装(一)的相关文章

centos7 php开发环境安装-Git

Git 的2中安装方法 1. yum命令安装: yum install -y git 2. 服务编译安装(推荐) 2.1 安装依赖包 yum install -y wget yum install -y gcc-c++ yum install -y zlib-devel perl-ExtUtils-MakeMaker 2.2 下载最新git cd /usr/local/src wget https://mirrors.edge.kernel.org/pub/software/scm/git/gi

centos7 php开发环境安装-php

PHP7.2 安装 1.创建运行用户 groupadd www useradd -g www www 2.建立软连接 cp -frp /usr/lib64/libldap* /usr/lib/ ln -s /usr/local/lib/libiconv.so.2 /usr/lib64/ 3.编译安装php tar -zxvf php-7.2.4.tar.gz cd php-7.2.4 ./configure --prefix=/usr/local/php --with-config-file-p

centos7 php开发环境安装-mysql

MySQL安装 1.安装cmake(作为mysql的安装工具) tar -zxvf cmake-3.8.0.tar.gz cd cmake-3.8.0 ./bootstrap gmake gmake install 2.安装boost_1_59_0 tar -zxvf boost_1_59_0.tar.gz cd boost_1_59_0 ./bootstrap.sh ./b2 ./b2 install 3.创建用户.配置目录 添加mysql用户和所属组 /usr/sbin/groupadd m

centos7 php开发环境安装-Nginx

1.Nginx编译安装 tar -zxvf nginx-1.12.2.tar.gz cd nginx-1.12.2 ./configure --user=www --group=www --prefix=/usr/local/nginx/ --with-http_v2_module --with-http_ssl_module --with-http_sub_module --with-http_stub_status_module --with-http_gzip_static_module

centos7 php开发环境安装-composer

1.安装composer cd /usr/local/src curl -sS https://getcomposer.org/installer | php mv composer.phar /usr/local/bin/composer 2.Composer 使用 chmod -R 777 /usr/local/bin/composer (错误时修改权限) 3.切换国内镜像 composer config -g repo.packagist composer https://packagis

centos7 php开发环境安装--配置SSL(Apache为例)

1.检查是否安装OpenSSL 1.1 查看是否安装 openssl version 1.2 编译安装: https://www.cnblogs.com/rxbook/p/9367725.html 1.3  yum安装 yum install openssl yum install openssl-devel 1.4 在线升级 yum -y update openssl 2.配置证书上传目录 在Apache安装目录中新建cert目录,并将下载的Apache证书. 证书链文件和秘钥文件拷贝到cer

三、安装cmake,安装resin ,tars服务,mysql 安装介绍,安装jdk,安装maven,c++ 开发环境安装

三.安装cmake,安装resin 2018年07月01日 21:32:05 youz1976 阅读数:308 开发环境说明: centos7.2 ,最低配置:1核cpu,2G内存,1M带宽 1.安装rz,sz命令,将安装包发送至服务器 yum install lrzsz 2.glibc-devel安装介绍如果没有安装glibc的开发库,需要先安装. yum install glibc-devel 3.安装gcc yum install gccyum install gcc-c++ 4.cmak

mac 开发环境安装使用 记录

---恢复内容开始--- 常用命令 1 查找文件位置: $locate php-fpm 软件变动的话更新locate本地库,可能比较耗时. $sudo /usr/libexec/locate.updatedb 2 查找运行文件位置 $whereis php-fpm $witch php-fpm 所有命令最好再超级管理员下运行,防止权限问题.要不然每次加sudo也很烦,另外安装是最好删除掉以前安装的软件 homebrew部分 是一个非常好的mac下的开发软件管理器.集安装卸载升级于一体.非常方便.

React Native 开发环境安装和配置使用报错: -bash: react-native: command not found

[React  Native 开发环境安装和配置:-bash: react-native: command not found 报错: 前提是安装homebrew,node.js ,npm ,watchman,flow都成功.React  Native 开发环境安装和配置 执行react-native init TestProject 命令 创建demo时报错:-bash: react-native: command not found 报错提示:Please include the follo