💬 Trending Now: .html - Fox News Update
  • 产品分类
  • 联系我们
    成颂信息科技有限公司
    联 系 人:赵经理
    移动电话: 17323577578
    固定电话:17314149516
    通讯地址:北京市通州区66号
  • nginx卸载重装配置没变

    nginx卸载重装配置没变

    一、载(zai)重装配置没nginx卸载重装前的载重装配置没准备工(gong)作

    在进行卸载重装之前,我们需要做好以下几(ji)方面(mian)的载重装配置没准(zhun)备工作:

    1. 备份网站数据:在进行任(ren)何操作之前,我(wo)们都需(xu)要(yao)确保网站的载重(zhong)装配置没数(shu)据已(yi)经备份,以防止在卸载和重装过程中出现数据丢失的载重装配置没问题。

    nginx卸载重装配置没变

    nginx卸载重装配置没变

    2. 停止正在运行的载(zai)重装(zhuang)配置没nginx服务(wu):在卸载(zai)和重装nginx之前(qian),需要先停止正在运行的载(zai)重装配置没nginx服务,以(yi)免影响到其他程序的(de)载重装配置没正常运(yun)行,可以使用以下命令来停止nginx服务:

    nginx卸载重装配置没变

    sudo service nginx stop

    3. 检查系统依赖:在卸载和重装nginx之前,载重装配置没需要检查系统中(zhong)是载重装配置没否还(hai)有(you)其他的软件(jian)包依赖于nginx,如果有(you),需要先卸载这些依赖,载重(zhong)装配置没以免在重新安装nginx时出现问(wen)题,载(zai)重装配置没可(ke)以使用以下命令来查看系统(tong)中的载重装配置没软件包依赖:

    4. 下载nginx安装包:在卸载和重装nginx之前,需要先从官方网站或者其他可信的载重(zhong)装配置没来源下载最新版本的nginx安装包,可以使用以下命令来下载nginx安装(zhuang)包:

    wget http://nginx.org/download/nginx-1.20.1.tar.gz

    二、载重装配置没卸载nginx

    1. 删除nginx安装目录:使用(yong)以下(xia)命令来删除已经安装的nginx目录:

    sudo rm -rf /usr/local/nginx

    2. 删除nginx配置文件:使用以下命令来删除已经(jing)安装的nginx配置文件:

    sudo rm /etc/nginx/nginx.conf

    3. 删除nginx相关(guan)文(wen)件:使用以下命令来删除与nginx相关的文件:

    sudo rm /usr/local/nginx/sbin/nginx*sudo rm /usr/local/nginx/conf/nginx*

    4. 删除系(xi)统服务:使用以下(xia)命令来删除已经安装的nginx系统服务:

    sudo apt-get remove --purge nginx-common libnginx-mod-http-ssl-module libnginx-mod-http-v2_6-module libnginx-mod-http-v2_7-module libnginx-mod-perl-module libnginx-mod-rtmp-module libnginx-mod-udp-module libnginx-mod-utils-curl libnginx-mod-utils-java libnginx-mod-xml2-utilssudo apt-get autoremovesudo apt-get autoclean

    三、安装并启动nginx

    1. 解压安装包:使用以下命令来解压刚刚下载的nginx安装包:

    tar -zxvf nginx-1.20.1.tar.gz

    2. 编译并安装:进入解压后的目录,执行以下命令来编译并安装nginx:

    “`

    cd nginx-1.20.1/src/configure && sudo make && sudo make install && sudo make test && sudo make install-libs && sudo make install-html && sudo make install-devel && sudo make install-open='open'ssl && sudo make install-pcre && sudo make install-libpcre && sudo make install-compat && sudo make install-ngx_http_geoip_module && sudo make install-ngx_http_image_filter_module && sudo make install-ngx_http_map_module && sudo make install-ngx_http_memcached_module && sudo make install-ngx_http_referer_module && sudo make install-ngx_http_stub_status_module && sudo make install-ngx_http_userid_module && sudo make install-ngx_http_xsltproc_module && sudo make install-ngx_http_zip_module && sudo make install-openresty && sudo make install-luajit && sudo make install-luac; sudo ldconfig; cd ../objs && sudo cp objs/server objs/geoip objs/imagefilter objs/map objs/memcached objs/referer objs/stubstatus objs/userid objs/xsltproc objs/zip openresty/luajit/luajit.so openresty/luajit/libluajit.a open=""resty/compat/libpcre.a open='open'resty/compat/libpcre++.a open="open"resty/compat/libpcrealt.a open="open"resty/compat/libpcre2.a open='open'resty/compat/libpcre2posix.a open="open"resty/compat/libssp.a open='open'resty/compat/libcrypt.a open="open"resty/compat/libcrypto.a openresty/compat/zlib.a open='open'resty/compat/libpng15.a open=""resty/compat/libjpeg8.a open='open'resty/compat/libfreetype6.a open=""resty; sudo mkdir -p /usr/local/open='open'resty; sudo mv open=""resty/* /usr/local/openresty; sudo chmod a+rx -R /usr/local; sudo chmod a+rx ???????????????????????????????; sudo chmod a+rx ????????????????????????; sudo chmod u+x *; sudo chmod u+x conf/*; sudo chmod u+x conf/*.conf; sudo chmod u+x conf/*.htm; sudo chmod u+x conf/*.html; sudo chmod u+x conf/*.js; sudo chmod u+x conf/*.php; sudo chmod u+x conf/*.py; sudo chmod u+x conf/*.txt; sudo chmod u+w conf/*; sudo chmod u+w conf/*.conf; sudo chmod u+w conf/*.htm; sudo chmod u+w conf/*.html; sudo chmod u+w conf/*.js; sudo chmod u+w conf/*.php; sudo chmod u+w conf/*.py; sudo chmod u+w conf/*.txt; sudo find var tmp logs etc !( -name ‘*’ ) > tmpfileslist; for file in `cat tmpfileslist` do if [ `echo $file | cut -b1` = “‘” ] then continue else echo “sudo chown root:root $file”; done; cat tmpfileslist | xargs sudo chgrp root:root; cat tmpfileslist | xargs sudo chmod g=u,o=g $file; cat tmpfileslist | xargs sudo chattr +i $file; find var tmp logs etc !( -name ‘*’ ) > tmpfileslist; for file in `cat tmpfileslist` do if [ `echo $file | cut -b1` = “‘” ] then continue else echo “sudo touch $file”; done; cat tmpfileslist | xargs sudo touch $file; find var tmp logs etc | sort | uniq > filestoinstall; for file in `cat filestoinstall` do if [ `echo $file | cut -b1` = “‘” ] then continue else echo “sudo mv $file $file”; done; find var tmp logs etc | sort | uniq > filestodelete; for file in `cat filestodelete` do if [ `echo $file | cut -b1` = “‘” ] then continue else echo “sudo del $file”; done; exit; cd ~; wget tar zxf open=""resty_VERSIONNUMBER_all.tar.gz; cd open=""resty_VERSIONNUMBER; export NGINXROOT=`pwd`export NGINXCONF=$NGINXROOT’conf’export NGINXDAILY=$NGINXROOT’logs’export NGINXBINDIR=$NGINXROOT’bin’export NGINXLIBDIR=$NGINXROOT’lib’export NGINXVARDIR=$NGINXROOT’var’export NGINXMANDIR=$NGINXROOT’man’export NGINXDOCDIR=$NGINXROOT’doc’export NGINXPKGCONFIGDIR=$NGINXROOT’pkgconfig’export NGINXPIDDIR=$NGINXROOT’pids’export NGINXRUNDIR=$NGINXROOT’run’export NGINXLOCKDIR=$NGINXROOT’lock’export NGINXHTTPDUSER=wwwmake all install clean test deps rewrite reload restart graceful shutdown reopen reload save config save config dirty force reload reloadsave load test check status version updowndownupupcheck status version updowndownupupcheck status version updowndownupupcheck status version updowndownupupcheck status version updowndownupupcheck status version updowndownupupcheck status version updowndownupupcheck status version updowndownupupcheck status version up


  • 成颂信息科技有限公司
    通讯地址:上海市金山66号    联系人:赵经理    联系电话:19974869549