Wednesday, August 5, 2015

Generating a maven project

mvn archetype:generate -B  -DarchetypeGroupId=pl.org.miki -DarchetypeArtifactId=java8-quickstart-archetype -DarchetypeVersion=1.0.0  -DgroupId=com.e2empire.palpatine -DartifactId=palpatine-client -Dversion=0.0.1-SNAPSHOT -Dpackage=com.e2empire.palpatine.client  -DcompilerMode=simple  -DtestLibrary=junit

Wednesday, December 25, 2013

Install the epel repo

# wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
# rpm -Uvh epel-release-5*.rpm

install ntp service to keep time and date synchronized

# yum install ntp
# chkconfig ntpd on
# ntpdate pool.ntp.org
# service ntpd on
# hwclock --systohc

disable ssh root access on CentOS

# cat /etc/ssh/sshd_config

# vi /etc/ssh/sshd_config
Go to line
# PermitRootLogin yes
 and change to
PermitRootLogin no

# service sshd restart

Configure eth0 to auto configure everytime it reboots

Check if the script is there:
$ cat /etc/sysconfig/network-scripts/ifcfg-eth0

It should be there! If its not, then idk. :O

Depending on which network adaptor you want to auto connect,
if its eth0 then its /etc/sysconfig/network-scripts/ifcfg-eth0
if its eth1 then its /etc/sysconfig/network-scripts/ifcfg-eth1


Yeap! 

after you cat the file, you should see something like:
DEVICE=eth0
HWADDR=__________________
TYPE=Ethernet
UUID=_______________________________
ONBOOT=no
NM_CONTROLLED=yes
BOOTPROTO=dhcp

Go in and use vi edit the :
ONBOOT=no
to
ONBOOT=yes

You may use other editors too, if you dont like vi.

reboot and test that it works!

Create a new user account and give it sudoer powers

# useradd
# passwd

follow on screen instructions thereafter.

CentOS

This blog has been down for a long long time and its time i resurrect it. This blog will be a place for me to share my technical experience with Linux and computing!

I like RHEL. Or Red Hat Enterprise Linux. The things work and in my opinion "clean". Personally i use Fedora(on my desktops and laptops) and CentOS on my server(s). Yes, server with a "s".

Recently i have been cleaning up my server structure and revamping some stuff! One of the tasks required me to reinstall CentOS. Its been some time since i installed CentOS.

The version installed is CentOS 6.5. What I really like in the installer is the ability to use USB to go about doing the installation. One can use the dd command(my favourite) to mount the iso onto the USB.
dd if= of=/dev/

During installation when asked about the installation media, choose Harddrive and select the appropriate drive(if u dont know just trail-and-error).

This feature was not here when i installed CentOS the previous time, so i really like this new feature.

I usually reduce the amount of space taken by /home and increase the space taken by /. There are more practical uses for me if configured this way.

Lastly, this is a server, so I will install using the "minimal" option. When selected, the installer will not install all the GUI(Graphical User Interface) rubbish. I strongly recommend that for a server.

Just click next all the way until it is done, asking you to reboot.


Once you clicked reboot, remember to plug the USB drive out! Or else you can just select "boot from local drive" in the Installer boot menu.

Once into the system, login as root.

Note that in "minimal" CentOS, the network card is not automatically configured on boot.

run "ifup eth0" if your card used is eth0 to configure the ethernet adaptor.

Once done, logout and login using SSH from a more user friendly computer.

Important things to do when SSHed as root: (i will be posting articles on how soon)
  1. Create a new user account and give it sudoer powers
  2. Configure eth0 to auto configure everytime it reboots
  3. disable ssh root access on CentOS
  4. update the system and reboot
  5. install ntp service to keep time and date synchronized
  6. install the epel repo.
  7. Configure keyless ssh login(optional)