Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Wednesday, July 13, 2016

Teamspeak Install/Setup Instructions

Teamspeak Install/Setup Instructions

For Ubuntu

  1. Install PUTTY or SSH utility (optional)
  2. Install VirtualBox
  3. Download latest server ISO from Ubuntu.
  4. Provision the Virtual Machine to match or exceed the recommendations for minimum system specifications
  5. Attach the ISO and install
    • use entire disk no LVM
    • install updates automatically
    • standard system utilities
    • OpenSSH (optional)
    • GRUB on boot is fine for dedicated VM
  6. Add port forwarding to your NAT
    • map a port for SSH
    • map a UDP port for client port 9987
  7. Install Guest Additions
    1. sudo mount -t iso9660 -o ro /dev/cdrom /media/cdrom
    2. cd /media/cdrom
    3. sudo apt-get -y install gcc make
    4. sudo ./VBoxLinuxAdditions.run
    5. sudo umount /media/cdrom
    6. sudo /sbin/shutdown -r now
  8. update os
    • sudo apt-get update
  9. clone vm so you don't need to install ubuntu again
    • setup a different host name for each full clone
    • setup a different port for openSSH so you can boot a few up at once
  10. start headless virtualbox instance
    • ssh with PuTTY or another tool
  11. install teamspeak-server
    1. Download from http://www.teamspeak.com/downloads
    2. Click the copy link
    3. wget and paste into putty
      wget pastedurlhere
    4. decompress the download
      tar -xvf somedownload.bz2
    5. start the server
      ./ts3server_startscript.sh start
    6. save off that screen that pops up it is important
      • sign in from the TeamSpeak client
      • add the network key from the screen that appeared
    7. set the teamspeak server to startup on server ``` crontab -e @reboot /path/to/decompressedlocation/ts3server_startscript.sh start

Sunday, July 10, 2016

Replacing MySQL with MariaDB

Get MariaDB SQL Up and Running

If you read the previous article you will see that we installed the LAMP stack as is. We are going to be removing the MySQL component today and replacing it with MariaDB.

Remove MySQL

  1. Start the server in headless mode
    • right click the context menu
    • choose start headless
  2. SSH into it
  3. See what is installed
    dpkg --get-selections | grep -v deinstall > installedFiles.txt
  4. Open the file
    ...
        mysql-client-5.7                                install
        mysql-client-core-5.7                           install
        mysql-common                                    install
        mysql-server                                    install
        mysql-server-5.7                                install
        mysql-server-core-5.7                           install
        mysql-client-5.7                                install
        mysql-client-core-5.7                           install
        mysql-common                                    install
    ...
  5. Remove these with apt-get remove
    • For the lazy and uncaring
         sudo apt-get remove  mysql* 
         sudo apt-get autoremove
  6. remove /etc/mysql
    • For the trusting and lazy (seriously be careful with any rm commands)
          sudo rm -Rf /etc/mysql
          sudo rm -Rf /var/lib/mysql
    • You might find more like:
      • /var/lib/mysql-5.7
      • /var/lib/mysql-files
      • /var/lib/mysql-keyrings
When that doesn't work
sudo service mysql stop  #or mysqld
sudo killall -9 mysql
sudo killall -9 mysqld
sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean
sudo deluser mysql
sudo rm -rf /var/lib/mysql
sudo apt-get purge mysql-server-core-5.5
sudo apt-get purge mysql-client-core-5.5
sudo rm -rf /var/log/mysql
sudo rm -rf /etc/mysql
http://stackoverflow.com/questions/10853004/removing-mysql-5-5-completely

Install MariaDB

sudo apt-get install --force-reinstall true mariadb-server
sudo mysql_secure_installation

Grant localhost

https://dev.mysql.com/doc/refman/5.5/en/adding-users.html

Fix the bind address

File:
/etc/mysql/mariadb.conf.d/50-server.cnf
Allow any do not do this in production or on an internet accessible machine:
bind-address:0.0.0.0

VirtualBox

  • map a port to connect
  • if you want it locked to your host you could put a host IP of 127.0.0.1

Thursday, July 7, 2016

Apache on Ubuntu inside of VirtualBox Headless

Ubuntu LAMP Headless

  1. Install PUTTY or SSH utility (optional)
  2. Install VirtualBox
  3. Download latest server ISO from Ubuntu.
  4. Provision the Virtual Machine to match or exceed the recommendations for minimum system specifications
  5. Attach the ISO and install
    • use entire disk no LVM
    • install updates automatically
    • standard system utilities
    • LAMP server
      1. Set a MySQL password
    • OpenSSH (optional)
    • GRUB on boot is fine for dedicated VM
  6. Add port forwarding to your NAT
    • map a port for SSH
    • map a port for Web Traffic
  7. Install Guest Additions
    1. sudo mount -t iso9660 -o ro /dev/cdrom /media/cdrom
    2. cd /media/cdrom
    3. sudo apt-get -y install gcc make
    4. sudo ./VBoxLinuxAdditions.run
    5. sudo umount /media/cdrom
    6. sudo /sbin/shutdown -r now
  8. start headless virtualbox instance
    • ssh with PuTTY or another tool
  9. Add Shared Directory for web
    1. create script to automap in /etc/init.d Sample Script:
      #!/bin/bash
      sudo mount -t vboxsf PublicWeb /var/www/html
      
    2. Make script executable
          sudo chmod +x /etc/init.d/mountVBoxDirectories.sh
    3. Update RC to run at start
          sudo update-rc.d mountVBoxDirectories.sh defaults