This article mainly gives some commonly used Linux configurations. The system version is based on CentOs6.3, for reviewing and learning by newcomers. Please correct me if I am inappropriate.
vmware tools installation
虚拟机--->安装vmware tools
将光盘内的文件VMwareTools-10.0.6-3595377.tar.gz拖到linux里
tar -xzvf VMwareTools-10.0.6-3595377.tar.gz
cd vmwaretools
sudo ./wmware-install.pl 然后就一直回车了
遇到:问gcc回车再输入no继续回车
1. Firewall
#启动/关闭/查询防火墙状态
service iptables start/stop/status
#配置文件vim /etc/sysconfig/iptables 开启8000端口 重启防火墙
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8000 -j ACCEPT
#命令行下执行,机器重启后失效
iptables -I INPUT -p tcp --dport 8000 -j ACCEPT
#查看防火墙是否开机启动
chkconfig iptables --list
#设置防火墙开机启动/开机不启动
chkconfig iptables on/off
2. Configure the local yum source
1.挂载光盘
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
2.让其他yum源失效
cd /etc/yum.repo.d
mv CentOS-Base.repo CentOS-Base.repo.bak
mv CentOS-Vault.repo CentOS-Vault.repo.bak
mv CentOS-Debuginfo.repo CentOS-Debuginfo.repo.bak
3.开启光盘yum源
vim CentOs-Media.repo
baseurl=file:///mnt/cdrom
enable=1
4.开机自动加载光盘
vim /etc/fstab
3. Configure the local yum source in the cluster
1.在集群中的一台机器上(mini4)配置好本地yum源
2.在mini4上启动http服务(yum -y install httpd, service httpd start)
3.将/mnt/cdrom软链接到/var/www/html目录下
cd /var/www/html
ln -s /mnt/cdrom ./centos
4.在集群中的其他机器上配置yum源
cd /etc/yum.repo.d
mv CentOS-Base.repo CentOS-Base.repo.bak
mv CentOS-Vault.repo CentOS-Vault.repo.bak
mv CentOS-Debuginfo.repo CentOS-Debuginfo.repo.bak
mv CentOS-Media.repo CentOS-Media.repo.bak
cp CentOS-Media.repo.bak CentOS-mini4.repo
vim CentOs-mini4.repo
5.验证设置是否成功
yum repolist
4. SecureCRT upload and download
yum -y install lrzsz
Upload (windows to linux)
直接从window拖到linux上,选择Zmodem
Download (linux to windows download to the default location set by SecureCRT)
sz filename
5. JDK installation
1.解压
tar -zxvf jdk-7u45-linux-x64.tar.gz -C /usr/local
2.配置环境变量
vim /etc/profile
export JAVA_HOME=/usr/local/jdk1.7.0_45
export PATH=$PATH:$JAVA_HOME/bin
3.保存后加载
source /etc/profile
6. Modify the mapping relationship between ip address and host name
vim /etc/hosts
192.168.25.13 mini1
192.168.25.14 mini2
Author: py xiaojie
Blog address: http://www.cnblogs.com/52mm/
The copyright of this article belongs to the author and the blog garden. Reprints are welcome, but this statement must be retained without the author's consent, and a link to the original text is given in an obvious position on the article page.