电商网站开发流程list,wordpress的用户注册,建立网站分为几阶段,怎么创建免费网站吗文章目录 一、Linux常见命令记录1. 为普通用户赋sudo权限2. Kylin系统yum配置以及使用2.1 Kylin操作系统yum源配置(本地yum源)2.1.1 .repo类型文件存在2.1.2 .repo类型文件不存在2.1.3 挂载OS镜像文件2.1.4 编辑local.repo文件#xff0c;创建yum源地址2.1.5使yum源生效 2.2 y… 文章目录 一、Linux常见命令记录1. 为普通用户赋sudo权限2. Kylin系统yum配置以及使用2.1 Kylin操作系统yum源配置(本地yum源)2.1.1 .repo类型文件存在2.1.2 .repo类型文件不存在2.1.3 挂载OS镜像文件2.1.4 编辑local.repo文件创建yum源地址2.1.5使yum源生效 2.2 yum命令2.2.1 使用yum命令只下载安装包而不安装安装包未安装2.2.2 使用yum命令只下载安装包而不安装安装包已安装 二、安装MySQL8常见问题1. libncurses.so.5: cannot open shared object file: No such file or directory2. libtinfo.so.5: cannot open shared object file: No such file or directory 三、安装Nginx常见问题1. configure: error: in ~/nginx/pcre-8.42:2. ./InstallNginx.sh:行102: make: 未找到命令3. pcrecpp.cc:43:10: 致命错误string没有那个文件或目录4. 以上问题离线解决 一、Linux常见命令记录
1. 为普通用户赋sudo权限
# 1. 登录root用户用以下命令打开sudo配置文件
visudo
# 2. 在文件中找到以下行
root ALL(ALL) ALL
# 3. 在此行下面新增需要创建用户的sudo权限
username ALL(ALL) ALL
# 4. 保存并关闭visudo配置文件linux在文档中查找某一关键字步骤为visudo - /root(回车键) - n(依次查找)
2. Kylin系统yum配置以及使用
2.1 Kylin操作系统yum源配置(本地yum源)
首先查看/etc/yum.repos.d/目录下是否存在.repo类型文件
2.1.1 .repo类型文件存在
查看yum源
ls /etc/yum.repos.d备份yum源
cd /etc/yum.repos.d mkdir bak mv *.repo bak2.1.2 .repo类型文件不存在
建目录创文件
mkdir yum.repos.d
touch local.repo2.1.3 挂载OS镜像文件
上传镜像文件至root根目录下挂载镜像
查看OS镜像对应的设备符号
ls /dev/sr*
# 此系统显示 dev/sr0将OS镜像文件挂载至/mnt目录下
mount /root/Kylin-Server-10-8.2-Release-Build09-20211104-X86_64.iso /mnt
# 返回 mount: /mnt: WARNING: source write-protected, mounted read-only 说明挂载成功执行以下命令查看挂载详情
# dev/sr0 与OS镜像文件的设备号保持一致
mount /dev/sr0 /mnt
df -h | grep /mnt
ls /mnt2.1.4 编辑local.repo文件创建yum源地址
在local.repo文件中添加如下内容
[local.repo]
namelocal.repo
baseurlfile:///mnt
enabled1
gpgcheck0附 其他yum依据操作系统版本精准匹配直接添加至local.repo 根据实际情况添加
[AppStream]
name Kylin AppStream
baseurl https://update.cs2c.com.cn/NS/V10/8U2/os/adv/lic/AppStream/$basearch/
gpgcheck 0
enabled 1[AppStream-updates]
name Kylin AppStream-updates
baseurl https://update.cs2c.com.cn/NS/V10/8U2/os/adv/lic/AppStream-updates/$basearch/
gpgcheck 0
enabled 1[BaseOS]
name Kylin BaseOS
baseurl https://update.cs2c.com.cn/NS/V10/8U2/os/adv/lic/BaseOS/$basearch/
gpgcheck 0
enabled 1[BaseOS-updates]
name BaseOS-updates
baseurl https://update.cs2c.com.cn/NS/V10/8U2/os/adv/lic/BaseOS-updates/$basearch/
gpgcheck 0
enabled 12.1.5使yum源生效
yum clean all
yum makecache
yum list2.2 yum命令
2.2.1 使用yum命令只下载安装包而不安装安装包未安装
sudo yum -y install --downloadonly --downloaddir/path/to/directory package-name命令解析
sudo: 以超级用户身份运行命令以便获得必要的权限。yum: 包管理器工具的名称用于管理和安装软件包。install: yum操作命令用于安装软件包。–downloadonly: 指定仅下载软件包而不进行安装。–downloaddir: 指定下载软件包的目标目录。将/path/to/directory替换为您要下载软件包的目标目录的路径。package-name: 指定要下载的软件包的名称。
2.2.2 使用yum命令只下载安装包而不安装安装包已安装
当安装包已安装的情况下上面的命令是不能下载安装包及相关依赖的此时就要用到下面这个命令
sudo yum reinstall --downloadonly --downloaddir/path/to/directory package-name命令解析
reinstall: yum操作命令用于重新安装软件包。
二、安装MySQL8常见问题
1. libncurses.so.5: cannot open shared object file: No such file or directory
问题描述
/home/zhh/app/mysql/bin/mysql: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory解决方法
# 查找是否含有libncurses.*文件
sudo find / -name libncurses.*
# 如果能查到相应文件
/usr/lib64/libncurses.so.6
/usr/lib64/libncurses.so.6.1# 执行以下命令解决此问题
cd /usr/lib64
sudo ln -s libncurses.so.6 libncurses.so.52. libtinfo.so.5: cannot open shared object file: No such file or directory
问题描述
/home/zhh/app/mysql/bin/mysql: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory解决方法
# 查找是否含有libtinfo.*文件
sudo find / -name libtinfo.*
# 如果能查到相应文件
/usr/lib64/libtinfo.so.6
/usr/lib64/libtinfo.so.6.1# 则执行下面命令解决此问题
cd /usr/lib64
sudo ln -s libtinfo.so.6 libtinfo.so.5三、安装Nginx常见问题
1. configure: error: in ~/nginx/pcre-8.42’:
问题描述
checking whether the C compiler works... no
configure: error: in ~/nginx/pcre-8.42:
configure: error: C compiler cannot create executables
See config.log for more detail# 日志文件config.log 中提示
gcc: error trying to exec as: execvp: No such file or directory
configure:3855: $? 1
configure:3893: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME PCRE
| #define PACKAGE_TARNAME pcre
| #define PACKAGE_VERSION 8.42
| #define PACKAGE_STRING PCRE 8.42
| #define PACKAGE_BUGREPORT
| #define PACKAGE_URL
| #define PACKAGE pcre
| #define VERSION 8.42
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }解决方法
# 下载安装binutils即可解决
sudo yum -y install binutils2. ./InstallNginx.sh:行102: make: 未找到命令
问题描述
---------------编译pcre-8.42
./InstallNginx.sh:行102: make: 未找到命令
xxxxxxxxxxxxxxxpcre-8.42编译失败解决方法安装make命令
sudo yum -y install make3. pcrecpp.cc:43:10: 致命错误string没有那个文件或目录
问题描述
pcrecpp.cc:43:10: 致命错误string没有那个文件或目录#include string^~~~~~~~
编译中断。
make[1]: *** [Makefile:2255libpcrecpp_la-pcrecpp.lo] 错误 1
make: *** [Makefile:1322all] 错误 2
xxxxxxxxxxxxxxxpcre-8.42编译失败解决方法gcc、g安装有问题重新安装
sudo yum -y install gcc
sudo yum -y install gcc-c4. 以上问题离线解决
找一个能下载安装包的服务器先将安装包以及依赖下载下来然后拿到需要的地方自己安装以安装gcc为例
下载安装包
sudo yum -y install --downloadonly --downloaddir/home/zhh/software/gcc gcc安装安装包
cd /home/zhh/software/gcc
sudo rpm -ivh *.rpm