Installation and config steps
- Right click on the server click on new VM
- Select your preferred configuration
- Attach installation iso (e.g. Ubuntu 16.04 x64.iso)
- Start the VM
- If you face the error after creating a VM, that it cannot boot any ISO or CD Image to install your system, probably the boot order is not correctly set.
- Login to XenServer with secure shell
- Find the VM uuid by
xe vm-list
- Check the boot parameter first by
xe vm-param-list uuid=<vm-uuid> |grep HVM-boot
- Set the boot order by
xe vm-param-set uuid=<vm-uuid> HVM-boot-policy=BIOS\ order HVM-boot-params:order=dc
- Proceed the Installation process
- Configure apt:
sudo vim /etc/apt/apt.conf
Acquire::http::proxy "http://user:pass@proxy:port";
Acquire::https::proxy "https://user:pass@proxy:port";
- If you have configured local repository, you can add its address as the proxy.
- Configure network:
$ sudo apt-get purge network-manager
$ sudo vim /etc/network/interfaces
# E.g.
auto eth0
iface eth0 inet static
address 192.168.2.200
netmask 255.255.255.0
gateway 192.168.2.193
dns-nameserver 10.0.10.9 10.0.10.8
$ sudo ifup eth0
$ sudo ifdown eth0
$ sudo ifup eth0
- Attach xen-tools.iso to the VM
$ sudo mount /dev/sr0 /media
$ sudo /media/Linux/install.sh
- Reboot VM
$ sudo apt-get update
- Install a good editor with
sudo apt-get install vim
- Install ssh server with
sudo apt-get install openssh-server
- Install Java with
sudo apt-get install openjdk-8-jdk
- Install git with
sudo apt-get install git
- Install maven with
sudo apt-get install maven
- Install axel with
sudo apt-get install axel
- Install gradle with
sudo apt-get install gradle
- Install npm with
sudo apt-get install npm
- Install bower with
sudo npm install -g bower
- Put these useful aliases in .bashrc
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias ls='ls --color'
alias c='clear'
alias cd..='cd ..'
alias ..='cd ..'
alias ...='cd ../../../'
alias ....='cd ../../../../'
alias .....='cd ../../../../../'
alias .2='cd ../../'
alias .3='cd ../../../'
alias .4='cd ../../../../'
alias .5='cd ../../../../..'
alias mkdir='mkdir -pv'
alias diff='colordiff'
alias h='history'
alias histg="history | grep"
alias now='date +"%T"'
alias nowtime=now
alias nowdate='date +"%d-%m-%Y"'
alias vi='vim'
alias svi='sudo vi'
alias vis='vim "+set si"'
alias edit='vim'
alias ports='netstat -tulanp'
alias su='sudo -i'
alias reboot='sudo /sbin/reboot'
alias poweroff='sudo /sbin/poweroff'
alias halt='sudo /sbin/halt'
alias shutdown='sudo /sbin/shutdown'
alias meminfo='free -m -l -t'
alias psmem='ps auxf | sort -nr -k 4'
alias psmem10='ps auxf | sort -nr -k 4 | head -10'
alias pscpu='ps auxf | sort -nr -k 3'
alias pscpu10='ps auxf | sort -nr -k 3 | head -10'
alias gpumeminfo='grep -i --color memory /var/log/Xorg.0.log'
alias wget='wget -c'
alias df="df -Tha --total"
alias psg="ps aux | grep -v grep | grep -i -e VSZ -e"
alias top="htop"
alias myip="curl http://ipecho.net/plain; echo"
alias DU="du --max-depth=1 -B M |sort -rn"
alias filecount="find . -type f 2> /dev/null | wc -l"
alias make='make -j8'
alias my-sbatch-report='sacct -aX -o jobid,jobname%36,NNodes,NCPUS,start,elapsed,state -u sojoodi'
alias sbatch-report='sacct -aX -o jobid,jobname%36,NNodes,NCPUS,start,elapsed,state'
- Create multiple users
- Open a terminal and type:
vim /tmp/name
to create a file and the names of the users. e.g:
$ cat /tmp/name
kalam
havij
etc
- Create User with Home Dir and default shell:
for i in `cat /tmp/name`; do useradd -m -d /home/$i -s /bin/bash $i; done
- Create password for each user:
for i in cat /tmp/name; do passwd $i; done
- Configure remote desktop connection
sudo apt-get install xfce4 xrdp
sudo apt-get install xfce4-terminal
sudo apt-get install gnome-icon-theme-full tango-icon-theme
echo xfce4-session >~/.xsession
- Put this line instead of the last line in this file
/etc/xrdp/startwm.sh
:
startxfce4
sudo service xrdp restart
- To make your prompt status look nicer, put this line in
.bashrc
:
export PS1="\[\033]0;$TITLEPREFIX:$PWD\007\]\n\[\033[32m\]\u@\h \[\033[35m\]$MSYSTEM \[\033[33m\]\w\[\033[36m\]\[\033[0m\]\n$ "