OS First Start Configuration
Remote login & utilities
Sign in as root and run the following commands:
apt-get install mc apt-get install sudo apt-get install telnetd apt-get install screen
Using your favorite editor (eg. nano) allow remote login by root by editing following file:
nano /etc/ssh/sshd_config
and setting the PermitRootLogin value
# Authentication: LoginGraceTime 120 PermitRootLogin yes << this line is being modified StrictModes yes
Reload the service using
service ssh restart
File System Settings
Create following directories ...
mkdir /volumes cd /volumes mkdir vmod1 mkdir vmod2 mkdir data cd /mnt mkdir ramdisk
and create partitions on the RAID drive (where /dev/logical-Raid10-volume is an identification of the RAID drive created during RAID manager setup, usualy /dev/sda1)
fdisk /dev/logical-Raid10-volume
fdisk /dev/sda1 g (creates GPT partition) n (creates partition) - default (order number) - default (start of partition - 0) +950GB (size of the partition) g (creates GPT partition) n (creates partition) - default (order number) - default (start of partition) +950GB (size of the partition) g (creates GPT partition) n (creates partition) - default (order number) - default (start of partition) - default (end of partition) w (writes partition to drive)
Create filesystems on new partitions (where /dev/sdX is the identification of the RAID drive)
mkfs -t ext4 /dev/sdX1 mkfs -t ext4 /dev/sdX2 mkfs -t ext4 /dev/sdX3
Add following lines to /etc/fstab (last line creates a ramdisk)
/dev/sda1 /volumes/vmod1 ext4 defaults,noatime 0 2 /dev/sda2 /volumes/vmod2 ext4 defaults,noatime 0 2 /dev/sda3 /volumes/data ext4 defaults,noatime 0 2 tmpfs /mnt/ramdisk tmpfs nodev,nosuid,noexec,nodiratime,size=1G 0 0
Mount created partitions using ...
mount -a
User accounts unification
Execute following commands in order to change ID of user accounts:
usermod -u 7050 txpom groupmod -g 7050 txpom find / -user 1000 -exec chown -h 7050 {} \; find / -group 1000 -exec chgrp -h 7050 {} \;
And edit sudo configuration to allow root impersonation by user txpom
visudo
# User privilege specification root ALL=(ALL:ALL) ALL txpom ALL=(ALL:ALL) ALL << this line is being added
Network Configuration
Usually DHCP is used during the installation. In order to setup a static IP, one need to edit the file /etc/network/interfaces (remove default allow-hotplug and dhcp for eth0) and configure required values:
# The primary network interface auto eth0 iface eth0 inet static address 192.168.1.35 netmask 255.255.255.0 gateway 192.168.1.2
Restart the network interface using ...
ifdown eth0 ifup eth0
MySQL Installation
In order to install MySQL 5.7 version, one usually needs to configure the package repositories. This can be done automatically using the MySQL selection packages, which can be downloaded from:
wget http://dev.mysql.com/get/mysql-apt-config_0.6.0-1_all.deb wget http://ftp.ntu.edu.tw/pub/MySQL/Downloads/Connector-Python/mysql-connector-python_2.0.4-1debian7.6_all.deb
Install the packages and inside mysql-apt-config pick the preferred MySQL version (5.7):
dpkg -i mysql-apt-config_0.6.0-1_all.deb dpkg -i mysql-connector-python_2.0.4-1debian7.6_all.deb
Afterwards you may update repositories and install the MySQL:
apt-get update apt-get install mysql-server
Now you will stop the running MySQL service and move the data dir from default location to the RAID drive:
service mysql stop cp -prv /var/lib/mysql /volumes/data/
The data dir location is specified inside /etc/mysql/my.cnf (usually link file to /etc/mysql/mysql.conf.d/mysqld.cnf):
nano /etc/mysql/my.cnf
[mysqld] user = mysql << set this pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 << set this basedir = /usr << set this datadir = /volumes/data/mysql <<set this tmpdir = /tmp << set this lc-messages-dir = /usr/share/mysql << set this explicit_defaults_for_timestamp << set this max_heap_table_size = 16G << set this secure-file-priv = "" << set this bind-address = 0.0.0.0 <<set this
Now you may start MySQL and create default user accounts:
service mysql start mysql -u root -p SET GLOBAL default_password_lifetime = 0; CREATE USER 'convertor'@'localhost' IDENTIFIED BY 'DEFAULTPASSWORD'; GRANT ALL PRIVILEGES ON * . * TO 'convertor'@'localhost'; CREATE USER 'inflex'@'%' IDENTIFIED BY 'DEFAULTPASSWORD'; GRANT ALL PRIVILEGES ON * . * TO 'inflex'@'%'; CREATE USER 'poweranalyzer'@'%' IDENTIFIED BY 'DEFAULTPASSWORD'; GRANT ALL PRIVILEGES ON * . * TO 'poweranalyzer'@'%'; flush privileges;