安装前准备

  • 修改默认主机名称
[root@iZuf60c5bxd15kr9gycvv6Z ~]# hostnamectl set-hostname centos7
[root@iZuf60c5bxd15kr9gycvv6Z ~]# reboot
[root@iZuf60c5bxd15kr9gycvv6Z ~]# yum update
  • 安装依赖库
[root@centos7 ~]# yum -y install libaio  libaio-devel  bison  bison-devel  zlib-devel  openssl openssl-devel  ncurses  ncurses-devel libcurl-devel libarchive-devel  boost  boost-devel  lsof  wget gcc  gcc-c++ make cmake perl kernel-headers kernel-devel  pcre-devel

删除系统默认数据库配置文件

  • 查询
[root@centos7 ~]# find -H /etc/ | grep my.c
/etc/my.cnf
/etc/my.cnf.d
/etc/my.cnf.d/MysqL-clients.cnf
/etc/pki/tls/certs/renew-dummy-cert
/etc/pki/tls/certs/make-dummy-cert
  • 删除
[root@centos7 ~]# rm -rf /etc/my.cnf /etc/my.cnf.d /etc/my.cnf.d/MysqL-clients.cnf
  • 确认
[root@centos7 ~]# find -H /etc/ | grep my.c
/etc/pki/tls/certs/renew-dummy-cert
/etc/pki/tls/certs/make-dummy-cert

卸载系统自带mariadb-libs

  • 查询
[root@centos7 ~]# rpm -qa|grep mariadb-libs
mariadb-libs-5.5.52-1.el7.x86_64
  • 删除
[root@centos7 ~]# rpm -e mariadb-libs-5.5.52-1.el7.x86_64 --nodeps

安装MariaDB数据库

  • 下载安装包
[root@centos7 ~]# cd /usr/local/src
[root@centos7 src]# wget https://downloads.mariadb.org/interstitial/mariadb-10.2.8/source/mariadb-10.2.8.tar.gz
  • 解压
[root@centos7 src]# tar -zxvf mariadb-10.2.8.tar.gz
  • 创建数据库安装目录,数据存放目录,以及用户组、用户
# 创建MysqL用户组
[root@centos7 mariadb-10.2.8]# groupadd -r MysqL
# 创建MysqL用户
[root@centos7 mariadb-10.2.8]# useradd -r -g MysqL -s /sbin/nologin -d /usr/local/MysqL -M MysqL
# 创建安装目录
[root@centos7 mariadb-10.2.8]# mkdir -p /usr/local/MysqL
# 创建数据存放目录
[root@centos7 mariadb-10.2.8]# mkdir -p /data/MysqL
# 赋以MysqL用户读写权限
[root@centos7 mariadb-10.2.8]# chown -R MysqL:MysqL /data/MysqL
  • 编译安装
[root@centos7 mariadb-10.2.8]# cd /usr/local/src/mariadb-10.2.8
# 输入以下编译参数
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/MysqL \
-DMysqL_DATADIR=/data/MysqL \
-DSYSconfdIR=/etc \
-DWITHOUT_TOKUDB=1 \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_ARCHIVE_STPRAGE_ENGINE=1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DWIYH_READLINE=1 \
-DWIYH_SSL=system \
-DVITH_ZLIB=system \
-DWITH_LOBWRAP=0 \
-DMysqL_UNIX_ADDR=/tmp/MysqL.sock \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci

# 如果编译失败请删除CMakeCache.txt
[root@centos7 mariadb-10.2.8]# rm -f CMakeCache.txt
# 让指令重新执行,否则每次读取这个文件,命令修改正确也是报错
# cmake没问题,可以编译并且安装了

# 开始安装,这个过程比较久,跟据电脑配制不同可能会有10-30分钟
[root@centos7 mariadb-10.2.8]# make && make install
  • 导入MysqL系统表
[root@centos7 mariadb-10.2.8]# cd /usr/local/MysqL/
[root@localhost MysqL]# scripts/MysqL_install_db --user=MysqL --datadir=/data/MysqL
  • 复制配制文件
[root@localhost ~]# cd /usr/local/MysqL/
[root@localhost MysqL]# cp support-files/my-large.cnf /etc/my.cnf
  • 编写快捷启动脚本
[root@centos7 MysqL]# vi /lib/systemd/system/MysqL.service
# --------------------------------------------------------------------------
# 输入以下代码
# --------------------------------------------------------------------------
[Unit]
Description=MysqL Community Server
After=network.target

[Service]
User=MysqL
Group=MysqL
Type=forking
PermissionsstartOnly=true
PIDFile=/data/MysqL/centos7.pid
ExecStart=/usr/local/MysqL/support-files/MysqL.server start
ExecReload=/usr/local/MysqL/support-files/MysqL.server restart
ExecStop=/usr/local/MysqL/support-files/MysqL.server stop
PrivateTmp=true

[Install]
WantedBy=multi-user.target
  • 设置开机启动
[root@centos7 MysqL]# systemctl enable MysqL.service
  • 其它命令说明
# 启动MysqL
[root@centos7 MysqL]# systemctl start MysqL.service
# 停止MysqL
[root@centos7 MysqL]# systemctl stop MysqL.service
# 重启MysqL
[root@centos7 MysqL]# systemctl restart MysqL.service
# 如果提示:Job for MysqL.service Failed because the control process exited with error code. See "systemctl status MysqL.service" and "journalctl -xe" for details.
# 请选结束MysqL进程后再尝试执行上面的快捷操作
[root@centos7 MysqL]# pkill -9 MysqL
  • 配置环境变量(以便在任何目录下输入MySQL命令)
# 创建独立环境变量文件
[root@localhost MysqL]# touch /etc/profile.d/MysqL.sh
# 写入变量值
[root@localhost MysqL]# echo 'export PATH=$PATH:/usr/local/MysqL/bin/' > /etc/profile.d/MysqL.sh 
# 赋以执行权限
[root@localhost MysqL]# chmod 0777 /etc/profile.d/MysqL.sh 
# 刷新生效
[root@localhost MysqL]# source /etc/profile.d/MysqL.sh
  • 初始化MariaDB
# 运行MariaDB初始化脚本
[root@localhost MysqL]# ./bin/MysqL_secure_installation

# --------------------------------------------------------------------------
# 根据相关提示进行操作
# 以下提示:
# --------------------------------------------------------------------------
Enter current password for root (enter for none):    输入当前root密码(没有输入)
Set root password? [Y/n]                             设置root密码?(是/否)
New password:                                        输入新root密码
Re-enter new password:                               确认输入root密码
Password updated successfully!                       密码更新成功
Remove anonymous users? [Y/n]                        删除匿名用户?(是/否)
disallow root login remotely? [Y/n]                  不允许root登录远程?(是/否)
Reload privilege tables Now? [Y/n]                   现在重新加载权限表(是/否)

#全部完成!如果你已经完成了以上步骤,MariaDB安装现在应该安装完成。
  • 创建外部管理员帐号(根据需要,请尽量保证密码的复杂性避免数据库外泄)
[root@localhost MysqL] MysqL -uroot -p
# 根据提示输入密码
MariaDB [(none)]> GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;

安装Nginx

-下载安装包并解压

[root@localhost MysqL]# cd /usr/local/src
[root@localhost src]# wget http://Nginx.org/download/Nginx-1.12.1.tar.gz
[root@localhost src]# tar -zxvf Nginx-1.12.1.tar.gz
  • 创建Nginx安装目录,WEB存放目录,以及用户组、用户
# 创建Nginx用户组
[root@centos7 src]# groupadd -r www
# 创建Nginx用户
[root@centos7 src]# useradd -r -g www -s /sbin/nologin -d /usr/local/Nginx -M www
# 创建安装目录
[root@centos7 src]# mkdir -p /usr/local/Nginx
# 创建数据存放目录
[root@centos7 src]# mkdir -p /data/web
# 赋以MysqL用户读写权限
[root@centos7 src]# chown -R www:www /data/web

-编译安装

[root@localhost src]# cd Nginx-1.12.1
# 输入以下参数
./configure \
--prefix=/usr/local/Nginx \
--without-http_memcached_module \
--user=www  \
--group=www \
--with-http_stub_status_module \
--with-http_ssl_module \
--with-http_gzip_static_module

# 如果看到以下说明则编译成功
Configuration summary
  + using system PCRE library
  + using system OpenSSL library
  + using system zlib library

  Nginx path prefix: "/usr/local/Nginx"
  Nginx binary file: "/usr/local/Nginx/sbin/Nginx"
  Nginx modules path: "/usr/local/Nginx/modules"
  Nginx configuration prefix: "/usr/local/Nginx/conf"
  Nginx configuration file: "/usr/local/Nginx/conf/Nginx.conf"
  Nginx pid file: "/usr/local/Nginx/logs/Nginx.pid"
  Nginx error log file: "/usr/local/Nginx/logs/error.log"
  Nginx http access log file: "/usr/local/Nginx/logs/access.log"
  Nginx http client request body temporary files: "client_body_temp"
  Nginx http proxy temporary files: "proxy_temp"
  Nginx http fastcgi temporary files: "fastcgi_temp"
  Nginx http uwsgi temporary files: "uwsgi_temp"
  Nginx http scgi temporary files: "scgi_temp"

# 开始安装
[root@localhost Nginx-1.12.1]# make && make install
  • 尝试启动
[root@centos7 Nginx-1.12.1]# /usr/local/Nginx/sbin/Nginx
# 如果未提示错误即代表安装成功
  • 编写快捷启动脚本
[root@centos7 Nginx-1.12.1]# vi /lib/systemd/system/Nginx.service
# --------------------------------------------------------------------------
# 输入以下代码
# --------------------------------------------------------------------------
[Unit]
Description=Nginx
After=network.target

[Service]
Type=forking
PIDFile=/usr/local/Nginx/logs/Nginx.pid
ExecStart=/usr/local/Nginx/sbin/Nginx
ExecReload=/usr/local/Nginx/sbin/Nginx -s reload
ExecStop=/usr/local/Nginx/sbin/Nginx -s quit
PrivateTmp=true

[Install]
WantedBy=multi-user.target
  • 设置开机启动
[root@centos7 Nginx-1.12.1]# systemctl enable Nginx.service
  • 其它命令说明
# 启动Nginx
[root@centos7 Nginx-1.12.1]# systemctl start Nginx.service
# 停止Nginx
[root@centos7 Nginx-1.12.1]# systemctl stop Nginx.service
# 重启Nginx
[root@centos7 Nginx-1.12.1]# systemctl restart Nginx.service
# 如果提示:Job for Nginx.service Failed because the control process exited with error code. See "systemctl status Nginx.service" and "journalctl -xe" for details.
# 请选结束Nginx进程后再尝试执行上面的快捷操作
[root@centos7 Nginx-1.12.1]# pkill -9 Nginx
  • 修改配Nginx配制文件
[root@centos7 PHP-7.1.9]# cd /usr/local/Nginx/conf
[root@centos7 conf]# vi Nginx.conf
# 修改如下代码
# --------------------------------------------------------------------------
#user  nobody;去除前面#号,并将用户改为www www
user www www;
# --------------------------------------------------------------------------
#pid        logs/Nginx.pid; 去除前面的#号 
pid        logs/Nginx.pid;
# --------------------------------------------------------------------------
去除前面的#号 如下
log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                  '$status $body_bytes_sent "$http_referer" '
                  '"$http_user_agent" "$http_x_forwarded_for"';
# --------------------------------------------------------------------------
# gzip  on;去除前面的#号并加上隐藏版号代码 
server_tokens off;
# --------------------------------------------------------------------------
index  index.html index.htm;后面加上index.PHP 默认页
index  index.html index.htm index.PHP;
# --------------------------------------------------------------------------
去下以下前面的#号并做如下修改
location ~ \.PHP$ {
    root           html;
    fastcgi_pass   127.0.0.1:9000;
    fastcgi_index  index.PHP;
    #fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
    fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include        fastcgi_params;
}
  • 最后张节介绍虚拟主机配制,以及memcache配制

安装PHP7

  • 下载安装包并解压
[root@centos7 Nginx-1.12.1]# cd /usr/local/src
[root@centos7 src]# wget http://cn.PHP.net/distributions/PHP-7.1.9.tar.gz
[root@centos7 src]# tar -zxvf PHP-7.1.9.tar.gz
  • 安装必要的相关扩展
[root@centos7 src]# 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

-编译安装

[root@localhost src]# cd PHP-7.1.9
# 输入以下参数
./configure \
--prefix=/usr/local/PHP \
--with-config-file-path=/usr/local/PHP/etc \
--enable-fpm \
--with-fpm-user=www  \
--with-fpm-group=www \
--enable-inline-optimization \
--disable-debug \
--disable-rpath \
--enable-shared  \
--enable-soap \
--with-libxml-dir \
--with-xmlrpc \
--with-openssl \
--with-mcrypt \
--with-mhash \
--with-pcre-regex \
--with-zlib \
--enable-bcmath \
--with-iconv \
--with-bz2 \
--enable-calendar \
--with-curl \
--with-cdb \
--enable-dom \
--enable-exif \
--enable-fileinfo \
--enable-filter \
--with-pcre-dir \
--enable-ftp \
--with-gd \
--with-openssl-dir \
--with-jpeg-dir \
--with-png-dir \
--with-zlib-dir  \
--with-freetype-dir \
--enable-gd-native-ttf \
--enable-gd-jis-conv \
--with-gettext \
--with-gmp \
--with-mhash \
--enable-json \
--enable-mbstring \
--enable-mbregex \
--enable-mbregex-backtrack \
--with-libmbfl \
--with-onig \
--enable-pdo \
--with-MysqLi=MysqLnd \
--with-pdo-MysqL=MysqLnd \
--with-zlib-dir \
--with-pdo-sqlite \
--with-readline \
--enable-session \
--enable-shmop \
--enable-simplexml \
--enable-sockets  \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-wddx \
--with-libxml-dir \
--with-xsl \
--enable-zip \
--enable-MysqLnd-compression-support \
--with-pear \
--enable-opcache

# 开始安装
[root@localhost PHP-7.1.9]# make && make install
  • 配置环境变量(以便在任何目录下输入PHP命令)
# 创建独立环境变量文件
[root@localhost PHP-7.1.9]# touch /etc/profile.d/PHP.sh
# 写入变量值
[root@localhost PHP-7.1.9]# echo 'export PATH=$PATH:/usr/local/PHP/bin/' > /etc/profile.d/PHP.sh 
# 赋以执行权限
[root@localhost PHP-7.1.9]# chmod 0777 /etc/profile.d/PHP.sh 
# 刷新生效
[root@localhost PHP-7.1.9]# source /etc/profile.d/PHP.sh
  • 配制PHP.ini
[root@centos7 PHP-7.1.9]# cp PHP.ini-production /usr/local/PHP/etc/PHP.ini
[root@centos7 PHP-7.1.9]# vi /usr/local/PHP/etc/PHP.ini
# 做以下修改(时区,不显示版本号,开启opcache缓存加速PHP)
# --------------------------------------------------------------------------
1.找到:;date.timezone =                               修改为:date.timezone = PRC
2.找到:expose_PHP = On                                   修改为:expose_PHP = Off
3.找到:opcache.enable=0                              修改为:opcache.enable=1
4.在 Dynamic Extensions 代码块中添加 zend_extension=opcache.so
  • 配置PHP-fpm
[root@centos7 PHP-7.1.9]# cp /usr/local/PHP/etc/PHP-fpm.conf.default /usr/local/PHP/etc/PHP-fpm.conf
[root@centos7 PHP-7.1.9]# cp /usr/local/PHP/etc/PHP-fpm.d/www.conf.default /usr/local/PHP/etc/PHP-fpm.d/www.conf
[root@centos7 PHP-7.1.9]# cp sapi/fpm/init.d.PHP-fpm /usr/local/PHP/bin/PHP-fpm
[root@centos7 PHP-7.1.9]# chmod 0777 /usr/local/PHP/bin/PHP-fpm
  • 尝试启动
[root@centos7 PHP-7.1.9]# /usr/local/PHP/bin/PHP-fpm start
Starting PHP-fpm  done
# 如提示以上即表示安装成功
  • 编写快捷启动脚本
[root@centos7 PHP-7.1.9]# vi /lib/systemd/system/PHP-fpm.service
# --------------------------------------------------------------------------
# 输入以下代码
# --------------------------------------------------------------------------
[Unit]
Description=PHP-fpm
After=network.target

[Service]
Type=forking
PIDFile=/usr/local/PHP/var/run/PHP-fpm.pid
ExecStart=/usr/local/PHP/bin/PHP-fpm start
ExecReload=/usr/local/PHP/bin/PHP-fpm restart
ExecStop=/usr/local/PHP/bin/PHP-fpm stop
PrivateTmp=true

[Install]
WantedBy=multi-user.target
  • 设置开机启动
[root@centos7 PHP-7.1.9]# systemctl enable PHP-fpm.service
  • 其它命令说明
# 启动PHP-fpm
[root@centos7 PHP-7.1.9]# systemctl start PHP-fpm.service
# 停止PHP-fpm
[root@centos7 PHP-7.1.9]# systemctl stop PHP-fpm.service
# 重启PHP-fpm
[root@centos7 PHP-7.1.9]# systemctl restart PHP-fpm.service
# 如果提示:Job for PHP-fpm.service Failed because the control process exited with error code. See "systemctl status PHP-fpm.service" and "journalctl -xe" for details.
# 请选结束PHP-fpm进程后再尝试执行上面的快捷操作
[root@centos7 PHP-7.1.9]# pkill -9 PHP-fpm

Nginx虚拟主机配制

  • 打开配制文件
[root@centos7 PHP-7.1.9]# vi /usr/local/Nginx/conf/Nginx.conf
  • 在http{}节点尾加入以下代码
##############################################
    #LIANGZHI
    ##############################################
    server {
        listen          80;
        server_name     *.demo.com;
        root            /data/web/demo/www;
        access_log      /data/web/demo/log/access.log  main;
        error_log       /data/web/demo/log/error.log error;
        index           index.PHP;

        #THINKPHP伪静态
        location / {
            if (!-e $request_filename) {
                rewrite ^(.*)$ /index.PHP?s=$1 last;
                break;
            }
        }

        #解析PHP代码
        location ~ \.PHP$ {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.PHP;
            fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include        fastcgi_params;
        }

        #静态资源缓存1天
        location ~ .*\.(gif|jpg|jpeg|png|bmp|ico|swf|js|css)$ {
            expires     1d;
            access_log  off;
        }

        #字体文件跨域问题
        location ~ .*\.(eof|ttf|ttc|otf|eof|woff|woff2|svg)(.*){
            add_header Access-Control-Allow-Origin *;
        }
    }

安装PHP支持插件Memcache

[root@centos7 www]# cd /usr/local/src
[root@centos7 src]# wget http://memcached.org/files/memcached-1.5.1.tar.gz
[root@centos7 src]# tar -zxvf memcached-1.5.1.tar.gz
[root@centos7 src]# cd memcached-1.5.1
[root@centos7 memcached-1.5.1]# yum install libevent*
[root@centos7 memcached-1.5.1]# ./configure --prefix=/usr/local/memcached
[root@centos7 memcached-1.5.1]# make && make install
  • 编写快捷启动脚本
[root@centos7 memcached-1.5.1]# vi /usr/local/memcached/memcached
# 输入以下代码(启动参数请在下面的脚本中修改,如端口,最大内存)
#! /bin/sh
#
# chkconfig: - 55 45
# description:  The memcached daemon is a network memory cache service.
# processname: memcached
# config: /etc/sysconfig/memcached

# Source function library.
. /etc/rc.d/init.d/functions

PORT=11211
USER=root 
MAXCONN=1024
CACHESIZE=64
OPTIONS=""

if [ -f /etc/sysconfig/memcached ];then
    . /etc/sysconfig/memcached
fi

# Check that networking is up.
if [ "$NETWORKING" = "no" ]
then
    exit 0
fi

RETVAL=0

start () {
    echo "Starting memcached ..."
    # insure that /var/run/memcached has proper permissions
    chown $USER /usr/local/memcached/bin/memcached
    /usr/local/memcached/bin/memcached -d -p $PORT -u $USER -m $CACHESIZE -c $MAXCONN -P /var/run/memcached.pid $OPTIONS
    RETVAL=$?
    echo
    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/memcached
}
stop () {
    echo "Stopping memcached ..."
    killproc memcached
    RETVAL=$?
    echo
    if [ $RETVAL -eq 0 ] ; then
        rm -f /var/lock/subsys/memcached
        rm -f /var/run/memcached.pid
    fi
}

restart () {
    stop
    start
}

# See how we were called.
case "$1" in
    start)
        start
        ;;
    stop)
    stop
    ;;
    status)
    status memcached
    ;;
    restart|reload)
    restart
    ;;
    condrestart)
    [ -f /var/lock/subsys/memcached ] && restart || :
    ;;
    *)
    echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
    exit 1
esac
  • 脚本执行权限
[root@localhost memcached-1.5.1]# chmod 0777 /usr/local/memcached/memcached
  • 编写服务启动脚本
[root@centos7 memcached-1.5.1]# vi /lib/systemd/system/memcached.service
# --------------------------------------------------------------------------
# 输入以下代码
# --------------------------------------------------------------------------
[Unit]
Description=memcached
After=network.target

[Service]
Type=forking
PIDFile=/var/run/memcached.pid
ExecStart=/usr/local/memcached/memcached start
ExecReload=/usr/local/memcached/memcached restart
ExecStop=/usr/local/memcached/memcached stop
PrivateTmp=true

[Install]
WantedBy=multi-user.target
  • 设置开机启动
[root@centos7 memcached-1.5.1]# systemctl enable memcached.service
  • 其它命令说明
# 启动memcached
[root@centos7 memcached-1.5.1]# systemctl start memcached.service
# 停止memcached
[root@centos7 memcached-1.5.1]# systemctl stop memcached.service
# 重启memcached
[root@centos7 memcached-1.5.1]# systemctl restart memcached.service
# 如果提示:Job for memcached.service Failed because the control process exited with error code. See "systemctl status memcached.service" and "journalctl -xe" for details.
# 请选结束memcached进程后再尝试执行上面的快捷操作
[root@centos7 memcached-1.5.1]# pkill -9 memcached
  • 为PHP增加memcache支持(官司网memcache-3.0.8暂时不支持PHP的编译)

官网memcache-3.0.8在编译的时候出现“PHP-smart_str.h”没有找到的错误!
但是我们可以在github里面找到pecl-memcache支持PHP7的分支,请按以下操作即可完成memcache中扩展安装

[root@centos7 memcached]# cd /usr/local/src/PHP-7.1.9/ext
# 如果已经安装git忽略yun install git
[root@centos7 memcached]# yum install git
[root@centos7 ext]# git clone https://github.com/websupport-sk/pecl-memcache memcache
[root@centos7 ext]# cd memcache
[root@centos7 ext]# yum install autoconf
[root@centos7 ext]# /usr/local/PHP/bin/PHPize
[root@centos7 ext]# ./configure --with-PHP-config=/usr/local/PHP/bin/PHP-config
[root@centos7 ext]# make && make install
  • 修改PHP.ini
[root@centos7 ext]# vi /usr/local/PHP/etc/PHP.ini
# 在 Dynamic Extensions 代码块中添加如下扩展
extension=/usr/local/PHP/lib/PHP/extensions/no-debug-non-zts-20160303/memcache.so

-重启linux完成安装(或重启Nginx PHP-fpm)

[root@centos7 ext]#  reboot

啊里云centos7.3编译安装NGINX+PHP7+MariaDB+MEMCACHED的更多相关文章

  1. 从iOS应用程序发送帖子到PHP脚本不工作…简单的解决方案就像

    我之前已经做了好几次了但是由于某些原因我无法通过这个帖子…我尝试了设置为_POST且没有的变量的PHP脚本……当它们未设置为发布时它工作精细.这是我的iOS代码:这里是PHP的一大块,POST变量不在正确的位置?我想这对于更有经验的开发人员来说是一个相当简单的答案,感谢您的帮助!解决方法$_POST是一个数组,而不是一个函数.您需要使用方括号来访问数组索引:

  2. swift学习2 元组 tuples

    swift中出现了一种新的数据结构,非常牛掰的元组tuples如果懂PHP的猿,会发现这个元组和PHP的数组非常类似,同样是可以默认不指定key,也可以指定key目前的学习疑问是,如何进行元组的遍历?

  3. openstack学习笔记七 swift安装

    指定映射位置创建ring文件启动服务代维服务proxyserver

  4. openstack安装liberty--安装对象存储服务swift

    通常使用CACHE技術提高性能Accountservers賬戶服務,管理對象存儲中的賬戶定義。Containerservers容器服務,在對象存儲中管理容器或文件夾映……Objectservers對象服務,在存儲節點管理實際的對象,比如文件。Wsgimiddleware處理認證,通常使用OPENSTACKIdentityswiftclient為用戶提供命令行接口使用RESTAPIswift-init初始化和構建RING文件腳本swift-recon一個命令行工具,用於檢索群集的各種度量和測試信息。

  5. 尝试使用swift mailer,gmail smtp,php发送邮件

    这里是我的代码:在运行时出现此错误…

  6. 将我的Android应用程序签名为系统应用程序

    将我的Android应用程序签名为系统应用程序在我的公司,我们希望在现场完全控制电池消耗,仅使用2g和gps可以快速耗尽电池.我们的决定是我们需要拥有移动电话的root权限,这样当手机闲置时,我们就会关掉那些不必要的电池消耗.而且我们也不允许用户将其卸载并清除数据.我的问题是:>我从哪里获得这些签名密钥?>它是否会像root访问权限一样如果我成功地成功了签字?

  7. Android – 将SQLite与MySQL同步的最佳方式

    参见英文答案>Synchronizingclient-serverdatabases5个我正在开发一个包含网络应用和移动应用程序的项目,该应用程序记录每日用户的数据.用户可以删除,更新他们的数据,他们可以使用许多设备插入数据.我打算这样开发:用户输入他们的数据然后插入sqlite.服务将定期启动(每5小时或每小时)以使用时间戳与MysqL同步.我确实在互联网上使用服务和时间戳搜索了一个样本,但我一

  8. 获得Android App的“root”权限

    我想知道如何从Android应用程序获得root权限?我尝试了下面的代码行来列出文件但没有发生任何事情我试图在我的清单文件中给予TEST_FACTORY权限,但是我收到错误“允许系统应用”如何制作我的应用系统应用?

  9. android – 如何将唯一的GCM注册标识存储到MySQL中

    我正在设置GoogleCloudMessaging机制的服务器端,使用MySQL存储移动应用提供的注册ID.Google可以发出最多4k个注册码,我被迫将其存储在TEXT字段中.所有的好,到目前为止,问题是我必须处理这样的情况:>用户登录到应用程序>该应用从google请求注册ID>应用程序将新的注册ID发送到应用服务器>服务器存储该注册ID并将其链接到当前登录的用户>该用户注销并且新用户登录>应

  10. PHP使用JpGraph绘制折线图操作示例【附源码下载】

    这篇文章主要介绍了PHP使用JpGraph绘制折线图操作,结合实例形式分析了php使用JpGraph的相关操作技巧与注意事项,并附带源码供读者下载参考,需要的朋友可以参考下

随机推荐

  1. 在airgapped(离线)CentOS 6系统上安装yum软件包

    我有一个CentOS6系统,出于安全考虑,它已经被空气泄漏.它可能从未连接到互联网,如果有,它很长时间没有更新.我想将所有.rpm软件包放在一个驱动器上,这样它们就可以脱机安装而无需查询互联网.但是,我在测试VM上遇到的问题是,即使指定了本地路径,yum仍然会挂起并尝试从在线存储库进行更新.另外,有没有办法使用yum-utils/yumdownloader轻松获取该包的所有依赖项和所有依赖项?目前

  2. centos – 命名在日志旋转后停止记录到rsyslog

    CentOS6.2,绑定9.7.3,rsyslog4.6.2我最近设置了一个服务器,我注意到在日志轮换后,named已停止记录到/var/log/messages.我认为这很奇怪,因为所有日志记录都是通过rsyslog进行的,并且named不会直接写入日志文件.这更奇怪,因为我在更新区域文件后命名了HUPed,但它仍然没有记录.在我停止并重新启动命名后,记录恢复.这里发生了什么?

  3. centos – 显示错误的磁盘大小

    对于其中一个磁盘,Df-h在我的服务器上显示错误的空白区域:Cpanel表明它只有34GB免费,但还有更多.几分钟前,我删除了超过80GB的日志文件.所以,我确信它完全错了.fdisk-l/dev/sda2也显示错误:如果没有格式化,我该怎么做才能解决这个问题?并且打开文件描述符就是它需要使用才能做到这一点.所以…使用“lsof”并查找已删除的文件.重新启动写入日志文件的服务,你很可能会看到空间可用.

  4. 如何在centos 6.9上安装docker-ce 17?

    我目前正在尝试在centOS6.9服务器上安装docker-ce17,但是,当运行yuminstalldocker-ce时,我收到以下错误:如果我用跳过的标志运行它我仍然得到相同的消息,有没有人知道这方面的方法?

  5. centos – 闲置工作站的异常负载平均值

    我有一个新的工作站,具有不寻常的高负载平均值.机器规格是:>至强cpu>256GB的RAM>4x512GBSSD连接到LSI2108RAID控制器我从livecd安装了CentOS6.564位,配置了分区,网络,用户/组,并安装了一些软件,如开发工具和MATLAB.在启动几分钟后,工作站负载平均值的值介于0.5到0.9之间.但它没有做任何事情.因此我无法理解为什么负载平均值如此之高.你能帮我诊断一下这个问题吗?

  6. centos – Cryptsetup luks – 检查内核是否支持aes-xts-plain64密码

    我在CentOS5上使用cryptsetupluks加密加密了一堆硬盘.一切都很好,直到我将系统升级到CentOS6.现在我再也无法安装磁盘了.使用我的关键短语装载:我收到此错误:在/var/log/messages中:有关如何装载的任何想法?找到解决方案问题是驱动器使用大约512个字符长的交互式关键短语加密.出于某种原因,CentOS6中的新内核模块在由旧版本创建时无法正确读取512个字符的加密密钥.似乎只会影响内核或cryptsetup的不同版本,因为在同一系统上创建和打开时,512字符的密钥将起作用

  7. centos – 大量ssh登录尝试

    22个我今天登录CentOS盒找到以下内容这是过去3天内的11次登录尝试.WTF?请注意,这是我从我的提供商处获得的全新IP,该盒子是全新的.我还没有发布任何关于此框的内容.为什么我会进行如此大量的登录尝试?是某种IP/端口扫描?基本上有4名匪徒,其中2名来自中国,1名来自香港,1名来自Verizon.这只发生在SSH上.HTTP上没有问题.我应该将罪魁祸首子网路由吗?你们有什么建议?

  8. centos – kswap使用100%的CPU,即使有100GB的RAM也可用

    >Linux内核是否应该足够智能,只需从内存中清除旧缓存页而不是启动kswap?

  9. centos – Azure将VM从A2 / 3调整为DS2 v2

    我正在尝试调整前一段时间创建的几个AzureVM,从基本的A3和标准A3到标准的DS2v2.我似乎没有能力调整到这个大小的VM.必须从头开始重建服务器会有点痛苦.如果它有所不同我在VM中运行CentOS,每个都有一个带有应用程序和操作系统的磁盘.任何人都可以告诉我是否可以在不删除磁盘的情况下删除VM,创建新VM然后将磁盘附加到新VM?

  10. centos – 广泛使用RAM时服务器计算速度减慢

    我在非常具体的情况下遇到服务器速度下降的问题.事实是:>1)我使用计算应用WRF>2)我使用双XeonE5-2620v3和128GBRAM(NUMA架构–可能与问题有关!

返回
顶部