前言:
当前小伙伴们对“centos安装meld”可能比较看重,同学们都想要分析一些“centos安装meld”的相关资讯。那么小编在网摘上收集了一些关于“centos安装meld””的相关知识,希望小伙伴们能喜欢,看官们一起来了解一下吧!PowerShell远程操作CentOS离线部署(1)
PowerShell远程操作CentOS离线部署(2)
PowerShell远程操作CentOS离线部署(3)
五、部署.NetCore程序
上传,解压文件:
sudo tar –xvf OpenAPI.tar
切换到解压目录,运行:
dotnet OpenAPI.dll --urls http://*:9090
然后可以在浏览器中查看了,这种情况,关闭dos界面,进程就没了,所以需要使用到守护进程。
六、安装守护进程
①安装守护进程之前需安装Python环境(先查看是否已安装)
安装python前的库环境
sudo yum install gcc patch libffi-devel python-devel zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel -y
解压Python-3.7.0.tar.xz,xz文件解压需两步
sudo xz -d Python-3.7.0.tar.xzsudo tar -xvf Python-3.7.0.tar
编译安装
sudo mkdir /usr/local/python3 # 创建编译安装目录sudo chmod 777 /usr/local/python3cd Python-3.7.0 # 进入python的解压目录sudo ./configure --prefix=/usr/local/python3sudo make && make install # 编译$安装
(此处报错,暂未找到原因,后发现已安装Python2.7.5)
创建软连接
sudo ln -s /usr/local/python3/bin/python3 /usr/local/bin/python3sudo ln -s /usr/local/python3/bin/pip3 /usr/local/bin/pip3
查看版本
sudo python -V
②安装依赖
sudo tar zxvf setuptools-0.6c11.tar.gz && cd setuptools-0.6c11sudo python setup.py buildsudo python setup.py installsudo tar zxvf meld3-2.0.1.tar.gz && cd meld3-2.0.1sudo python setup.py install
③安装supervisor
sudo tar zxvf supervisor-3.3.3.tar.gz && cd supervisor-3.3.3sudo python setup.py install
④验证supervisor安装是否成功
supervisorctl --help
⑤配置守护进程
创建文件夹和配置文件
sudo mkdir -p /etc/supervisorsudo chmod 777 /etc/supervisorsudo echo_supervisord_conf > /etc/supervisor/supervisord.conf
创建/etc/supervisor/supervisor.d目录,用于存放进程管理的配置文件
sudo mkdir -p /etc/supervisor/supervisor.dsudo chmod 777 /etc/supervisor/supervisor.d
修改/etc/supervisor/supervisord.conf文件内容, 将/etc/supervisor/supervisor.d目录添加到include中
sudo vim /etc/supervisor/supervisord.conf
创建配置文件:
sudo vim /etc/supervisor/supervisor.d/openapi.ini
启动:
sudo supervisord -c /etc/supervisor/supervisord.conf
查询进程:
sudo ps -ef | grep supervisord
查看状态
sudo supervisorctl status
很多常用命令不能使用是由于未配置Supervisor自启动服务
⑥配置自启动Supervisor服务
进入/lib/systemd/system目录,并创建supervisor.service文件
# cd /lib/systemd/system && vim supervisor.service
[Unit]Description=supervisorAfter=network.target [Service]Type=forkingExecStart=/usr/bin/supervisord -c /etc/supervisor/supervisord.confExecStop=/usr/bin/supervisorctl $OPTIONS shutdownExecReload=/usr/bin/supervisorctl $OPTIONS reloadKillMode=processRestart=on-failureRestartSec=42s [Install]WantedBy=multi-user.target
设置开机启动
# systemctl daemon-reload# systemctl enable supervisor.service# systemctl start supervisor.service# systemctl status supervisor.service修改文件权限为766# chmod 766 supervisor.service
标签: #centos安装meld