N62-4
Posted wx5c2a3973ce0e4
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了N62-4相关的知识,希望对你有一定的参考价值。
1、自建yum仓库,分别为网络源和本地源
1、创建目录
mkdir -pv /apps/httpd/htdocs/epel/7/x86_64
mkdir -pv /apps/httpd/htdocs/centos/7/os/x86_64
2、配置yum源
[root@bogon ~]# cat /etc/yum.repos.d/CentOS-Base.repo
[base]
name=CentOS-$releasever - Base
baseurl=https://mirrors.aliyun.com/centos/7/os/x86_64/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=https://mirrors.aliyun.com/centos/7/updates/x86_64/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=https://mirrors.aliyun.com/centos/7/extras/x86_64/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
[epel]
name=CentOS-epel
baseurl=https://mirrors.aliyun.com/epel/7/x86_64/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
3、同步阿里云yum源到本地私有yum仓库
cd /apps/httpd/htdocs/centos/7/os/x86_64
reposync -np /apps/httpd/htdocs/centos/7/os/x86_64
mv extras/ ../../
mv updates/ ../../
mv base/Packages/ ./
rm base/ -rf
createrepo pwd
Spawning worker 0 with 10072 pkgs
Workers Finished
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
cd /apps/httpd/htdocs/centos/7/extras
createrepo pwd
Spawning worker 0 with 277 pkgs
Workers Finished
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
cd /apps/httpd/htdocs/centos/7/updates
createrepo pwd
Spawning worker 0 with 1476 pkgs
Workers Finished
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
cd /apps/httpd/htdocs/epel/7/x86_64/epel
mv Packages/ ../
cd ..
rm epel/ -rf
createrepo pwd
4、路径同步
cd /apps/httpd/htdocs/centos/7/extras
mkdir x86_64
mv * x86_64
cd /apps/httpd/htdocs/centos/7/updates
mkdir x86_64
mv * x86_64
5、使用yum仓库
客户端配置:
2、编译安装http2.4,实现可以正常访问,并将编译步骤和结果提交。
yum install gcc make autoconf apr-devel apr-util-devel pcre-devel openssl-devel redhat-rpm-config
wget https://dlcdn.apache.org//httpd/httpd-2.4.51.tar.gz --no-check-certificate
tar -zxvf httpd-2.4.51.tar.gz -C /usr/local/src/
mkdir -pv /apps/httpd
./configure --prefix=/apps/httpd --sysconfdir=/etc/httpd --enable-ssl
make && make install
echo PATH=/apps/httpd/bin:$PATH > /etc/profile.d/httpd.sh
useradd -r -s /sbin/nologin -d /var/www -c Apache -u 48 apache
vi /etc/httpd/httpd.conf
user apache
group apache
apachectl restart
3、利用sed 取出ifconfig命令中本机的IPv4地址
[root@localhost ~]# ifconfig | sed -r -n /inet /s/.*inet ([0-9.]+) .*/\\1/gp
192.168.52.111
127.0.0.1
4、删除/etc/fstab文件中所有以#开头,后面至少跟一个空白字符的行的行首的#和空白字符
[root@centos6 ~]#cat /etc/fstab |sed -r s/^#\\ ?(.*)/\\1/|sed /^$/d
/etc/fstab
Created by anaconda on Sat Feb 29 17:24:49 2020
Accessible filesystems, by reference, are maintained under /dev/disk
See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
UUID=045518d2-26c1-4e65-8302-2d85f85da5f8 / ext4 defaults 1 1
UUID=29182137-a18c-468d-9e56-8a2c4d678359 /boot ext4 defaults 1 2
UUID=1dca2886-9385-47c0-b625-ada3166b4392 /data ext4 defaults 1 2
UUID=b719b189-e2e0-4304-b36a-7112932d69cc swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
以上是关于N62-4的主要内容,如果未能解决你的问题,请参考以下文章
linux安装 redis(redis-3.0.2.tar.gz) 和 mongodb(mongodb-linux-x86_64-rhel62-4.0.0)