# 如何将EOS8安装在自定义目录下
# 环境准备
请参考Windows快速安装。
# 下载并解压安装介质
参考Windows快速安装,但将安装路径修改为自定义目录,例如D:\custom_eos_platform-dev\
。
# 修改路径相关配置文件
假设您的解压路径为D:\custom_eos_platform-dev\
,需要修改以下服务的配置文件:
# MySQL
如果你需要使用安装介质中自带的MySQL服务,请参考本节修改它的配置文件。
如果你使用的是自己提供的MySQL服务,则无需进行以下配置,请跳过本节。
在D:\custom_eos_platform-dev\mysql\my.ini
中,
- 添加
max_allowed_packet=100M
,配置允许传送最大数据包; - 修改
basedir
为D:/custom_eos_platform-dev/mysql
; - 修改
datadir
为D:/custom_eos_platform-dev/mysql/data
。
修改后的my.ini
文件如下:
[mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8
[mysqld]
# 设置MySQL的端口
port = 3306
# 设置mysql的安装目录
basedir=D:/custom_eos_platform-dev/mysql
# 设置mysql的数据目录
datadir=D:/custom_eos_platform-dev/mysql/data
# 允许最大连接数
max_connections=2000
# 服务端使用的字符集默认为8比特编码的latin1字符集
character-set-server=utf8
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB
sql_mode='STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION'
# skip-grant-tables
# 允许传送最大数据包
max_allowed_packet=100M
# Nginx
在D:\custom_eos_platform-dev\web\conf\eos8.conf
中,找到如下配置:
location / {
root "d:/primeton/eos-8.3-dev/web/afcenter";
access_log d:/primeton/eos-8.3-dev/web/logs/afcenter-access.log ;
error_log d:/primeton/eos-8.3-dev/web/logs/afcenter-error.log warn;
index index.html index.htm;
try_files $uri /index.html;
}
将其中的root
、access_log
与error_log
修改至自定义的目录。修改后的配置如下所示:
location / {
root "D:/custom_eos_platform-dev/web/afcenter";
access_log D:/custom_eos_platform-dev/web/logs/afcenter-access.log ;
error_log D:/custom_eos_platform-dev/web/logs/afcenter-error.log warn;
index index.html index.htm;
try_files $uri /index.html;
}
同理,找到如下配置
location / {
root "d:/primeton/eos-8.3-dev/web/mobile";
access_log d:/primeton/eos-8.3-dev/web/logs/mobile-access.log ;
error_log d:/primeton/eos-8.3-dev/web/logs/mobile-error.log warn;
index index.html index.htm;
try_files $uri /index.html;
}
将其中的root
、access_log
与error_log
修改至自定义的目录。修改后的配置如下所示:
location / {
root "D:/custom_eos_platform-dev/web/mobile";
access_log D:/custom_eos_platform-dev/web/logs/mobile-access.log ;
error_log D:/custom_eos_platform-dev/web/logs/mobile-error.log warn;
index index.html index.htm;
try_files $uri /index.html;
}
其他服务的配置无需修改。
# 运行验证
参考Windows快速安装。