<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:wfw="http://wellformedweb.org/CommentAPI/">
<channel>
<title>拾光 - linux</title>
<link>https://www.ishiguang.cn/tag/linux/</link>
<atom:link href="https://www.ishiguang.cn/feed/tag/linux/" rel="self" type="application/rss+xml" />
<language>zh-CN</language>
<description></description>
<lastBuildDate>Tue, 07 Mar 2023 17:16:00 +0800</lastBuildDate>
<pubDate>Tue, 07 Mar 2023 17:16:00 +0800</pubDate>
<item>
<title>Linux自启动脚本编写</title>
<link>https://www.ishiguang.cn/17863.html</link>
<guid>https://www.ishiguang.cn/17863.html</guid>
<pubDate>Tue, 07 Mar 2023 17:16:00 +0800</pubDate>
<dc:creator>小威博客</dc:creator>
<description><![CDATA[本文章向大家介绍Linux里编写shell脚本实现开机自动启动1.连接上SSH终端，使用vim在/etc/init.d/文件夹里面创建一个名为start.sh的脚本文件vim /etc/init...]]></description>
<content:encoded xml:lang="zh-CN"><![CDATA[
<blockquote>本文章向大家介绍<a href="https://www.xiaoweio.com/534.html">Linux</a>里编写<a href="https://www.xiaoweio.com/534.html">shell脚本</a>实现开机自动启动</blockquote><p>1.连接上SSH终端，使用<code>vim</code>在<code>/etc/init.d/</code>文件夹里面创建一个名为<code>start.sh</code>的脚本文件</p><pre><code>vim /etc/init.d/start.sh</code></pre><p>2.编写名为<code>start.sh</code>脚本内容</p><pre><code> #!/bin/bash

### BEGIN INIT INFO
# Provides:     start
# Required-Start:  $remote_fs $syslog
# Required-Stop:   $remote_fs $syslog
# Default-Start:   2 3 4 5
# Default-Stop:   0 1 6
# Short-Description: start test
# Description:    start test
### END INIT INFO

#此处编写脚本内容
cd /var/local/
nohup java -jar -Xms512M  -Xmx1024M jenkins.war --httpPort=8080 &gt; jenkins.log 2&gt;&amp;1 &amp;

exit 0</code></pre><p>3.给文件增加权限</p><pre><code>chmod +755 /etc/init.d/start.sh</code></pre><p>4.设置开机自启动</p><pre><code>sudo update-rc.d /etc/init.d/start.sh defaults</code></pre><p>5.重启服务器</p><pre><code>reboot</code></pre><p>6.查看进程</p><pre><code>ps -ef |grep jenkns</code></pre><p>完成OK</p><p><a href="https://www.xiaoweio.com/534.html">文章来源于：小威博客</a></p>
]]></content:encoded>
<slash:comments>0</slash:comments>
<comments>https://www.ishiguang.cn/17863.html#comments</comments>
<wfw:commentRss>https://www.ishiguang.cn/feed/tag/linux/</wfw:commentRss>
</item>
<item>
<title>go关键字，变量，类型，规范</title>
<link>https://www.ishiguang.cn/11880.html</link>
<guid>https://www.ishiguang.cn/11880.html</guid>
<pubDate>Sat, 22 Jan 2022 18:42:14 +0800</pubDate>
<dc:creator>admin</dc:creator>
<description><![CDATA[1.在java语言中，代码一行书写需要加上分号，但是在go语言中写同一个语句不需要分号。 2.java中申明变量为int a，即变量的类型在变量前面，而在go语言中，变量的类型在变量的后面，即 ...]]></description>
<content:encoded xml:lang="zh-CN"><![CDATA[
<p>1.在java语言中，代码一行书写需要加上分号，但是在go语言中写同一个语句不需要分号。 2.java中申明变量为int a，即变量的类型在变量前面，而在go语言中，变量的类型在变量的后面，即 a int ，在go中变量申明后没有赋值 的话将会有默认的值， a int 是0，b string 是字符长度为0的“”，c bool 的值是false。go中也可以申明变量后直接赋值，使用 i:=3的方式在函数中申明变量并且赋值。还可以使用分组的方式赋值 a,b:=4,5,另外使用下划线的方式代替变量名，可以使用以下的方式进行赋值：_,b:=5,8,这种赋值方式使得任何赋值给下划线的值都被抛弃。同样的可以进行分组申明变量 {a int b bool}.使用bool申明布尔类型，使用int申明整型类型，在go中，混合类型进行运算时非法行为，如a int 和 b int32是无法相加的，其中int类型是通用类型，具体大小根据硬件进行改变，如在32位系统是32位的，在64位系统是64位的。 3.常量，在go语言中，使用const关键字申明常量，可以申明整型，布尔类型，字符串类型申明常量 const（x:=4;b:=false）。申明常量可以使用iota，常量赋值自增量，const(a:=iota b) 4.go中的特殊类型string和java一样，属于不可变的。</p>
]]></content:encoded>
<slash:comments>0</slash:comments>
<comments>https://www.ishiguang.cn/11880.html#comments</comments>
<wfw:commentRss>https://www.ishiguang.cn/feed/tag/linux/</wfw:commentRss>
</item>
<item>
<title>go程序部署apache配置</title>
<link>https://www.ishiguang.cn/11879.html</link>
<guid>https://www.ishiguang.cn/11879.html</guid>
<pubDate>Sat, 22 Jan 2022 18:41:50 +0800</pubDate>
<dc:creator>admin</dc:creator>
<description><![CDATA[在ubuntu上配置apache的时候，发现使用find -name 查找httpd.conf配置文件，但是并没有找到相应的配置文件，但是却找到了/etc/apache2/apache2.con...]]></description>
<content:encoded xml:lang="zh-CN"><![CDATA[
<p>在ubuntu上配置apache的时候，发现使用find -name 查找httpd.conf配置文件，但是并没有找到相应的配置文件，但是却找到了/etc/apache2/apache2.conf这个配置文件，使用vi编辑器查看后，发现一些配置文件通过Include的指令包含进来，其中就有/etc/apache2/sites-available以及/etc/apache2/sites-enabled两个目录，打开mods-available目录，发现已经有默认的配置模块000-default，这里面是设置虚拟主机的，80端口指向的就是apache的默认页面。所以这里每个虚拟主机的配置文件都是放在sites-available目录下的，而sites-enabled建立了指向该目录下每一个配置文件的链接，这样关闭虚拟主机删除相应链接即可。在我的项目中配置时，我通过在sites-available目录下建立myapp.conf文件，配置如下： //通过公网ip访问的80端口 ServerName chepinpin.top 域名解析时设置 ServerAdmin <a href="mailto:kemp2chen@gmail.com">kemp2chen@gmail.com</a> 设置管理员邮箱 ProxyRequests on 开启反向代理 策略 Order deny,allow Allow from all ProxyPass / <a href="http://127.0.0.1:8081/">http://127.0.0.1:8081/</a> 本地服务端口 ProxyPassReverse / <a href="http://127.0.0.1:8081/">http://127.0.0.1:8081/</a></p>
]]></content:encoded>
<slash:comments>0</slash:comments>
<comments>https://www.ishiguang.cn/11879.html#comments</comments>
<wfw:commentRss>https://www.ishiguang.cn/feed/tag/linux/</wfw:commentRss>
</item>
<item>
<title>解决apache2配置时出现ProxyPass无效的错误</title>
<link>https://www.ishiguang.cn/11878.html</link>
<guid>https://www.ishiguang.cn/11878.html</guid>
<pubDate>Sat, 22 Jan 2022 18:40:46 +0800</pubDate>
<dc:creator>admin</dc:creator>
<description><![CDATA[unbunt使用apache2配置访问服务端口时，使用ProxyPass将远程服务器映射到本地url空间，即使用ProxyPass进行反向代理，但是在配置时发现该命令无效，可使用如下方法进行解决...]]></description>
<content:encoded xml:lang="zh-CN"><![CDATA[
<p>unbunt使用apache2配置访问服务端口时，使用ProxyPass将远程服务器映射到本地url空间，即使用ProxyPass进行反向代理，但是在配置时发现该命令无效，可使用如下方法进行解决： cd /etc/apache2/mods-enabled ln -s ../mods-available/proxy_http.load proxy_http.load ln -s ../mods-available/proxy_ajp.load proxy_ajp.load ln -s ../mods-available/proxy.load proxy.load 然后 servise apache2 restart 重启服务器</p>
]]></content:encoded>
<slash:comments>0</slash:comments>
<comments>https://www.ishiguang.cn/11878.html#comments</comments>
<wfw:commentRss>https://www.ishiguang.cn/feed/tag/linux/</wfw:commentRss>
</item>
<item>
<title>Debian系统宝塔无法安装PHP,Nginx等解决办法</title>
<link>https://www.ishiguang.cn/11873.html</link>
<guid>https://www.ishiguang.cn/11873.html</guid>
<pubDate>Sat, 22 Jan 2022 18:34:22 +0800</pubDate>
<dc:creator>admin</dc:creator>
<description><![CDATA[Debian系统宝塔无法安装PHP,Nginx等怎么办？由于缺少依赖决绝办法RetHat CentOS or Fedora 使用下面安装命令yum install curl curl-devel...]]></description>
<content:encoded xml:lang="zh-CN"><![CDATA[
<p>Debian系统宝塔无法安装PHP,Nginx等怎么办？<br>由于缺少依赖</p><p>决绝办法</p><p>RetHat CentOS or Fedora 使用下面安装命令<br>yum install curl curl-devel<br>Debian or Ubuntu使用下面的安装命令<br>apt-get install curl<br>apt-get install libcurl4-gnutls-dev<br>这样就可以了<br>关于不能安装php就安装这个</p><p>apt-get install -y libboost-all-dev gperf libevent-dev uuid-dev</p><p>*另外说下，用Apache.不要用Nginx</p>
]]></content:encoded>
<slash:comments>0</slash:comments>
<comments>https://www.ishiguang.cn/11873.html#comments</comments>
<wfw:commentRss>https://www.ishiguang.cn/feed/tag/linux/</wfw:commentRss>
</item>
</channel>
</rss>