User Tools

Site Tools


learn:webenv

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
learn:webenv [2018/12/31 14:46]
soup
learn:webenv [2019/04/10 02:45] (current)
soup
Line 1: Line 1:
-web基础环境+===== WEB环境 ​=====
  
-1, install nginx +==== web server ==== 
 + 
 +  * install nginx  
 + 
 <​code>​ <​code>​
         yum install nginx         yum install nginx
Line 7: Line 10:
  nginx -s reload / ps aux|grep nginx  nginx -s reload / ps aux|grep nginx
 </​code>​ </​code>​
-2, install php / php-fpm+  * install php / php-fpm
 <​code>​ <​code>​
         yum install php / php-fpm         yum install php / php-fpm
Line 14: Line 17:
  
  vi /​etc/​php-fpm.d/​www.conf  vi /​etc/​php-fpm.d/​www.conf
- Php-fpm -D + php-fpm -D 
- ps aux|grep ​Php+ ps aux|grep ​php
  kill -USR2 PID (restart)  kill -USR2 PID (restart)
 </​code>​ </​code>​
-3, install mariadb+  * install mariadb
 <​code>​ <​code>​
         yum install mariadb*         yum install mariadb*
  service mariadb start  service mariadb start
  mysqladmin -u root password '​root'​  mysqladmin -u root password '​root'​
 +        ​
 +        install phpmyadmin for edit
 </​code>​ </​code>​
-4,install libevent+  * install libevent
 <​code>​ <​code>​
         yum install libevent         yum install libevent
Line 31: Line 36:
  or refer to http://​www.cnblogs.com/​zgx/​archive/​2011/​08/​10/​2134097.html   or refer to http://​www.cnblogs.com/​zgx/​archive/​2011/​08/​10/​2134097.html
 </​code>​ </​code>​
-5,  ​update php to 5.6+  * update php to 5.6
 <​code>​ <​code>​
         rpm -Uvh https://​mirror.webtatic.com/​yum/​el7/​epel-release.rpm         rpm -Uvh https://​mirror.webtatic.com/​yum/​el7/​epel-release.rpm
Line 39: Line 44:
  yum install -y php56w-fpm  yum install -y php56w-fpm
 </​code>​ </​code>​
-防火墙设置: 
- systemctl stop firewalld 
- systemctl restart firewalld 
-        firewall-cmd --zone=public --add-port=80/​tcp --permanent   
- firewall-cmd --reload 
- firewall-cmd --list-all 
  
-为了数据方便同步:+  * 为了数据方便同步:
  /​etc/​my.cnf -> [mysqld] -> log-bin=mysql-bin  /​etc/​my.cnf -> [mysqld] -> log-bin=mysql-bin
  
-mysql+  * mysql
 开启远程访问: 开启远程访问:
 mysql -h localhost -u root  mysql -h localhost -u root 
Line 63: Line 62:
   
  
-turn server+==== 防火墙设置 ==== 
 +: 
 + systemctl stop firewalld 
 + systemctl restart firewalld 
 +        firewall-cmd --zone=public --add-port=80/​tcp --permanent   
 + firewall-cmd --reload 
 + firewall-cmd --list-all 
 + 
 +==== turn server ​==== 
  
 turnserver -a -f -u qh:qh -r gy -o turnserver -a -f -u qh:qh -r gy -o
Line 70: Line 78:
 http://​www.centoscn.com/​mysql/​2014/​0930/​3881.html http://​www.centoscn.com/​mysql/​2014/​0930/​3881.html
  
-SVN环境+==== SVN环境 ​====
  
 mkdir 创建目录  mkdir 创建目录 
Line 82: Line 90:
 HuPMOTGhs4)e HuPMOTGhs4)e
  
-ssl:+==== ssl配置 ==== 
 generate key: generate key:
         openssl genrsa -des3 -out cmc.key 2048         openssl genrsa -des3 -out cmc.key 2048
Line 99: Line 108:
 UP(42039100@qq.com : tangmubai1126) UP(42039100@qq.com : tangmubai1126)
  
 +
 +==== ssh 保持链接 ====
 +解决一会儿不操作就断线问题,可设置ssh client 或 ssh server.
 +
 +  * ssh client:
 +<​code>​
 +sudo vim /​etc/​ssh/​ssh_config
 +# 添加
 +ServerAliveInterval 20
 +ServerAliveCountMax 999
 +</​code>​
 +  * ssh server:
 +<​code>​
 +sudo vim/​etc/​ssh/​sshd_config
 +# 添加
 +ClientAliveInterval 30
 +ClientAliveCountMax 6
 +</​code>​
learn/webenv.1546267614.txt.gz · Last modified: 2018/12/31 14:46 by soup