xml地图|网站地图|网站标签 [设为首页] [加入收藏]

7的安装配置代码,安装步骤

来源:http://www.ccidsi.com 作者:集成介绍 人气:151 发布时间:2020-01-30
摘要:3、设置开机运行 systemctl enable nginx.servicesystemctl enable php-fpm.service 你可能感兴趣的小说: CentOS7.3.1611编写翻译安装Nginx1.10.3 MySQL5.7.16 PHP7.1.2 Centos7 安装PHP7最新版的详实教程 CentOS下PHP7的编

3、设置开机运行

systemctl enable nginx.servicesystemctl enable php-fpm.service

你可能感兴趣的小说:

  • CentOS 7.3.1611编写翻译安装Nginx1.10.3 MySQL5.7.16 PHP7.1.2
  • Centos7 安装 PHP7最新版的详实教程
  • CentOS下PHP7的编写翻译安装及MySQL的帮衬和一些普及难点的解决办法
  • Centos7.2 编写翻译安装PHP7.0.2的步调
  • 详整怎么样在CentOS7中运用Nginx和PHP7-FPM安装Nextcloud
  • CentOS 7.2 下编写翻译安装PHP7.0.10 MySQL5.7.14 Nginx1.10.1的不二等秘书诀详细解释(mini版本卡塔尔
  • CentOS 7.2.1511 编译安装Nginx1.10.1 MySQL5.7.14 PHP7.0.11
  • centos7利用yum安装lnmp的教程(linux nginx php7.1 mysql5.7)
  • CentOS 6/7境况下通过yum安装php7的诀要

办法二、编写翻译安装

风流浪漫、获取有关开源程序

yum -y updateyum -y remove mariadb*yum install -y patch make cmake gcc gcc-c   bison flex file libtool libtool-libs autoconf re2c libaio libcap glibc glib2 kernel-devel glibc-devel glib2-devel curl unzip epel-release java-1.8.0-openjdkyum install -y diffutils ncurses ncurses-devel libjpeg libpng freetype libxml2 zlib bzip2 libidn gettext libxslt libedit libtidy gd libyaml libxml2-devel openssl-devel bzip2-devel curl-devel libjpeg-devel libpng-devel freetype-devel cyrus-sasl-devel gmp-devel libedit-devel libtidy-devel libxslt-devel readline-devel libidn-devel zlib-devel ImageMagick ImageMagick-devel gettext-devel gd-devel libyaml-devel mhash mhash-devel libmemcached libmemcached-devel systemd systemd-develyum -y install mcrypt libmcrypt libmcrypt-devel

echo -e "/lib64n/usr/lib64n/usr/local/lib64n/libn/usr/libn/usr/local/libn`cat /etc/ld.so.conf`" > /etc/ld.so.conf/sbin/ldconfig

cd /usr/local/srccurl -fSL http://soft.l68.net/libiconv/libiconv-1.15.tar.gz -o libiconv-1.15.tar.gztar zxf libiconv-1.15.tar.gz && rm -f libiconv-1.15.tar.gz cd libiconv-1.15/./configure --prefix=/usr/local --libdir=/usr/local/lib64 --enable-staticmake -j "$" && make installcd ../rm -rf /usr/local/src/libiconv-1.15curl -fSL http://soft.l68.net/icu/icu4c-58_2-src.tgz -o icu4c-58_2-src.tgztar zxf icu4c-58_2-src.tgz && rm -f icu4c-58_2-src.tgzcd icu/source/./configure --prefix=/usr/local --libdir=/usr/local/lib64 --enable-static make -j "$" && make installcd ../../rm -rf /usr/local/src/icu

如上所述是作者给大家介绍的CentOS7服务器中apache、php7以至mysql5.7的安装配备代码,希望对大家有所协理,如若我们有任何疑问请给自个儿留言,小编会及时过来大家的。在那也极其多谢大家对剧本之家网址的支撑!

yum install php70w

Centos 7 下的 PHP7/Nginx/Memcached 安装步骤。跟上豆蔻梢头篇 Centos 7 Nginx PHP 安装步骤 的界别是,这一次是编写翻译的陆十五人的,全体的库均编写翻译到 /usr/local/lib64 目录中,英特网这些教程常常未有一点名编写翻译路径,实际上是错的,全体编译到默许路线是在/usr/local/lib 下然后在软连接到 lib64 里简直是有病。其余 Centos 7.4 业已提拔了openssl 库,故本篇不在单独安装新版的 Openssl 。所以那篇小讲完全部是安装Linux的专门的学问措施安装的,跟网络那贰个业余爱好者安装教程有本质差别。本篇文章未有去布置 php.ini,笔者觉着这些构造依据跟人须求和谐配置就能够。

关闭SELinux
编辑器打开 etc/selinux/config 文件,找到 SELINUX=enforcing 字段,将其改成 SELINUX=disabled ,并重启设备。
yum -y install httpd mod_ssl
配置防火墙
firewall-cmd --permanent --add-port=80/tcp
firewall-cmd --permanent --add-port=443/tcp
firewall-cmd --reload
开机启动
systemctl start httpd
systemctl enable httpd
终端输入如下指令检查httpd的运行状态
sudo systemctl status httpd
make && make install

二、安装PHP 7(FastCGI模式)

curl -fSL http://soft.l68.net/php/php-7.1.22.tar.gz -o php-7.1.22.tar.gztar zxf php-7.1.22.tar.gz && rm -f php-7.1.22.tar.gzcd php-7.1.22//sbin/ldconfig./configure --prefix=/usr/local --libdir=/usr/local/lib64 --with-config-file-path=/usr/local/etc --with-config-file-scan-dir=/usr/local/etc/php --with-libxml-dir --with-openssl --with-kerberos --with-zlib --enable-bcmath --with-bz2 --enable-calendar --with-curl --enable-exif --enable-fpm --enable-ftp --with-png-dir --with-gd --with-jpeg-dir --enable-gd-native-ttf --with-icu-dir=/usr/local --enable-mbstring --enable-mbregex --enable-shmop --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --with-xmlrpc --with-libedit --with-iconv-dir=/usr/local --with-xsl --enable-zip --with-pcre-regex --with-pcre-jit --with-freetype-dir --enable-xml --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-pdo-sqlite --with-sqlite3 --disable-rpath --enable-inline-optimization --with-mcrypt --with-mhash --enable-pcntl --without-pear --with-gettext --enable-fileinfo --enable-intl --enable-opcache --enable-cli --with-gmp --with-tidy --with-pcre-dir --with-readline --with-fpm-systemd --with-zlib-dir --with-libdir=lib64make -j "$" ZEND_EXTRA_LIBS='-liconv'make installcp php.ini-production /usr/local/etc/php.inicp /usr/local/etc/php-fpm.conf.default /usr/local/etc/php-fpm.confcp sapi/fpm/php-fpm.service /usr/lib/systemd/system/php-fpm.servicecd ../rm -rf /usr/local/src/php-7.1.22

curl -fSL http://soft.l68.net/pecl/msgpack-2.0.2.tgz -o msgpack-2.0.2.tgztar zxf msgpack-2.0.2.tgz && rm -rf msgpack-2.0.2.tgzcd msgpack-2.0.2phpize./configuremake -j "$" && make installcd ../rm -rf /usr/local/src/msgpack-2.0.2rm -f /usr/local/src/package.xmlcurl -fSL http://soft.l68.net/pecl/igbinary-2.0.7.tgz -o igbinary-2.0.7.tgztar zxf igbinary-2.0.7.tgz && rm -rf igbinary-2.0.7.tgzcd igbinary-2.0.7phpize./configuremake -j "$" && make installcd ../rm -rf /usr/local/src/igbinary-2.0.7rm -f /usr/local/src/package.xmlcurl -fSL http://soft.l68.net/pecl/memcached-3.0.4.tgz -o memcached-3.0.4.tgztar zxf memcached-3.0.4.tgz && rm -rf memcached-3.0.4.tgzcd memcached-3.0.4phpize./configure --enable-memcached --enable-memcached-igbinary --enable-memcached-json --enable-memcached-msgpack --with-libdir=lib64make -j "$" && make installcd ../rm -rf /usr/local/src/memcached-3.0.4rm -f /usr/local/src/package.xmlcurl -fSL http://soft.l68.net/pecl/redis-4.1.1.tgz -o redis-4.1.1.tgztar zxf redis-4.1.1.tgz && rm -rf redis-4.1.1.tgzcd redis-4.1.1phpize./configure --enable-redis --enable-redis-igbinarymake -j "$" && make installcd ../rm -rf /usr/local/src/redis-4.1.1rm -f /usr/local/src/package.xmlcurl -fSL http://soft.l68.net/pecl/yaml-2.0.2.tgz -o yaml-2.0.2.tgztar zxf yaml-2.0.2.tgz && rm -rf yaml-2.0.2.tgzcd yaml-2.0.2phpize./configuremake -j "$" && make installcd ../rm -rf /usr/local/src/yaml-2.0.2rm -f /usr/local/src/package.xmlcurl -fSL http://soft.l68.net/pecl/imagick-3.4.3.tgz -o imagick-3.4.3.tgztar zxf imagick-3.4.3.tgzrm -rf imagick-3.4.3.tgzcd imagick-3.4.3phpize./configuremake -j "$" && make installcd ../rm -rf /usr/local/src/imagick-3.4.3rm -f /usr/local/src/package.xmlcurl -fSL http://soft.l68.net/pecl/mongodb-1.5.3.tgz -o mongodb-1.5.3.tgztar zxf mongodb-1.5.3.tgz && rm -rf mongodb-1.5.3.tgzcd mongodb-1.5.3phpize./configuremake -j "$" && make installcd ../rm -rf /usr/local/src/mongodb-1.5.3rm -f /usr/local/src/package.xmlcurl -fSL http://soft.l68.net/pecl/apcu-5.1.12.tgz -o apcu-5.1.12.tgztar zxf apcu-5.1.12.tgz && rm -rf apcu-5.1.12.tgzcd apcu-5.1.12phpize./configuremake -j "$" && make installcd ../rm -rf /usr/local/src/apcu-5.1.12rm -f /usr/local/src/package.xmlmkdir -p /usr/local/etc/phpecho -e "[PHP]nextension=msgpack.so" >> /usr/local/etc/php/msgpack.iniecho -e "[PHP]nextension=igbinary.so" >> /usr/local/etc/php/igbinary.iniecho -e "[PHP]nextension=memcached.so" >> /usr/local/etc/php/memcached.iniecho -e "[PHP]nextension=redis.so" >> /usr/local/etc/php/redis.iniecho -e "[PHP]nextension=yaml.so" >> /usr/local/etc/php/yaml.iniecho -e "[PHP]nextension=mongodb.so" >> /usr/local/etc/php/mongodb.ini
添加源
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
安装
yum install php70w

2.安装PHP7的rpm源

四、收尾

#for aliyuncat >>/etc/security/limits.conf<<eof* soft nproc 65535* hard nproc 65535eof#othercat >>/etc/security/limits.conf<<eof* soft nproc 65535* hard nproc 65535* soft nofile 65535* hard nofile 65535eofecho "fs.file-max=65535" >> /etc/sysctl.conf

CentOS7服务器中apache、php7以至mysql5.7的构造代码如下所示:

 方法风流倜傥、轻便安装(通过yum)

三、安装Nginx

curl -fSL http://soft.l68.net/nginx/nginx-1.15.3.tar.gz -o nginx-1.15.3.tar.gztar zxf nginx-1.15.3.tar.gz && rm -f nginx-1.15.3.tar.gzcd nginx-1.15.3./configure --prefix=/usr/local --conf-path=/usr/local/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --lock-path=/run/lock/nginx.lock --pid-path=/run/nginx.pid --with-http_ssl_module --with-http_v2_module --with-http_image_filter_module --with-http_slice_module --with-http_xslt_module --with-http_realip_module --with-http_stub_status_module --with-pcre --with-pcre-jit --with-http_flv_module --with-http_mp4_module --with-http_addition_module --with-threads --with-http_secure_link_module --with-http_degradation_module --with-http_ssl_module --with-http_gzip_static_module --without-mail_imap_module --without-mail_pop3_module --without-mail_smtp_module --without-http_uwsgi_module --without-http_scgi_module --without-select_module --with-http_sub_module --with-cc-opt='-O2'make -j "$" && make installmkdir -p /var/lib/nginxmkdir -p /usr/local/etc/nginx/sitescd ../rm -rf /usr/local/src/nginx-1.15.3
yum upgrade
yum install net-tools

4.安装重视包

安装PHP7

9.启动php-fpm

1.安装wget
  yum -y install wget
2.安装源
  wget https://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
  rpm -ivh mysql57-community-release-el7-8.noarch.rpm
3.安装mysql
  yum install mysql-server
4.启动mysql服务
  systemctl start mysqld
5.查看MySQL的启动状态
  systemctl status mysqld
6.开机启动
  systemctl enable mysqld
  systemctl daemon-reload
7.修改root本地登录密码
  查找mysql生成的随机密码
  grep 'temporary password' /var/log/mysqld.log
  mysql -uroot -p
  修改密码,注意:mysql5.7默认安装了密码安全检查插件(validate_password),默认密码检查策略要求密码必须包含:大小写字母、数字和特殊符号,并且长度不能少于8位。否则会提示ERROR 1819 (HY000): Your password does not satisfy the current policy requirements错误
  ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!'; 
8.配置默认编码为utf8
  修改/etc/my.cnf配置文件,在[mysqld]下添加编码配置
  [mysqld]
  character_set_server=utf8
  init_connect='SET NAMES utf8'
9.配置mysql远程连接
  mysql -uroot -p
  use mysql;
  Grant all on *.* to 'root'@'%' identified by 'root用户的密码' with grant option;
flush privileges;
然后用以下命令查看哪些用户和host可以访问,%代表任意ip地址
select user,host from user;
防火墙添加3306端口
firewall-cmd --zone=public --add-port=3306/tcp --permanent
firewall-cmd --reload
10.mysql忘记密码
1.修改MySQL的配置文件(默认为/etc/my.cnf),在[mysqld]下添加一行skip-grant-tables
2.service mysqld restart后,即可直接用mysql进入
3.mysql> update mysql.user set authentication_string=password('123qwe') where user='root' and Host = 'localhost';
  mysql> flush privileges;
  mysql> quit;
 将/etc/my.cnf文件还原,重新启动mysql:service mysql restart,这个时候可以使用mysql -u root -p'123qwe'进入了
 mysql>SET PASSWORD = PASSWORD('newpasswd'); 设置新密码

1.下载php7

总结

# 直接复制下面一行(不包括本行)
yum install libxml2 libxml2-devel openssl openssl-devel bzip2 bzip2-devel libcurl libcurl-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel gmp gmp-devel libmcrypt libmcrypt-devel readline readline-devel libxslt libxslt-devel

安装apache

cd php-7.0.4

安装mysql5.7

你或然感兴趣的作品:

  • Centos6.5和Centos7 php景况搭建方法
  • Centos7.2 编写翻译安装PHP7.0.2的步骤
  • 阿里云CentOS7搭建Apache PHP MySQL环境
  • 安详严整怎样在CentOS7中选取Nginx和PHP7-FPM安装Nextcloud
  • Centos7下编译安装配置Nginx PHP MySql情状
  • CentOS7 LNMP phpmyadmin意况搭建 第三篇phpmyadmin安装
  • 简言之谈谈centos7中安插php

本文由68399皇家赌场发布于集成介绍,转载请注明出处:7的安装配置代码,安装步骤

关键词: 68399皇家赌场 php 步骤 Centos

上一篇:PHP代码简洁之道,php代码规范

下一篇:没有了

最火资讯