PHP+Nginx环境搭建

作者:王宇阳( Mirror )_

参考文章:

Nginx+PHP+MySQL安装参考

PHP源码安装经验

PHP源码环境搭建过程中常见问题

CentOS环境

配置CentOS-7网络:

CentOS(最小安装)默认是不打开网络的

  • 启动网络

vi打开:/etc/sysconfig/network-scripts/ifcfg-ens33 文件

将 “ONBOOT:no”属性修改为:“ONBOOT:yes”

  • 重启网络服务
# sudo service network restart
  • OK
# ip addr

Nginx服务:

安装依赖包

  • 安装:

    # yum -y install build-essential
  • 安装:更多依赖包

    # yum -y install gcc automake autoconf libtool make
  • 安装:g++

    # yum -y install gcc gcc-c++

安装PCRE库

选定源码目录 ==> ftp下载PCRE库 ==> 安装PCRE库

# cd /usr/local/src

# wget ftp://ftp.pcre.org/pub/pcre/pcre-8.42.tar.gz

# tar -zxvf pcre-8.42.tar.gz

# cd /pcre-8.42

# ./configure

# make && make install

安装zlib源码包

下载zlib源码包 ==> 安装zlib包

# cd /usr/local/src

# wget http://zlib.net/zlib-1.2.11.tar.gz

# tar -zxvf zlib-1.2.11.tar.gz

# cd zlib-1.2.11

# ./configure

# make && make install

安装openssl源码包

# cd /usr/local/src

# wget https://www.openssl.org/source/openssl-1.1.0k.tar.gz

# tar -zxvf openssl-1.1.0k.tar.gz

# cd ./openssl-1.1.0k

# ./configure

# make && make install

安装Nginx

# cd /usr/local/src

# wget http://nginx.org/download/nginx-1.16.1.tar.gz

# tar -zxvf nginx-1.16.1.tar.gz

# cd nginx-1.16.1

# groupadd -r nginx
# useradd -r -g nginx nginx # ./configure \
--prefix=/usr/local/nginx \
--sbin-path=/usr/local/nginx/sbin/nginx \
--conf-path=/usr/local/nginx/nginx.conf \
--pid-path=/usr/local/nginx/nginx.pid \
--user=nginx \
--group=nginx \
--with-http_ssl_module \
--with-http_flv_module \
--with-http_mp4_module \
--with-http_stub_status_module \
--with-http_gzip_static_module \
--http-client-body-temp-path=/var/tmp/nginx/client/ \
--http-proxy-temp-path=/var/tmp/nginx/proxy/ \
--http-fastcgi-temp-path=/var/tmp/nginx/fcgi/ \
--http-uwsgi-temp-path=/var/tmp/nginx/uwsgi \
--http-scgi-temp-path=/var/tmp/nginx/scgi \
--with-pcre=/usr/local/src/pcre-8.42 \
--with-zlib=/usr/local/src/zlib-1.2.11 \
--with-openssl=/usr/local/src/openssl-1.1.0k \ [注:当前所在目录一定要是/usr/local/src/nginx-1.16.1 --with-pcre=/usr/local/src/pcre-8.41 指的是pcre-8.42 的源码路径。 --with-zlib=/usr/local/src/zlib-1.2.11 指的是zlib-1.2.11 的源码路径。 --with-openssl=/usr/local/src/openssl-1.1.0g 指的是openssl-1.1.0k 的源码路径。] # make && make install

nginx编译选项

make是用来编译的,它从Makefile中读取指令,然后编译。

make install是用来安装的,它也从Makefile中读取指令,安装到指定的位置。

configure命令是用来检测你的安装平台的目标特征的。它定义了系统的各个方面,包括nginx的被允许使用的连接处理的方法,比如它会检测你是不是有CC或GCC,并不是需要CC或GCC,它是个shell脚本,执行结束时,它会创建一个Makefile文件。nginx的configure命令支持以下参数:

  • --prefix=*path* 定义一个目录,存放服务器上的文件 ,也就是nginx的安装目录。默认使用 /usr/local/nginx。
  • --sbin-path=*path* 设置nginx的可执行文件的路径,默认为 *prefix*/sbin/nginx.
  • --conf-path=*path* 设置在nginx.conf配置文件的路径。nginx允许使用不同的配置文件启动,通过命令行中的-c选项。默认为*prefix*/conf/nginx.conf.
  • --pid-path=*path* 设置nginx.pid文件,将存储的主进程的进程号。安装完成后,可以随时改变的文件名 , 在nginx.conf配置文件中使用 PID指令。默认情况下,文件名 为``*prefix*/logs/nginx.pid.
  • --error-log-path=*path* 设置主错误,警告,和诊断文件的名称。安装完成后,可以随时改变的文件名 ,在nginx.conf配置文件中 使用 的error_log指令。默认情况下,文件名 为*prefix*/logs/error.log.
  • --http-log-path=*path* 设置主请求的HTTP服务器的日志文件的名称。安装完成后,可以随时改变的文件名 ,在nginx.conf配置文件中 使用 的access_log指令。默认情况下,文件名 为*prefix*/logs/access.log.
  • --user=*name* 设置nginx工作进程的用户。安装完成后,可以随时更改的名称在nginx.conf配置文件中 使用的 user指令。默认的用户名是nobody。
  • --group=*name* 设置nginx工作进程的用户组。安装完成后,可以随时更改的名称在nginx.conf配置文件中 使用的 user指令。默认的为非特权用户。
  • --with-select_module --without-select_module 启用或禁用构建一个模块来允许服务器使用select()方法。该模块将自动建立,如果平台不支持的kqueue,epoll,rtsig或/dev/poll。
  • --with-poll_module --without-poll_module 启用或禁用构建一个模块来允许服务器使用poll()方法。该模块将自动建立,如果平台不支持的kqueue,epoll,rtsig或/dev/poll。
  • --without-http_gzip_module — 不编译压缩的HTTP服务器的响应模块。编译并运行此模块需要zlib库。
  • --without-http_rewrite_module 不编译重写模块。编译并运行此模块需要PCRE库支持。
  • --without-http_proxy_module — 不编译http_proxy模块。
  • --with-http_ssl_module — 使用https协议模块。默认情况下,该模块没有被构建。建立并运行此模块的OpenSSL库是必需的。
  • --with-pcre=*path* — 设置PCRE库的源码路径。PCRE库的源码(版本4.4 - 8.30)需要从PCRE网站下载并解压。其余的工作是Nginx的./ configure和make来完成。正则表达式使用在location指令和 ngx_http_rewrite_module 模块中。
  • --with-pcre-jit —编译PCRE包含“just-in-time compilation”(1.1.12中, pcre_jit指令)。
  • --with-zlib=*path* —设置的zlib库的源码路径。要下载从 zlib(版本1.1.3 - 1.2.5)的并解压。其余的工作是Nginx的./ configure和make完成。ngx_http_gzip_module模块需要使用zlib 。
  • --with-cc-opt=*parameters* — 设置额外的参数将被添加到CFLAGS变量。例如,当你在FreeBSD上使用PCRE库时需要使用:--with-cc-opt="-I /usr/local/include。.如需要需要增加 select()支持的文件数量:--with-cc-opt="-D FD_SETSIZE=2048".
  • --with-ld-opt=*parameters* —设置附加的参数,将用于在链接期间。例如,当在FreeBSD下使用该系统的PCRE库,应指定:--with-ld-opt="-L /usr/local/lib".

安装完成后,按照安装的参数,安装的启动目录在/usr/local/nginx

[root@localhost nginx]# ls -l
总用量 76
drwxr-xr-x. 2 root root 4096 9月 8 09:46 conf
-rw-r--r--. 1 root root 1077 9月 8 10:34 fastcgi.conf
-rw-r--r--. 1 root root 1077 9月 8 10:34 fastcgi.conf.default
-rw-r--r--. 1 root root 1007 9月 8 10:34 fastcgi_params
-rw-r--r--. 1 root root 1007 9月 8 10:34 fastcgi_params.default
drwxr-xr-x. 2 root root 40 9月 8 09:46 html
-rw-r--r--. 1 root root 2837 9月 8 10:34 koi-utf
-rw-r--r--. 1 root root 2223 9月 8 10:34 koi-win
drwxr-xr-x. 2 root root 41 9月 8 10:37 logs
-rw-r--r--. 1 root root 5231 9月 8 10:34 mime.types
-rw-r--r--. 1 root root 5231 9月 8 10:34 mime.types.default
-rw-r--r--. 1 root root 2656 9月 8 10:34 nginx.conf
-rw-r--r--. 1 root root 2656 9月 8 10:34 nginx.conf.default
-rw-r--r--. 1 root root 6 9月 8 10:37 nginx.pid
drwxr-xr-x. 2 root root 36 9月 8 10:34 sbin
-rw-r--r--. 1 root root 636 9月 8 10:34 scgi_params
-rw-r--r--. 1 root root 636 9月 8 10:34 scgi_params.default
-rw-r--r--. 1 root root 664 9月 8 10:34 uwsgi_params
-rw-r--r--. 1 root root 664 9月 8 10:34 uwsgi_params.default
-rw-r--r--. 1 root root 3610 9月 8 10:34 win-utf
[root@localhost nginx]# pwd
/usr/local/nginx

启动Nginx服务:

由于CentOS-7防火墙不开发端口,所以在本地测试中,可以选择关闭防火墙或者允许开发80端口

CentOS防火墙

# systemctl status firewalld	 ==> 防火墙状态
# systemctl start firewalld ==> 开启防火墙
# systemctl stop firewalld ==> 关闭防火墙
# systemctl restart firewalld ==> 重启防火墙
# firewall-cmd --reload ==> 防火墙重载
# firewall-cmd --permanent --zone=public --add-port=80/tcp
permanent: 永久有效
zone:作用域
--add-port=80/tcp:添加-端口=端口/通信协议

开放端口或关闭防火墙后就可以启动nginx服务

服务启动

[root@localhost nginx]# netstat -ano | grep 80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN off (0.00/0/0)
unix 3 [ ] STREAM CONNECTED 80900
unix 3 [ ] STREAM CONNECTED 80899
[root@localhost nginx]# /usr/local/nginx/sbin/nginx
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()

通过netstat查看端口网络状态,是否有服务占用80端口;通过调用nginx的启动目录实现nginx服务启动

如图:启动成功

Nginx服务维护

为了避免每次开机手动启动,可以使用命令脚本,注册服务,开机自启动等

创建nginx启动命令脚本

`vi /etc/init.d/nginx`

插入以下内容, 注意修改PATH和NAME字段, 匹配自己的安装路径 (这段是从网上copy的)

`#! /bin/bash``# chkconfig: - 85 15``PATH=/usr/local/nginx``DESC=``"nginx daemon"``NAME=nginx``DAEMON=$PATH/sbin/$NAME``CONFIGFILE=$PATH/$NAME.conf``PIDFILE=$PATH/logs/$NAME.pid``SCRIPTNAME=/etc/init.d/$NAME``set` `-e``[ -x ``"$DAEMON"` `] || exit 0``do_start() {``$DAEMON -c $CONFIGFILE || echo -n ``"nginx already running"``}``do_stop() {``$DAEMON -s stop || echo -n ``"nginx not running"``}``do_reload() {``$DAEMON -s reload || echo -n ``"nginx can't reload"``}``case` `"$1"` `in``start)``echo -n ``"Starting $DESC: $NAME"``do_start``echo ``"."``;;``stop)``echo -n ``"Stopping $DESC: $NAME"``do_stop``echo ``"."``;;``reload|graceful)``echo -n ``"Reloading $DESC configuration..."``do_reload``echo ``"."``;;``restart)``echo -n ``"Restarting $DESC: $NAME"``do_stop``do_start``echo ``"."``;;``*)``echo ``"Usage: $SCRIPTNAME {start|stop|reload|restart}"` `>&2``exit 3``;;``esac``exit 0`

设置执行权限

`chmod a+x /etc/init.d/nginx`

注册成服务

`chkconfig --add nginx`

设置开机启动

`chkconfig nginx ``on`

重启, 查看nginx服务是否自动启动

`shutdown -h 0 -r``ss -apn|grep nginx`

对nginx服务执行停止/启动/重新读取配置文件操作

`#启动nginx服务``systemctl start nginx.service``#停止nginx服务``systemctl stop nginx.service``#重启nginx服务``systemctl restart nginx.service``#重新读取nginx配置(这个最常用, 不用停止nginx服务就能使修改的配置生效)``systemctl reload nginx.service`

MySQL安装:

Linux yum-rpm

[root@localhost src]# rpm -qa |grep mysql

[root@localhost src]# wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm

[root@localhost src]# rpm -ivh mysql-community-release-el7-5.noarch.rpm

[root@localhost src]# yum dpdate

[root@localhost src]# yum install mysql-server 

[root@localhost src]# chown mysql:mysql -R /var/lib/mysql	设置权限

[root@localhost src]# mysqld --initialize 初始化mysql

[root@localhost src]# systemctl start mysqld  启动mysql

PHP环境:

编译安装php-fpm

PHP-FPM是一个PHP FastCGI管理器,是只用于PHP的

  • 安装依赖包
# yum -y install libmcrypt-devel mhash-devel libxslt-devel \
libjpeg libjpeg-devel libpng libpng-dvevl freetype freetype-devel libxml2 libxml2-devel \
zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel \
ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel \
krb5 krb5-devel libidn libidn-devel openssl openssl-devel # yum -y install libzip
# wget http://103.40.19.56/lnmp/libzip-1.3.2.tar.gz
# tar -zxvf libzip-1.3.2.tar.gz cd libzip-1.3.2
# ./configure
# make && make install # wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic/libmcrypt/libmcrypt-2.5.7.tar.gz
# tar -zxvf libmcrypt-2.5.7.tar.gz
# cd libmcrypt-2.5.7
# ./configure –prefix=/usr/local
# make && make install
  • 源码安装PHP:
# cd /usr/local/src
# wget http://php.net/get/php-5.6.27.tar.gz/from/a/mirror
# tar -zxvf php-5.6.27.tar.gz
# ./configure --prefix=/usr/local/php --enable-fpm --with-mcrypt \
--enable-mbstring --enable-pdo --with-curl --disable-debug --disable-rpath \
--enable-inline-optimization --with-bz2 --with-zlib --enable-sockets \
--enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex \
--with-mhash --enable-zip --with-pcre-regex --with-pdo-mysql --with-mysqli \
--with-gd --with-jpeg-dir --with-freetype-dir --enable-calendar\
# make && make install

我在执行configure时,发生报错:Please reinstall the libzip distribution 于是我删除了旧版的libzip“yum remove libzip”,之后下载libzip源码包进行本地执行configure+make&&make install

执行libzip的安装:

# wget https://libzip.org/download/libzip-1.5.2.tar.gz
# tar -zxf libzip-1.2.0.tar.gz # cd libzip-1.2.0 # ./configure # make && make install

PHP安装新问题:安装执行configure时报错

configure: error: off_t undefined; check your library configuration

解决方法:

vim /etc/ld.so.conf
#添加如下几行
/usr/local/lib64
/usr/local/lib
/usr/lib
/usr/lib64
#保存退出
:wq
ldconfig -v # 执行命令,使之生效

报错:configure: WARNING: unrecognized options: --with-mcrypt

解决方法:PHP 7.2+不支持 --with-mcrypt ; --enable-gd-native-ttf

# ./configure --prefix=/usr/local/php  --enable-fpm \
--enable-mbstring --enable-pdo --with-curl --disable-debug --disable-rpath \
--enable-inline-optimization --with-bz2 --with-zlib --enable-sockets \
--enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex \
--with-mhash --enable-zip --with-pcre-regex --with-pdo-mysql --with-mysqli \
--with-gd --with-jpeg-dir --with-freetype-dir --enable-calendar\

其它错误可以参考百度/Google解决(常见php安装的方案)

至此!PHP-fpm安装的基本流程结束了,下一步就需要配置文件

用户配置文件

  • 为php提供配置文件:php.ini
# cp php.ini-production /usr/local/php/lib/php.ini
  • 为php-fpm提供配置文件
# cd /usr/local/php
# cp etc/php.fpm.conf.default etc/php-fpm.conf
# vi etc/php-fpm.conf

vi打开php-fpm.conf文件:

将文件的尾部的索引;修改成实际的目录

include=/usr/local/php/etc/php-fpm.d/*.conf

添加用户和组:

useradd mirror
groupadd -g mirror mirror

默认情况下,etc/php-fpm.d/目录下有一个“www .conf.defalut”用户配置文件

# cp /usr/local/php/etc/php-fpm.d/www.conf.default /usr/local/php/etc/php-fpm.d/www.conf
# vi /usr/local/php/etc/php-fpm.d/www.conf

修改“www.conf"文件中的user和group的value;添加用户和组

user = mirror
group = mirror
  • 启动php-fpm服务
# /usr/local/php/sbin/php-fpm
# ps aux | grep php-fpm [验证服务启动]
# netstat -tln | grep 9000 [验证网络端口是否使用]
[root@localhost /]# ps aux | grep php-fpm
root 41831 0.0 0.3 221264 6220 ? Ss 08:54 0:00 php-fpm: master process (/usr/local/php/etc/php-fpm.conf)
mirror 41832 0.0 0.2 221264 5748 ? S 08:54 0:00 php-fpm: pool www
mirror 41833 0.0 0.2 221264 5748 ? S 08:54 0:00 php-fpm: pool www
root 41835 0.0 0.0 110292 916 pts/0 R+ 08:54 0:00 grep --color=auto php-fpm
[root@localhost /]# netstat -tln | grep 9000
tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN

至此!php-fpm服务启动成功!

Nginx+PHP环境配置

  • 打开nginx.conf(nginx配置文件)
[root@localhost nginx]# vi ./nginx.conf

#user  nobody;
worker_processes 1; #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 html;
index 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 html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#} # deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
} # another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias; # location / {
# root html;
# index index.html index.htm;
# }
#} # HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost; # ssl_certificate cert.pem;
# ssl_certificate_key cert.key; # ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m; # ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on; # location / {
# root html;
# index index.html index.htm;
# }
#}
}

修改server配置块中的location和php后端请求配置块

  server {
listen 80;
server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / {
root html;
index index.html index.htm index.php
} #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 html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
include fastcgi_params;
} # deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}

在location配置块中添加index.php首页

php请求和后端php-fpm模块进行通信,需要配置location ~\ .php$配置块

​ root:配置php程序文件的根目录

*** 修改配置文件的第一行:”user“属性为我们之前配置的用户**,表示nginx的权限

至此!我们的Nginx和php的环境完成简单的配置!

大功告成

启动步骤:

  • 启动Nginx服务

    # /usr/local/nginx/sbin/nginx
  • 启动php-fpm服务

    # /usr/local/php/sbin/php-fpm
  • 启动mysql服务

    # systemctl start mysqld

phpinfo():

在Nginx的目录html中添加一个php文件:”index.php“

<?php
phpinfo();
?>

测试数据库连接:

编写一个连接数据库行为的php文件:”mysql.php“

php和mysql之间的连接操作依靠的是”mysqli“

<?php
$conn = mysqli_connect("127.0.0.1","root","926498");
if(! $conn ) {
echo "连接失败".mysqli_connect_error();
} else {
echo "连接成功";
}
?>

至此!PHP+Nginx+MySQL环境完成了基本的搭建!

Linux下PHP+Nginx环境搭建的更多相关文章

  1. HDP2.0.6+hadoop2.2.0+eclipse(windows和linux下)调试环境搭建

    花了好几天,搭建好windows和linux下连接HDP集群的调试环境,在此记录一下 hadoop2.2.0的版本比hadoop0.x和hadoop1.x结构变化很大,没有eclipse-hadoop ...

  2. Linux下安装python3环境搭建

    Linux下python3环境搭建 Linux安装软件有哪些方式? rpm软件包 手动安装 拒绝此方式 需要手动解决依赖关系 yum自动化安装 自动处理依赖关系 非常好用 源代码编译安装,可自定义的功 ...

  3. Linux下Java开发环境搭建—CentOS下Eclipse的安装教程

    据了解,在Linux下的Java开发很多时候都比较喜欢使用vim + 插件,反而很少使用Eclipse,但是我是第一次使用Linux来进行Java编程,就什么都体验下啦,好啦,废话不多说,直接开始啦. ...

  4. Linux下golang开发环境搭建

    对于golang开发来说,Windows下可以用vscode或者liteide都不错,但是Linux下的开发也就只有vim了,所以怎么搞笑的利用vim进行golang开发呢? 参考官方推荐的一个插件: ...

  5. linux下php开发环境搭建(nginx+php+mysql)

    安装前准备工作 先安装一些必要的类库 yum install -y wget  zlib-devel bzip2-devel  curl-devel openssl openssl-devel vim ...

  6. Linux下PHP开发环境搭建

    平时写程序时都是在服务器已经搭建好的PHP环境进行的.出于对未知知识的好奇,这几天在自己的机器上搭建起了PHP开发环境.本想轻松顺利的看到phpinfo显示在我的页面上,没想到安装环境时一路的erro ...

  7. 【Lua】linux下lua+mod_lwt环境搭建

    Lua 是一个小巧的脚本语言.它具有轻量级.可扩展等优势.它可以作为一个强大.轻量的脚本语言,供任何需要的程序使用. LWT (Lua Web Tools) 可让你使用 Lua 开发 Web 应用,并 ...

  8. Linux下Java开发环境搭建—CentOS下Mysql安装教程

    本人学习Linux时使用的是CentOs5.5版本,在该环境中,Mysql的安装方法有很多种,下面我只讲我这次成功了的方法,作为一个记录,供大家参考,同时给自己做一个笔记. MySQL下载 1.进入网 ...

  9. Linux下Web服务器环境搭建LNMP一键安装包[20130911更新]

    2012年08月14日 ⁄ LNMP ⁄ 评论数 73 ⁄ 被围观 25,200次+ 最新版本:lnmp-2.4 安装说明:请保证服务器能够正常上网.服务器系统时间准确.yum命令可以正常使用! 1. ...

随机推荐

  1. 聊聊目标管理之 OKR

    这篇文章我们不谈技术,聊点轻松的,那聊什么呢?聊一下最近很火的目标管理 OKR.不知道小伙伴你们的公司什么情况,我的公司今年开始推行 OKR,用了大半年的时间,感觉效果还不错,上周六又参加了一天的复盘 ...

  2. React躬行记(13)——React Router

    在网络工程中,路由能保证信息从源地址传输到正确地目的地址,避免在互联网中迷失方向.而前端应用中的路由,其功能与之类似,也是保证信息的准确性,只不过来源变成URL,目的地变成HTML页面. 在传统的前端 ...

  3. 安装VMware14虚拟机,centos7版本的linux 软件地址

    首先下载虚拟机软件和centos7的linux系统的镜像软件系统, https://pan.baidu.com/s/1cJfzpaLwB4dfe2W8gGEAPQ 两个文件 非常好用 虚拟机安装 很简 ...

  4. HelloDjango 第 07 篇:创作后台开启,请开始你的表演!

    作者:HelloGitHub-追梦人物 文中涉及的示例代码,已同步更新到 HelloGitHub-Team 仓库 在此之前我们完成了 django 博客首页视图的编写,我们希望首页展示发布的博客文章列 ...

  5. Golang 解决 Iris 被墙的依赖包

    使用 Golang 的 Iris web 框架时,用 go get github.com/kataras/iris 命令久久无法下载,最后还报一堆错误. 使用  GOPROXY 可解决问题,也可参考如 ...

  6. Redis总结(九)Linux环境如何安装redis

    以前总结Redis 的一些基本的安装和使用,由于是测试方便,直接用的window 版的reids,并没有讲redis在linux下的安装.今天就补一下Linux环境如何安装redis. 大家可以这这里 ...

  7. Rikka with Game[技巧]----2019 杭电多校第九场:1005

      Rikka with Game Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Othe ...

  8. notepad 写html乱码,已解决

    写一些简单基础的html文件时,突然发现新建的demo2,在浏览器打开乱码,而昨天的demo1打开没乱码,真奇怪,开始排查原因. 1.检查代码,,设了charset=UTF-8,看不出毛病. 2.索性 ...

  9. .net测试篇之Moq行为配置

    系列目录 我们前面说过.Moq在创建模拟对象的时候,简单对象赋值默认值,引用对象赋值为null,但是有些时候接口里面还包含另一个接口对象,我们知道Moq是可以模拟一个接口对象的,我们可以通过配置让Mo ...

  10. 【翻译】无需安装Python,就可以在.NET里调用Python库

    原文地址:https://henon.wordpress.com/2019/06/05/using-python-libraries-in-net-without-a-python-installat ...