root超级用户:
ubuntu默认禁用掉了root超级用户,只能使用普通用户登陆,用sudo来操作命令
必须sudo passwd root 命令 来启动root超级用户
ubuntu默认 不能用root用户来ssh连接,需要修改ssh的配置文件
vim /etc/ssh/sshd_config
#PermitRootLogin without-password
PermitRootLogin yes
/etc/init.d/ssh restart
注释掉PermitRootLogin without-password,把PermitRootLogin 启用yes就可以啦。
Ubuntu ssh服务默认是不安装的:
ubuntu 网卡的操作命令:
vim /etc/network/interface
auto eno1
iface eno1 inet static
pre-up ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx #永久修改MAC地址
address 192.168.0.1
netmask 255.255.255.0
gateway 192.168.0.1
/etc/init.d/networking restart #重启网卡服务
ifconfig eno1 down/up #启动或关闭某个网卡
ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx #临时修改MAC地址
apt:
apt-get相当于redhat中的yum命令
可以在/etc/apt/sources.list
更改了/etc/apt/sources.list,要用apt-get update 更新index文件,更新的index文件在/var/lib/apt/lists
apt-get update 更新软件源,读取软件包列表
apt-get dist-upgrade 更新所有的软件版本
apt-get install
apt-cache search <包名> 查询可以安装的Packages
dpkg -S 查询已经安装的Packages 、 ubantu中默认包格式为dpkg包,安装dpkg包用dpkg -i 命令安装
由于种种原因,很多软件不能进入到官方的ubuntu软件仓库,PPA个人软件包集:允许用户建立自己的软件仓库,自由的上传软件。如果你在ubuntu官方仓库中没有找到,可以在PPA上找找
add-apt-repository ppa:user/ppa-name
apt-get update
然后发现在/var/lib/apt/lists/多了几个index文件,之前不能安装某个软件就是在ppa(add-apt-repository ppa:gstreamer-developers/ppa)上找的。
ubuntu 服务管理:
在ubuntu10.04之前的版本都是使用chkconfig来进行管理,之后的版本就没有了,如果还想继续使用chkconfig,只好自己apt-get install chkconfig下了
现在 ubuntu都是通过 sysv-rc-conf和updte-rc.d来管理服务的
添加一个服务
update-rc.d 服务名 defaults
删除一个服务
update-rc.d -f 服务名 remove
临时服务启动停止等
/etc/init.d/服务名 start/stop/restart
在ubuntu中安装rpm格式的包,怎么安装?
安装MegaCli-8.07.14-1.noarch.rpm
apt-get -y install rpm2cpio libsysfs2 libsysfs-dev
cd /lib/x86_64-linux-gnu
ln -s libsysfs.so.2.0.1 libsysfs.so2.0.2
rpm2cpio MegaCli-8.07.14-1.noarch.rpm | cpio -idmv
mkdir -p /opt/MegaRAID/MegaCli
cp ./opt/MegaRAID/MegaCli/MegaCli /opt/MegaRAID/MegaCli/
cp ./opt/MegaRAID/MegaCli/MegaCli64 /opt/MegaRAID/MegaCli/
cp ./opt/MegaRAID/MegaCli/libstorelibir-2.so.14.07-0 /opt/MegaRAID/MegaCli/
cp ./opt/MegaRAID/MegaCli/libstorelibir-2.so.14.07-0 /opt/MegaRAID/MegaCli/
然后就可以执行/opt/MegaRAID/MegaCli/MegaCli64 -LDinfo -Lall -aAll 命令了