修改getconf LONG_BIT显示的值

不知道什么原因导致Linux系统执行getconf LONG_BIT显示的值为32,而操作系统实际是64位。

通过修改软链接 

[root@server4]#ls -l /usr/libexec/getconf/

lrwxrwxrwx 1 root root    20  6月  5 10:02 default -> POSIX_V6_ILP32_OFF32

[root@server4 getconf]# ln -s  POSIX_V6_LP64_OFF64 default

以下为操作过程

[root@server4 ~]# cd /usr/libexec/getconf/
[root@server4 getconf]# ls
default  POSIX_V6_ILP32_OFF32  POSIX_V6_ILP32_OFFBIG  POSIX_V6_LP64_OFF64  POSIX_V7_ILP32_OFF32  POSIX_V7_ILP32_OFFBIG  POSIX_V7_LP64_OFF64
[root@server4 getconf]# ls -l
总用量 152
lrwxrwxrwx 1 root root    20  6月  5 10:02 default -> POSIX_V6_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFFBIG
-rwxr-xr-x 2 root root 25536 11月  3 2011 POSIX_V6_LP64_OFF64
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFFBIG
-rwxr-xr-x 2 root root 25536 11月  3 2011 POSIX_V7_LP64_OFF64
[root@server4 getconf]# ls -s default POSIX_V6_LP64_OFF64
 0 default  28 POSIX_V6_LP64_OFF64
[root@server4 getconf]# ls -l
总用量 152
lrwxrwxrwx 1 root root    20  6月  5 10:02 default -> POSIX_V6_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFFBIG
-rwxr-xr-x 2 root root 25536 11月  3 2011 POSIX_V6_LP64_OFF64
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFFBIG
-rwxr-xr-x 2 root root 25536 11月  3 2011 POSIX_V7_LP64_OFF64
[root@server4 getconf]# ln default POSIX_V6_LP64_OFF64
ln: 创建硬链接"POSIX_V6_LP64_OFF64": 文件已存在
[root@server4 getconf]# ln  POSIX_V6_LP64_OFF64 default
[root@server4 getconf]# ls -l
总用量 180
-rwxr-xr-x 3 root root 25536 11月  3 2011 default
lrwxrwxrwx 1 root root    20  6月  5 10:02 default.bak -> POSIX_V6_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFFBIG
-rwxr-xr-x 3 root root 25536 11月  3 2011 POSIX_V6_LP64_OFF64
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFFBIG
-rwxr-xr-x 3 root root 25536 11月  3 2011 POSIX_V7_LP64_OFF64
[root@server4 getconf]# ls -l
总用量 180
-rwxr-xr-x 3 root root 25536 11月  3 2011 default
lrwxrwxrwx 1 root root    20  6月  5 10:02 default.bak -> POSIX_V6_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFFBIG
-rwxr-xr-x 3 root root 25536 11月  3 2011 POSIX_V6_LP64_OFF64
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFFBIG
-rwxr-xr-x 3 root root 25536 11月  3 2011 POSIX_V7_LP64_OFF64
[root@server4 getconf]# rm default.bak 
rm:是否删除符号链接 "default.bak"?y
[root@server4 getconf]# ls -l
总用量 180
-rwxr-xr-x 3 root root 25536 11月  3 2011 default
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFFBIG
-rwxr-xr-x 3 root root 25536 11月  3 2011 POSIX_V6_LP64_OFF64
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFFBIG
-rwxr-xr-x 3 root root 25536 11月  3 2011 POSIX_V7_LP64_OFF64
[root@server4 getconf]# ln  POSIX_V6_LP64_OFF64 default
ln: 创建硬链接"default": 文件已存在
[root@server4 getconf]# ls -l
总用量 180
-rwxr-xr-x 3 root root 25536 11月  3 2011 default
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFFBIG
-rwxr-xr-x 3 root root 25536 11月  3 2011 POSIX_V6_LP64_OFF64
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFFBIG
-rwxr-xr-x 3 root root 25536 11月  3 2011 POSIX_V7_LP64_OFF64
[root@server4 getconf]# rm -f default 
[root@server4 getconf]# ls -l
总用量 152
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFFBIG
-rwxr-xr-x 2 root root 25536 11月  3 2011 POSIX_V6_LP64_OFF64
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFFBIG
-rwxr-xr-x 2 root root 25536 11月  3 2011 POSIX_V7_LP64_OFF64
[root@server4 getconf]# ln -s  POSIX_V6_LP64_OFF64 default
[root@server4 getconf]# ls -l
总用量 152
lrwxrwxrwx 1 root root    19  6月  5 15:25 default -> POSIX_V6_LP64_OFF64

-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V6_ILP32_OFFBIG
-rwxr-xr-x 2 root root 25536 11月  3 2011 POSIX_V6_LP64_OFF64
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFF32
-rwxr-xr-x 4 root root 23740 11月  3 2011 POSIX_V7_ILP32_OFFBIG
-rwxr-xr-x 2 root root 25536 11月  3 2011 POSIX_V7_LP64_OFF64
[root@server4 getconf]# getconf LONG_BIT
64
[root@server4 getconf]# 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
MySQL 8.0.34 64位的安装和配置教程如下: 1. 首先,从MySQL官网下载适合您服务器位数的安装包。您可以通过以下链接访问MySQL官网:https://www.mysql.com/downloads/ 2. 在Linux系统中,使用以下命令查看服务器位数:getconf LONG_BIT 3. 下载完安装包后,使用FTP工具将MySQL安装文件上传到服务器。 4. 修改并禁用SELinux功能。使用以下命令打开配置文件:vi /etc/selinux/config,并将SELINUX的修改为disabled。保存并退出配置文件后,执行以下命令以立即生效:setenforce 0 5. 检查系统是否自带mariadb并卸载(以防止MySQL与mariadb的文件冲突)。使用以下命令查询是否安装了mariadb:rpm -qa | grep mariadb。如果有安装mariadb,请使用以下命令进行卸载:rpm -e mariadb-libs-5.5.68-1.el7.x86_64 --nodeps 6. 将下载好的MySQL压缩包上传到服务器,并将其解压到/usr/local/目录下。您可以使用以下命令进行解压和重命名:tar -xvf mysql-8.0.34-linux-glibc2.12-x86_64.tar.xz -C /usr/local/,cd /usr/local/,mv mysql-8.0.34-linux-glibc2.12-x86_64 ./mysql 7. 进入mysql文件夹,并创建data和log目录(根据您的磁盘情况进行调整)。使用以下命令创建目录:cd mysql,mkdir data log,touch ./log/mysql.log 8. 创建MySQL用户和组,并修改权限。使用以下命令创建用户和组,并设置权限:groupadd mysql,useradd -g mysql mysql,chown -R mysql.mysql /usr/local/mysql 9. 创建并编辑my.cnf配置文件。使用以下命令创建并编辑文件:vi /etc/my.cnf 以上就是MySQL 8.0.34 64位的安装配置教程。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值