天气:晴 风力:微风
systemctl 补充
Type=forking 命令启动后放到后台,默认启动后退出
需要java环境的话应添加 Environment=JAVA_HOME=/usr/local/bin/jdk1.8.0_171
修改xxx.service 后 执行systemctl daemon-reload重新载入
systemctl enable xxx加入开机启动,实际Created symlink from /etc/systemd/system/multi-user.target.wants/neo4j.service to /usr/lib/systemd/system/neo4j.service.
复制了一个软连接到多用户启动服务下面systemctl status xxx查看当前状态
systemctl start xxx 和systemctl start xxx.service一样
systemctl start xxx起来的最好使用systemctl stop xxx关,bin/stop可能会出问题,例如stop不会退出
修改可同时读文件数量
- Become root, since all operations that follow require editing protected system files.
user@localhost:~sudo su - Password: root@localhost:~
- Edit /etc/security/limits.conf and add these two lines:
neo4j soft nofile 40000
neo4j hard nofile 40000
- Edit /etc/pam.d/su and uncomment or add the following line:
session required pam_limits.so
- . A restart is required for the settings to take effect.