建站

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
yum install vim

#安装git
yum install git
#安装dnf
yun install dnf
#安装wget
sudo install wget

#设置时区
timedatectl set-timezone Asia/Shanghai

#安装docker
sudo dnf remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine

#设置yum源     
sudo wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

#清理yum数据
sudo yum clean all
sudo yum makecache
sudo yum repolist

#设置docker存储库
sudo dnf -y install dnf-plugins-core
sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

#安装最新的docker
sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

#设置docker开机启动
sudo systemctl enable --now docker

#安装文件上传工具
yum install lrzsz

#下载go
#https://go.dev/dl/ 上传到服务器
cd /opt
mkdir soft

#上传go到soft
rz
cd ..

#解压go (opt目录)
tar -vxzf ./soft/fo.tar.gz -C ./module

vim ~/.bash_profile
#末尾添加
export PATH=$PATH:/opt/module/go/bin
:wq

#设置go的软件安装目录
go env -w GOBIN=/opt/app

实在没有办法才这样做!

安装GCC编译器

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#yum -y install gcc gcc-c++ autoconf pcre pcre-devel make automake
sudo yum update
sudo yum install gcc-c++
sudo yum install gcc

#更新GCC
sudo yum groupinstall "Development Tools" 
sudo yum install glibc-static libstdc++-static

#下载并编译最新版GCC
#https://ftp.gnu.org/gnu/gcc/gcc-14.2.0/
#上传#解压
tar -vxzf gcc -C /opt/module

cd /opt/module/gcc

##运行下载脚本 确保依赖全部安装
#./contrib/download_prerequisites
##存放build文件
#mkdir build
#cd build

##运行configure脚本
#../configure --enable-checking=release --enable-languages=c,c++ --disable-multilib
##运行make命令
#make -j$(nproc)

##运行依赖脚本
#bash ./contrib/download_prerequisites 

##进入gcc源码目录
##<gcc_source_directory>是源码目录
#cd <gcc_source_directory> 

##运行编译脚本
##<installation_path> 是输出目录
#./configure --prefix=<installation_path> --enable-languages=c,c++,fortran 
#bash make

#安装gmp
sudo yum install gmp gmp-devel
#进入gcc源码目录
cd /opt/module/gcc
#下载依赖
bash ./contrib/download_prerequisites
#安装 m4
yum install m4
#解压依赖 gmp-6.2tar
tar jxvf gmp-6.2.1.tar.bz2
#进入解压后的目录
cd ./gmp-6.2.1
#编译依赖
./configure --prefix=/usr/local/gmp
#安装依赖
make && make install

#解压编译第二个依赖
#如果报错 configure:error:gmp.h can't be found, or is unusable
-yum install gmp-devel.x86_64

cd ..
tar jxvf mpfr-4.1.0.tar.bz2
cd mpfr-4.1.0
./configure --prefix=/usr/local/mpfr
make && make install
#添加到环境变量
export LD_LIBRARY_PATH=/usr/local/mpfr/lib:$LD_LIBRARY_PATH
export LD_RUN_PATH=/usr/local/mpfr/lib:$LD_RUN_PATH
#添加到 /etc/ld.so.conf文件
vim /etc/ld.so.conf
#更新缓存
sudo ldconfig


#第三个依赖
#如果报错 error: libmpfr not found or uses a different ABI (including static vs shared)..
- yum install mpfr-devel.x86_64

##https://www.mpfr.org/mpfr-4.1.0/ 下载源码

cd ..
tar zxvf mpc-1.2.1.tar.gz 
cd mpc-1.2.1
#记得指定 mpfr路径
./configure --with-mpfr=/usr/local/mpfr --prefix=/usr/local/mpc
make && make install

#第四个依赖
#error libmpfr not found or user a different ABI (including static vs shared)
- yum install mpfr-devel.x86_64
cd ..
tar jxvf isl-0.24.tar.bz2
cd isl-0.24
./configure --prefix=/usr/local/isl
make && make install

#添加依赖的环境变量
vim ./.bash_profile
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/mpc/lib:/usr/local/gmp/lib:/usr/local/mpfr/lib/:/usr/local/isl/lib
source ./.bash_profile
reboot

#安装zlib
yum install zlib-devel.x86_64
sudo yum install gmp-devel mpfr-devel libmpc-devel isl-devel

#编译gcc
cd /opt/moudel/gcc
#清理
make clean

#编译
./configure --prefix=/usr/local/gcc --with-gmp=/usr/local/gmp/ --with-mpfr=/usr/local/mpfr/ --with-mpc=/usr/local/mpc/ --with-isl=/usr/local/isl  --with-system-zlib --disable-multilib

#继续
#configure: creating ./config.status
#config.status: creating Makefile
make -j$(nproc)

sudo make install

没做上面就这样做

ABI Policy and Guidelines

Ramone Linux - Browse /Rel_0.99/releases/i686/packages at SourceForge.net

Ramone Linux - Browse /Rel_0.99/releases/x86_64/packages at SourceForge.net

[SOLVED] /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20’ not found

1
2
3
4
5
6
cp libstdc++.so.6.0.25 /usr/lib64/
cd /usr/lib64
#删除软链
sudo rm /usr/lib64/libstdc++.so.6
#创建软链
ln -s libstdc++.so.6.0.25 libstdc++.so.6
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
#安装最新 HuGo 扩展/部署版本 https://gohugo.io/installation/linux/
#不行 X
CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@latest

#使用dnf安装
#sudo dnf install hugo

#启用CGO 让GO语言能使用C代码 (命令行敲就行了)
export CGO_ENABLED=1

####下载hugo-master 源码并上传到 /opt/soft
####解压
#下载 hugoliunxamd64.tar.gz
#解压
tar -zxvf hugo.tar.gz -C /opt/module/

#更新缺失的玩意
yum provides libstdc

开始

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#创建基础hugo站点
./hugo new site NanTingBlog
#进入站点跟目录
cd NanTingBlog
git clone https://github.com/rhazdon/hugo-theme-hello-friend-ng.git themes/hello-friend-ng


#下载hugo主题
#https://github.com/rhazdon/hugo-theme-hello-friend-ng?tab=License-1-ov-file
#拷贝到基础站点目录
#内容需要到站点所在根目录
##cp -r themesbak/* NanTingBlog/
#tar -zxvf grbkzt.gz
 
##进入解压后的目录  拷贝配置文件
#cd ./NanTingBlog/exampleSite
#cp config.toml ..

配置

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
baseURL      = "127.0.0.1"
title        = "My Blog"
languageCode = "en-us"
theme        = "hello-friend-ng"
paginate     = 10

[params]
  dateform        = "Jan 2, 2006"
  dateformShort   = "Jan 2"
  dateformNum     = "2006-01-02"
  dateformNumTime = "2006-01-02 15:04"

  # Subtitle for home
  homeSubtitle = "NanTing"

  # Set disableReadOtherPosts to true in order to hide the links to other posts.
  disableReadOtherPosts = false

  # Enable sharing buttons, if you like
  enableSharingButtons = true

  # Show a global language switcher in the navigation bar
  enableGlobalLanguageMenu = false

  # Metadata mostly used in document's head
  description = "NanTing"
  keywords = "homepage, blog"
  images = [""]

[taxonomies]
    category = "blog"
    tag      = "tags"
                                                                                            1,3           Top
1
2
#启动
../hugo server --bind 0.0.0.0 -p 80
1
2
vim /etc/rc.local
nohup /opt/module/HuGo/hugo server --bind 0.0.0.0 -p 9996 -b http://127.0.0.1:9996 &
使用 Hugo 构建
主题 StackJimmy 设计