Ubuntu | Nignix描述问题1 检查确实他是空壳子,并不会有任何影响。解决1.停掉旧 Nginx2.卸载程序和配置3. 清扫战场(删除多余依赖)4. 安装宝塔[宝塔安装]()描述Ubuntu中下载宝塔的时候,发现与系统中原有的ngnix环境进行冲突。问题系统现有Ngnix与宝塔冲突,考虑到系统现有的版本也可能比较老旧,准卸载它。先要准备检查一下系统中原有的nginx的版本号位置等信息。``1 检查确实他是空壳子,并不会有任何影响。查年纪:它的版本有多老?这是最直观的指标。输入以下命令(注意是大写的 V):nginx -V怎么定罪:如果输出的版本号(比如 nginx version: nginx/1.18.0)非常老,而且后面的 configure arguments 里没带什么奇奇怪怪的自定义模块,那就说明这只是某任学长随手通过 Ubuntu 默认应用商店(apt)下载的老古董,毫无保留价值。nginx version: nginx/1.18.0(Ubuntu)built with OpenSSL1.1.1f31Mar2020TLS SNI support enabled configure arguments: --with-cc-opt='-g -O2 -fdebug-prefix-map=/build/nginx-V1WJUN/nginx-1.18.0=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wdate-time -D_FORTIFY_SOURCE=2'--with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fPIC'--prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-compat --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_sub_module --with-http_xslt_module=dynamic --with-stream=dynamic --with-stream_ssl_module --with-mail=dynamic --with-mail_ssl_module查老巢:它到底占了哪些地方?虽然刚才用 which 查到了执行文件在 /usr/sbin/nginx,但我们可以查得更彻底:whereis nginx怎么定罪:正常通过 apt 安装的空壳 Nginx,它会规规矩矩地待在 /usr/sbin/nginx(程序)、/etc/nginx(配置文件夹)和 /usr/share/nginx(共享资源)里。如果输出只有这几个常规路径,说明它没有到处乱拉屎,可以被 apt remove 一键清理得很干净。~$whereisnginx nginx: /usr/sbin/ngi