澳门威尼人登录网址·主頁欢迎您

<pre id="ipusv"></pre>
  1. <acronym id="ipusv"><strong id="ipusv"><xmp id="ipusv"></xmp></strong></acronym>
  2. <track id="ipusv"><ruby id="ipusv"><menu id="ipusv"></menu></ruby></track>
  3. <pre id="ipusv"><label id="ipusv"></label></pre>
    1. Web环境搭建教程:lamp

      写一个Web环境搭建教程,用于能够运行WordPress,这个Web服务器搭建教程使用云服务器搭建Web,我用阿里云服务器CentOS做个示例。

      第一步:购买ECS服务器

      这里比较简单,先领取一下阿里云代金券,购买阿里云服务器ECS,选择CentOS系统即可,推荐CentOS 6.x 64位。

      第二步:配置yum源

      备份repo

      1
      2
      mv /etc/yum.repos.d /etc/yum.repos.d.back
      mkdir /etc/yum.repos.d

      新建CentOS源

      1
      vi /etc/yum.repos.d/CentOS-Base.repo

      输入

      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      31
      32
      33
      34
      35
      36
      37
      38
      39
      40
      41
      42
      43
      44
      45
      46
      47
      48
      49
      50
      51
      52
      # CentOS-Base.repo
      #
      # The mirror system uses the connecting IP address of the client and the
      # update status of each mirror to pick mirrors that are updated to and
      # geographically close to the client.? You should use this for CentOS updates
      # unless you are manually picking other mirrors.
      #
      # If the mirrorlist= does not work for you, as a fall back you can try the
      # remarked out baseurl= line instead.
      #
      #
      [base]
      name=CentOS-$releasever - Base
      baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/os/$basearch/
      #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;amp;arch=$basearch&amp;amp;repo=os
      gpgcheck=1
      gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
      #released updates
      [updates]
      name=CentOS-$releasever - Updates
      baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/updates/$basearch/
      #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;amp;arch=$basearch&amp;amp;repo=updates
      gpgcheck=1
      gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
      #additional packages that may be useful
      [extras]
      name=CentOS-$releasever - Extras
      baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch/
      #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;amp;arch=$basearch&amp;amp;repo=extras
      gpgcheck=1
      gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
      #additional packages that extend functionality of existing packages
      [centosplus]
      name=CentOS-$releasever - Plus
      baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/centosplus/$basearch/
      #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;amp;arch=$basearch&amp;amp;repo=centosplus
      gpgcheck=1
      enabled=0
      gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
      #contrib - packages by Centos Users
      [contrib]
      name=CentOS-$releasever - Contrib
      baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/contrib/$basearch/
      #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;amp;arch=$basearch&amp;amp;repo=contrib
      gpgcheck=1
      enabled=0
      gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

      新增epel、remi、MariaDB

      1
      2
      3
      yum install yum-utils -y
      yum install https://mirrors.tuna.tsinghua.edu.cn/epel/6/x86_64/epel-release-6-8.noarch.rpm
      yum install https://mirrors.tuna.tsinghua.edu.cn/remi/enterprise/remi-release-6.rpm
      1
      vi /etc/yum.repos.d/MariaDB.repo

      输入

      1
      2
      3
      4
      5
      6
      7
      # MariaDB 10.3 CentOS repository list - created 2019-01-10 05:49 UTC
      # http://downloads.mariadb.org/mariadb/repositories/
      [mariadb]
      name = MariaDB
      baseurl = https://mirrors.tuna.tsinghua.edu.cn/mariadb/yum/10.3/centos6-amd64/
      gpgkey=https://mirrors.tuna.tsinghua.edu.cn/mariadb/yum/RPM-GPG-KEY-MariaDB
      gpgcheck=1

      第三步:安装Apache、PHP、MariaDB

      1
      2
      3
      yum makecache
      yum-config-manager --enable remi remi-php73
      yum install php php-bcmath php-cli php-common php-dba php-devel php-embedded php-enchant php-fpm php-gd php-intl php-ldap php-mbstring php-mysql php-mysqlnd php-odbc php-pdo php-pear php-pecl-memcache php-pgsql php-process php-pspell php-recode php-snmp php-soap php-xml php-xmlrpc php-opcache mod_ssl sendmail unzip crontabs MariaDB-server MariaDB-client

      第四步:启动Apache、设置数据库密码

      1
      2
      service httpd restart && service mysql restart
      mysql_secure_installation

      第五步:Apache配置虚拟机

      这里就不详细配置了,网上很多教程。

      这样一个完整的Web云服务器搭建环境就可以运行WordPress了,再找一个合适的WordPress主题,愉快的玩耍自己的网站。

      标签:,,

      上一篇:

      下一篇:

      澳门威尼人登录网址