<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
        <title>Nohup - 标签 - lihuu — 系统工程、AI 工具链与 Rust 开发博客</title>
        <link>https://silentstormic.top/tags/nohup/</link>
        <description>Nohup - 标签 - lihuu — 系统工程、AI 工具链与 Rust 开发博客</description>
        <generator>Hugo -- gohugo.io</generator><language>zh-CN</language><lastBuildDate>Thu, 30 May 2019 22:18:47 &#43;0800</lastBuildDate><atom:link href="https://silentstormic.top/tags/nohup/" rel="self" type="application/rss+xml" /><item>
    <title>Linux使用</title>
    <link>https://silentstormic.top/post/Linux%E4%BD%BF%E7%94%A8%E8%AE%B0%E5%BD%95/</link>
    <pubDate>Thu, 30 May 2019 22:18:47 &#43;0800</pubDate>
    <author>lihuu</author>
    <guid>https://silentstormic.top/post/Linux%E4%BD%BF%E7%94%A8%E8%AE%B0%E5%BD%95/</guid>
    <description><![CDATA[<h4 id="一ssh-服务">一、ssh 服务</h4>
<h5 id="安装">安装</h5>
<ul>
<li>查看 ssh 是否安装
输入命令：<code>rpm -qa|grep ssh</code>
如果没有安装 SSH 则可以输入：<code>yum install openssh-server</code></li>
<li>启动 SSH 服 n 务
<code>service sshd start</code></li>
<li>设置 ssh 为开机启动
输入命令<code>chkconfig sshd on</code> 即可。
注：若是<code>chkconfig sshd off</code>则禁止 SSH 开机启动。
也可以使用<code>systemctl</code>来开启自启动，
<code>systemctl enable sshd</code></li>
</ul>
<h5 id="配置">配置</h5>
<ul>
<li>修改端口号：修改<code>/etc/ssh/sshd_config</code>文件，找到 port 修改即可</li>
</ul>
<h5 id="简单的使用">简单的使用</h5>
<ul>
<li>连接服务器<code>ssh -p [port] user@host</code></li>
<li>使用 scp <code>scp -P port src des(user@host:path)</code></li>
</ul>
<h4 id="三让程序在后台启动">三、让程序在后台启动</h4>
<p>思路：当用户注销或者断开网络的时候，终端会收到 HU（hangup）信号从而关闭其所有的子进程。因此解决方案就有两种，要么让进程忽略 HUP 信号，要么让进程运行在新的会话里面从而成为不属于此终端的子进程。</p>]]></description>
</item>
</channel>
</rss>
