linux卸载和安装nginx资料汇总


linux卸载nginx资料汇总


https://www.cnblogs.com/yangfei123/p/12760058.html
https://www.cnblogs.com/weibanggang/p/11487339.html
https://blog.csdn.net/weixin_42440768/article/details/114843375


https://blog.csdn.net/huawangxin/article/details/107874720?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522162510730716780269859871%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=162510730716780269859871&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_v2~rank_v29-1-107874720.pc_v2_rank_blog_default&utm_term=linux&spm=1018.2226.3001.4450

https://www.cnblogs.com/sirdong/p/11969148.html

1.安装nginx
安装nginx提示报错
checking for PCRE library ... not found
checking for PCRE library in /usr/local/ ... not found
checking for PCRE library in /usr/include/pcre/ ... not found
checking for PCRE library in /usr/pkg/ ... not found
checking for PCRE library in /opt/local/ ... not found

./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.

安装pcre报错
libtool: link: gcc -shared  .libs/pcreposix.o   -Wl,-rpath -Wl,/usr/local/mydata/soft/pcre-8.10/.libs -Wl,-rpath -Wl,/usr/local/lib/pcre ./.libs/libpcre.so    -Wl,-soname -Wl,libpcreposix.so.0 -o .libs/libpcreposix.so.0.0.0
libtool: link: (cd ".libs" && rm -f "libpcreposix.so.0" && ln -s "libpcreposix.so.0.0.0" "libpcreposix.so.0")
libtool: link: (cd ".libs" && rm -f "libpcreposix.so" && ln -s "libpcreposix.so.0.0.0" "libpcreposix.so")
libtool: link: ar cru .libs/libpcreposix.a  pcreposix.o
libtool: link: ranlib .libs/libpcreposix.a
libtool: link: ( cd ".libs" && rm -f "libpcreposix.la" && ln -s "../libpcreposix.la" "libpcreposix.la" )
source='pcrecpp.cc' object='pcrecpp.lo' libtool=yes \
DEPDIR=.deps depmode=none /bin/sh ./depcomp \
/bin/sh ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.      -c -o pcrecpp.lo pcrecpp.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -c pcrecpp.cc  -o .libs/pcrecpp.o
./libtool: line 990: g++: command not found
make[1]: *** [pcrecpp.lo] Error 1
make[1]: Leaving directory `/usr/local/mydata/soft/pcre-8.10'
make: *** [all] Error 2

tomcat启动报错
1. 在jdk安装目录配置
编辑$JAVA_HOME/jre/lib/security/Java.security文件,将securerandom.source=file:/dev/random 换成 securerandom.source=file:/dev/urandom 即可

链接:https://www.jianshu.com/p/75b834cce309
https://www.csdn.net/tags/OtTaggxsNDU4MzYtYmxvZwO0O0OO0O0O.html

redis启动报错,缺少依赖jemalloc

安装pcre
http://www.rpmfind.net/linux/rpm2html/search.php?query=pcre(x86-64)
https://centos.pkgs.org/7/centos-x86_64/pcre-8.32-17.el7.x86_64.rpm.html


pcre-8.32-17.el7.x86_64.rpm
[root@iZ0jf01ed6wd4ocxbq7l6nZ soft]# rpm -ivh pcre-8.32-17.el7.x86_64.rpm
Preparing...                          ################################# [100%]
        file /usr/lib64/libpcre.so.1.2.0 from install of pcre-8.32-17.el7.x86_64 conflicts with file from package pcre-8.32-15.el7_2.1.x86_64
        file /usr/lib64/libpcre16.so.0.2.0 from install of pcre-8.32-17.el7.x86_64 conflicts with file from package pcre-8.32-15.el7_2.1.x86_64
        file /usr/lib64/libpcre32.so.0.0.0 from install of pcre-8.32-17.el7.x86_64 conflicts with file from package pcre-8.32-15.el7_2.1.x86_64
        file /usr/lib64/libpcrecpp.so.0.0.0 from install of pcre-8.32-17.el7.x86_64 conflicts with file from package pcre-8.32-15.el7_2.1.x86_64
        file /usr/lib64/libpcreposix.so.0.0.1 from install of pcre-8.32-17.el7.x86_64 conflicts with file from package pcre-8.32-15.el7_2.1.x86_64

##linux 搭建 nacos 单机模式
https://blog.csdn.net/wsjzzcbq/article/details/123916233

##RabbitMQ部署安装
下载erlang
https://blog.csdn.net/th3000/article/details/121410292
https://github.com/rabbitmq/erlang-rpm/releases
https://blog.csdn.net/BitcoinR/article/details/123908446
下载RabbitMQ
https://www.rabbitmq.com/download.html
下载socat
http://www.rpmfind.net/linux/rpm2html/search.php?query=socat(x86-64)

##安装异常报错
[root@iZ0jf01ed6wd4ocxbq7l6qZ mq]# rpm -ivh erlang-23.3.4.15-1.el8.x86_64.rpm
warning: erlang-23.3.4.15-1.el8.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID cc4bbe5b: NOKEY
error: Failed dependencies:
        libcrypto.so.1.1()(64bit) is needed by erlang-23.3.4.15-1.el8.x86_64
        libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) is needed by erlang-23.3.4.15-1.el8.x86_64
        libcrypto.so.1.1(OPENSSL_1_1_1)(64bit) is needed by erlang-23.3.4.15-1.el8.x86_64
        libtinfo.so.6()(64bit) is needed by erlang-23.3.4.15-1.el8.x86_64
        libz.so.1(ZLIB_1.2.7.1)(64bit) is needed by erlang-23.3.4.15-1.el8.x86_64
[root@iZ0jf01ed6wd4ocxb


[root@iZ0jf01ed6wd4ocxbq7l6qZ mq]# rpm -ivh ncurses-libs-6.1-9.20180224.el8.x86_64.rpm
warning: ncurses-libs-6.1-9.20180224.el8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY
error: Failed dependencies:
        ncurses-base = 6.1-9.20180224.el8 is needed by ncurses-libs-6.1-9.20180224.el8.x86_64
[root@iZ0jf01ed6wd4ocxbq7l6qZ mq]# rpm -ivh zlib-1.2.7-18.el7.x86_64.rpm
Preparing...                          ################################# [100%]
        file /usr/lib64/libz.so.1.2.7 from install of zlib-1.2.7-18.el7.x86_64 conflicts with file from package zlib-1.2.7-17.el7.x86_64
[root@iZ0jf01ed6wd4ocxbq7l6qZ mq]# rpm -ivh erlang-23.3.4.15-1.el8.x86_64.rpm
warning: erlang-23.3.4.15-1.el8.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID cc4bbe5b: NOKEY
error: Failed dependencies:
        libtinfo.so.6()(64bit) is needed by erlang-23.3.4.15-1.el8.x86_64
        libz.so.1(ZLIB_1.2.7.1)(64bit) is needed by erlang-23.3.4.15-1.el8.x86_64

[root@iZ0jf01ed6wd4ocxbq7l6qZ mq]# erl -version
/usr/lib64/erlang/erts-11.2.2.14/bin/beam.smp: error while loading shared libraries: libtinfo.so.6: cannot open shared object file: No such file or directory

参考解决
https://blog.csdn.net/weixin_50224527/article/details/120433182
在该命令后面加上 --nodeps --force
该命令的作用: 不再分析包之间的依赖关系而直接安装
rpm -ivh erlang-18.3-1.el7.centos.x86_64.rpm --nodeps --force

查找包
https://pkgs.org/search/?q=libtinfo.so.6
https://blog.csdn.net/weixin_50224527/article/details/120433182

https://blog.csdn.net/u011489186/article/details/118958612
https://blog.csdn.net/BitcoinR/article/details/123908446
https://blog.csdn.net/th3000/article/details/121410292
https://blog.csdn.net/qq_51929833/article/details/123639554
https://blog.csdn.net/shishishilove/article/details/122086399
https://blog.csdn.net/weixin_45698637/article/details/118857484

https://10.71.192.124/index.php?c=operate&a=showAllProtocol#

nignxSSL 版本 2 和 3 协议检测漏洞修复

参考:https://blog.csdn.net/weixin_34599958/article/details/112937789

ssl_prefer_server_ciphers On;

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5;
 

查看linux版本和已安装的配置(https需要配置最后面那段)

./nginx -V

nginx version: nginx/1.20.1
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC)

configure arguments: --prefix=/usr/local/mydata/nginx --with-pcre=../pcre-8.30 --with-zlib=../zlib-1.2.11 --with-openssl=../openssl-fips-2.0.16 --with-http_ssl_module

查询nginx位置
find / -name nginx

备份原有nginx数据
mkdir /usr/local/mydata/backup/nginx/
mkdir /usr/local/mydata/backup/nginx/20221130
cp -Rf /usr/local/mydata/soft/nginx/nginx.conf /usr/local/mydata/backup/nginx/20221130/

解压
tar -zxvf nginx-1.22.1.tar.gz

停止原nginx
/usr/sbin/nginx -s stop
cd nginx-1.22.1
./configure --prefix=/usr/local/mydata/soft/nginx-v1.22.1 --without-http_rewrite_module
make && make install
cd ../nginx_v1.22.1/
nginx -s start
./sbin/nginx
nginx -v
cd ../nginx-1.22.1

./configure --prefix=/usr/local/mydata/soft/nginx_v1.22.1 --with-http_stub_status_module --with-http_ssl_module --without-http_rewrite_module --with-openssl=../openssl-1.0.2h

./configure --prefix=/usr/local/mydata/soft/nginx_v1.22.1 --with-http_stub_status_module --with-http_ssl_module --with-openssl=../openssl-1.0.2h --with-pcre=../pcre-8.30

配置nginx安装
./configure --prefix=/usr/install/nginx --with-pcre=../pcre-8.21 --with-zlib=../zlib-1.2.7 --with-openssl=../openssl-fips-2.0.2
make && make install
 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
重新卸载安装nginx的步骤如下: 1. 首先,进入要安装的目录。通常情况下,可以选择将nginx安装在/usr/local/src目录下。使用以下命令进入目录: ``` cd /usr/local/src/ ``` 2. 下载nginx的压缩包。可以使用以下命令下载最新版本的nginx: ``` sudo wget http://nginx.org/download/nginx-1.10.2.tar.gz ``` 3. 解压压缩包。使用以下命令解压刚刚下载的nginx压缩包: ``` sudo tar -xvf nginx-1.10.2.tar.gz ``` 4. 重命名解压后的文件夹。为了方便管理,可以将解压后的文件夹重命名为nginx,可以使用以下命令进行重命名: ``` sudo mv nginx-1.10.2 nginx ``` 5. 接下来,如果之前安装nginx,需要先卸载之前的nginx。执行以下命令进行卸载: ``` rm -rf /etc/nginx/ rm -rf /usr/sbin/nginx rm /usr/share/man/man1/nginx.1.gz sudo apt-get remove nginx* ``` 6. 最后,运行nginx。首先,我们需要找到nginx的配置文件,可以使用以下命令进行搜索: ``` sudo find / -name nginx.conf ``` 以上是重新卸载安装nginx的步骤。请按照上述步骤进行操作。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* *3* [linuxnginx全部卸载,重新安装并运行](https://blog.csdn.net/changyana/article/details/123452943)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 100%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值