#! /bin/bash #What I will do after a fresh copy of CENTOS 7 system is up. Ideally the script also applies to Rocks clusters. #========================================================== ## Run the script as su ### add default users ################ users=( \ edward \ pwkoh \ tminyang \ baharak \ khor \ mok \ yusuf \ tlyoon \ ) userss=$(echo ${users[*]}) for user in $userss do #echo $user useradd $user usermod -g users $user passwd $user chown -R $user:users /home/$user chmod -R 750 /home/$user done ### end add default users ################ #Preliminary #========== # specify user here. Modify as deemed neccesary for your case user=common # Alert sound effect off (done manually, optional) useradd $user usermod -g users $user passwd $user mkdir /home/$user/share mkdir /home/$user/share/apps mkdir /home/$user/share/apps/configrepo mkdir /home/$user/share/apps/local mkdir /home/$user/share/apps/local/bin mkdir /home/$user/share/apps/local/lib mkdir /home/$user/state mkdir /home/$user/state/partition1 cd / ln -s /home/$user/share . ln -s /home/$user/state . echo 'export PATH=/share/apps/local/bin:$PATH'>> /home/$user/.bashrc echo 'export LD_LIBRARY_PATH=/share/apps/local/lib:$LD_LIBRARY_PATH' >> /home/$user/.bashrc cd /share/apps/local/bin/ wget http://comsics.usm.my/tlyoon/configrepo/howto/customise_centos/check_pbs chmod +x check_pbs yum install -y epel-release yum install -y python-devel.x86_64 ##needed by lammps yum install -y seamonkey yum install -y libjpeg-turbo-devel.x86_64 yum groups mark convert yum groupinstall -y "Development Tools" yum install -y glib.x86_64 yum install -y vim yum install -y zlib-devel.x86_64 yum install -y python36 python36-devel.x86_64 python36-pip.noarch python34-pip.noarch python34-devel.x86_64 ### Install google chrome ### cd /share/apps/configrepo; wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm; yum install -y libappindicator-gtk3-devel.* # libappindicator-gtk3-devel.x86_6 yum install -y liberation-fonts.noarch yum -y install redhat-lsb libXScrnSaver rpm -ivh google-chrome-stable_current_x86_64.rpm chown -R $user:users /home/$user/share chown -R $user:users /home/$user/state chmod -R 755 /home/$user chmod -R 775 /home/$user/state chown -R root:users /share chown -R root:users /state chmod -R 755 /share chmod -R 775 /state