DragonFlyBSD 4.0.1 and VirtualBox Bridge

After success configure teamviewer 10 on my peppermint os 5 I continue with Virtualbox. No problem here and I can get virtualbox running. Another task I try to accomplish is testing newest DragonFlyBSD (its 4.0.1) that only available in 64 bit.

Everything is smooth except nat section on my virtualbox. I can not connect to internet but I can ping to host.

Being curious I decide to test ‘bridge’ connection via wireless connection.

bridge_virtualbox_dragonflybsd

I activate portable hotspot using my Xiaomi Red 1s .

Checking ip address of host

$ ifconfig wlan0

wlan0 Link encap:Ethernet HWaddr 38:b1:db:ec:d1:a1
inet addr:192.168.43.94 Bcast:192.168.43.255 Mask:255.255.255.0
inet6 addr: fe80::3ab1:dbff:feec:d1a1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8786 errors:0 dropped:0 overruns:0 frame:5364
TX packets:9104 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4774804 (4.7 MB) TX bytes:2067642 (2.0 MB)
Interrupt:18

Well, I can use 192.168.43.95 as ip address.

For gateway find it out by trace route

$ traceroute yahoo.com
traceroute to yahoo.com (98.138.253.109), 30 hops max, 60 byte packets
1 192.168.43.1 (192.168.43.1) 3.269 ms 4.229 ms 5.127 ms
2 * * *
3 * * *
4 * * *
^C

Great. Gateway located in 192.168.43.1

Last information needed for my dragonflybsd is nameserver.

I use google dns (8.8.8.8) for that purpose.

Lets configure Ip address on dragonlybsd 4.0.1 box

# ifconfig em0 inet 192.168.43.95/24

# route add default 192.168.43.1

# echo 'nameserver    8.8.8.8' > /etc/resolv.conf

Done.

Last step is configure sshd_config for allow ssh access as I do previously.

Try ssh now from my linux box.

$ ssh alam@192.168.43.95
The authenticity of host ‘192.168.43.95 (192.168.43.95)’ can’t be established.
ECDSA key fingerprint is b0:7e:40:28:5a:d6:10:e0:7f:f7:58:a6:30:21:47:47.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘192.168.43.95’ (ECDSA) to the list of known hosts.
alam@192.168.43.95’s password:
Last login: Fri Jan 2 11:26:41 2015
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
The Regents of the University of California. All rights reserved.

DragonFly v4.0.0.32.gce3e27-RELEASE (X86_64_GENERIC) #25: Mon Nov 24 20:15:26 PST 2014

Welcome to DragonFly!

dports/net/netcat package is useful not only for redirecting input/output
to TCP or UDP connections, but also for proxying them. See inetd(8) for
details.
>

Great.

uname -a

DragonFly 4.0-RELEASE DragonFly v4.0.0.32.gce3e27-RELEASE #25: Mon Nov 24 20:15:26 PST 2014 root@pkgbox64.dragonflybsd.org:/usr/obj/build/home/justin/src/sys/X86_64_GENERIC x86_64

top

load averages: 0.00, 0.00, 0.00; up 0+00:27:33 11:53:20
21 processes: 1 running, 21 active
CPU states: 0.0% user, 0.0% nice, 4.1% system, 0.0% interrupt, 95.8% idle
Memory: 12M Active, 2252K Inact, 137M Wired, 105M Buf, 1798M Free
Swap: 4096M Total, 4096M Free

PID USERNAME NICE SIZE RES STATE CPU TIME CTIME CPU COMMAND
1080 alam 0 14M 2196K CPU0 0 0:00 0:00 0.10% top
1002 root 0 15M 2904K ttyin 1 0:00 0:00 0.00% csh
867 root 0 18M 3592K kqread 0 0:00 0:00 0.00% sendmail
979 alam 0 15M 2916K pause 0 0:00 0:00 0.00% tcsh
971 root 0 38M 1796K wait 1 0:00 0:00 0.00% login
1074 alam 0 15M 2888K pause 0 0:00 0:00 0.00% tcsh
1071 root 0 30M 4156K kqread 0 0:00 0:00 0.00% sshd
999 alam 0 38M 1912K wait 1 0:00 0:00 0.00% su
518 root 0 6532K 1148K kqread 0 0:00 0:00 0.00% syslogd
870 smmsp 0 17M 3404K pause 1 0:00 0:00 0.00% sendmail
977 root 0 6900K 1308K ttyin 1 0:00 0:00 0.00% getty
974 root 0 6900K 1308K ttyin 0 0:00 0:00 0.00% getty
894 root 0 9528K 1236K nanslp 1 0:00 0:00 0.00% cron
975 root 0 6900K 1308K ttyin 1 0:00 0:00 0.00% getty
976 root 0 6900K 1308K ttyin 0 0:00 0:00 0.00% getty
973 root 0 6900K 1308K ttyin 1 0:00 0:00 0.00% getty
978 root 0 6900K 1308K ttyin 0 0:00 0:00 0.00% getty
972 root 0 6900K 1308K ttyin 0 0:00 0:00 0.00% getty
1073 alam 0 30M 2740K kqread 1 0:00 0:00 0.00% sshd
853 root 0 27M 1592K kqread 0 0:00 0:00 0.00% sshd
452 root 0 5928K 628K kqread 0 0:00 0:00 0.00% devd

df

df -H

Filesystem Size Used Avail Capacity Mounted on
ROOT 80G 1.2G 79G 1% /
devfs 1.0k 1.0k 0B 100% /dev
/dev/serno/VB1831c6f3-9ab76793.s1a 793M 122M 608M 17% /boot
/pfs/@@-1:00001 80G 1.2G 79G 1% /var
/pfs/@@-1:00002 80G 1.2G 79G 1% /tmp
/pfs/@@-1:00003 80G 1.2G 79G 1% /usr
/pfs/@@-1:00004 80G 1.2G 79G 1% /home
/pfs/@@-1:00005 80G 1.2G 79G 1% /usr/obj
/pfs/@@-1:00006 80G 1.2G 79G 1% /var/crash
/pfs/@@-1:00007 80G 1.2G 79G 1% /var/tmp
procfs 4.1k 4.1k 0B 100% /proc

fstab

cat /etc/fstab

# Device Mountpoint FStype Options Dump Pass#
/dev/serno/VB1831c6f3-9ab76793.s1a /boot ufs rw 1 1
/dev/serno/VB1831c6f3-9ab76793.s1b none swap sw 0 0
/dev/serno/VB1831c6f3-9ab76793.s1d / hammer rw 1 1
/pfs/var /var null rw 0 0
/pfs/tmp /tmp null rw 0 0
/pfs/usr /usr null rw 0 0
/pfs/home /home null rw 0 0
/pfs/usr.obj /usr/obj null rw 0 0
/pfs/var.crash /var/crash null rw 0 0
/pfs/var.tmp /var/tmp null rw 0 0
proc /proc procfs rw 0 0

gcc version

gcc -v
Using built-in specs.
COLLECT_GCC=/usr/libexec/gcc47/gcc
Target: x86_64-pc-dragonflybsd
Configured with: DragonFly/x86_64 system compiler (c, c++, objc, LTO)
Thread model: posix
gcc version 4.7.4 [DragonFly] Release/2014-06-12

Check CPU information

sysctl -a | egrep -i 'hw.machine|hw.model|hw.ncpu'
hw.machine: x86_64
hw.model: Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz
hw.ncpu: 2
hw.machine_arch: x86_64

Wait.

To make configuration permanent (ip address)

Switch to root first before edit rc.conf (I already add alam user with group wheel)

# ee /etc/rc.conf

# Basic rc.conf, adjust according to your needs
#
nfs_reserved_port_only=”YES”
sshd_enable=”YES”
usbd_enable=”YES”
nfs_client_enable=”YES”
rpc_umntall_enable=”NO”
dumpdev=”/dev/serno/VB1831c6f3-9ab76793.s1b” # via installer configuration
ifconfig_em0=”DHCP” # via installer configuration
#add permanent ip address after comment ifconfig_em0 line

ifconfig_em0=”inet 192.168.43.95 netmask 255.255.255.0″
defaultrouter=”192.168.43.1

save the file by hit esc key and choose save option.

Next step is try hhvm on DragonFlyBSD :-)

Install TeamViewer 10 on Peppermint OS 5

My new laptop has arrived. Its a HP Pavilion Laptop Computer Silver plus 4GB more memory. I choose it over my old laptop that powered by Acer due its processor. 332 bit limitation force me to walk in place. Maximum 4GB memory limitation and unable to test server software that available in 64 bit. Lucky me that I still able to use cheap cloud provider that cost me $5/month that allow me to install many operating system as many as I want. Very helpful in many case but I still have problem when I have to show a demo server where no internet connection available.

I install Peppermint OS 5 for my new laptop. I choose it simply for the name and since this distro use Lubuntu that more familiar for me.

Installation is very smooth and my wife even like it. She want me to install it for her netbook (I’m in process download iso for 32 bit architecture).

During this holiday season a call is coming and I need to see client monitor. The answer is teamviewer and I decide to use latest version (teamviewer 10).

Here the steps for install teamviewer 10 on peppermint os 5 :

1. Download 64 bit version from here

$ wget -c http://download.teamviewer.com/download/teamviewer_amd64.deb

2. Install it from command line

Yes, if you use gui you’ll get this error screen

teamviewer10_peppermint errror when you choose 64 bit

Yes. lib32asound2 needed for installation. In fact I can’t find it in repository.

$ sudo dpkg -i teamviewer_10.0.36281_amd64.deb

[sudo] password for alamsyah:
Selecting previously unselected package teamviewer.
(Reading database … 186532 files and directories currently installed.)
Preparing to unpack teamviewer_10.0.36281_amd64.deb …
Unpacking teamviewer (10.0.36281) …
dpkg: dependency problems prevent configuration of teamviewer:
teamviewer depends on lib32asound2; however:
Package lib32asound2 is not installed.
teamviewer depends on ia32-libs; however:
Package ia32-libs is not installed.

dpkg: error processing package teamviewer (–install):
dependency problems – leaving unconfigured
Errors were encountered while processing:
teamviewer.

Check it

$ sudo dpkg --get-selections | grep teamviewer
teamviewer install

Yes, its installed.

Fix anything related.

$ sudo apt-get install -f
Reading package lists… Done
Building dependency tree
Reading state information… Done
Correcting dependencies… Done
The following packages were automatically installed and are no longer required:
lib32z1 libc6-i386
Use ‘apt-get autoremove’ to remove them.
The following packages will be REMOVED:
teamviewer
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 120 MB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.

Well. Looks like 64bit is not welcome at the moment.

I need 32/64 bit multi architecture.

$ wget -c http://download.teamviewer.com/download/teamviewer_i386.deb

Uninstall ‘half baked’ teamviewer I install previously.

$ sudo apt-get install -f
Reading package lists… Done
Building dependency tree
Reading state information… Done
Correcting dependencies… Done
The following packages were automatically installed and are no longer required:
lib32z1 libc6-i386
Use ‘apt-get autoremove’ to remove them.
The following packages will be REMOVED:
teamviewer
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 120 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database … 186778 files and directories currently installed.)
Removing teamviewer (10.0.36281) …

Back to install

$ sudo dpkg --add-architecture i386

$ sudo dpkg -i teamviewer_i386.deb
Selecting previously unselected package teamviewer.
(Reading database … 186532 files and directories currently installed.)
Preparing to unpack teamviewer_i386.deb …
Unpacking teamviewer (10.0.36281) …
dpkg: dependency problems prevent configuration of teamviewer:
teamviewer depends on libjpeg62.
teamviewer depends on libxtst6.

dpkg: error processing package teamviewer (–install):
dependency problems – leaving unconfigured
Errors were encountered while processing:
teamviewer

Ups, another dependency problem.

Let apt-get fix it.

$ sudo apt-get install -f
Reading package lists… Done
Building dependency tree
Reading state information… Done
Correcting dependencies… Done
The following packages were automatically installed and are no longer required:
lib32z1 libc6-i386
Use ‘apt-get autoremove’ to remove them.
The following extra packages will be installed:
libjpeg62:i386 libxtst6:i386
The following NEW packages will be installed:
libjpeg62:i386 libxtst6:i386
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 89,7 kB of archives.
After this operation, 266 kB of additional disk space will be used.
Do you want to continue? [Y/n] y

Get:1 http://id.archive.ubuntu.com/ubuntu/ trusty/main libjpeg62 i386 6b1-4ubuntu1 [75,8 kB]
Get:2 http://id.archive.ubuntu.com/ubuntu/ trusty/main libxtst6 i386 2:1.2.2-1 [13,8 kB]
Fetched 89,7 kB in 3s (29,1 kB/s)
Selecting previously unselected package libjpeg62:i386.
(Reading database … 186778 files and directories currently installed.)
Preparing to unpack …/libjpeg62_6b1-4ubuntu1_i386.deb …
Unpacking libjpeg62:i386 (6b1-4ubuntu1) …
Selecting previously unselected package libxtst6:i386.
Preparing to unpack …/libxtst6_2%3a1.2.2-1_i386.deb …
Unpacking libxtst6:i386 (2:1.2.2-1) …
Setting up libjpeg62:i386 (6b1-4ubuntu1) …
Setting up libxtst6:i386 (2:1.2.2-1) …
Setting up teamviewer (10.0.36281) …
Processing triggers for libc-bin (2.19-0ubuntu6.4) …

Try again

$ sudo dpkg -i teamviewer_i386.deb
(Reading database … 186787 files and directories currently installed.)
Preparing to unpack teamviewer_i386.deb …
Unpacking teamviewer (10.0.36281) over (10.0.36281) …
Setting up teamviewer (10.0.36281) …

Looks fine.

Access it from Menu -> Internet -> Team Viewer 10

teamviewer10 installed successfully on pepermintos 5 64 bit

Conclusion for Teamviewer 10 on Peppermint OS 5 64 bit is : use 32bit or you’ll get nothing :-)

Happy new year 2015 everyone.

Quick dns server for CentOS 7 minimal

Damn, this CentOS 7 minimal installation has taken my whole day. The last thing I want to try is dns server. Since I’ve working standard dns that use maradns under CentOS 5.10 then I’m going to try the steps here. Using CentOS 7.

# yum install gcc wget

# gcc -v

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure –prefix=/usr –mandir=/usr/share/man –infodir=/usr/share/info –with-bugurl=http://bugzilla.redhat.com/bugzilla –enable-bootstrap –enable-shared –enable-threads=posix –enable-checking=release –with-system-zlib –enable-__cxa_atexit –disable-libunwind-exceptions –enable-gnu-unique-object –enable-linker-build-id –with-linker-hash-style=gnu –enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto –enable-plugin –enable-initfini-array –disable-libgcj –with-isl=/builddir/build/BUILD/gcc-4.8.2-20140120/obj-x86_64-redhat-linux/isl-install –with-cloog=/builddir/build/BUILD/gcc-4.8.2-20140120/obj-x86_64-redhat-linux/cloog-install –enable-gnu-indirect-function –with-tune=generic –with-arch_32=x86-64 –build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC)

Download latest MaraDNS Source Code

# wget -c http://maradns.samiam.org/download/2.0/2.0.09/maradns-2.0.09.tar.bz2

# tar xvjf maradns-2.0.09.tar.bz2
tar (child): bzip2: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

Ups CentOS 7 minimal install not install bzip2

# yum install bzip2

Re extract

# tar xvjf maradns-2.0.09.tar.bz2

# cd maradns-2.0.09

# make

# make install

VERSION=2.0.09 ./build/install.sh
Installing MaraDNS, placing programs in /usr/local//bin/ and /usr/local//sbin/,
man pages in /usr/local//share/man/man1, /usr/local//share/man/man5,
and /usr/local//share/man/man8, and documents in /usr/local//doc/maradns-2.0.09
Adding MaraDNS startup scripts
Starting up MaraDNS at runlevel 3
starting up MaraDNS at runlevel 5

Start MaraDNS

# service maradns start
Starting all maradns processes
Starting maradns process which uses Mararc file /etc/mararc

Check it

# ps ax | grep mara
19635 pts/0    S      0:00 /usr/local/bin/duende /usr/local/sbin/maradns -f /etc/mararc
19636 pts/0    S      0:00 /usr/local/sbin/maradns -f /etc/mararc
19637 pts/0    S      0:00 /usr/local/bin/duende /usr/local/sbin/maradns -f /etc/mararc

# nano /etc/mararc

looking for ipv4_bind_address line and change it into :

ipv4_bind_addresses = “192.168.1.88, 127.0.0.1”

My lan ip address is 192.168.1.88

# chkconfig maradns on

Edit test dns zone file

# nano /etc/maradns/db.example.net

test.example.net.      +14400    soa    ns1.example.net. dns@example.net. 2012010117 14400 3600 604800 14400 ~
example.net.      +14400    ns     ns1.example.net. ~
example.net.      +14400    ns     ns2.example.net. ~
ns1.example.net.  +14400    a       192.168.1.88 ~
ns2.example.net.  +14400    a       192.168.1.88 ~
example.net.      +14400    a       127.0.0.1 ~
www.example.net.  +14400    a       127.0.0.1 ~
example.net.      +14400    mx     10 mail.example.net. ~
test.example.net. +14400    a       192.168.1.88 ~

save the file.

Restart maradns service

# service maradns restart

Sending all MaraDNS processes the TERM signal
waiting 1 second
Sending all MaraDNS processes the KILL signal
MaraDNS should have been stopped
Starting all maradns processes
Starting maradns process which uses Mararc file /etc/mararc

Testing using dig

# yum install bind-utils

# dig @192.168.1.88 test.example.net

; <<>> DiG 9.9.4-RedHat-9.9.4-14.el7 <<>> @192.168.1.88 test.example.net
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10783
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;test.example.net.        IN    A

;; ANSWER SECTION:
test.example.net.    14400    IN    A    192.168.1.88

;; AUTHORITY SECTION:
example.net.        14400    IN    NS    ns1.example.net.
example.net.        14400    IN    NS    ns2.example.net.

;; ADDITIONAL SECTION:
ns1.example.net.    14400    IN    A    192.168.1.88
ns2.example.net.    14400    IN    A    192.168.1.88

;; Query time: 0 msec
;; SERVER: 192.168.1.88#53(192.168.1.88)
;; WHEN: Kam Des 11 15:04:23 WIB 2014
;; MSG SIZE  rcvd: 118

Testing from other user in local area network

$ dig @192.168.1.88 test.example.net

; <<>> DiG 9.9.5-3ubuntu0.1-Ubuntu <<>> @192.168.1.88 test.example.net
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached

Seem firewall block udp connection and port 53.

# firewall-cmd --permanent --add-port=53/udp

# systemctl restart firewalld.service

# service maradns restart

Re test resolver from LAN

$ dig @192.168.1.88 test.example.net

; <<>> DiG 9.9.5-3ubuntu0.1-Ubuntu <<>> @192.168.1.88 test.example.net
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4614
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;test.example.net.        IN    A

;; ANSWER SECTION:
test.example.net.    14400    IN    A    192.168.1.88

;; AUTHORITY SECTION:
example.net.        14400    IN    NS    ns1.example.net.
example.net.        14400    IN    NS    ns2.example.net.

;; ADDITIONAL SECTION:
ns1.example.net.    14400    IN    A    192.168.1.88
ns2.example.net.    14400    IN    A    192.168.1.88

;; Query time: 1 msec
;; SERVER: 192.168.1.88#53(192.168.1.88)
;; WHEN: Fri Dec 12 10:10:29 WIB 2014
;; MSG SIZE  rcvd: 118

Good, dns server work now for my CentOS 7 minimal installation :-)

How to install Apache, MariaDB and PHP on CentOS 7 minimal

After install and configure network under CentOS 7 minimal I continue with LAMP section. Since the machine has 4GB memory I prefer to use old fashion LAMP. Only switch MySQL with MariaDB :-)

The steps for LAMP installation for my own reference and my vps need :

Install required Package

Install nano

# yum install nano

Install Apache, PHP and MariaDB

# yum install httpd mariadb-server mariadb php php-mysql php-mysqli php-gd php-pear php-mbstring

Configure Apache

Start httpd

# systemctl start httpd.service

Set httpd to auto start after reboot or boot process

# systemctl enable httpd.service
ln -s ‘/usr/lib/systemd/system/httpd.service’ ‘/etc/systemd/system/multi-user.target.wants/httpd.service’

By default firewall will block access. To exclude http from firewall block :

# firewall-cmd --permanent --add-service http

# systemctl restart firewalld.service

Try visit ip address from browser

httpd_centos7

Configure MariaDB

Start mariadb

# systemctl start mariadb

Set mariadb to autostart

# systemctl enable mariadb.service
ln -s ‘/usr/lib/systemd/system/mariadb.service’ ‘/etc/systemd/system/multi-user.target.wants/mariadb.service’

Set password for mariadb, delete unnecessary database and users.

# mysql_secure_installation
/usr/bin/mysql_secure_installation: line 379: find_mysql_client: command not found

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we’ll need the current
password for the root user.  If you’ve just installed MariaDB, and
you haven’t set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on…

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
… Success!

By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
… Success!

Normally, root should only be allowed to connect from ‘localhost’.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
… Success!

By default, MariaDB comes with a database named ‘test’ that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
– Dropping test database…
… Success!
– Removing privileges on test database…
… Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
… Success!

Cleaning up…

All done!  If you’ve completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

I also need to enable firewall to exclude future database remote backup. Port 3306 is required to open.

# firewall-cmd --permanent --add-port=3306/tcp
success
# systemctl restart firewalld.service

Done.

Next step is measure time needed from start server to get login display and make my report.

IBM X3250 M5 and Minimal CentOS 7

New server come. Its a IBM X3250 M5 with single HD 1TB Sata 7200 RPM. I can not see it from bios setting, my FreeBSD 9.2 CD also unable to detect it but I’ve not try it using FreeBSD 10. As I ever see various case that related with storage detection then I quickly switch to CentOS.

My preference will be CentOS 5.xx version due to application requirement (php 5.2) but now its no longer relevance. I can use newest php version and I think CentOS 7 will be fit. It will overcome storage detection and perhaps I can learn new things.

Installation work smooth since I choose DVD version but I work with minimal installation. A few notes around Minimal CentOS 7 :

# cat /etc/redhat-release
CentOS Linux release 7.0.1406 (Core)

No ifconfig command in minimal CentOS 7

# ifconfig
bash: ifconfig: command not found

Ip addr to see all network setting

# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s26u1u2u5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
link/ether 6e:ae:8b:5a:68:67 brd ff:ff:ff:ff:ff:ff
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
link/ether 6c:ae:8b:5a:68:60 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.88/24 brd 192.168.1.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::6eae:8bff:fe5a:6860/64 scope link
valid_lft forever preferred_lft forever
4: eno1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN qlen 1000
link/ether 6c:ae:8b:5a:68:61 brd ff:ff:ff:ff:ff:ff

nmcli is new friend

# nmcli -p con
=============================================================================
NetworkManager connection profiles
=============================================================================
NAME           UUID                                  TYPE            DEVICE
—————————————————————————–
enp0s26u1u2u5  4ca8bc8e-74c5-4578-ab34-895c1c6cb7a1  802-3-ethernet  —
eno1           598b49c6-9adf-4fb7-96ee-22ebd2ee15bf  802-3-ethernet  —
eth0           2c0edb26-c2ad-42f5-80f3-3bd69b1e27e5  802-3-ethernet  eth0

Edit connection using nmtui

#nmtui

you’ll see screen like this

network manager TUI

more

edit network setting under nmtui

edit anything you want

complete network change using nmtui

The interface is pretty clear and enough for me but if really need ifconfig command

# yum install net-tools
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: kartolo.sby.datautama.net.id
* extras: kartolo.sby.datautama.net.id
* updates: kartolo.sby.datautama.net.id
Resolving Dependencies
–> Running transaction check
—> Package net-tools.x86_64 0:2.0-0.17.20131004git.el7 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
Package                               Arch                               Version                                                Repository                        Size
========================================================================================================================================================================
Installing:
net-tools                             x86_64                             2.0-0.17.20131004git.el7                               base                             304 k

Transaction Summary
========================================================================================================================================================================
Install  1 Package

Total download size: 304 k
Installed size: 917 k
Is this ok [y/d/N]: y

Downloading packages:
warning: /var/cache/yum/x86_64/7/base/packages/net-tools-2.0-0.17.20131004git.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY76 kB  00:00:00 ETA
Public key for net-tools-2.0-0.17.20131004git.el7.x86_64.rpm is not installed
net-tools-2.0-0.17.20131004git.el7.x86_64.rpm                                                                                                    | 304 kB  00:00:03
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Importing GPG key 0xF4A80EB5:
Userid     : “CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>”
Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
Package    : centos-release-7-0.1406.el7.centos.2.3.x86_64 (@anaconda)
From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : net-tools-2.0-0.17.20131004git.el7.x86_64                                                                                                            1/1
Verifying  : net-tools-2.0-0.17.20131004git.el7.x86_64                                                                                                            1/1

Installed:
net-tools.x86_64 0:2.0-0.17.20131004git.el7

Complete!

network scripts still there

# ls /etc/sysconfig/network-scripts/
ifcfg-eno1           ifdown       ifdown-ipv6  ifdown-routes    ifdown-tunnel  ifup-eth   ifup-plip   ifup-routes    ifup-tunnel        network-functions-ipv6
ifcfg-enp0s26u1u2u5  ifdown-bnep  ifdown-isdn  ifdown-sit       ifup           ifup-ippp  ifup-plusb  ifup-sit       ifup-wireless
ifcfg-eth0           ifdown-eth   ifdown-post  ifdown-Team      ifup-aliases   ifup-ipv6  ifup-post   ifup-Team      init.ipv6-global
ifcfg-lo             ifdown-ippp  ifdown-ppp   ifdown-TeamPort  ifup-bnep      ifup-isdn  ifup-ppp    ifup-TeamPort  network-functions

# cat ifcfg-eth0
TYPE=”Ethernet”
BOOTPROTO=”none”
DEFROUTE=”yes”
IPV4_FAILURE_FATAL=”no”
IPV6INIT=”yes”
IPV6_AUTOCONF=”yes”
IPV6_DEFROUTE=”yes”
IPV6_FAILURE_FATAL=”no”
NAME=”eth0″
UUID=”2c0edb26-c2ad-42f5-80f3-3bd69b1e27e5″
ONBOOT=”yes”
HWADDR=”6C:AE:8B:5A:68:60″
IPADDR0=”192.168.1.88″
PREFIX0=”24″
GATEWAY0=”192.168.1.1″
DNS1=”192.168.1.1″
DOMAIN=”google.com”
IPV6_PEERDNS=”yes”
IPV6_PEERROUTES=”yes”

Free memory before install LAMP

# free -m
total       used       free     shared    buffers     cached
Mem:          3629        534       3095          8          1        342
-/+ buffers/cache:        189       3439
Swap:         3855          0       3855

# df -H
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root   54G  1,1G   53G   2% /
devtmpfs                 1,9G     0  1,9G   0% /dev
tmpfs                    2,0G     0  2,0G   0% /dev/shm
tmpfs                    2,0G  9,0M  1,9G   1% /run
tmpfs                    2,0G     0  2,0G   0% /sys/fs/cgroup
/dev/sda2                521M   93M  429M  18% /boot
/dev/mapper/centos-home  942G   34M  942G   1% /home
/dev/sda1                210M   10M  200M   5% /boot/efi

So far its great :-)