一:安装PHP,mysql,nginx

 linux装软件方式:
1.源码安装:下载wget--》解压tar -zxvf --》配置 ./configure ---》编译make
-->安装 make install
2.yum安装 一键安装包 centos 红帽 乌班图
3.rpm l n m p linux 版本 39.98.47.141
windows centos 6.5 6.8 system nekwrok restart
centos 7.0+ systemctl centos 7.4 7.5 systemctl status firewalld.service 查看防火墙
systemctl stop firewalld.service
systemctl disable firewalld.service 开机 防火墙 不自启 ###Nginx#######安装篇############
rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
yum list nginx ##查询更新列表
yum -y install nginx ##yum安装命令 systemctl start nginx.service ##开启nginx服务软件
systemctl enable nginx.service ##加入开启启动项 ###Nginx#######测试篇######################
用windows浏览器 测试
http://39.98.47.141/(阿里云IP)
看到:
Welcome to nginx!
表示:
Nginx安装成功了
问题1: 访问不了
阿里云: 安全组 --》配置 --》 克隆一个 端口 80
########################################### ===========================================接》》着》》安装》》PHP》》=================================================》》》》 ###Php56#######安装篇############
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 -y install php56w php56w-fpm php56w-opcache php56w-mysql php56w-gd libjpeg* php56w-ldap php56w-odbc php56w-pear php56w-xml php56w-xmlrpc php56w-mbstring php56w-bcmath systemctl start php-fpm.service ## 启动 php-fpm 软件 用于 运行PHP脚本
systemctl enable php-fpm.service ## 加入 php-fpm 开启自动项 /etc/nginx/conf.d/ 目录下: 虚拟机配置文件 nginx.conf
include vim /etc/nginx/conf.d/default.conf :set nu #####开启行数
###将30行-36行 前面 # 去掉
###将 第31行 "html" 改成 /usr/share/nginx/html
###将 第34行 "/scripts" 改成 $document_root location ~ \.php$ {
root /usr/share/nginx/html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
} :wq! ##退出保存 systemctl restart nginx.service
systemctl restart php-fpm.service vim /usr/share/nginx/html/index.php
###编辑如下代码 测试环境脚本
<?php
echo phpinfo();
?> ###Nginx关联php脚本#######测试篇######################
用windows浏览器 测试
http://39.107.105.231/index.php (阿里云IP)
看到:
PHP Version 5.6.36
表示:
Nginx关联php成功了,也就是PHP安装成功了!
##################################################### ===========================================接》》着》》安装》》MySQL》》=================================================》》》》 ###Mysql#######安装篇############
rpm -qa|grep mariadb #查看阿里云默认安装的mariadb数据库 版本号:如:mariadb-libs-5.5.56-2.el7.x86_64
rpm -e --nodeps mariadb-libs-5.5.56-2.el7.x86_64 ##卸载mariadb-libs-5.5.56-2.el7.x86_64包 (rpm -e --nodeps 后面跟是上个命令查询结果) rpm -e --nodeps mariadb-libs-5.5.44-2.el7.centos.x86_64 rpm -ivh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
yum list mysql-community-server
yum -y install mysql-community-server systemctl start mysqld.service
systemctl enable mysqld.service mysql_secure_installation ###初始化 mysql系统数据(安装系统数据库) ##提示: Enter current password for root (enter for none):
空密码,回车 ##提示: Set root password? [Y/n]
y,回车 ##提示: New password:
输入数据库密码,如:zha123456 (两次重复密码) ##提示: Remove anonymous users? [Y/n]
y,回车 ##提示: Disallow root login remotely? [Y/n]
y,回车 ##提示: Remove test database and access to it? [Y/n]
y,回车 ##提示: Reload privilege tables now? [Y/n]
y,回车 ###提示: 看到:
Thanks for using MySQL! mysql -h localhost -u root -p
Enter password:******** rootroot mysql>
mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'zha123456' WITH GRANT OPTION; ##开启mysql远程访问权限
mysql>flush privileges; ##刷新权限
mysql>exit; systemctl stop firewalld.service ###MySQL#######测试篇######################
###提示: 阿里云 安全组 克隆规则
允许 自定义 TCP 3306/3306 地址段访问 0.0.0.0/0 System created rule.
用Navicat for MySQL 新建连接测试
表示:
Navicat for MySQL 连接阿里云Ip数据库,
外网访问正常,ok!!
##################################################### ===========================================接》》着》》安装》》Iwebshop》》=================================================》》》》 上传iwebshop压缩包:
FileZilla: unzip iwebshop.zip vim /etc/selinux/config

PHP,mysql,nginxunx中安装的更多相关文章

  1. Centos7中安装Mysql及配置

    CentOS 7 安装 MySQL 首先检查 MySQL 是否已安装 yum list installed | grep mysql 如果有的话 就全部卸载 yum -y remove +数据库名称 ...

  2. Linux CentOS 中安装 MySql

    CentOS7的yum源中默认好像是没有mysql的.为了解决这个问题,我们要先下载mysql的repo源. 1. 下载mysql的repo源 $ wget http://repo.mysql.com ...

  3. 在linux中安装和卸载mysql

    [安装] 已经获取到linux版本的mysql安装包,包括mysql的server(服务端)和client(客户端)的安装包,假设安装包为: MySQL-server-5.0.22-0.i386.rp ...

  4. 应用mysql(Linux中安装)

    当前 mysql 官网的安装教程,指明可以使用 yum 方式. 若在Ubuntu中安装,参考“Linux(Ubuntu)下MySQL的安装与配置”. MySQL YUM Repository MySQ ...

  5. ubuntu linux 中安装 mysql

    三种安装方式: 1. 从网上安装 sudo apt-get install mysql-server.装完已经自动配置好环境变量,可以直接使用mysql的命令. 注:建议将/etc/apt/sourc ...

  6. centos中安装mysql

    一.首先输入指令 rpm -qa|grep mysql 检查操作系统中是否已经安装了MySQL 可以通过 yum list | grep mysql 命令来查看yum上提供的mysql数据库可下载的版 ...

  7. ubuntu的安装及ubuntu中安装mysql和tomcat

    一.安装ubuntu 1.创建虚拟机 2.向导选择自定义 3.然后下一步再下一步,直到这里,稍后再安装系统 4.然后选择linux,注意这里下面的下拉选择Ubuntu64,因为我们下载的是64位的,如 ...

  8. Linux中安装MySQL

    因为使用yum安装.安装过程需保证网络通畅 一.安装mysql 1.yum安装mysqlCentOS7默认数据库是mariadb,配置等用着不习惯,因此决定改成mysql,但是CentOS7的yum源 ...

  9. 在docker中安装mysql

    #!/bin/sh # 安装docker # 在docker中安装mysql # 解决了docker容器中无法输入中文的问题 ##########################安装docker # ...

随机推荐

  1. WPF之Treeview实现MVVM双向绑定

    Treeview分别有两个数据模板HierarchicalDataTemplate(层级数据模板)和DataTemplate(数据模板),分别应用于生成子数据项和普通数据项. 在使用过程中,如果对两个 ...

  2. go之流程控制

    一.与用户交互 var name string fmt.Scanln(&name) # 一定得传指针,因为我要修改的是name的值 fmt.Println(name) 二.if判断 1.if ...

  3. Android_(控件)使用自定义控件在屏幕中绘制一条虚线

    在Android屏幕中绘制虚线,最通用的是自定义控件DashedLine,再将自定义控件放入xml布局中 运行截图: 程序结构 package com.example.asus.gary_042; i ...

  4. centos6升级系统内核

    1.升级系统内核查看内核版本: uname -r 2.6.32-573.8.1.el6.x86_64 导入elrepo的key: rpm --import https://www.elrepo.org ...

  5. C++中void和void*指针的含义 (指针类型的含义)

    转载自:http://blog.csdn.net/lee_shuai 指针有两个属性:指向变量/对象的地址和长度,但是指针只存储地址,长度则取决于指针的类型:编译器根据指针的类型从指针指向的地址向后寻 ...

  6. laravel 先orderBY再groupby,导致分组后的排序不正确

    //联系过我的经纪人 $appletChats=$this->AppletChat->orderBy('created_at','desc')->where([['user_id', ...

  7. HearthBuddy卡牌无法识别

    界面上无法识别,提示是 [Unidentified card ID :DAL_010][Unidentified card ID :DAL_415] Unidentified card ID :HER ...

  8. GitHub-Tech-DotNet:Cnblogs

    ylbtech-GitHub-Tech-DotNet:Cnblogs 1.返回顶部 · EnyimMemcachedCore Forked from enyim/EnyimMemcached A Me ...

  9. JDBC事务案例学习

    package com.loaderman.demo.d_tx; import com.loaderman.demo.utils.JdbcUtil; import java.sql.Connectio ...

  10. Sticky广播

    sticky广播通过Context.sendStickyBroadcast()函数来发送,用此函数发送的广播会一直滞留,当有匹配此广播的广播接收器被注册后,该广播接收器就会收到此条信息. 使用此函数需 ...