The IBM LinuxONE is a family of servers built to host enterprise Linux applications. Its architecture, known as s390x (short term for 64-bit Z), is designed to pack more compute power into every CPU core (drive more processing with fewer cores).
The IBM LinuxONE Community Cloud provides free access to developers, students, and entrepreneurs to virtual servers (e.g. RedHat, SUSE, Ubuntu) and services for testing and piloting emerging applications for evaluation purposes.
The LinuxONE is a service which provides virtual servers above a virtual machine (VM) manager called Hypervisor, running on IBM Z.
Yellowdog Linux: a RedHat-based old Linux distribution. The Yellowdog Updater, Modified (YUM) is a software-package manager under RedHat.
Register for LinuxONE:
visit the site: https://community.ibm.com/zsystems/l1cc/
select Try Linux Virtual Machines...
enter data; for EventCode enter IBMZXPLORE
press Submit
wait for email confirmation
service link: https://linuxone.cloud.marist.edu
alternative is the LinuxONE Community Cloud: https://developer.ibm.com/linuxone
sign in
Create an SSH key pair:
Virtual Servers tab
open personal menu and manage SSH key pairs
if you already have a key, import it, if not, create and save one (.pem file)
Create
Create a virtual server:
instance name has no spaces or special characters
RHEL with the highest version number (RedHat Enterprise Linux; other systems can be tried as well for fun)
select SSH key pair
Create
VM status phases: networking, spawning, active
Get full Windows username in Powershell:
start up Powershell
whoami
Get full path to .pem key pair:
Resolve-Path "path/to/.pem"
Note names:
vmServerIPAddress: look for it in the line of the virtual server
vmUsername: linux1
fullWindowsUserName: what the whoami shows
keyFileFullPath: the path what the Resolve-Path showed
Manage SSH key in Powershell:
icacls "keyFileFullPath" /reset
icacls "keyFileFullPath" /inheritance:r
icacls "keyFileFullPath" /grant:r "fullWindowsUserName:(R)"
Check rights on the SSH key pair:
the user must fit to fullWindowsUserName with R right: icacls "keyFileFullPath"
the key must be readable and starting with -----BEGIN RSA PRIVATE KEY-----: type "path\to\your-key-file.pem"
Connect to VM:
ssh -i "keyFileFullPath" linux1@vmServerIPAddress
Install nano small-text editor:
sudo yum install nano
Setup prompt (works on VM-level):
nano ~/.bashrc
modify or add new line: PS1="\e[92m\n\w>\e[0m "
save
exit nano
source ~/.bashrc
Setup compiler environment for C source files:
software builder from a configuration file: sudo yum install make
GNU C compiler: sudo yum install gcc
Most of the available commands are coming the UNIX ancestry therefore there are many similarities with the USS.
The Linux1 user reaches over the system, not just the home directory, but it is a non-root user (not an administrator).
Special codes in prompt pattern (escaped characters):
\u: username
\h: hostname
\H: full hostname
\w: full path
\W: working directory name
\t: actual time
\T: 12-hour time
\d: actual date
\!: number of command in history
\$: $ for normal user, # for root
\n: new line
\e[sxm: s: colour series number, x color number
\e[0m: reset color
Colour series codes:
3:basic, dark
4: background
9: bright
Colour codes:
1: red
2: green
3: white
4: blue
5: black
6: turquise
7: gray
Default prompt:
[\e[0m\u@\h \W]\$
In root:
bin: programs, binaries
etc: system-wide configuration files
home: user directories, e.g. /home/linux1
lib: shared code and kernel libraries
root: sysadmin files
usr: shared, read-only files
var: changing file e.g. logs, printer spools, caches
Install web server program:
yum search apache
sudo yum install httpd.s390x
Start Apache web server:
start: sudo apachectl start
set autostart: sudo systemctl enable httpd
show status: sudo apachectl status
Create homepage:
cd /var/www/htmlÂ
sudo nano index.html
fill the content
save, exit
ip addr
note enc1000/inet
Check firewall:
sudo iptables --list
Open port 80:
sudo iptables --insert INPUT --protocol tcp --dport 80 --jump ACCEPT
Check firewall:
sudo iptables --list
new ACCEPT line must be visible (tcp dpt:http, dpt = destination port)
Check homepage:
launch a browser
http://148.100.112.97
Check tcp log:
sudo tail -f /var/log/httpd/access_log
^C
EXAMPLE FOR UTILIZING AN OPEN SOURCE TETRIS: