1)CentOS虚拟机安装时提示无法找到硬盘虚拟机
有关虚拟硬盘的选择:
SCSI Adapter ---------------->LSI logic
或者在选择 virtual disk type 是选择IDE
2) insufficient memory to configure kdump
it doesn't matter 不必在意
3)centos6 root login
#vi /etc/pam.d/gdm and changed one line to :#auth required pam_succeed_if.so user != root quiet
#vi /etc/pam.d/gdm-passwd
4) 安装vmware tool
You must restart your X session before any mouse or graphics changes take effect.You can now run VMware Tools by invoking the following command:
"/usr/bin/vmware-toolbox" during an X server session.
To enable advanced X features (e.g., guest resolution fit, drag and drop, and
file and text copy/paste), you will need to do one (or more) of the following:
1. Manually start /usr/bin/vmware-user
2. Log out and log back into your desktop session; and,
3. Restart your X session.
To use the vmxnet driver, restart networking using the following commands:
/etc/init.d/network stop
5) 安装tftp 服务器和客户端
[root@wangxinyong ]# yum install -y tftp-server
root@wangxinyong] #yum install xinetd
[root@wangxinyong ]# cat /etc/xinetd.d/tftp
# description: The tftp server serves files using the trivial file transfer \
# protocol. The tftp protocol is often used to boot diskless \
# workstations, download configuration files to network-aware printers, \
# and to start the installation process for some operating systems.
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /var/lib/tftpboot --->/home/wang/tftpboot
disable = yes ----->no
per_source = 11
cps = 100 2
flags = IPv4
}
修改后重启服务
[root@wangxinyong ]#chkconfig tftp on
[root@wangxinyong ]
#chkconfig xinetd on
安装客户端
[root@wangxinyong wang]#yum install -y tftp
#tftp <your-ip-address>tftp>get <download file>
tftp>put <upload file>
tftp>q
出现错误时,执行一下
/sbin/chkconfig --level 345 xinetd on /sbin/chkconfig --level 345 tftp on,
然后执行:[root@wangxinyong wang]# vi /etc/sysconfig/selinux
SELINUX=disable,保存退出。
重新启动一下机器,不是注销应该可以解决问题了。
6)SELINUX
了解和配置 SELinux1. 获取当前 SELinux 运行状态
getenforce
可能返回结果有三种:Enforcing、Permissive 和 Disabled。Disabled 代表 SELinux 被禁用,Permissive 代表仅记录安全警告但不阻止可疑行为,Enforcing 代表记录警告且阻止可疑行为。
目前常见发行版中,RHEL 和 Fedora 默认设置为 Enforcing,其余的如 openSUSE 等为 Permissive。
2. 改变 SELinux 运行状态
setenforce [ Enforcing | Permissive | 1 | 0 ]
该命令可以立刻改变 SELinux 运行状态,在 Enforcing 和 Permissive 之间切换,结果保持至关机。一个典型的用途是看看到底是不是 SELinux 导致某个服务或者程序无法运行。若是在 setenforce 0 之后服务或者程序依然无法运行,那么就可以肯定不是 SELinux 导致的。
若是想要永久变更系统 SELinux 运行环境,可以通过更改配置文件 /etc/sysconfig/selinux 实现。注意当从 Disabled 切换到 Permissive 或者 Enforcing 模式后需要重启计算机并为整个文件系统重新创建安全标签(touch /.autorelabel && reboot)。
3. SELinux 运行策略
配置文件 /etc/sysconfig/selinux 还包含了 SELinux 运行策略的信息,通过改变变量 SELINUXTYPE 的值实现,该值有两种可能:targeted 代表仅针对预制的几种网络服务和访问请求使用 SELinux 保护,strict 代表所有网络服务和访问请求都要经过 SELinux。
RHEL 和 Fedora 默认设置为 targeted,包含了对几乎所有常见网络服务的 SELinux 策略配置,已经默认安装并且可以无需修改直接使用。
7) 在centos6上编译程序出现如下错误:
/usr/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
解决方法: yum install glibc-static
出现 error: lzo/lzo1x.h: No such file or directory
解决方法:yum install lzo lzo-devel
出现: error: uuid/uuid.h: No such file or directory
解决办法:yum install uuid uuid-devel
for switchfin next two step also need
1 mkdir /usr/include/uuid
2 cp /usr/include/uuid.h /usr/include/uuid/
出现:/usr/bin/ld: cannot find -luuid
collect2: ld returned 1 exit status
解决方法:yum install e2fsprogs-devel
#yum install libuuid libuuid-devel
8)安装samba服务器
01) 查看是否已安装所需软件包:
#rpm -qa | grep sambasamba-common-3.5.10-116.el6_2.i686
samba-winbind-clients-3.5.10-116.el6_2.i686
samba-3.5.10-116.el6_2.i686
samba-client-3.5.10-116.el6_2.i686
任何一个软件包缺少请安装。
02) 修改配置文件
#vi /etc/samba/smb.conf
增加以下几行
path = /opt/tomcat # 共享的目录
valid users = wang # 共享登陆用户
public = no
writable = yes # 是否允许写入
printable = no
create mask = 0765 # 新建文件目录的默认权限
#:wq
03)启用服务
#service smb start
顺便设置服务开机启动
#chkconfig smb on
如果启动服务后不能使用,请关闭防火墙。
#service iptables stop
04)测试服务
#testparm
05)添加samb用户
#smbpasswd -a wang
06)从windows中访问
\\192.168.1.xx
输入用户名和密码
OK