当前位置: 首页 > 编程日记 > 正文

手动配置lnmp环境

做php开发的,想要进一步提升自己,手动搭建开发环境,我想是必须经历的一个坎。虽然说有很多第三方集成环境可供使用,但我想说的是在你没有自己搭建过一次环境的时候,你没有太多的资本去“偷懒”。虽然我自己也是个菜鸟,但我乐意分享我的成长历程和学习成果。所以今天我说说我自己搭建lnmp环境的整个流程,有表述不清的地方或者错误,希望大伙不吝指出。废话不多说了,开干。

一、主机环境:

虚拟机安装的centos 6.7 , i686


二、各应用版本:

php: 5.6.3

mysql: 5.6.12

nginx: 1.8.0


三、准备安装包:

为了节省大伙时间,我已经放置在微云盘: http://share.weiyun.com/f891e9c6547bd9abf03072e554626ee6(密码:9Z4G),包含了安装过程需要用到的所有安装包。

现在,我们做如下约定:

  1. <pre name="code" class="plain">  <strong><span style="font-size:18px;">/usr/local/src</span></strong>


    这是我们存放安装包的路径
  2. <pre name="code" class="plain"> <strong><span style="font-size:18px;">/usr/local</span></strong>


    这是各应用的安装路径

在安装包目录下解压压缩包:

        <pre name="code" class="plain">        <strong><span style="font-size:18px;">unzip   lnmp.zip</span></strong>

四、环境预设:

1、防火墙设置:

打开 iptables文件 

<pre name="code" class="plain"><span style="font-size:18px;"> <strong>vim   /etc/sysconfig/iptables</strong></span>




添加两行:

<span style="font-size:18px;">-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT</span>

第一行是为网络协议开放的端口,第二行为mysql数据库开放的端口。

编辑完要重启iptables:

<pre name="code" class="plain"><strong><span style="font-size:18px;">service iptables restart</span></strong>



2、关闭SELINUX:

<strong><span style="font-size:18px;">vim /etc/selinux/config</span></strong>

</pre><pre>
注释掉 SELINUX=enforcing 和 SELINUXTYPE=targeted,然后 在最底部添加 SELINUX=disabled 

3、安装编译工具及依赖库文件:

直接用yum命令安装,如下:

<pre name="code" class="plain"><strong><span style="font-size:18px;">yum install -y apr* autoconf automake bison bzip2 bzip2* cloog-ppl compat* cpp curl curl-devel fontconfig fontconfig-devel freetype freetype* freetype-devel gcc gcc-c++ gtk+-devel gd gettext gettext-devel glibc kernel kernel-headers keyutils keyutils-libs-devel krb5-devel libcom_err-devel libpng libpng* libpng-devel libjpeg* libsepol-devel libselinux-devel libstdc++-devel libtool* libgomp libxml2 libxml2-devel libXpm* libX* libtiff libtiff* make mpfr ncurses* ntp openssl nasm nasm* openssl-devel patch pcre-devel perl php-common php-gd policycoreutils ppl telnet t1lib t1lib* wget zlib-devel</span></strong>



五、安装mysql

1、由于是采用cmake方式编译安装mysql,因此得先安装cmake:

<pre name="code" class="plain"><strong><span style="font-size:18px;">cd /usr/local/src</span></strong>
<strong><span style="font-size:18px;">tar -zxvf  cmake-3.0.2.tar.gz</span></strong>
<strong><span style="font-size:18px;">cd cmake-3.0.2 
./configure && make && make install</span></strong>



2、cmake安装完成后即可编译安装mysql了,正式安装mysql之前,我们还有个小任务
<pre name="code" class="plain"><strong><span style="font-size:18px;">groupadd mysql   #添加mysql组
useradd -g mysql mysql -s /bin/false  #创建用户mysql并加入到mysql组,不允许mysql用户直接登录系统
mkdir -p /data/mysql    #创建MySQL数据库存放目录
chown -R mysql:mysql /data/mysql     #设置MySQL数据库存放目录权限
mkdir -p /usr/local/mysql     #创建MySQL安装目录</span></strong>



3、现在可以正式编译mysql了:

<pre name="code" class="plain"><strong><span style="font-size:18px;">tar -zxvf  mysql-5.6.21.tar.gzcd mysql-5.6.21cmake  .  -DCMAKE_INSTALL_PREFIX=/usr/local/mysql  -DMYSQL_DATADIR=/data/mysql  -DSYSCONFDIR=/etc  -DDEFAULT_CHARSET=utf8  -DDEFAULT_COLLATION=utf8_general_ci -DMYSQL_TCP_PORT=3306make && make install</span></strong>



4、编译完成后我们就用进入mysql的安装目录:

<pre name="code" class="plain"><strong><span style="font-size:18px;">cd  /usr/local/mysql</span></strong>



生成mysql数据库系统:

<pre name="code" class="plain"><strong><span style="font-size:18px;">./scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/data/mysql</span></strong>



5、下面就要修改配置文件了:

<pre name="code" class="html">
<strong><span style="font-size:18px;">cp /usr/local/mysql/support-files/mysql.server  /etc/rc.d/init.d/mysqld</span></strong>
<strong><span style="font-size:18px;">
vim /etc/rc.d/init.d/mysqld</span></strong>

<pre name="code" class="plain">
找到大概46、47行的位置,修改如下:

<strong><span style="font-size:18px;">basedir=/usr/local/mysql
datadir=/data/mysql</span></strong>

保存退出。


6、试着启动mysql:

<pre name="code" class="plain"><strong><span style="font-size:18px;">service mysqld start</span></strong>


可以看到 "Starting  MySQL. SUCCESS !"说明启动成功。

我们通常习惯将其放置系统变量,因此打开/etc/profile 文件,在倒数第三行左右,修改如下:

<strong><span style="font-size:18px;">export PATH=$PATH:/usr/local/mysql/bin</span></strong>


然后刷新/etc/profile文件:

<pre name="code" class="plain"><strong><span style="font-size:18px;">source /etc/profile</span></strong>



7、mysql安装完成后是默认没有设置root的密码的,因此安全起见,我们设置root账户密码:

<pre name="code" class="plain"><strong><span style="font-size:18px;">mysql_secure_installation</span></strong>



输入命令后按照提示走,相信你可以的。

设置完后,我们测试root密码是否生成了:

<pre name="code" class="plain"><strong><span style="font-size:18px;">mysql -uroot -p</span></strong>



根据提示输入刚刚设置的root新密码,

如果看到上面这个界面,那么恭喜你,说明你完成了mysql的安装。


六、安装nginx

1、安装nginx所需的依赖包pcre、openssl、zlib:

<pre name="code" class="plain"><strong><span style="font-size:18px;">tar -zxvf pcre-8.36.tar.gz
cd  pcre-8.36
./configure && make && make install</span></strong>



安装openssl和zlib和安装pcre的方法是一样的,这里不多赘述。

在按装完openssl后,需要多做件事: 打开/etc/profile,在之前添加的

<strong><span style="font-size:18px;">export PATH=$PATH:/usr/local/mysql/bin</span></strong>

后面添加下面这行:

<strong><span style="font-size:18px;">export PATH=$PATH:/usr/local/openssl/bin
</span></strong>


保存后,让其生效:

<pre name="code" class="plain"><pre name="code" class="plain"><strong><span style="font-size:18px;">source /etc/profile</span></strong>



2、编译安装nginx:

 <pre name="code" class="plain"><strong><span style="font-size:18px;">tar -zxvf nginx-1.8.0.tar.gz
cd  nginx-1.8.0
./configure --prefix=/usr/local/nginx --without-http_memcached_module --user=nobody  --group=nobody  --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module --with-openssl=/usr/local/src/openssl-1.0.1j --with-zlib=/usr/local/src/zlib-1.2.8 --with-pcre=/usr/local/src/pcre-8.36</strong>
make && make install</span></strong>


编译安装完成后,启动:

<pre name="code" class="plain"><pre name="code" class="plain"><strong><span style="font-size:18px;">/usr/local/nginx/sbin/nginx</span></strong>

然后将在/etc/rc.d/init.d/下新增文件nginx,内容如下

<strong><span style="font-size:18px;">#!/bin/sh
#
# nginx - this script starts and stops the nginx daemin
#
# chkconfig:   - 85 15 
# description:  Nginx is an HTTP(S) server, HTTP(S) reverse \
#               proxy and IMAP/POP3 proxy server
# processname: nginx
# config:      /usr/local/nginx/conf/nginx.conf
# pidfile:     /usr/local/nginx/logs/nginx.pid# Source function library.
. /etc/rc.d/init.d/functions# Source networking configuration.
. /etc/sysconfig/network# Check that networking is up.
[ "$NETWORKING" = "no" ] && exit 0nginx="/usr/local/nginx/sbin/nginx"
prog=$(basename $nginx)NGINX_CONF_FILE="/usr/local/nginx/conf/nginx.conf"lockfile=/var/lock/subsys/nginxstart() {[ -x $nginx ] || exit 5[ -f $NGINX_CONF_FILE ] || exit 6echo -n $"Starting $prog: "ulimit -SHn 65535daemon $nginx -c $NGINX_CONF_FILEretval=$?echo[ $retval -eq 0 ] && touch $lockfilereturn $retval
}stop() {echo -n $"Stopping $prog: "killproc $prog -QUITretval=$?echo[ $retval -eq 0 ] && rm -f $lockfilereturn $retval
}restart() {configtest || return $?stopstart
}reload() {configtest || return $?echo -n $"Reloading $prog: "killproc $nginx -HUPRETVAL=$?echo
}force_reload() {restart
}configtest() {$nginx -t -c $NGINX_CONF_FILE
}rh_status() {status $prog
}rh_status_q() {rh_status >/dev/null 2>&1
}case "$1" instart)rh_status_q && exit 0$1;;stop)rh_status_q || exit 0$1;;restart|configtest)$1;;reload)rh_status_q || exit 7$1;;force-reload)force_reload;;status)rh_status;;condrestart|try-restart)rh_status_q || exit 0;;*)echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|configtest}"exit 2
esac</span></strong>


赋予其执行权限:

<pre name="code" class="plain"><strong><span style="font-size:18px;">chmod 775 /etc/rc.d/init.d/nginx</span></strong>


设置开机启动:

<pre name="code" class="plain"><strong><span style="font-size:18px;">chkconfig --add nginx
chkconfig nginx on </span></strong>



再重启nginx:

<pre name="code" class="plain"><strong><span style="font-size:18px;">service nginx restart</span></strong>


3、测试nginx是否安装成功:

在浏览器网址输入框输入:  localhost ,你会看到很鸡冻的画面。


==================================================我的鸡汤========================================================

天哪,废了好大劲才把mysql安装完成,这全部弄完不累死才怪。。。

害羞千万别这么想啊,最难过的时候,也是离成功最近的时候。所以一定要挺住,干吧得奋斗

=================================================================================================================


七、安装php

1、先安装php的相关扩展库yasm、libmcrypt、libvpx、tiff、libpng、freetype、jpeg

这些命令都是: ./configure && make && make install


安装 libgd 有些区别:

<pre name="code" class="plain"><strong><span style="font-size:18px;">./configure --prefix=/usr/local/libgd --enable-shared --with-jpeg=/usr/local/jpeg --with-png=/usr/local/libpng --with-freetype=/usr/local/freetype --with-fontconfig=/usr/local/freetype --with-xpm=/usr/ --with-tiff=/usr/local/tiff --with-vpx=/usr/local/libvpx
make && make install</span></strong>

安装 t1lib 这里有个坑,虽小但估计害死了一批人,记得不是make而是make without_doc:

<pre name="code" class="plain"><strong><span style="font-size:18px;">./configure --prefix=/usr/local/t1lib --enable-shared
make without_doc && make install</span></strong>



2、编译安装php

<pre name="code" class="plain"><strong><span style="font-size:18px;">tar -zvxf php-5.6.3.tar.gzcd php-5.6.3./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-mysql-sock=/tmp/mysql.sock --with-pdo-mysql=/usr/local/mysql --with-gd --with-png-dir=/usr/local/libpng --with-jpeg-dir=/usr/local/jpeg --with-freetype-dir=/usr/local/freetype --with-xpm-dir=/usr/ --with-vpx-dir=/usr/local/libvpx/ --with-zlib-dir=/usr/local/zlib --with-t1lib=/usr/local/t1lib --with-iconv --enable-libxml --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --enable-opcache --enable-mbregex --enable-fpm --enable-mbstring --enable-ftp --enable-gd-native-ttf --with-openssl --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --enable-session --with-mcrypt --with-curl --enable-ctypemake && make test &&  make install</span></strong>


3、配置php

复制php配置文件到安装目录:

<pre name="code" class="plain"><strong><span style="font-size:18px;">cp  php.ini-production  /usr/local/php/etc/php.ini</span></strong>



将配置文件链到etc下:

<pre name="code" class="plain"><strong><span style="font-size:18px;">ln -s /usr/local/php/etc/php.ini /etc/php.ini</span></strong>



php.ini里的具体配置这里不多说。


4、由于我们使用php-fpm管理php的,因此php-fpm也需要配置

<pre name="code" class="plain"><strong><span style="font-size:18px;">cp /usr/local/php/etc/php-fpm.conf.default   /usr/local/php/etc/php-fpm.conf
vim  /usr/local/php/etc/php-fpm.conf</span></strong>


修改对应的地方(地25行左右):

<strong><span style="font-size:18px;">pid = run/php-fpm.pid #取消前面的分号</span></strong>



接下来设置php-fpm开机启动:

<pre name="code" class="plain"><strong><span style="font-size:18px;">cp /usr/local/src/php-5.6.3/sapi/fpm/init.d.php-fpm   /etc/rc.d/init.d/php-fpm 
chmod +x /etc/rc.d/init.d/php-fpm 
chkconfig php-fpm on </span></strong>



5、配置nginx支持php

所有服务都安装完了,但这时候nginx和php还不是同路人呢,得给他们牵条线,双方才能合作呢。

<pre name="code" class="plain"><strong><span style="font-size:18px;">vim /usr/local/nginx/conf/fcgi.conf</span></strong>


内容如下:

<pre name="code" class="plain"><strong><span style="font-size:18px;">fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
fastcgi_param  SERVER_SOFTWARE    nginx;fastcgi_param  QUERY_STRING       $query_string;
fastcgi_param  REQUEST_METHOD     $request_method;
fastcgi_param  CONTENT_TYPE       $content_type;
fastcgi_param  CONTENT_LENGTH     $content_length;fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
fastcgi_param  REQUEST_URI        $request_uri;
fastcgi_param  DOCUMENT_URI       $document_uri;
fastcgi_param  DOCUMENT_ROOT      $document_root;
fastcgi_param  SERVER_PROTOCOL    $server_protocol;fastcgi_param  REMOTE_ADDR        $remote_addr;
fastcgi_param  REMOTE_PORT        $remote_port;
fastcgi_param  SERVER_ADDR        $server_addr;
fastcgi_param  SERVER_PORT        $server_port;
fastcgi_param  SERVER_NAME        $server_name;# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param  REDIRECT_STATUS    200;
</span></strong>




修改nginx配置文件

<pre name="code" class="plain"><strong><span style="font-size:18px;">vim /usr/local/nginx/conf/nginx.conf</span></strong>



内容修改如下:

<pre name="code" class="plain"><strong><span style="font-size:18px;">user  nobody nobody;
worker_processes  4;#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;#pid        logs/nginx.pid;events {worker_connections  1024;
}http {include       mime.types;default_type  application/octet-stream;#log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '#                  '$status $body_bytes_sent "$http_referer" '#                  '"$http_user_agent" "$http_x_forwarded_for"';#access_log  logs/access.log  main;sendfile        on;#tcp_nopush     on;#keepalive_timeout  0;keepalive_timeout  65;#gzip  on;server {listen       80;server_name  localhost;#charset koi8-r;#access_log  logs/host.access.log  main;location / {root   /data/www;index  index.php index.html index.htm;}#error_page  404              /404.html;# redirect server error pages to the static page /50x.html##error_page   500 502 503 504  /50x.html;#location = /50x.html {#    root   html;#}# proxy the PHP scripts to Apache listening on 127.0.0.1:80##location ~ \.php$ {#    proxy_pass   http://127.0.0.1;#}# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000#location ~ \.php$ {root           /data/www;fastcgi_pass   127.0.0.1:9000;fastcgi_index  index.php;include        fcgi.conf;   #此处就是引用刚刚新增的文件}# deny access to .htaccess files, if Apache's document root# concurs with nginx's one##location ~ /\.ht {#    deny  all;#}location /tongji {stub_status on;access_log off;auth_basic "Nginx status";auth_basic_user_file /usr/local/nginx/.htpasswd;}}</span></strong>



6、测试php和nginx是否合作愉快:

在/data/www/目录下新增index.php:

写入php测试代码:

<pre name="code" class="php"><strong><span style="font-size:18px;"><?php
<span style="white-space:pre">	</span>phpinfo();
?></span></strong>



打开浏览器,输入localhost,如果你看到phpinfo函数打印出的相关信息,说明你成功了。好感动啊啊啊。。。。。


七、总结

此教程属于为新手准备的饭菜,按照此教程配置的lnmp环境只是达到了让其工作的层面,离部署代码正式上线是还有很大的差距,因此,希望各位参考为主,不应该将此配置成功用于正式环境。介于我粗劣的描述能力,不喜勿喷。大笑



相关文章:

负载均衡,会话保持,session同步

一&#xff0c;什么负载均衡一个新网站是不要做负载均衡的&#xff0c;因为访问量不大&#xff0c;流量也不大&#xff0c;所以没有必要搞这些东西。但是随着网站访问量和流量的快速增长&#xff0c;单台服务器受自身硬件条件的限制&#xff0c;很难承受这么大的访问量。在这种…

终于“打造”出了一个可以随时随地编程的工具

作者 | 老表来源丨简说Python分享概要 系统&#xff1a;阿里云ECS共享型n4服务器 1核2g 存储50g&#xff08;双十一便宜买的&#xff0c;180元/3年&#xff09;环境&#xff1a;自带python3.6.8 方便演示&#xff0c;直接使用它开始动手动脑 首先我们需要连接上服务器&#xff…

JVM堆 栈 方法区详解

一、栈 每当启用一个线程时&#xff0c;JVM就为他分配一个JAVA栈&#xff0c;栈是以帧为单位保存当前线程的运行状态 栈是由栈帧组成&#xff0c;每当线程调用一个java方法时&#xff0c;JVM就会在该线程对应的栈中压入一个帧 只有在调用一个方法时&#xff0c;才为当前栈分配一…

ECSHOP学习笔记

帮助 http://help.ecshop.com/index.phpECSHOP各文件夹功能说明 1、根目录&#xff1a;前台程序文件2、admin&#xff1a;后台程序文件夹 --根目录&#xff1a;后台程序文件 *.php文件 --help\zh_cn&#xff1a;各功能的帮助文件 *.xml文件 --images&#xff1a;后台页面…

Redis主从复制配置

环境描述Redis Master&#xff1a;192.168.1.100 6379(Ubuntu系统)Redis Slave1&#xff1a;192.168.1.101 6380(Ubuntu系统)Redis Slave2&#xff1a;192.168.1.102 6381(Ubuntu系统) 安装redis分别在192.168.1.100、192.168.1.101、192.168.1.102三台机器上安装redis&#xf…

利用 Python 打造一个语音合成系统

作者 | thedaydreamer来源丨CSDN博客背景一直对语音合成系统比较感兴趣&#xff0c;总想能给自己合成一点内容&#xff0c;比如说合成小说&#xff0c;把我下载的电子书播报给我听等等。语音合成系统其实就是一个基于语音合成的工具&#xff0c;但是这个东西由于很多厂家都提供…

干货:排名前 16 的 Java 工具类!

2019独角兽企业重金招聘Python工程师标准>>> 干货&#xff1a;排名前 16 的 Java 工具类&#xff01; 在Java中&#xff0c;工具类定义了一组公共方法&#xff0c;这篇文章将介绍Java中使用最频繁及最通用的Java工具类。以下工具类、方法按使用流行度排名&#xf…

使用ecshop电子商务系统的100个小问题

总结100条关于操作ecshop电子商务系统的小问题。1:如何修改网站"欢迎光临本店"回答:languages\zh_cn\common.php文件中&#xff0c; $_LANG[welcome] 欢迎光临本店;将他修改成你需要的字样。2:如何修改首页"热门搜索关键字"回答:后台->系统设置->网…

MyCAT常用分片规则之分片枚举

MyCAT支持多种分片规则&#xff0c;下面测试的这种是分片枚举。适用场景&#xff0c;列值的个数是固定的&#xff0c;譬如省份&#xff0c;月份等。 在这里&#xff0c;需定义三个值&#xff0c;规则均是在rule.xml中定义。 1. tableRule 2. function 3. mapFile 首先&#xff…

手把手带你打造一款 签名设计 的GUI图形界面!

作者 | 黄伟呢来源丨数据分析与统计学之美1.概述 整体布局呢我们已经搭建起来&#xff0c;唯一没有实现的一个步骤就是&#xff0c;用户每输入一个名字&#xff0c;就会将个性签名一并显示在这个窗口界面中&#xff0c;今天我就带着大家一起完成这个需求。今天的文章可以看成是…

跨域资源共享 CORS

简介 CORS是一个W3C标准&#xff0c;全称是"跨域资源共享"&#xff08;Cross-origin resource sharing&#xff09;。它允许浏览器向跨源服务器&#xff0c;发出XMLHttpRequest请求&#xff0c;从而克服了AJAX只能同源使用的限制。 CORS需要浏览器和服务器同时支持。…

SMARTY核心

http://www.smarty.net/http://smarty.php.net/manual/en/1.配置define("ROOTPATH",dirname(__FILE__)."/../");require_once("smarty/Smarty.class.php");/*** Smarty Template Class Initializtion*/if( constant( "ENABLED_TPL" ) …

5G+XR:让视频增强技术在工业领域大有所为

据工业和信息化部统计显示&#xff0c;目前中国累计建成并开通5G基站142.5万个&#xff0c;基站总数今年有望突破200万个。自5G正式商用以来&#xff0c;凭借其高带宽、广连接、低延时等优势&#xff0c;5G应用的实践逐渐从最初的单一化业务触及至更广泛的行业应用场景中。其中…

IE的安全性设定增加“我的电脑”的安全性设定

HKEY_CURRE-NT_USER\Software\Microsoft\Windows\CurrentVersion\InternetSettings\Zones\0&#xff0c;在右边窗口中找到DWORD值“Flags”&#xff0c;默认键值为十六进制的21(十进制33)&#xff0c;双击“Flags”&#xff0c;在弹出的对话框中将它的键值改为“1”即可&#x…

F# 4.5提供Spans、Match!等特性

F# 4.5预览版现已发布&#xff0c;其中提供了一系列新特性&#xff0c;包括对.NET Core 2.1的新原生类型Span\u0026lt;T\u0026gt;的支持、新关键字Match!等。\\类型Span意在实现底层代码指针操作的安全性和可预测性&#xff0c;这可使得很多情况下不必再分配内存&#xff0c;进…

ecshop transport.js/run() error:undefined

在使用ECshop的AJAX(即&#xff1a;transport.js) IE有时候会出现&#xff1a;ReferenceError: process_request is not defined&#xff0c;FF则出现&#xff1a;transport.js/run() error:undefined&#xff0c;其实这完全和transport.js无关。那么问题出在哪里呢&#xff1f…

为什么你不应该自行更新 Drupal 网站?

&#xff08;译注&#xff1a;这篇文章主要还是针对于非专业人员及个人Drupal站长&#xff0c;对于专业的 Drupal 团队和公司而言 Drupal 的升级更新都有规范的操作流程&#xff0c;完全是家常便饭&#xff0c;不可能出现文中出现的这些情况。尽管如此&#xff0c;里面也还是有…

用友发布新一代企业智能商旅及费控服务平台

3月31日&#xff0c;“便捷商旅 智能费控—2022用友BIP|商旅及费控服务新品发布会”成功举行。作为新一代企业智能商旅及费控服务平台&#xff0c;用友BIP商旅及费控服务以“连接 高效 智能 合规”为核心价值理念&#xff0c;致力于让5000万报销人拥有极致的体验&#xff0c;让…

RNN,LSTM,GRU简单图解:

一篇经典的讲解RNN的&#xff0c;大部分网络图都来源于此&#xff1a;http://colah.github.io/posts/2015-08-Understanding-LSTMs/ 每一层每一时刻的输入输出&#xff1a;https://www.cnblogs.com/lovychen/p/9368390.html 带有权重标识的图&#xff1a;

ecshop模板smarty foreach详解 [ECshop]

{foreach},{foreachelse}{foreach} 用于像循环访问一个数字索引数组一样循环访问一个关联数组&#xff0c;与仅能访问数字索引数组的{section}不同&#xff0c;{foreach}的语法比 {section}的语法简单得多&#xff0c;但是作为一个折衷方案也仅能用于单个数组。每个{foreach}标…

自己动手,做一款抬头显示的「Todo Hud」

我用过好多款 TodoList 软件&#xff0c;但事情一多总还是丢三落四&#xff0c;原本计划好要做的事情总是安静地躺在某个角落&#xff0c;等我想起来要去扫一眼的时候&#xff0c;都已快「物是人非」。。。 要是能在桌面上实时显示 TodoList&#xff0c;那该多好&#xff01;但…

微软语音扩展全球语言支持,发布160个新声音

导语&#xff1a;全世界有数千种语言&#xff0c;最具语言天赋的人也只能说数十种&#xff0c;普通人能够学会两三种语言已属不易。然而&#xff0c;在科技日新月异的今天&#xff0c;具备自然语言对话能力的AI已经能够掌握上百种语言&#xff0c;扩展人类自身能力&#xff0c;…

P4269 [USACO18FEB]Snow Boots G

思维题。 以地板为序构造链表&#xff0c;再排序&#xff0c;然后删除走不过去的地面。 删除的时候顺便维护最大的跨度&#xff0c;以此判断可行性。 总的来说利用了答案的单调性。 #include <cstdio> #include <cstring> #include <iostream> #include <…

GPT-3:现实版的“贾维斯”?还是真「人工」智能?

整理 | 章雨铭 责编 | 屠敏出品 | CSDN&#xff08;ID&#xff1a;CSDNnews&#xff09;GPT-3&#xff08;Generative Pre-trained Transformer 3&#xff09;自2020年推出以来就备受热议&#xff0c;它是一种由OpenAI开发的AI工具。发布的两年来&#xff0c;外媒The Verg…

SVN更换修改用户名

如果装了TortoiseSVN&#xff1a; Settings -> Saved Data -> Authentication Data -> clear。即可清除保存的上个用户登录信息&#xff1b;当再次用到svn时&#xff0c;会提示输入用户名密码&#xff0c;输入新的用户名密码即可。 或者&#xff0c;手动删除下面目录下…

启用CORS实现Ajax跨域请求

2019独角兽企业重金招聘Python工程师标准>>> 应用场景&#xff1a;想从a.com请求b.com上的资源&#xff0c;由于同源策略不允许请求。 解决办法&#xff1a;在请求的php文件中加入 header("Access-Control-Allow-Origin: http://b.com"); 这种比较安全&am…

Python机器学习实践指南pdf (中文版带书签)、原书代码、数据集

Python机器学习实践指南 目 录 第1章Python机器学习的生态系统 1 1&#xff0e;1 数据科学/机器学习的工作 流程 2 1&#xff0e;1&#xff0e;1 获取 2 1&#xff0e;1&#xff0e;2 检查和探索 2 1&#xff0e;1&#xff0e;3 清理和准备 3 1&#xff0e;1&#xff0e;4 建模…

虚拟机安装CentOS以及SecureCRT设置【完美无错版】

一、CentOS简介CentOS是Linux的发行版之一&#xff0c;它安全、稳定、高效&#xff0c;是我最喜欢的Linux发行版之一。CentOS根据Red Hat Enterprise Linux开放源代码编译而成&#xff0c;与RedHat Linux并没有什么本质上的差别。但Red Hat Enterprise Linux是商业软件&#xf…

Python 实现机器学习前后端页面的交互

作者 | 俊欣来源丨关于数据分析与可视化对于机器学习爱好者而言&#xff0c;很多时候我们需要将建好的模型部署在线上&#xff0c;实现前后端的交互&#xff0c;今天小编就通过Flask以及Streamlit这两个框架实现机器学习模型的前后端交互。模型的建立首先是模型的建立&#xff…

webpack入门(二)what is webpack

webpack is a module bundler.webpack是一个模块打包工具&#xff0c;为了解决上篇一提到的各种模块加载或者转换的问题。 webpack takes modules with dependencies and generates static assets representing those modules. webpack以依赖模块和生成 静态的资源来代表这些模…