随笔分类 -  server

摘要:1、nginx.conf user nginx; worker_processes auto; error_log /var/log/nginx/error.log notice; pid /var/run/nginx.pid; worker_rlimit_nofile 65536; events 阅读全文
posted @ 2021-05-20 17:19 zhyemmmm 阅读(100) 评论(0) 推荐(0)
摘要:1、为了给同一个应用项目动态配置多个域名访问,把apache服务器换成了nginx,在/etc/nginx/conf.d/下配置域名命名的配置文件 #所有访问80端口的请求都重写到443 server { listen 80; server_name xxx.com www.xxx.com; rew 阅读全文
posted @ 2020-10-28 18:31 zhyemmmm 阅读(2281) 评论(0) 推荐(0)
摘要:首先准备3台虚拟机,设置好固定IP,用xshell连上,因为xshell有一个发送键输入到所有会话功能比较方便,本次以CentOS7最小版做实践。 #集群关系 192.168.126.100 nginx(代理)、mycat 192.168.126.101 nginx、mysql(主)、php 192 阅读全文
posted @ 2020-07-30 18:39 zhyemmmm 阅读(383) 评论(0) 推荐(0)
摘要:一、虚拟机配置 1、在WMware里装上3台虚拟机,CentOS7最小化系统,配置好独立IP,截图如下: 2、修改虚拟机网卡配置,然后启动网卡,再查看ip已经固定 #vi /etc/sysconfig/network-scripts/ifcfg-ens33 BOOTPROTO=static ONBO 阅读全文
posted @ 2020-07-24 18:53 zhyemmmm 阅读(319) 评论(0) 推荐(0)
摘要:简单理解docker:docker 是一个开源的应用容器引擎,就像虚拟机,可以在它上面跑应用服务(container),而生成应用服务的就叫镜像(image)。 1、首先得安装docker,安装最新的看官方文档:https://docs.docker.com/engine/install/cento 阅读全文
posted @ 2020-05-15 12:46 zhyemmmm 阅读(3236) 评论(0) 推荐(0)
摘要:#进程与状态相关 systemctl start firewalld.service #启动防火墙 systemctl stop firewalld.service #停止防火墙 firewall-cmd --state #查看防火墙状态 firewall-cmd --reload #更新防火墙规则 阅读全文
posted @ 2020-04-29 10:46 zhyemmmm 阅读(167) 评论(0) 推荐(0)
摘要:1、PHP官方扩展库 http://pecl.php.net/ 2、下载redis对应版本扩展并解压并进入解压目录 tar zxf redis-5.1.1.tgz cd redis-5.1.1.tgz 3、执行phpize /usr/bin/phpize 4、配置编译参数,出现错误时需安装autoc 阅读全文
posted @ 2019-12-09 17:26 zhyemmmm 阅读(303) 评论(0) 推荐(0)
摘要:1、安装 yum -y install httpd-tools 2、检测版本 ab -V 3、常用 ab -c 10 -n 100 127.0.0.1/index.php #同时处理100个请求并运行10次index.php #-c10表示并发用户数为10 #-n100表示请求总数为100 4、解释 阅读全文
posted @ 2019-11-25 14:41 zhyemmmm 阅读(244) 评论(0) 推荐(0)
摘要:1、前提:开启apache重写,并把httpd.conf里的相关的AllowOverride denied改为AllowOverride all 2、重写规则可写在项目根目录的.htaccess文件或直接配在httpd.conf 3、规则的三个重点 4、简单理解:URL和重写规则的正则条件2比较,符 阅读全文
posted @ 2019-07-16 18:01 zhyemmmm 阅读(1841) 评论(0) 推荐(0)
摘要:1、下载pythonwget https://www.python.org/ftp/python/3.4.5/Python-3.4.5.tgz 或者去官网下载压缩包 2、安装python3依赖yum install openssl-devel bzip2-devel expat-devel gdbm 阅读全文
posted @ 2019-05-23 11:46 zhyemmmm 阅读(1831) 评论(0) 推荐(0)
摘要:1、容器 2、服务 3、swarm 阅读全文
posted @ 2018-06-07 17:57 zhyemmmm 阅读(170) 评论(0) 推荐(0)
摘要:1、工具: 两台机器 master:192.168.0.1 slave:192.168.0.2 2、master的配置 找到mysql的配置文件,一般centos的是/etc/my.cnf,ubuntu的是/etc/mysql/mysql.conf.d/mysqld.cnf 跳到到[mysqld]下 阅读全文
posted @ 2018-06-01 14:37 zhyemmmm 阅读(189) 评论(0) 推荐(0)
摘要:1、composer中文网:https://www.phpcomposer.com/ laravel中文网:https://d.laravel-china.org/ 2、composer是的作用是给你的项目管理依赖关系,安装php包,不用手动,laravel和yii框架也通过它安装,要求php版本5 阅读全文
posted @ 2018-03-30 16:45 zhyemmmm 阅读(269) 评论(0) 推荐(0)
摘要:1、安装nginx: yum install gcc -y yum install -y pcre pcre-devel yum install -y zlib zlib-devel yum install -y openssl openssl-devel yum -y install nginx 阅读全文
posted @ 2018-03-20 14:21 zhyemmmm 阅读(170) 评论(0) 推荐(0)
摘要:svn服务器搭建:https://www.linuxidc.com/Linux/2017-05/144254.htm SVN版本库中的一个项目:/svn/repositories/test/ 网站目录:/web/test/ 1、现将SVN版本库中的一个项目checkout到网站目录 svn co f 阅读全文
posted @ 2018-03-15 11:22 zhyemmmm 阅读(289) 评论(0) 推荐(0)
摘要:1、安装PCRE库 到www.pcre.org 下载pcre-8.37.tar.gz tar -zxvf pcre-8.37.tar.gz cd pcre-8.37 ./configure make make install 2、安装zlib库 到www.zlib.net 下载zlib-1.2.8. 阅读全文
posted @ 2018-01-04 16:18 zhyemmmm 阅读(1481) 评论(0) 推荐(0)