一、nohup: ignoring input and appending output to ‘nohup.out’
看了网上很多介绍,意思解释利用nohup命令运行程序,nohup会产生日志文件,所以需要我们把日志文件写到nohup.out,
我需要运行的程序是 nohup redis-server /etc/redis/redis.conf &这个
nohup redis-server /etc/redis/redis.conf > /dev/null 2> /dev/null &
执行这个有可能会有网友会成功,反正我是没成功的,运行上面的代码出现了这个错了
nohup: ignoring input and redirecting stderr to stdout
到了第二环节 nohup: ignoring input and redirecting stderr to stdout
二、nohup: ignoring input and redirecting stderr to stdout
网上查了查。现象是控制台输出的信息输出到两处了,这就有点尴尬了
继续改bug,把最后面的 “&” 改为"2>&1 &" 改了改成了
nohup redis-server /etc/redis/redis.conf > /dev/null 2 > /dev/null 2>&1 &
运行总结果图