<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Debian &#8211; ZhiZhi</title>
	<atom:link href="https://zhizhi.date/archives/tag/debian/feed" rel="self" type="application/rss+xml" />
	<link>https://zhizhi.date</link>
	<description></description>
	<lastBuildDate>Wed, 01 May 2024 10:44:27 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
	<item>
		<title>Debian使用Supervisor守护进程</title>
		<link>https://zhizhi.date/archives/55.html</link>
					<comments>https://zhizhi.date/archives/55.html#respond</comments>
		
		<dc:creator><![CDATA[eswan]]></dc:creator>
		<pubDate>Wed, 01 May 2024 10:44:27 +0000</pubDate>
				<category><![CDATA[Debian]]></category>
		<guid isPermaLink="false">https://eswan.cc/?p=55</guid>

					<description><![CDATA[Debian安装supervisor 配置文件 Supervisor的配置文件为/etc/supervisor [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Debian安装supervisor</h2>



<pre class="wp-block-code"><code>apt-get install supervisor -y</code></pre>



<h2 class="wp-block-heading">配置文件</h2>



<p>Supervisor的配置文件为<code>/etc/supervisor/supervisord.conf</code><br>Supervisor所管理应用的配置文件放在<code>/etc/supervisor/conf.d/</code>目录中，需要对每个应用进行配置。在<code>/etc/supervisor/conf.d/</code>中创建<code>xxxxxx.conf</code>，每个应用对应一个配置文件即可。</p>



<h2 class="wp-block-heading">配置文件内容示例</h2>



<pre class="wp-block-code"><code>&#91;program:soga-ss]
command=/usr/local/soga/soga -c /etc/soga/soga-ss.conf
directory=/usr/local/soga/
user = root
stopsignal = INT
autostart = true
autorestart = true
startsecs = 1
stderr_logfile = /var/log/soga-ss.err.log</code></pre>



<h2 class="wp-block-heading">添加开机启动Supervisor</h2>



<pre class="wp-block-code"><code>systemctl enable supervisor
</code></pre>



<h2 class="wp-block-heading">启动Supervisor</h2>



<pre class="wp-block-code"><code>supervisorctl start all
</code></pre>



<h2 class="wp-block-heading">常用命令</h2>



<pre class="wp-block-code"><code>#关闭所有任务
supervisorctl shutdown
#关闭指定任务
supervisorctl stop program_name
#开启指定任务
supervisorctl start program_name
#查看所有任务状态
supervisorctl status
#加载新的配置
supervisorctl update
#重启所有任务
supervisorctl reload</code></pre>
]]></content:encoded>
					
					<wfw:commentRss>https://zhizhi.date/archives/55.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Debian安装Python 3.10</title>
		<link>https://zhizhi.date/archives/29.html</link>
					<comments>https://zhizhi.date/archives/29.html#respond</comments>
		
		<dc:creator><![CDATA[eswan]]></dc:creator>
		<pubDate>Sun, 03 Dec 2023 19:05:30 +0000</pubDate>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">https://eswan.cc/?p=29</guid>

					<description><![CDATA[更新程序包并安装编译依赖环境 开始正式安装]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">更新程序包并安装编译依赖环境</h2>



<pre class="wp-block-code"><code>apt update &amp;&amp; apt upgrade -y
apt install wget build-essential libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev -y
</code></pre>



<h2 class="wp-block-heading">开始正式安装</h2>



<ul class="wp-block-list">
<li>下载Python源码包</li>
</ul>



<pre class="wp-block-code"><code>cd
wget https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tgz
</code></pre>



<ul class="wp-block-list">
<li>解压Python源码</li>
</ul>



<pre class="wp-block-code"><code>tar xzf Python-3.10.0.tgz</code></pre>



<ul class="wp-block-list">
<li>编译Python源码</li>
</ul>



<pre class="wp-block-code"><code>cd Python-3.10.0
./configure --enable-optimizations</code></pre>



<ul class="wp-block-list">
<li>安装Python 3.10</li>
</ul>



<pre class="wp-block-code"><code>make altinstall

</code></pre>



<pre class="wp-block-code"><code>apt update &amp;&amp; apt upgrade -y &amp;&amp; apt install wget build-essential libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev -y &amp;&amp; cd &amp;&amp; wget https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tgz &amp;&amp; tar xzf Python-3.10.0.tgz &amp;&amp; cd Python-3.10.0 &amp;&amp; ./configure --enable-optimizations &amp;&amp; make altinstall</code></pre>
]]></content:encoded>
					
					<wfw:commentRss>https://zhizhi.date/archives/29.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
