Goals:
- 'Sharpen the saw' with regards to my hands-on skills to configure and maintain a Linux virtual machine.
- Create a pre-configured, reusable image, that I can use for future client engagements - and in preparation for some new product development I have planned for 2016.
- As a foundation master/controller for experimenting with Ansible and Docker.
1) Install VirtualBox (I'm using the current 5.0.10 release)
2) Download CentOS (I'm using version 7)
3) Create Your CentOS virtual machine
- For this experiment, I chose: CentOS-7-x86_64-Minimal-1503-01.iso
4) Update your packages
- >yum update
5) Modify Network Interface Config Files
- Locate the appropriate files in the /etc/sysconfig/network-scripts/ directory
- For my particular installation environment, this happened to be ifcfg-enp0s03
- Modify the following entries in the file to have these values:
- ONBOOT=yes
- BOOTPROTO=dhcp
- Restart network service
- >sudo systemctl restart network
- Verify that you have network access
- >ping -c 5 google.com
6) Configure NTP Synchronization
- Check your current system time configuration
- >sudo timedatectl
- Set your desired timezone, for example:
- >sudo timedatectl set-timezone America/Los_Angeles
- Install ntp
- >sudo yum install ntp
- Start and Enable the ntp service
- >sudo systemctl start ntpd
- >sudo systemctl enable ntpd
7) Install some networking tools...
- >sudo yum install net-tools
- >sudo yum install nmap
8) Enable Outside Access (e.g. from the Windows 7 machine that is running VirtualBox)
- To be able to access the CentOS virtual machine from the outside, you'll need to setup an and additional Network "Host-only Adapter"
9) Ansible install
- {TODO}
10) Java install
11) Go install
- These links explain how to install the official Oracle release...
- http://www.oracle.com/technetwork/java/javase/downloads/index.html
- http://tecadmin.net/install-java-8-on-centos-rhel-and-fedora/#
- For my current experimentation, I will try the following:
- >sudo yum install java-1.8.0-openjdk-devel.x86_64
- >sudo yum install golang
- currently appears to install v1.4
- {TODO}
- >sudo yum install git.x86_64
14) Connecting to a CentOS virtual machine with Eclipse
- Eclipse Mars RSE User Guide
- http://www.eclipse.org/tm/
- http://marketplace.eclipse.org/content/tm-terminal
- http://www.eclipse.org/tcf/
15) Install Apache Web Server (http)
- >sudo yum install htttpd
- >sudo service start httpd
- >sudo chkconfig httpd on
16) Enable Outside Access to Apache Web Server
- Configure firewall
- >sudo firewall-cmd --permanent --zone=public --add-service=http
- >sudo firewall-cmd --permanent --zone=public --add-service=https
- >sudo firewall-cmd --reload
- Configure iptables
- >sudo iptables -I INPUT -i eth1 -p tcp -m tcp --dport 80 -j ACCEPT
- To persist the changes, go to /etc/sysconfig/ - and add the following line to iptables
- "-A INPUT -i eth1 -p tcp -m tcp --dport 80 -j ACCEPT"
- >sudo service iptables restart
- >sudo service httpd restart
- https://www.centos.org/docs/5/html/5.1/Deployment_Guide/index.html
- https://www.centos.org/forums/index.php
- https://www.digitalocean.com/community/tutorials/initial-server-setup-with-centos-7
- https://www.digitalocean.com/community/tutorials/additional-recommended-steps-for-new-centos-7-servers
- https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-centos-6
- http://cyruslab.net/2014/07/11/installing-netstat-on-centos-7-minimal-installation/
- http://superuser.com/questions/696782/vm-running-centos-can-ping-but-cant-access-web-server
- http://stackoverflow.com/questions/27003677/accessing-a-centos-7-minimal-server-running-on-virtualbox-from-outside
- https://forums.virtualbox.org/
- http://stackoverflow.com/questions/27003677/accessing-a-centos-7-minimal-server-running-on-virtualbox-from-outside
- http://www.krizna.com/
You may also want to consider ordering a digital copy of this book:
No comments:
Post a Comment