CentOS6minimal安装nginx-1.26.1.tar.gz 笔记240718

CentOS6安装新版nginx

240718, CentOS6.1-minimal 安装 nginx-1.26.1.tar.gz

下载 nginx-1.26.1.tar.gz 的页面 : https://nginx.org/en/download.html
下载 nginx-1.26.1.tar.gz : https://nginx.org/download/nginx-1.26.1.tar.gz

CentOS6.1已过期, 给它更换yum源, 将下面内容替换 /etc/yum.repos.d/CentOS-Base.repo

vi /etc/yum.repos.d/CentOS-Base.repo 
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=https://mirrors.aliyun.com/centos-vault/6.1/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6#released updates 
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=https://mirrors.aliyun.com/centos-vault/6.1/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=https://mirrors.aliyun.com/centos-vault/6.1/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

重建yum缓存

yum clean all
yum makecache

安装需要的软件

yum install gcc-c++ pcre-devel zlib-devel make -y

将下载的 nginx-1.26.1.tar.gz 放到某个文件夹 , 或者直接用curl下载
curl下载要把https换成http

# curl大O选项是使用原名,下载到当前文件夹,  小o自定义路径和文件名
curl -O http://nginx.org/download/nginx-1.26.1.tar.gz

也可用wget 要单独下载, CentOS6.1minimal没有自带, wget无选项和curl -O效果基本相同, 将文件下载到当前文件夹,并保留网络上的名称, wget也要把https改成http

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

创建文件夹,进入文件夹,并下载到当前文件夹

mkdir -pm 777 /tmp/install/nginx ; cd $_ ; curl -O http://nginx.org/download/nginx-1.26.1.tar.gz

解压下载内容

# 可用zxvf或axvf, z专用于gz , a自动识别后缀名gz,xz,bz等
tar -axvf nginx-1.26.1.tar.gz

进入解压出的文件夹

cd nginx-1.26.1

执行配置

./configure

执行make

make

执行make install

make install

nginx 将会被默认安装到 /usr/local/nginx

进入安装文件夹,(nginx的home)

cd /usr/local/nginx

启动nginx

/usr/local/nginx/sbin/nginx

CentOS6.1默认防火墙是iptables, 默认是开启的, 默认访问不了80端口
关闭iptables

service iptables stop

停用iptables

chkconfig iptables off

iptables开放80端口 , 编辑/etc/sysconfig/iptables

vi /etc/sysconfig/iptables

内容修改为

*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [53:5644]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT

保存,重启

service iptables restart
service iptables status

成功访问

在这里插入图片描述
一气呵成

### 要用单引号,不然$会被转义
echo '
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=https://mirrors.aliyun.com/centos-vault/6.1/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6#released updates 
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=https://mirrors.aliyun.com/centos-vault/6.1/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=https://mirrors.aliyun.com/centos-vault/6.1/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6' > /etc/yum.repos.d/CentOS-Base.repo yum clean all ; yum makecache;yum install gcc-c++ pcre-devel zlib-devel make -ymkdir -pm 777 /tmp/install/nginx ; cd $_ ; curl -O http://nginx.org/download/nginx-1.26.1.tar.gztar -axf nginx-1.26.1.tar.gz;    cd nginx-1.26.1./configure ; make ; make install ; /usr/local/nginx/sbin/nginx ;service iptables stop;   chkconfig iptables off;  service iptables status ; 




240718, CentOS6.0-minimal 安装 nginx-1.26.1.tar.gz

下载 nginx-1.26.1.tar.gz 的页面 : https://nginx.org/en/download.html
下载 nginx-1.26.1.tar.gz : https://nginx.org/download/nginx-1.26.1.tar.gz

CentOS6.0已过期, 给它更换yum源, 将下面内容替换 /etc/yum.repos.d/CentOS-Base.repo

vi /etc/yum.repos.d/CentOS-Base.repo 
[base]
name=CentOS-$releasever - Base
baseurl=http://mirrors.163.com/centos-vault/6.0/os/$basearch/http://mirrors.aliyun.com/centos-vault/6.0/os/$basearch/http://mirrors.huaweicloud.com/centos-vault/6.0/os/$basearch/http://mirrors.cloud.tencent.com/centos-vault/6.0/os/$basearch/http://archive.kernel.org/centos-vault/6.0/os/$basearch/http://linuxsoft.cern.ch/centos-vault/6.0/os/$basearch/http://mirrors.tuna.tsinghua.edu.cn/centos-vault/6.0/os/$basearch/http://mirrors.ustc.edu.cn/centos-vault/6.0/os/$basearch/http://mirrors.cqupt.edu.cn/centos-vault/6.0/os/$basearch/http://mirrors.zju.edu.cn/centos-vault/6.0/os/$basearch/http://mirror.nyist.edu.cn/centos-vault/6.0/os/$basearch/http://mirrors.pku.edu.cn/centos-vault/6.0/os/$basearch/http://mirror.nsc.liu.se/centos-store/6.0/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6[updates]
name=CentOS-$releasever - Updates
baseurl=http://mirrors.163.com/centos-vault/6.0/updates/$basearch/http://mirrors.aliyun.com/centos-vault/6.0/updates/$basearch/http://mirrors.huaweicloud.com/centos-vault/6.0/updates/$basearch/http://mirrors.cloud.tencent.com/centos-vault/6.0/updates/$basearch/http://archive.kernel.org/centos-vault/6.0/updates/$basearch/http://linuxsoft.cern.ch/centos-vault/6.0/updates/$basearch/http://mirrors.tuna.tsinghua.edu.cn/centos-vault/6.0/updates/$basearch/http://mirrors.ustc.edu.cn/centos-vault/6.0/updates/$basearch/http://mirrors.cqupt.edu.cn/centos-vault/6.0/updates/$basearch/http://mirrors.zju.edu.cn/centos-vault/6.0/updates/$basearch/http://mirror.nyist.edu.cn/centos-vault/6.0/updates/$basearch/http://mirrors.pku.edu.cn/centos-vault/6.0/updates/$basearch/http://mirror.nsc.liu.se/centos-store/6.0/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirrors.163.com/centos-vault/6.0/extras/$basearch/http://mirrors.aliyun.com/centos-vault/6.0/extras/$basearch/http://mirrors.huaweicloud.com/centos-vault/6.0/extras/$basearch/http://mirrors.cloud.tencent.com/centos-vault/6.0/extras/$basearch/http://archive.kernel.org/centos-vault/6.0/extras/$basearch/http://linuxsoft.cern.ch/centos-vault/6.0/extras/$basearch/http://mirrors.tuna.tsinghua.edu.cn/centos-vault/6.0/extras/$basearch/http://mirrors.ustc.edu.cn/centos-vault/6.0/extras/$basearch/http://mirrors.cqupt.edu.cn/centos-vault/6.0/extras/$basearch/http://mirrors.zju.edu.cn/centos-vault/6.0/extras/$basearch/http://mirror.nyist.edu.cn/centos-vault/6.0/extras/$basearch/http://mirrors.pku.edu.cn/centos-vault/6.0/extras/$basearch/http://mirror.nsc.liu.se/centos-store/6.0/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6[epel-archive]
name=Extra Packages for Enterprise Linux 6 - $basearch
baseurl=http://mirrors.aliyun.com/epel-archive/6/$basearchhttp://mirrors.cloud.tencent.com/epel-archive/6/$basearchhttp://repo.jing.rocks/fedora-buffet/archive/epel/6/$basearchhttp://archives.fedoraproject.org/pub/archive/epel/6/$basearch
failovermethod=priority
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

重建yum缓存

yum clean all
yum makecache

安装需要的软件

yum install gcc-c++ pcre-devel zlib-devel make -y

将下载的 nginx-1.26.1.tar.gz 放到某个文件夹 , 或者直接用curl下载
curl下载要把https换成http

# curl大O选项是使用原名,下载到当前文件夹,  小o自定义路径和文件名
curl -O http://nginx.org/download/nginx-1.26.1.tar.gz

也可用wget 要单独下载, CentOS6.1minimal没有自带, wget无选项和curl -O效果基本相同, 将文件下载到当前文件夹,并保留网络上的名称, wget也要把https改成http

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

创建文件夹,进入文件夹,并下载到当前文件夹

mkdir -pm 777 /tmp/install/nginx ; cd $_ ; curl -O http://nginx.org/download/nginx-1.26.1.tar.gz

解压下载内容

# 可用zxvf或axvf, z专用于gz , a自动识别后缀名gz,xz,bz等
tar -axvf nginx-1.26.1.tar.gz

进入解压出的文件夹

cd nginx-1.26.1

执行配置

./configure

执行make

make

执行make install

make install

nginx 将会被默认安装到 /usr/local/nginx

进入安装文件夹,(nginx的home)

cd /usr/local/nginx

启动nginx

/usr/local/nginx/sbin/nginx

CentOS6.1默认防火墙是iptables, 默认是开启的, 默认访问不了80端口
关闭iptables

service iptables stop

停用iptables

chkconfig iptables off

iptables开放80端口 , 编辑/etc/sysconfig/iptables

vi /etc/sysconfig/iptables

内容修改为

*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [53:5644]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT

保存,重启

service iptables restart
service iptables status

成功访问

在这里插入图片描述

添加环境变量

echo 'export PATH=$PATH:/usr/local/nginx/sbin/' > /etc/profile.d/IConfigPath.sh

开机启动

echo -e "\n\n\n#start nginx\n/usr/local/nginx/sbin/nginx" >> /etc/rc.d/rc.local

一气呵成

### 要用单引号,不然$会被转义
echo '[base]
name=CentOS-$releasever - Base
baseurl=http://mirrors.163.com/centos-vault/6.0/os/$basearch/http://mirrors.aliyun.com/centos-vault/6.0/os/$basearch/http://mirrors.huaweicloud.com/centos-vault/6.0/os/$basearch/http://mirrors.cloud.tencent.com/centos-vault/6.0/os/$basearch/http://archive.kernel.org/centos-vault/6.0/os/$basearch/http://linuxsoft.cern.ch/centos-vault/6.0/os/$basearch/http://mirrors.tuna.tsinghua.edu.cn/centos-vault/6.0/os/$basearch/http://mirrors.ustc.edu.cn/centos-vault/6.0/os/$basearch/http://mirrors.cqupt.edu.cn/centos-vault/6.0/os/$basearch/http://mirrors.zju.edu.cn/centos-vault/6.0/os/$basearch/http://mirror.nyist.edu.cn/centos-vault/6.0/os/$basearch/http://mirrors.pku.edu.cn/centos-vault/6.0/os/$basearch/http://mirror.nsc.liu.se/centos-store/6.0/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6[updates]
name=CentOS-$releasever - Updates
baseurl=http://mirrors.163.com/centos-vault/6.0/updates/$basearch/http://mirrors.aliyun.com/centos-vault/6.0/updates/$basearch/http://mirrors.huaweicloud.com/centos-vault/6.0/updates/$basearch/http://mirrors.cloud.tencent.com/centos-vault/6.0/updates/$basearch/http://archive.kernel.org/centos-vault/6.0/updates/$basearch/http://linuxsoft.cern.ch/centos-vault/6.0/updates/$basearch/http://mirrors.tuna.tsinghua.edu.cn/centos-vault/6.0/updates/$basearch/http://mirrors.ustc.edu.cn/centos-vault/6.0/updates/$basearch/http://mirrors.cqupt.edu.cn/centos-vault/6.0/updates/$basearch/http://mirrors.zju.edu.cn/centos-vault/6.0/updates/$basearch/http://mirror.nyist.edu.cn/centos-vault/6.0/updates/$basearch/http://mirrors.pku.edu.cn/centos-vault/6.0/updates/$basearch/http://mirror.nsc.liu.se/centos-store/6.0/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirrors.163.com/centos-vault/6.0/extras/$basearch/http://mirrors.aliyun.com/centos-vault/6.0/extras/$basearch/http://mirrors.huaweicloud.com/centos-vault/6.0/extras/$basearch/http://mirrors.cloud.tencent.com/centos-vault/6.0/extras/$basearch/http://archive.kernel.org/centos-vault/6.0/extras/$basearch/http://linuxsoft.cern.ch/centos-vault/6.0/extras/$basearch/http://mirrors.tuna.tsinghua.edu.cn/centos-vault/6.0/extras/$basearch/http://mirrors.ustc.edu.cn/centos-vault/6.0/extras/$basearch/http://mirrors.cqupt.edu.cn/centos-vault/6.0/extras/$basearch/http://mirrors.zju.edu.cn/centos-vault/6.0/extras/$basearch/http://mirror.nyist.edu.cn/centos-vault/6.0/extras/$basearch/http://mirrors.pku.edu.cn/centos-vault/6.0/extras/$basearch/http://mirror.nsc.liu.se/centos-store/6.0/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6[epel-archive]
name=Extra Packages for Enterprise Linux 6 - $basearch
baseurl=http://mirrors.aliyun.com/epel-archive/6/$basearchhttp://mirrors.cloud.tencent.com/epel-archive/6/$basearchhttp://repo.jing.rocks/fedora-buffet/archive/epel/6/$basearchhttp://archives.fedoraproject.org/pub/archive/epel/6/$basearch
failovermethod=priority
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6' > /etc/yum.repos.d/CentOS-Base.repo yum clean all ; yum makecache;yum install gcc-c++ pcre-devel zlib-devel make -ymkdir -pm 777 /tmp/install/nginx ; cd $_ ; curl -O http://nginx.org/download/nginx-1.26.1.tar.gztar -axf nginx-1.26.1.tar.gz;    cd nginx-1.26.1./configure ; make ; make install ; /usr/local/nginx/sbin/nginx ;service iptables stop;   chkconfig iptables off;  service iptables status ; #添加环境变量
echo 'export PATH=$PATH:/usr/local/nginx/sbin/' > /etc/profile.d/IConfigPath.sh#开机启动
chmod +x /etc/rc.d/rc.local
echo -e "\n\n\n#start nginx\n/usr/local/nginx/sbin/nginx" >> /etc/rc.d/rc.local




240718, CentOS6.3-minimal 安装 nginx-1.26.1.tar.gz

### 要用单引号,不然$会被转义
echo '[base]
name=CentOS-$releasever - Base
baseurl=http://mirrors.163.com/centos-vault/6.3/os/$basearch/http://mirrors.aliyun.com/centos-vault/6.3/os/$basearch/http://mirrors.huaweicloud.com/centos-vault/6.3/os/$basearch/http://mirrors.cloud.tencent.com/centos-vault/6.3/os/$basearch/http://archive.kernel.org/centos-vault/6.3/os/$basearch/http://linuxsoft.cern.ch/centos-vault/6.3/os/$basearch/http://mirrors.tuna.tsinghua.edu.cn/centos-vault/6.3/os/$basearch/http://mirrors.ustc.edu.cn/centos-vault/6.3/os/$basearch/http://mirrors.cqupt.edu.cn/centos-vault/6.3/os/$basearch/http://mirrors.zju.edu.cn/centos-vault/6.3/os/$basearch/http://mirror.nyist.edu.cn/centos-vault/6.3/os/$basearch/http://mirrors.pku.edu.cn/centos-vault/6.3/os/$basearch/http://mirror.nsc.liu.se/centos-store/6.3/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6[updates]
name=CentOS-$releasever - Updates
baseurl=http://mirrors.163.com/centos-vault/6.3/updates/$basearch/http://mirrors.aliyun.com/centos-vault/6.3/updates/$basearch/http://mirrors.huaweicloud.com/centos-vault/6.3/updates/$basearch/http://mirrors.cloud.tencent.com/centos-vault/6.3/updates/$basearch/http://archive.kernel.org/centos-vault/6.3/updates/$basearch/http://linuxsoft.cern.ch/centos-vault/6.3/updates/$basearch/http://mirrors.tuna.tsinghua.edu.cn/centos-vault/6.3/updates/$basearch/http://mirrors.ustc.edu.cn/centos-vault/6.3/updates/$basearch/http://mirrors.cqupt.edu.cn/centos-vault/6.3/updates/$basearch/http://mirrors.zju.edu.cn/centos-vault/6.3/updates/$basearch/http://mirror.nyist.edu.cn/centos-vault/6.3/updates/$basearch/http://mirrors.pku.edu.cn/centos-vault/6.3/updates/$basearch/http://mirror.nsc.liu.se/centos-store/6.3/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirrors.163.com/centos-vault/6.3/extras/$basearch/http://mirrors.aliyun.com/centos-vault/6.3/extras/$basearch/http://mirrors.huaweicloud.com/centos-vault/6.3/extras/$basearch/http://mirrors.cloud.tencent.com/centos-vault/6.3/extras/$basearch/http://archive.kernel.org/centos-vault/6.3/extras/$basearch/http://linuxsoft.cern.ch/centos-vault/6.3/extras/$basearch/http://mirrors.tuna.tsinghua.edu.cn/centos-vault/6.3/extras/$basearch/http://mirrors.ustc.edu.cn/centos-vault/6.3/extras/$basearch/http://mirrors.cqupt.edu.cn/centos-vault/6.3/extras/$basearch/http://mirrors.zju.edu.cn/centos-vault/6.3/extras/$basearch/http://mirror.nyist.edu.cn/centos-vault/6.3/extras/$basearch/http://mirrors.pku.edu.cn/centos-vault/6.3/extras/$basearch/http://mirror.nsc.liu.se/centos-store/6.3/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6[epel-archive]
name=Extra Packages for Enterprise Linux 6 - $basearch
baseurl=http://mirrors.aliyun.com/epel-archive/6/$basearchhttp://mirrors.cloud.tencent.com/epel-archive/6/$basearchhttp://repo.jing.rocks/fedora-buffet/archive/epel/6/$basearchhttp://archives.fedoraproject.org/pub/archive/epel/6/$basearch
failovermethod=priority
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6' > /etc/yum.repos.d/CentOS-Base.repo yum clean all ; yum makecache;yum install gcc-c++ pcre-devel zlib-devel make -ymkdir -pm 777 /tmp/install/nginx ; cd $_ ; curl -O http://nginx.org/download/nginx-1.26.1.tar.gztar -axf nginx-1.26.1.tar.gz;    cd nginx-1.26.1./configure ; make ; make install ; /usr/local/nginx/sbin/nginx ;service iptables stop;   chkconfig iptables off;  service iptables status ; #添加环境变量
echo 'export PATH=$PATH:/usr/local/nginx/sbin/' > /etc/profile.d/IConfigPath.sh#开机启动
chmod +x /etc/rc.d/rc.local
echo -e "\n\n\n#start nginx\n/usr/local/nginx/sbin/nginx" >> /etc/rc.d/rc.local




240718, CentOS6.6-minimal 安装 nginx-1.26.1.tar.gz


echo '
[base]
name=CentOS-$releasever - Base
baseurl=http://mirrors.163.com/centos-vault/6.6/os/$basearch/http://mirrors.aliyun.com/centos-vault/6.6/os/$basearch/http://mirrors.huaweicloud.com/centos-vault/6.6/os/$basearch/http://mirrors.cloud.tencent.com/centos-vault/6.6/os/$basearch/http://archive.kernel.org/centos-vault/6.6/os/$basearch/http://linuxsoft.cern.ch/centos-vault/6.6/os/$basearch/http://mirrors.tuna.tsinghua.edu.cn/centos-vault/6.6/os/$basearch/http://mirrors.ustc.edu.cn/centos-vault/6.6/os/$basearch/http://mirrors.cqupt.edu.cn/centos-vault/6.6/os/$basearch/http://mirrors.zju.edu.cn/centos-vault/6.6/os/$basearch/http://mirror.nyist.edu.cn/centos-vault/6.6/os/$basearch/http://mirrors.pku.edu.cn/centos-vault/6.6/os/$basearch/http://mirror.nsc.liu.se/centos-store/6.6/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6[updates]
name=CentOS-$releasever - Updates
baseurl=http://mirrors.163.com/centos-vault/6.6/updates/$basearch/http://mirrors.aliyun.com/centos-vault/6.6/updates/$basearch/http://mirrors.huaweicloud.com/centos-vault/6.6/updates/$basearch/http://mirrors.cloud.tencent.com/centos-vault/6.6/updates/$basearch/http://archive.kernel.org/centos-vault/6.6/updates/$basearch/http://linuxsoft.cern.ch/centos-vault/6.6/updates/$basearch/http://mirrors.tuna.tsinghua.edu.cn/centos-vault/6.6/updates/$basearch/http://mirrors.ustc.edu.cn/centos-vault/6.6/updates/$basearch/http://mirrors.cqupt.edu.cn/centos-vault/6.6/updates/$basearch/http://mirrors.zju.edu.cn/centos-vault/6.6/updates/$basearch/http://mirror.nyist.edu.cn/centos-vault/6.6/updates/$basearch/http://mirrors.pku.edu.cn/centos-vault/6.6/updates/$basearch/http://mirror.nsc.liu.se/centos-store/6.6/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirrors.163.com/centos-vault/6.6/extras/$basearch/http://mirrors.aliyun.com/centos-vault/6.6/extras/$basearch/http://mirrors.huaweicloud.com/centos-vault/6.6/extras/$basearch/http://mirrors.cloud.tencent.com/centos-vault/6.6/extras/$basearch/http://archive.kernel.org/centos-vault/6.6/extras/$basearch/http://linuxsoft.cern.ch/centos-vault/6.6/extras/$basearch/http://mirrors.tuna.tsinghua.edu.cn/centos-vault/6.6/extras/$basearch/http://mirrors.ustc.edu.cn/centos-vault/6.6/extras/$basearch/http://mirrors.cqupt.edu.cn/centos-vault/6.6/extras/$basearch/http://mirrors.zju.edu.cn/centos-vault/6.6/extras/$basearch/http://mirror.nyist.edu.cn/centos-vault/6.6/extras/$basearch/http://mirrors.pku.edu.cn/centos-vault/6.6/extras/$basearch/http://mirror.nsc.liu.se/centos-store/6.6/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6[epel-archive]
name=Extra Packages for Enterprise Linux 6 - $basearch
baseurl=http://mirrors.aliyun.com/epel-archive/6/$basearchhttp://mirrors.cloud.tencent.com/epel-archive/6/$basearchhttp://repo.jing.rocks/fedora-buffet/archive/epel/6/$basearchhttp://archives.fedoraproject.org/pub/archive/epel/6/$basearch
failovermethod=priority
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6' > /etc/yum.repos.d/CentOS-Base.repo yum clean all ; yum makecache;yum install gcc-c++ pcre-devel zlib-devel make -ymkdir -pm 777 /tmp/install/nginx ; cd $_ ; curl -O http://nginx.org/download/nginx-1.26.1.tar.gztar -axf nginx-1.26.1.tar.gz;    cd nginx-1.26.1./configure ; make ; make install ; /usr/local/nginx/sbin/nginx ;service iptables stop;   chkconfig iptables off;
service iptables status ; #添加环境变量
echo 'export PATH=$PATH:/usr/local/nginx/sbin/' > /etc/profile.d/IConfigPath.sh#开机启动
chmod +x /etc/rc.d/rc.local
echo -e "\n\n\n#start nginx\n/usr/local/nginx/sbin/nginx" >> /etc/rc.d/rc.local




240718, CentOS6.10-minimal 安装 nginx-1.26.1.tar.gz


echo '
[base]
name=CentOS-$releasever - Base
baseurl=http://mirrors.163.com/centos-vault/6.10/os/$basearch/http://mirrors.aliyun.com/centos-vault/6.10/os/$basearch/http://mirrors.huaweicloud.com/centos-vault/6.10/os/$basearch/http://mirrors.cloud.tencent.com/centos-vault/6.10/os/$basearch/http://archive.kernel.org/centos-vault/6.10/os/$basearch/http://linuxsoft.cern.ch/centos-vault/6.10/os/$basearch/http://mirrors.tuna.tsinghua.edu.cn/centos-vault/6.10/os/$basearch/http://mirrors.ustc.edu.cn/centos-vault/6.10/os/$basearch/http://mirrors.cqupt.edu.cn/centos-vault/6.10/os/$basearch/http://mirrors.zju.edu.cn/centos-vault/6.10/os/$basearch/http://mirror.nyist.edu.cn/centos-vault/6.10/os/$basearch/http://mirrors.pku.edu.cn/centos-vault/6.10/os/$basearch/http://mirror.nsc.liu.se/centos-store/6.10/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6[updates]
name=CentOS-$releasever - Updates
baseurl=http://mirrors.163.com/centos-vault/6.10/updates/$basearch/http://mirrors.aliyun.com/centos-vault/6.10/updates/$basearch/http://mirrors.huaweicloud.com/centos-vault/6.10/updates/$basearch/http://mirrors.cloud.tencent.com/centos-vault/6.10/updates/$basearch/http://archive.kernel.org/centos-vault/6.10/updates/$basearch/http://linuxsoft.cern.ch/centos-vault/6.10/updates/$basearch/http://mirrors.tuna.tsinghua.edu.cn/centos-vault/6.10/updates/$basearch/http://mirrors.ustc.edu.cn/centos-vault/6.10/updates/$basearch/http://mirrors.cqupt.edu.cn/centos-vault/6.10/updates/$basearch/http://mirrors.zju.edu.cn/centos-vault/6.10/updates/$basearch/http://mirror.nyist.edu.cn/centos-vault/6.10/updates/$basearch/http://mirrors.pku.edu.cn/centos-vault/6.10/updates/$basearch/http://mirror.nsc.liu.se/centos-store/6.10/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirrors.163.com/centos-vault/6.10/extras/$basearch/http://mirrors.aliyun.com/centos-vault/6.10/extras/$basearch/http://mirrors.huaweicloud.com/centos-vault/6.10/extras/$basearch/http://mirrors.cloud.tencent.com/centos-vault/6.10/extras/$basearch/http://archive.kernel.org/centos-vault/6.10/extras/$basearch/http://linuxsoft.cern.ch/centos-vault/6.10/extras/$basearch/http://mirrors.tuna.tsinghua.edu.cn/centos-vault/6.10/extras/$basearch/http://mirrors.ustc.edu.cn/centos-vault/6.10/extras/$basearch/http://mirrors.cqupt.edu.cn/centos-vault/6.10/extras/$basearch/http://mirrors.zju.edu.cn/centos-vault/6.10/extras/$basearch/http://mirror.nyist.edu.cn/centos-vault/6.10/extras/$basearch/http://mirrors.pku.edu.cn/centos-vault/6.10/extras/$basearch/http://mirror.nsc.liu.se/centos-store/6.10/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6[epel-archive]
name=Extra Packages for Enterprise Linux 6 - $basearch
baseurl=http://mirrors.aliyun.com/epel-archive/6/$basearchhttp://mirrors.cloud.tencent.com/epel-archive/6/$basearchhttp://repo.jing.rocks/fedora-buffet/archive/epel/6/$basearchhttp://archives.fedoraproject.org/pub/archive/epel/6/$basearch
failovermethod=priority
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6' > /etc/yum.repos.d/CentOS-Base.repo yum clean all ; yum makecache;yum install gcc-c++ pcre-devel zlib-devel make -ymkdir -pm 777 /tmp/install/nginx ; cd $_ ; curl -O http://nginx.org/download/nginx-1.26.1.tar.gztar -axf nginx-1.26.1.tar.gz;    cd nginx-1.26.1./configure ; make ; make install ; /usr/local/nginx/sbin/nginx ;service iptables stop;   chkconfig iptables off;
service iptables status ; #添加环境变量
echo 'export PATH=$PATH:/usr/local/nginx/sbin/' > /etc/profile.d/IConfigPath.sh#开机启动
chmod +x /etc/rc.d/rc.local
echo -e "\n\n\n#start nginx\n/usr/local/nginx/sbin/nginx" >> /etc/rc.d/rc.local

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://xiahunao.cn/news/3249642.html

如若内容造成侵权/违法违规/事实不符,请联系瞎胡闹网进行投诉反馈,一经查实,立即删除!

相关文章

SpringCloud------Sentinel(微服务保护)

目录 雪崩问题 处理方式!!!技术选型 Sentinel 启动命令使用步骤引入依赖配置控制台地址 访问微服务触发监控 限流规则------故障预防流控模式流控效果 FeignClient整合Sentinel线程隔离-------故障处理线程池隔离和信号量隔离​编辑 两种方式优缺点设置方式 熔断降级-----…

简述乐观锁和悲观锁——Java

悲观锁和乐观锁 悲观就是任何事都认为会往坏处发生,乐观就是认为任何事都会往好处发生。 打个比方,假如一个公司里只有一台打印机,如果多个人同时打印文件,可能出现混乱的问题,他的资料打印在了我的资料上&#xff0…

【视频讲解】神经网络、Lasso回归、线性回归、随机森林、ARIMA股票价格时间序列预测|附代码数据

全文链接:https://tecdat.cn/?p37019 分析师:Haopeng Li 随着我国股票市场规模的不断扩大、制度的不断完善,它在金融市场中也成为了越来越不可或缺的一部分。 【视频讲解】神经网络、Lasso回归、线性回归、随机森林、ARIMA股票价格时间序列…

Unity动画系统(4)

6.3 动画系统高级1-1_哔哩哔哩_bilibili p333- 声音组件添加 using System.Collections; using System.Collections.Generic; using UnityEngine; public class RobotAnimationController : MonoBehaviour { [Header("平滑过渡时间")] [Range(0,3)] publ…

AI智能名片S2B2C商城小程序在社群去中心化管理中的应用与价值深度探索

摘要:随着互联网技术的飞速发展,社群经济作为一种新兴的商业模式,正逐渐成为企业与用户之间建立深度连接、促进商业增长的重要途径。本文深入探讨了AI智能名片S2B2C商城小程序在社群去中心化管理中的应用,通过详细分析社群去中心化…

科普文:多线程如何使用CPU缓存?

一、前言 计算机的基础知识聊的比较少,但想要更好的理解多线程以及为后续多线程的介绍做铺垫,所以有必要单独开一篇来聊一下 CPU cache。 二、CPU 前面有一篇文章关于 CPU是如何进行计算 感兴趣的同学,可以先移步了解一下,不了…

连接Redis异常:JedisMovedDataException

redis.clients.jedis.exceptions.JedisMovedDataException: MOVED 5798 192.168.187.138:6379 在使用JAVA API连接redis的时候,出现了异常: 问题的原因 JAVA API实现是redis集群实现方式,而在配置文中就配置的是单结点的方式。 Moved表示使…

从人工巡检到智能防控:智慧油气田安全生产的新视角

一、背景需求 随着科技的飞速发展,视频监控技术已成为各行各业保障安全生产、提升管理效率的重要手段。特别是在油气田这一特殊领域,由于其工作环境复杂、安全风险高,传统的监控方式已难以满足实际需求。因此,基于视频监控AI智能…

NLP教程:1 词袋模型和TFIDF模型

文章目录 词袋模型TF-IDF模型词汇表模型 词袋模型 文本特征提取有两个非常重要的模型: 词集模型:单词构成的集合,集合自然每个元素都只有一个,也即词集中的每个单词都只有一个。 词袋模型:在词集的基础上如果一个单词…

springcolud学习04Ribbon

Ribbon Ribbon是一个用于构建分布式系统的开源项目,最初由Netflix开发。它是一个基于HTTP和TCP客户端负载均衡器,用于将客户端的请求分发到多个服务实例上,以提高系统的性能和可靠性。Ribbon提供了许多负载均衡算法和配置选项,可…

maven内网依赖包编译报错问题的一种解决方法

背景 外网开发时可以连接互联网,所以编译没有什么问题,但是将数据库、代码、maven仓库全部拷贝到内网,搭建内网环境之后,编译失败。 此依赖包的依赖层级图 maven镜像库配置使用拷贝到内网的本地库,配置如下&#xff…

WebRTC音视频-前言介绍

目录 效果预期 1:WebRTC相关简介 1.1:WebRTC和RTC 1.2:WebRTC前景和应用 2:WebRTC通话原理 2.1:媒体协商 2.2:网络协商 2.3:信令服务器 效果预期 1:WebRTC相关简介 1.1&…

24位动态信号采集卡8路同步音频震动信号采集IEPE采集卡USB8814

24位动态信号采集卡 音频震动信号采集USB8814实测演示 品牌:阿尔泰科技 产品概述: USB8814 是一款为测试音频和振动信号而设计的高精度数据采集卡。该板卡提供 8 路同步模拟输 入通道,24bit 分辨率,单通道采样速率zui高 204.8kSP…

4.定时器

原理 时钟源:定时器是内部时钟源(晶振),计数器是外部计时长度:对应TH TL计数器初值寄存器(高八位,低八位)对应的中断触发函数 中断源中断处理函数Timer0Timer0_Routine(void) interrupt 1Timer1Timer1_Routine(void) …

css list布局 高端玩法

这种布局方式 通常父级item 使用display:flex; 子集list使用margin-right margin-bottom撑开距离 然后得纠结最后一个子集的margin什么的 有个新思路子集使用padding <div class"video-box"><div class"video-list" v-for"item in videoLis…

系统架构设计师教程(清华第二版) 第3章 信息系统基础知识-3.3 管理信息系统(MIS)-解读

系统架构设计师教程 第3章 信息系统基础知识-3.3 管理信息系统(MIS) 3.3.1 管理信息系统的概念3.3.1.1 部件组成3.3.1.2 结构分类3.3.1.2.1 开环结构3.3.1.2.2 闭环结构3.3.1.3 金字塔结构3.3.2 管理信息系统的功能3.3.3 管理信息系统的组成3.3.3.1 销售市场子系统3.3.3.2…

前端学习(二)之HTML

一、HTML文件结构 <!DOCTYPE html> <!-- 告诉浏览器&#xff0c;这是一个HTML文件 --><html lang"en"> <!-- 根元素&#xff08;起始点&#xff0c;最外层容器&#xff09; --><head> <!-- 文档的头部&#xff08;元信息&#xff…

【JVM基础03】——组成-详细介绍下Java中的堆

目录 1- 引言&#xff1a;堆1-1 堆是什么&#xff1f;(What)1-2 为什么用堆&#xff1f;堆的作用 (Why) 2- ⭐核心&#xff1a;堆的原理&#xff08;How&#xff09;2-1 堆的划分2-2 Java 7 与 Java 8 的堆区别 3- 小结&#xff1a;3-1 详细介绍下Java的堆&#xff1f;3-2 JVM …

静态网站怎么更新数据

今天看到个问题 我不是行业从业者&#xff0c;但目前遇到一个问题 我公司网站为纯静态&#xff0c;除了直接从html里修改文字外能不能这样 建立一个xml或者txt文档&#xff0c;其中有很多信息&#xff0c;例如网站名称&#xff0c;电话&#xff0c;备案号等&#xff0c;一行一行…

SAPUI5基础知识15 - 理解控件的本质

1. 背景 经过一系列的练习&#xff0c;通过不同的SAPUI5控件&#xff0c;我们完成了对应用程序界面的初步设计&#xff0c;在本篇博客中&#xff0c;让我们一起总结下SAPUI5控件的相关知识点&#xff0c;更深入地理解SAPUI5控件的本质。 通常而言&#xff0c;一个典型UI5应用…