Skip to content

Commit

Permalink
发布博客,时间:2023-11-23 23:14:57
Browse files Browse the repository at this point in the history
  • Loading branch information
whp98 committed Nov 23, 2023
1 parent f3ae54c commit fa8899b
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 0 deletions.
70 changes: 70 additions & 0 deletions docs/兴趣/Windows使用cygwin编译运行haproxy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Windows使用cygwin编译运行haproxy

[原文](https://www.jianshu.com/p/d436a3e73d2f)

## 1.安装 cygwin

1.1.下载cygwin(https://cygwin.com/install.html)

1.2.安装cygwin(如果你没用过cygwin,安装程序打开后默认下一步)

1.3.再设置下载源的时候简易使用网易源(http://mirrors.163.com/cygwin/):

1.4 点击devel 设置安装

1.5 搜索安装make工具

## 2.编译安装 haproxy
2.1.下载haproxy (http://www.haproxy.org/download/) , 我下载的是 haproxy-1.7.5.tar.gz

2.2.将下载包放在cygwin安装目录下任意位置,比如home目录下

2.3.解压haproxy-1.7.5.tar.gz
```shell
tar -zxvf haproxy-1.7.5.tar.gz
```
2.4.进入haproxy解压目录进行安装

```shell
make TARGET=cygwin
make install
```

## 3.打包运行**haproxy **
3.1.找到在cygwin安装目录中找到haproxy.exe、cyggcc_s-1.dll和cygwin1.dll,新建位置复制放在文件夹内(我的路径是D:/haproxy/下)

## 3.2.创建配置文件,设置对远程桌面端口转发
haproxy.cfg:

```shell
#haproxy 配置示例

global
maxconn 1500
nbproc 1
daemon

defaults
mode tcp
retries 3
option abortonclose
maxconn 32000
timeout connect 300000ms
timeout client 300000ms
timeout server 300000ms
log 127.0.0.1 local0 err

###
#监听局域网的192.168.1.17机子的默认远程端口
##
listen win_17
bind 0.0.0.0:10008 #绑定IP:端口
mode tcp #模式
server s1 192.168.1.17:3389 weight 1 maxconn 2000 inter 60s #被监听服务器
```

3.3.使用以下命令运行

```shell
haproxy.exe -f haproxy.cfg -d
```
1 change: 1 addition & 0 deletions docs/兴趣/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
- [Electron客户端应用程序缺点](./Electron客户端应用程序缺点.md)
- [Export OTP From Microsoft Authenticator](./Export-OTP-From-Microsoft-Authenticator.md)
- [frp内网穿透后台服务相关](./frp内网穿透后台服务相关.md)
- [Windows使用cygwin编译运行haproxy](./Windows使用cygwin编译运行haproxy.md)
- [办公室双屏幕建议](./办公室双屏幕建议.md)
- [网站推荐](./网站推荐.md)
- [计算机行业就业分析报告](./计算机行业就业分析报告.md)
Expand Down
1 change: 1 addition & 0 deletions docs/数据库/Oracle数据库/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Oracle数据库
- [linux服务器上修改oracle数据库的字符集](./linux服务器上修改oracle数据库的字符集.md)
- [Oracle数据库乱码](./Oracle数据库乱码解决.md)
- [Oracle数据库导入 impdp](./Oracle数据库导入impdp.md)
- [Oracle脚本注意事项](./Oracle脚本注意事项.md)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# linux服务器上修改oracle数据库的字符集

## linux服务器上以dba身份进入:
sqlplus / as sysdba;

## 依次执行以下命令:
shutdown immediate;
startup mount;
alter system enable restricted session;
alter system set job_queue_processes=0;
alter system set aq_tm_processes=0;
alter database open;
alter database character set internal_use utf8;
shutdown immediate;
startup;


## 查看数据库字符集,看是否已经修改过来:
select userenv('language') from dual;

0 comments on commit fa8899b

Please sign in to comment.