yum install -y wget vim gcc-c++ bash-completion
wget http://nginx.org/download/nginx-1.14.0.tar.gz
tar xf nginx-1.14.0.tar.gz -C /root
cd /root/nginx-1.14.0
useradd -s /sbin/nologin nginx
yum -y install gcc pcre-devel openssl-devel
./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --with-http_ssl_module --with-http_stub_status_module --with-stream --with-http_v2_module --with-http_gzip_static_module --with-http_gunzip_module --with-stream_ssl_module --with-ipv6 --with-http_sub_module --with-http_flv_module --with-http_addition_module --with-http_realip_module --with-http_mp4_module

BT
--user=nginx --group=nginx --prefix=/www/server/nginx --with-openssl=/www/server/nginx/src/openssl --add-module=/www/server/nginx/src/ngx_devel_kit --add-module=/www/server/nginx/src/lua_nginx_module --add-module=/www/server/nginx/src/ngx_cache_purge --add-module=/www/server/nginx/src/nginx-sticky-module --add-module=/www/server/nginx/src/nginx-http-concat --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_image_filter_module --with-http_gzip_static_module --with-http_gunzip_module --with-stream --with-stream_ssl_module --with-ipv6 --with-http_sub_module --with-http_flv_module --with-http_addition_module --with-http_realip_module --with-http_mp4_module --with-ld-opt=-Wl,-E --with-ld-opt=-ljemalloc

make && make install
pkill httpd
ln -s /usr/local/nginx/sbin/nginx /sbin/
nginx
nginx -s reload
firewall-cmd --zone=public --add-port=80/tcp --permanent

------------------------------------------------------------------
server {
listen 80; //端口
server_name www.b.com; //域名
charset utf-8; //支持所有编码utf-8 万国编码
location / {
root www; //指定网站根路径
index index.html index.htm;
}
}
-----------------------------------------------------------------反向代理
http {
.. ..
upstream webserver { //定义集群 //注意位置 upstream 定义服务器名字 webserver 集群服务器名字
server 192.168.2.100:80; //集群的第一台机
server 192.168.2.200:80; //集群的第二台机
}
.. ..
server {
listen 80; //监听80端口
server_name localhost; //定义域名
location / {
proxy_pass http://webserver; //跳转到webserver
root html; //可有可无
index index.html index.htm; //可有可无

}
}
-----------------------------------------------------------------百度跳转
server {
listen 80;
server_name 88.88.218.1;

#charset koi8-r;

#access_log logs/host.access.log main;

location / {
proxy_pass http://www.baidu.com;
root html;
index index.html index.htm;
}

-----------------------------------------------------------------
/usr/local/nginx/conf/proxy.conf

echo `curl http://www.baidu.com` > /usr/local/nginx/html/index.html
#############################################################################################################################mysql5.7安装

wget http://repo.mysql.com/mysql57-community-release-el7-8.noarch.rpm
yum -y install mysql57-community-release-el7-8.noarch.rpm
yum -y install mysql-server
systemctl start mysqld
systemctl enable mysqld #设置开机自动启动
ps -C mysqld #检查是否有进程
netstat -utnlp | grep mysqld #看服务端口是否启动
grep password /var/log/mysqld.log #查询初始化密码C8&rp/gN#ijd
mysql -hlocalhost -uroot -p'系统产生的随机密码'
mysql>set global validate_password_policy=0; 只检查密码的长度
mysql>set global validate_password_length=6; 密码长度不能小于6个
mysql>alter user root@"localhost" identified by "weilai"; #用于改密码
mysql>alter user root@"localhost" identified by "Hdug&34dg1Gd";
]#vim /etc/my.cnf
[mysqld]#这个不放进去,以下如果不放,你用简短密码后期还是无法登陆,长密码无所谓
validate_password_policy=0
validate_password_length=6
lower_case_table_names=1 //忽略大小写
:wq
]#systemctl restart mysqld

//防火墙配置
[root@localhost ~]# iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT //centOS6 版本的端口放行
[root@localhost ~]# firewall-cmd --permanent --zone=public --add-port=3306/tcp
success

mysql> grant all on *.* to root@"%" identified by "Hdug&34dg1Gd";

select user,host,authentication_string from mysql.user; //查看授权列表
drop user 'root'@'192.168.12.1'; //删除用户授权

最新文章

  1. mysql常用操作
  2. uva 11178 - Morley's Theorem
  3. 往Android SDCard中读写入数据
  4. bool?
  5. ios uitableviewcell动态计算高度
  6. 【http】生命周期和http管道技术 整理中
  7. Web 应用的安全性
  8. C# Generic(转载)
  9. J2EE项目开发流程简介
  10. Oracle基础--体系
  11. js坚持不懈之14:不要在文档加载之后使用 document.write()示例
  12. antd-mobile less文件用模块方式引入
  13. Zabbix 3.4.7调整监控阈值以及告警级别
  14. 小菜鸟从0基础开始学Linux系统
  15. H5 27-优先级之important
  16. MT【244】调和分割
  17. 四.idea本地调试hadoop程序
  18. sitecore开发入门Sitecore的CRUD操作 - 第一部分
  19. 回文字符串 NYOJ
  20. sql的一个查询,情景:a表中存在的数据,且在b表中不存在 (not in,not exists

热门文章

  1. Java序列化bean保存到本地文件中
  2. C++11 shared_ptr智能指针(超级详细)
  3. springboot项目中进行XSS过滤
  4. 服务端负载监控-参考srs服务器源码
  5. Spring中Resource(资源)的获取
  6. C# 文件的读取与另存为(WPF)
  7. 这样设计 Java 异常更优雅
  8. AWS扩容EC2实例根空间
  9. 二、grep文本搜索工具
  10. IT人计算机网络浅析