Saturday, September 26, 2015

Install NFS In CentOS

Install NFS In CentOS

OS: CentOS 6.5
NFS Server IP: 124.124.124.150
NFS Client IP: 124.124.124.148

1. Install NFS - Server

yum install nfs-utils

2. Configuration
vi /etc/idmapd.conf
Add this line
Domain = vannakk.org

Edit file
vi /etc/exports

/home 124.124.124.0/24(rw,sync,no_root_squash,no_all_squash)

Start service nfs server
/etc/init.d/rpcbind start
/etc/init.d/nfslock start
/etc/init.d/nfs start

Startup service
chkconfig rpcbind on
chkconfig nfslock on
chkconfig nfs on

Install NFS - Client

yum -y install nfs-utils

Start service nfs server

/etc/init.d/rpcbind start
/etc/init.d/nfslock start
/etc/init.d/nfs start

Startup service
chkconfig rpcbind on
chkconfig nfslock on
chkconfig nfs on

Test show Mount

Mount Drive

Create a mount point
mkdir /mnt/nfsdrive



Add auto in startup with NFS
vi /etc/fstab

Add this line:
124.124.124.150:/home /mnt/nfsdrive nfs defaults 1 1


Done,

#NFS #CentOS #Vannakk

Install VSFTPd In CentOS

Install VSFTPd In CentOS 


OS: CentOS 6.5 
Server IP: 124.124.124.150

1. Installations

yum install vsftpd ftp

2. Configure
vi /etc/vsftpd/vsftpd.conf

changed:

## Set to "NO" ##
anonymous_enable=NO

## Uncomment ##
ascii_upload_enable=YES
ascii_download_enable=YES

## Uncomment - Enter your Welcome message - This is optional ##
ftpd_banner=Welcome to SunRise FTP service..

chroot_local_user=YES

## Add at the end of this  file ##
use_localtime=YES


Start Services and turn on at start up
service vsftpd start
chkconfig vsftpd --list
chkconfig vsftpd on

useradd vannakk1
passwd vannakk1

Test FTP
ftp 124.124.124.150


** Probably you will get an error like “500 OOPS: cannot change directory”.
setsebool -P ftp_home_dir on

Allow port 20 and 21 in iptables

vi /etc/sysconfig/iptables

-A INPUT -m state --state NEW -m tcp -p tcp --dport 20 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT

service iptables restart

setsebool -P allow_ftpd_full_access on
setsebool -P ftp_home_dir on

3. Test from Client

- Download ftp client and connect to server (FileZilla)

- Connect via browser
After loged in


Done,


#VSFTPd #CentOS #Vannakk

Friday, September 25, 2015

Install VNC Server on CentOS 7

Install VNC Server on CentOS 7

VNC Server IP: 124.124.124.143

Remote to VNC Server, Login as root and install the packages

Install dependency packages
yum groupinstall "X Window System"
yum install gnome-classic-session gnome-terminal nautilus-open-terminal control-center liberation-mono-fonts

unlink /etc/systemd/system/default.target

ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target

Reboot Server
reboot

Install VNC Server
yum install tigervnc-server

cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service

Now open /etc/systemd/system/vncserver@:1.service file and replace with your username .
Find these lines ..

I am create for user root in this case
ExecStart=/sbin/runuser -l root -c "/usr/bin/vncserver %i"
PIDFile=/root/.vnc/%H%i.pid


Reload systemd for changes.
systemctl daemon-reload

Create VNC password for the user .
vncpasswd

Enable service at startup
systemctl enable vncserver@:1.service

Start the service .
systemctl start vncserver@:1.service


Allow VNC service and restart firewall
firewall-cmd --permanent --add-service vnc-server
systemctl restart firewalld.service


Click Continue

Conected.


To stop VNC service .
systemctl stop vncserver@:1.service

To disable VNC service from startup ( permanent ).
systemctl disable vncserver@:1.service

To stop firewall ( For troubleshooting ).
systemctl stop firewalld.service


#VNC #CentOS #Server #Vannakk

Monday, September 21, 2015

Mount ISCSI in VMware vSphare

Mount ISCSI in VMware vSphare

* vSphare Server
* Storage: Open E, Enterprise Storage OS and Software for Every Business

- VMware vSphare IP: 124.124.124.140
- Open E Storage IP: 124.124.124.150

1. Prepare Open E
Download ISO image of Open E , Installed and assign IP

Create Volume Group

Select Disk and create Volume group name: vg200GB

Create ISCSI Volume
Our ISCSI volume

Create Target 

Attached
Click on attach. 

2. Access to VMware vSphare Server 
Add ISCSI Adapter

Add software ISCISI
confirm OK
After Added
Add ISCSI
Add Network
Add Target Server
ISCSI initiator
Device Found
Add storage

Select Disk/LUN

Disk Added
Select File System type
Disk layout
Name the new Storage
Capacity
Summary

View Storage

Done,

#VMware #vSphare #ISCSI #OpenE #Storage #Vannakk

Mount ISCSI in Linux Server

Mount ISCSI in Linux Server


Server CentOS   Open E Storage 
IP: 124.124.124.144 IP: 124.124.124.150

* Linux Server: CentOS 6.5 64bits
* Storage: Open E, Enterprise Storage OS and Software for Every Business

- Server CentOS IP: 124.124.124.144
- Open E Storage IP: 124.124.124.150

1. Prepare Open E

Download ISO image of Open E , Installed and assign IP

Create Volume Group
Select Disk and create Volume group name: vg200GB
Create ISCSI Volume
Our ISCSI volume

2. Prepare Server 

Install ISCSI Initiator

Discover ISCSI on Server storage

Start ISCSI Service

Check if our server detect any storage
We found sdb
Create partition /dev/sdb

Format /dev/sdb1 to ext4
Create Folder and mount ISCSI drive to mount point and check the result.

Done,

#CentOS #Mount #ISCSI #OpenE #Storage #Vannakk

Friday, September 18, 2015

Share Internet From Windows 8 to other Devices

Share Internet From Windows 8 to other Devices

1. Run Run as Administrator

netsh wlan show drivers
Check your wireless card support this

Hosted network supported  : Yes

2. create a network named “vannakk” with password “vannakk1123” by this command

netsh wlan set hostednetwork mode=allow ssid=vannakk key=vannakk123

3. After that, you network now has been created. What you have to do next is turn it on by enter this command.
netsh wlan start hostednetwork


4. Check the SSID we created
Open Network and Sharing Center
5. Allow wifi to use that SSID
Property on our existing SSID (Vimul In this case) ==> Sharing ==> Allow Other network ....


Done,

Enjoy