New answers tagged

0

Error message Failed at step CHDIR means that systemd is unable to cd into directory specified in WorkingDirectory. It is specified as /opt/www/my-app.com but later you list it as /opt/www/my-app. Another issue is that you are starting unicorn_rails with option -D which tells unicorn_rails process to daemonize (started process forks child and immediately ...


0

Another approach is to configure PolicyKit to allow members of a particular group to reboot; that is, being authorised directly thus avoiding the whole question of satisying authentication to gain the superuser's authorisation. Create a file /etc/polkit-1/localauthority/50-local.d/50-local.pkla and add a clause like: [Allow reboot by booters group] ...


1

To install latest MySql 5.7 on RHEL/Centos 7. There are few steps follows-: Step 1-: Add the below EPEL Repository $ sudo rpm -iUvh http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm Step 2-: Install the MySql Server using below yum installer. $ sudo yum install mysql-server Step 3-: Add to system Startup and start the Mysql Server. ...


0

The simple way create a script (for example /home/user/start_service.sh) with the follow content: #!/bin/sh while true; do path/to/service/executable done And add it to /etc/rc.local: #!/bin/sh -e su user -c '/home/user/start_service.sh' & exit 0 Then start script manually: /home/user/start_service.sh So you can forget about your web ...


0

On old-style init systems you can use good old start-stop-daemon application, which takes care of restarting the process if it dies. Just do something like: start-stop-daemon --start --background --exec /path/to/your/executable It also allows to set scheduling priority, IO priority etc. for the process you are running. On a systemd enabled system you can ...


1

Yes, you need to make the full-fledged web server executable a service. Prefer a non-root account for the service — I'd even say it's mandatory — to limit damages in cases the web server gets compromised. I think1 systemd is well documented enough to guide you through the required steps. 1 I don't run systemd, in case the question arises...


1

For speed and simplicity, I would pipe the command output into wc -l as Munir suggests. If you really want to use awk, just print the number of records in the END block: awk 'END { print NR }'


2

After you’ve run yum update to upgrade libraries, there may be services running which are still using the old copies of libraries. Such services might still be vulnerable to security bugs in the old libraries. It’s relatively easy to discover which processes are affected using lsof to list processes using deleted files: # lsof | awk '$5 == "DEL" { print }' ...



Top 50 recent answers are included