分享好友 系统运维首页 频道列表

小白的linux笔记1:CentOS 8 安装与设置

Centos  2023-02-09 23:080

为了在服务器上跑爬虫,以及学SegNet,研究了一圈看来linux是必学品了。在自己电脑上安装了一个

1。官网下载iso,一个linux dvd是稳定版,选之,另一个stream版是更新更快的测试版,里面软件更新。

https://www.centos.org/download/

2。刻u盘,用Win32 Disk Imager,https://sourceforge.net/projects/win32diskimager/,直接写入iso即可(默认只有img,选所有文件类型)。不用读取,读取是把u盘内容写入iso。第一次就傻逼先读取了。

3。分区,安装过程中选标准分区方案。xfs性能好,vfat是windows可读。所以新建了一个/data挂载点用vfat。/home只能用linux分区,选了ext4。安装模式:工作站模式占空间最大,但功能完整适合初学者,选之。其他类型有精简,适合明确需求的场景比如做服务器。

vfat就是fat16。在linux下vfat分区中的中文文件名会乱码,需要重新挂载设置编码。

先查看所有分区信息,找到需要处理的分区名:fdisk -l。根据大小和分区格式可以判断是哪个分区,比如dev/sdc3。

取消挂载:umount dev/sdc3或者umount /data都可以。

重新挂载并设置编码:mount /dev/sdc3 /data -t vfat -o iocharset=utf8

后来发现,这样挂载的普通用户是无权访问的,那么要在挂载时加上这两个选项就可以了:mount -t vfat -o iocharset=utf8,uid=500,gid=500 /dev/sdc3 /data(500是需要读写该分区的普通用户的UID和GID)

再用UID为500的用户登录后测试发现在该FAT分区读写正常了。当然,如果你用/etc/fstab文件配置的话,直接在defaults后面加上,uid=500,gid=500就行了。https://www.linuxidc.com/Linux/2011-02/31919.htm

重启会失效,又会变成乱码,要重新挂载。

4。输入法,win+space切换,shift切中英文。尝试安装搜狗输入法,失败(nothing provides imsettings needed by fcitx-4.2.9.6-1.el7.x86_64),先用着自带的ibus吧不折腾了。屏幕显示可以200%放大。

5。文件管理,文件夹拖到左边,可以创建书签。

6。右键菜单没有新建文件选项,需在 主文件夹/模板 下启用命令行,输touch blank,以创建新文件模板。

7。增加源,wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo。安装ntfs-3g,yum -y install ntfs-3g。yum update一下。增加appstream阿里云源:https://blog.csdn.net/wohendatou/article/details/102028632。

8。安装python。yum install python36(或python2)。运行用python3命令。yum install python3-setuptools。yum install python3-pip。运行用pip3命令。pip 慢可以更换国内源:https://blog.csdn.net/yuzaipiaofei/article/details/80891108

9。设置***。参照https://www.wx-smile.com/128。一定要设置到全局那一步。如果要全局转发,要polipo,按照这个的方法安装:https://blog.csdn.net/weixin_37939964/article/details/78939914。https://johng.cn/linux-s hadows ocks-polipo-global-proxy/

10。shell输出翻页。后面加个more:yum list |more。

11。用readyshare共享。在路由开ftp端口,如21被占用,需要改端口转发为其他端口。http://www.xuexila.com/luyouqi/netgear/557969.html。

查看更多关于【Centos】的文章

展开全文
相关推荐
反对 0
举报 0
评论 0
图文资讯
热门推荐
优选好物
更多热点专题
更多推荐文章
centos6下同时安装python2和python3
#build-essential compile packagesyum groupinstall "Development Tools"yum install openssl-develyum install zlib-develyum install make gcc gcc-c++ kernel-develhttp://unix.stackexchange.com/questions/291737/zipimport-zipimporterror-cant-decomp

0评论2023-02-10677

CentOS下查看文件和文件夹大小 linux查看文件夹大小
当磁盘大小超过标准时会有报警提示,这时如果掌握df和du命令是非常明智的选择。  df可以查看一级文件夹大小、使用比例、档案系统及其挂入点,但对文件却无能为力。当磁盘大小超过标准时会有报警提示,这时如果掌握df和du命令是非常明智的选择。  df可以查

0评论2023-02-10731

centos7 rc.local脚本执行不成功
腾讯云 centos7   配置文件/etc/rc.local的内容如下:#!/bin/sh#secu_agent init monitor, install at Thu Aug 3 11:19:41 CST 2017/usr/local/sa/agent/init_check.sh/dev/null 21/usr/sbin/ntpdate ntpupdate.tencentyun.com /dev/null 21 /usr/local/qclo

0评论2023-02-10442

如何在centos7启动时自动挂载硬盘
在/etc/rc.local中加入如下的语句,这样就不用每次重启后手动挂载了(后面挂载的目录根据自己的需求而定):mount  /dev/sdb1 /usr/sharedfiles/sdbmount  /dev/sdc1 /usr/sharedfiles/sdcmount  /dev/sdb1 /root/sdbmount  /dev/sdc1 /root/sdc注意:可以

0评论2023-02-10535

centos7.2 开启防火墙
开启防火墙当我们修改了某些配置之后(尤其是配置文件的修改),firewall并不会立即生效。可以通过两种方式来激活最新配置 systemctl restart firewalld 和 firewall-cmd --reload 两种方式,前一种是重启firewalld服务,建议使用后一种“重载配置文件”

0评论2023-02-10997

CentOS7 安装 Python3.8后 pip 安装报错
[root@localhost Python-3.8.0]# pip install bs4Collecting bs4Using cached https://files.pythonhosted.org/packages/10/ed/7e8b97591f6f456174139ec089c769f89a94a1a4025fe967691de971f314/bs4-0.0.1.tar.gzERROR: Command errored out with exit status

0评论2023-02-10961

[转]How to install PHP 5.3 on CentOS
在DIAHosting买了一个VPS,自带PHP5.1.6.我想安装wordpress,但是由于版本比较新,要求PHP也要是5.2以上的,于是我就安装了PHP5.3.20--------------------------------------------------------------------------------------------------------------------

0评论2023-02-10997

外部访问docker内部容器centos的http服务
1.创建容器docker run -d -it -h dd -p 5000 --name bbbbb centosdd 是用户名 --name 后面是容器名字2.在我们开始安装Nginx及其他所需软件之前先安装一些前提软yum install python-setuptools yum -y install epel-release yum install python-pip pip instal

0评论2023-02-10480

Centos7安装yum命令 centos8如何安装yum
步骤如下http://mirrors.163.com/centos/7/os/x86_64/Packages/到上面这个网站去下载如下RPM包(为版本号,根据最新的自己替换即可)python-iniparse-.noarch.rpmyum-metadata-parser-.x86_64.rpmyum-.centos.noarch.rpmyum-plugin-fastestmirror-*.noarch.rp

0评论2023-02-10760

CentOS 7 - 安装Python 3
Enable Software Collections (SCL)Software Collections, also known as SCL is a community project that allows you to build, install, and use multiple versions of software on the same system, without affecting system default packages. By enabl

0评论2023-02-10592

centos清除历史命令
1、rm -f /root/.bash_profile  历史命令记录在此文件2、history -c   清除缓存会话退出后重新连接输入history可以看到历史命令清空了。两条命令的顺序不能乱

0评论2023-02-09473

更多推荐