Created
October 30, 2014 04:16
-
-
Save vuquangchien/e108ace75d5e1bb890db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--set static ip | |
DEVICE=eth0 | |
HWADDR=00:0C:29:2D:08:6D | |
TYPE=Ethernet | |
UUID=551f9054-0ded-4ff0-a77a-387effe5924b | |
ONBOOT=yes | |
NM_CONTROLLED=yes | |
BOOTPROTO=static | |
IPADDR=10.1.12.81 | |
NETMASK=255.255.255.0 | |
GATEWAY=10.1.12.1 | |
NAMESERVER=8.8.8.8 | |
NETWORKING=yes | |
HOSTNAME=node1.hadoop | |
## Configure DNS Server | |
# | |
# vi /etc/resolv.conf | |
nameserver 8.8.8.8 # Replace with your nameserver ip | |
nameserver 10.3.9.254 # Replace with your nameserver ip | |
--set proxy | |
export http_proxy=http://10.1.7.55:8080 | |
export no_proxy=localhost,127.0.0.1,.hadoop | |
--set proxy yum | |
vi /etc/yum.conf | |
proxy=http://10.1.7.55:8080 | |
--set hosts | |
vi /etc/hosts | |
ip hostname | |
10.1.12.71 ambari.hadoop | |
10.3.9.241 node1.hadoop | |
10.3.9.242 node2.hadoop | |
10.3.9.243 node3.hadoop | |
10.3.9.244 node4.hadoop | |
--copy ssh key from ambari to node | |
http://www.thegeekstuff.com/2008/11/3-steps-to-perform-ssh-login-without-password-using-ssh-keygen-ssh-copy-id/ | |
--update yum | |
yum update -y | |
--install ntp | |
yum install ntp | |
add ntp to check config : | |
chkconfig ntpd on | |
--disable iptables (ip4/ip6) | |
chkconfig iptables off | |
/etc/init.d/iptables stop | |
chkconfig ip6tables off | |
/etc/init.d/ip6tables stop | |
setenforce 0 | |
--disable selinux | |
setenforce 0 | |
vi /etc/selinux/config | |
# This file controls the state of SELinux on the system. | |
# SELINUX= can take one of these three values: | |
# enforcing - SELinux security policy is enforced. | |
# permissive - SELinux prints warnings instead of enforcing. | |
# disabled - SELinux is fully disabled. | |
SELINUX=disabled | |
# SELINUXTYPE= type of policy in use. Possible values are: | |
# targeted - Only targeted network daemons are protected. | |
# strict - Full SELinux protection. | |
SELINUXTYPE=targeted | |
-- Config performence | |
sysctl -w vm.swappiness=0 | |
------------------------------- | |
restart | |
------------------------------- | |
config hue | |
------------------------------- | |
reference: | |
https://ambari.apache.org/1.2.2/installing-hadoop-using-ambari/content/ambari-chap1.html | |
http://docs.hortonworks.com/HDPDocuments/HDP1/HDP-1.3.2/bk_installing_manually_book/content/rpm-chap-hue-1.html | |
# Shrink /home partition | |
df -h | |
umount /dev/mapper/vg_xxx_home | |
e2fsck -f /dev/mapper/vg_xxx_home | |
resize2fs /dev/mapper/vg_xxx_home 5G | |
lvreduce -L 5G /dev/mapper/vg_xxx_home | |
mount /dev/mapper/vg_xxx_home /home | |
# Increase /root partition | |
df -h | |
lvextend -l 100%FREE /dev/mapper/vg_xxx_root | |
resize2fs /dev/mapper/vg_xxx_root | |
# Check again and reboot | |
df -h | |
sudo reboot | |
// add an resize disk | |
http://unix.stackexchange.com/questions/42857/how-to-extend-centos-5-partition-on-vmware | |
mount new partiation | |
# Format the hard drive | |
sudo mkfs -t ext4 /dev/vdb # create the filesystem as type ext4 | |
# Inspect the results | |
sudo parted -l | |
mount /dev/vdb /home |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment