我使用apt-get install openssh-server在我的Ubuntu PC中apt-get install openssh-server 。 版本是5.9。 现在,我想从源代码编译和安装openssh-server版本6.2。 我已经成功下载了源代码,并运行以下命令: ./configure make make install 我发现新版本的openssh-server被安装到/usr/local/sbin/ 。 旧版本的openssh-server位于/usr/sbin/ 。 我发现/etc/init.d/ssh中的服务脚本仍然指向/usr/sbin/ 。 旧的openssh-server(v5.9)仍在运行。 我怎样才能用我刚刚编译和安装的新的openssh-server replace旧的openssh-server? 我如何创build一个init.d脚本来启动和停止手动编译的新的openssh-server? 如何在启动时启动新的openssh-server? 当我使用apt-get install安装openssh-server时,configuration文件将被安装到/ etc / ssh /中。 如果我从源代码编译并安装它,configuration文件在哪里? 如果我从源代码编译openssh-server,但是我使用apt-get install来安装openssh-client包,会不会有任何configuration文件发生冲突? 谢谢。
/etc/init.d/php-fpm restart Stopping php-fpm: [FAILED] Starting php-fpm: [10-Oct-2013 21:24:37] ERROR: An another FPM instance seems to already listen on /home/php-fpm/sock/gosianozka.sock [10-Oct-2013 21:24:37] ERROR: FPM initialization failed [FAILED] 它不时发生,我不知道如何解决这个问题。 我在CentOS 6.4 64位上从ius repo使用PHP 5.4.20。 PHP 5.4.20 (cli) (built: Sep 20 2013 10:06:51) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies […]
我正在尝试为主pipe安装debian安装的init脚本。 insserv: Service \$remote_fs has to be enabled to start service supervisor insserv: Service \$syslog has to be enabled to start service supervisor insserv: exiting now! update-rc.d: error: insserv rejected the script header init脚本的完整内容在这里: #! /bin/sh ### BEGIN INIT INFO # Provides: supervisor # Required-Start: \$remote_fs \$syslog # Required-Stop: \$remote_fs \$syslog # Default-Start: 2 3 […]
我正在尝试使用puppet master 3.1.1来pipe理各种服务器上的iptables。 我的本地木偶代理是2.7.19 ,服务器OS是CentOS 5.4 。 /etc/puppet/modules/mycompany/manifests/config/iptables.pp class base::iptables ( { { $identity_environment = $::identity_environment } if ($identity_environment == "production") { $start_iptables = "true" $run_iptables = "running" } elsif ($identity_environment == "development") { $start_iptables = "false" $run_iptables = "stopped" } if ($run_iptables != "stopped") { file { "/etc/sysconfig/iptables": ensure => file, owner => root, […]
看来我需要使用sysv-rc-conf来pipe理服务启动/closures,但是当我安装NIS时没有脚本添加到/etc/init.d/ 。 我希望或者有/etc/init.d/nis或者/etc/init.d/ypbind 。 我通过apt-get安装了NIS,如下所示: sudo apt-get install nis 如何configurationypbind在Ubuntu 14.04启动时自动启动?
我不是一个顽固的Linux工程师,但是我在启动Elastic Search时遇到了一些问题。 一些统计数据: 服务器:Ubuntu服务器11.04弹性search:1.2.3(与appitude安装) 当我启动弹性search时,“开始”没有错误: * Starting Elasticsearch Server (一遍又一遍地) 当我运行状态时,我得到: * could not access PID file for elasticsearch 位于这里的pid文件有正确的权限(我猜?): -rw-r–r– 1 elasticsearch elasticsearch 0 2014-08-11 12:26 /var/run/elasticsearch.pid 此外,elasticsearch用户还存在于/ etc / passwd文件中。 我也尝试清除弹性search,并再次安装它,但没有帮助。 有什么build议么?
这是我的代码: #!/bin/bash daemon="$APPVENV/bin/uwsgi" args="–emperor $APPCONF/uwsgi/app.ini" pid="$APPDIR/emperor.pid" case "\$1" in start) echo "Starting uwsgi" start-stop-daemon -m -p \$pid –start –exec \$daemon — \$args ;; stop) echo "Stopping script uwsgi" start-stop-daemon –signal INT -p \$pid –stop \$daemon — \$args ;; reload) echo "Reloading conf" kill -HUP \$(< \$pid) ;; *) echo "Usage: /etc/init.d/uwsgi {start|stop|reload}" exit 1 ;; […]
我在本地的ubuntu服务器上build立了一个竹子的实例。 一切工作正常免除一件事:竹服务器重新启动时不启动。 我创build了一个脚本,并将其放在/etc/init.d/bamboo 。 该文件具有所有者root:root和文件权限755 。 它可以很好地手动调用,用于停止,启动和重新启动命令。 我已经在下面说明了。 任何原因,它可能无法在启动或在我的机器上的工作,我可能会发现有关它的日志信息? #!/bin/sh -e # bamboo startup script #chkconfig: 2345 80 05 #description: bamboo # Define some variables # Name of app ( bamboo, Confluence, etc ) APP=bamboo # Name of the user to run as USER=bamboo # Location of application's bin directory BASE=/opt/atlassian/bamboo # Location of Java […]
我创build了一个启动系统守护进程的init.d脚本。 守护进程使用系统$ PATH启动其他进程。 但是,系统path在init.d加载守护进程时不包含“/ usr / local / bin”。 所以,我必须在重新启动后停止/启动init.d守护进程,这实际上违背了init.d脚本的目的! 这个问题说init.d脚本应该设置path。 init.d脚本启动时的PATH问题 虽然这是可能的,但我想要更多的灵活性。 在系统设置$ PATHvariables之后,是否可以强制init.d脚本在运行级加载?
我试图让这些脚本在Java应用程序需要以用户foobar运行的环境中工作,而不foobar是以root还是foobar启动的。 所以这些是我对init脚本的修改,它是从init.d符号链接的: RUN_USER=foobar USER_NAME=$(id –user –name) START_SCRIPT=/opt/app/scripts/start ARGS="" start() { if [ "$USER_NAME" != "$RUN_USER" ]; then PID=$(su $RUN_USER -c $START_SCRIPT $ARGS > /dev/null 2>&1 & echo $!) else PID=`$START_SCRIPT $ARGS > /dev/null 2>&1 & echo $!` fi } 而我的/opt/app/scripts/start脚本如下所示: exec java -jar /opt/app/app.jar > /dev/null 2>&1 & echo $! 为了使init脚本工作, PIDvariables需要被正确设置,但是它被设置为su命令的PID 。 关于做这个工作有很多问题,但是没有一个解决scheme适用于我。 我知道> […]