1. Destkops
    1. Xfce
      1. # yum -y install epel-release gnome-classic-session control-center gnome-terminal nautilus-open-terminal liberation-mono-fonts && yum -y groupinstall "Xfce"
      2. # systemctl set-default graphical.target
      3. # reboot

  2. Remote Desktop Server
    1. Install Xfce Desktop (above)
    2. # yum install xrdp && systemctl enable xrdp && systemctl start xrdp && echo "xfce4-session" > ~/.Xclients && chmod a+x ~/.Xclients
    3. # firewall-cmd --zone=public --add-port=3389/tcp --permanent && firewall-cmd --reload
    4. Access email server with Windows/Linux Remote Desktop Client, and accept default configuratioin

  3. VNC Server
    1. Install Desktop (above)
    2. # yum install tigervnc-server tigervnc-server-minimal
    3. # cp -p /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service
    4. # perl -pi -e 's/^User=<USER>/User=root/g; s/=\/home\/<USER>/=\/root/g; s/^ExecStart=.*/ExecStart=\/sbin\/runuser -l root -c "\/usr\/bin\/vncserver %i -geometry 1280x800"/g' /etc/systemd/system/vncserver@:1.service
    5. # systemctl daemon-reload
    6. # mkdir ~/.vnc
    7. # printf '%s\n\n%s\n%s\n%s\n' '#!/bin/sh' 'unset SESSION_MANAGER' 'unset DBUS_SESSION_BUS_ADDRESS' 'exec /bin/sh /etc/xdg/xfce4/xinitrc' > ~/.vnc/xstartup
    8. # chmod ugo+x ~/.vnc/xstartup
    9. # vncpasswd
    10. # systemctl enable vncserver@:1.service
    11. # systemctl start vncserver@:1.service
    12. # firewall-cmd --zone=public --add-port=5901/tcp --permanent
    13. # firewall-cmd --reload
    14. Access email server w/RealVNC vewier, TigerVNC viewer, or TightVNC viever

  4. Firewall
    1. vi firewall.sh (Edit)
    2.  #!/bin/sh
       # Open ports on firewall
       ports=(20 21 22 25 53 80 110 113 143 443 465 587 993 995 3306 3389 5901 5222 5223 7777 9090 9091)
       for index in ${!ports[*]}
       do
          echo -n "Opening tcp port: ${ports[$index]} : "
          tput setaf 2
          firewall-cmd --zone=public --add-port=${ports[$index]}/tcp --permanent
          tput sgr0
          if [ "${ports[$index]}" = "5222" ] || [ "${ports[$index]}" = "5223" ] || [ "${ports[$index]}" = "7777" ] || [ "${ports[$index]}" = "9090" ] || [ "${ports[$index]}" = "9091" ]
          then
             echo -n "Opening udp port: ${ports[$index]} : "
             tput setaf 2
             firewall-cmd --zone=public --add-port=${ports[$index]}/udp --permanent
             tput sgr0
          fi
       done
       echo -n "Reload firewall settings : "
       tput setaf 2
       firewall-cmd --reload
       tput sgr0
      
  5. Openfire Collaboration
    1. # yum -y install java-1.7.0-openjdk libstdc++
    2. # wget -O openfire-*.rpm http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire-*.rpm
    3. # yum -y localinstall openfire-*.rpm
    4. Open firewall
    5.  #!/bin/sh
      
       for port in 5222 5223 7070 7443 5269 5275 5276 5262 5263 9090 9091 7777 5229
       do
          echo -n "Opening port: $port : "
          tput setaf 2
          firewall-cmd --zone=public --add-port=$port/tcp --permanent
          tput sgr0
       done
       firewall-cmd --reload
      
    6. Access and configure Openfire in browser
      1. http://your.im.server:9090/
      2. Download Spark collaboration client http://www.igniterealtime.org/downloads/index.jsp
    7. Migration
      1. On new server
      2. Download and install (above) lastest openfire version
      3. # systemctl stop openfire
      4. # rm -rf /opt/openfire
      5. On old server
      6. Download and update to the latest openfire version, and copy database to new server
      7. # systemctl stop openfire
      8. # scp -rp /opt/openfire root@ip.of.new.server:/opt
      9. Back on new server
      10. # systemctl start openfire
      11. # systemctl enable openfire
      12. # chmod -R daemon:daemon /opt/openfire (If openfire won't start)

  6. AWS cloud backup
    1. # yum install awscli awstats
    2. # aws configure
    3. # aws s3 mb s3://my-bucket --region us-west-1
    4. # aws s3 sync /home/vpopmail/domains/mydomain.com s3://my-bucket/mydomain.com

  7. Run level 3 (CentOS 7)
    1. # systemctl get-default
    2.     runlevel5.target
      
    3. # systemctl list-units --type=target
    4.     UNIT                LOAD   ACTIVE SUB    DESCRIPTION
          basic.target        loaded active active Basic System
          cryptsetup.target   loaded active active Encrypted Volumes
          getty.target        loaded active active Login Prompts
          graphical.target    loaded active active Graphical Interface
          local-fs-pre.target loaded active active Local File Systems (Pre)
          local-fs.target     loaded active active Local File Systems
          multi-user.target   loaded active active Multi-User System
          network.target      loaded active active Network
          nfs.target          loaded active active Network File System Server
          paths.target        loaded active active Paths
          remote-fs.target    loaded active active Remote File Systems
          slices.target       loaded active active Slices
          sockets.target      loaded active active Sockets
          swap.target         loaded active active Swap
          sysinit.target      loaded active active System Initialization
          timers.target       loaded active active Timers
      
          LOAD   = Reflects whether the unit definition was properly loaded.
          ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
          SUB    = The low-level unit activation state, values depend on unit type.
      
    5. # systemctl set-default multi-user.target
    6. # systemctl get-default
    7.     multi-user.target
      
    8. # reboot