源码截图
源码安装方法
服务器最低配置4h4g
安装宝塔 只安装Nginx 其他不用安装 不用创建站点
安装好Nginx 去配置文件 把以下 复制进去
user www www; worker_processes auto; error_log /www/wwwlogs/nginx_error.log crit; pid /www/server/nginx/logs/nginx.pid; worker_rlimit_nofile 51200; events { use epoll; worker_connections 51200; multi_accept on; } http { include mime.types; #include luawaf.conf; include proxy.conf; default_type aapplication/octet-stream; server_names_hash_bucket_size 512; client_header_buffer_size 32k; large_client_header_buffers 4 32k; client_max_body_size 50m; sendfile on; tcp_nopush on; keepalive_timeout 60; tcp_nodelay on; fastcgi_connect_timeout 300; fastcgi_send_timeout 300; fastcgi_read_timeout 300; fastcgi_buffer_size 64k; fastcgi_buffers 4 64k; fastcgi_busy_buffers_size 128k; fastcgi_temp_file_write_size 256k; fastcgi_intercept_errors on; gzip on; gzip_min_length 1k; gzip_buffers 4 16k; gzip_http_version 1.1; gzip_comp_level 2; gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/xml; gzip_vary on; gzip_proxied expired no-cache no-store private auth; gzip_disable "MSIE [1-6]\."; limit_conn_zone $binary_remote_addr zone=perip:10m; limit_conn_zone $server_name zone=perserver:10m; server_tokens off; access_log off; # 增加server server{ listen 7002; # 图片上传访问域名 upload.xx.xx # server_name localhost; # 拒接访问html 等类型的文件避免受到脚本攻击 location ~* /\.(html|htm|jsp|php|js)$ { deny all; } location /{ root /data/www/resources; expires 4d; } } # 增加server upstream apiweb{ server 127.0.0.1:8092; } # 此次是访问web路径 server{ listen 8099; # api访问域名 api.xxx.xxx server_name localhost; #location /pages/ { # alias /data/pages/; #} location / { set $origin '*'; if ($http_origin) { set $origin "$http_origin"; } if ($request_method = 'OPTIONS') { add_header 'Access-Control-Allow-Origin' "$origin"; add_header 'Access-Control-Allow-Credentials' "true"; add_header 'Access-Control-Max-Age' 86400; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; add_header 'Access-Control-Allow-Headers' 'Connection,version-secret,access-control-allow-origin,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,access_token'; ##注意,此处的token 取决于开发,有时候是user-token or doctor-token等。 add_header 'Content-Length' 0; add_header 'Content-Type' 'text/plain, charset=utf-8'; return 204; } proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Accept-Encoding 'gzip'; proxy_pass http://127.0.0.1:8092; } } include /www/server/panel/vhost/nginx/*.conf; }
以下是启动服务命令
在opt目录下命令
cd mongodb-3.4.0 sh start.sh cd redis-4.0.1 sh start.sh cd spring-boot-imapi sh start cd upload sh start.sh cd tig-push sh start cd message-push sh start.sh cd tigase-server-7.1.3-b4482 sh start cd rocketmq-all-4.3.2-bin-release sh startBroker sh startSrv
目前仅搭建了web 安卓 其他的苹果 pc 未搭建 测了一下 速度还挺快
- 风车IM即时通讯h5三端源码 [2024-02-05]
- 海外购商城源码,自带im即时通讯客服源码 [2024-01-30]
- 寻聊即时通讯在线聊天系统php源码 [2023-12-01]
- 仿微信聊天/朋友圈系统源码 [2023-11-25]
- phpkaifa智能客服源码下载分享 [2023-11-21]