2016年11月14日 星期一

How to Install VMware Tools



Option 1 (Recommended by VMware) – VMware support of open-vm-tools

open-vm-tools is an open source implementation of VMware Tools from third parties and contains utilities that enhances virtualization management, administration and functions of the virtual machine in VMware environments. The ultimate goal is to enable the operating system vendors and/or communities and virtual appliance vendors to bundle VMware Tools into their product releases.

# yum install open-vm-tools

Option 2 :

1. Install prerequisites :

# yum install perl gcc make kernel-headers kernel-devel -y

2. Attach the vmware tools sofware from vSphere client.

3. Mount the vmware tools package into /mnt :

# mount /dev/cdrom /mnt

mount: /dev/sr0 is write-protected, mounting read-only

4. Copy vmware tool packagae into /tmp :

# cd /mnt

# ls

manifest.txt     VMwareTools-9.4.0-1280544.tar.gz  vmware-tools-upgrader-64

run_upgrader.sh  vmware-tools-upgrader-32

# cp -p VMwareTools-9.4.0-1280544.tar.gz /tmp

5. Go to /tmp directory and extract the vmware tools package :

# cd /tmp

# tar xzvf VMwareTools-9.4.0-1280544.tar.gz

6. Go to extracted folder, vmware-tools-distrib :

# cd vmware-tools-distrib

# ls

bin  doc  etc  FILES  INSTALL  installer  lib  vmware-install.pl

7. Run vmware-install.pl to start installation :

# ./vmware-install.pl

Example:

# ./vmware-install.pl

Creating a new VMware Tools installer database using the tar4 format.



Installing VMware Tools.



In which directory do you want to install the binary files?

[/usr/bin]



What is the directory that contains the init directories (rc0.d/ to rc6.d/)?

[/etc/rc.d]



What is the directory that contains the init scripts?

[/etc/rc.d/init.d]



In which directory do you want to install the daemon files?

[/usr/sbin]



In which directory do you want to install the library files?

[/usr/lib/vmware-tools]



The path "/usr/lib/vmware-tools" does not exist currently. This program is

going to create it, including needed parent directories. Is this what you want?

[yes]



In which directory do you want to install the documentation files?

[/usr/share/doc/vmware-tools]



The path "/usr/share/doc/vmware-tools" does not exist currently. This program

is going to create it, including needed parent directories. Is this what you

want? [yes]



The installation of VMware Tools 9.4.0 build-1280544 for Linux completed

successfully. You can decide to remove this software from your system at any

time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".



Before running VMware Tools for the first time, you need to configure it by

invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want

this program to invoke the command for you now? [yes]



Initializing...





Making sure services for VMware Tools are stopped.



Stopping vmware-tools (via systemctl):                     [  OK  ]





The module vmci has already been installed on this system by another installer

or package and will not be modified by this installer.



The module vsock has already been installed on this system by another installer

or package and will not be modified by this installer.



The module vmxnet3 has already been installed on this system by another

installer or package and will not be modified by this installer.



The module pvscsi has already been installed on this system by another

installer or package and will not be modified by this installer.



The module vmmemctl has already been installed on this system by another

installer or package and will not be modified by this installer.



The VMware Host-Guest Filesystem allows for shared folders between the host OS

and the guest OS in a Fusion or Workstation virtual environment.  Do you wish

to enable this feature? [no]



The vmxnet driver is no longer supported on kernels 3.3 and greater. Please

upgrade to a newer virtual NIC. (e.g., vmxnet3 or e1000e)



The vmblock enables dragging or copying files between host and guest in a

Fusion or Workstation virtual environment.  Do you wish to enable this feature?

[no]



VMware automatic kernel modules enables automatic building and installation of

VMware kernel modules at boot that are not already present. This feature can be



enabled/disabled by re-running vmware-config-tools.pl.



Would you like to enable VMware automatic kernel modules?

[no]



No X install found.



Creating a new initrd boot image for the kernel.

Starting vmware-tools (via systemctl):                     [  OK  ]

The configuration of VMware Tools 9.4.0 build-1280544 for Linux for this

running kernel completed successfully.



You must restart your X session before any mouse or graphics changes take

effect.



You can now run VMware Tools by invoking "/usr/bin/vmware-toolbox-cmd" from the

command line.



To enable advanced X features (e.g., guest resolution fit, drag and drop, and

file and text copy/paste), you will need to do one (or more) of the following:

1. Manually start /usr/bin/vmware-user

2. Log out and log back into your desktop session; and,

3. Restart your X session.



Enjoy,



--the VMware team

8. Once successfully installed, make sure you umount back the /mnt :

# umount /mnt


2016年11月4日 星期五

ownCloud 9 setup on CentOS7 notes 1

@@@@@@@@@@@@@@@@@@@@@@@@@@
Install phpMyAdmin
@@@@@@@@@@@@@@@@@@@@@@@@@@


# yum -y update
# yum -y install epel*
# yum -y install phpMyAdmin* 
# vi /etc/httpd/conf.d/phpMyAdmin.conf
(add
        Require ip 192.168.1.19
        Require ip 192.168.1.36)
# systemctl restart httpd
# systemctl restart MariaDB
http://192.168.1.133/phpMyAdmin

@@@@@@@@@@@@@@@@@@@@@@@@@@
安裝 MariaDB
@@@@@@@@@@@@@@@@@@@@@@@@@@

執行以下指令安裝 MariaDB:
# yum install mariadb-server mariadb

啟動及設定開機自動執行 MariaDB:
# systemctl start mariadb
# systemctl enable mariadb
@@@@@@@@@@@@@@@@@@@@@@@@@@
setup owncloud MariaDB database
@@@@@@@@@@@@@@@@@@@@@@@@@@
    
Database : 'ownclouddb'
Database User : 'ownclouduser'
Password : 'centos'
================================================================
#  mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 66
Server version: 5.5.34-MariaDB MariaDB Server
Copyright (c) 2000, 2013, Oracle, Monty Program Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> CREATE DATABASE ownclouddb;
Query OK, 1 row affected (0.04 sec)

MariaDB [(none)]> GRANT ALL ON ownclouddb.* TO ownclouduser@localhost IDENTIFIED BY 'centos';
Query OK, 0 rows affected (0.01 sec)

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.01 sec)

MariaDB [(none)]> exit
Bye
@@@@@@@@@@@@@@@@@@@@@@@@@
view MariaDB log
@@@@@@@@@@@@@@@@@@@@@@@@@
    
 # cat /var/log/mariadb/mariadb.log

@@@@@@@@@@@@@@@@@@@@@@@@@
view ownCloud log
@@@@@@@@@@@@@@@@@@@@@@@@@

# cat /var/www/html/owncloud/data/owncloud.log
# cat /mnt/win/owncloud.log
@@@@@@@@@@@@@@@@@@@@@@@@@
show ip address
@@@@@@@@@@@@@@@@@@@@@@@@@
#  systemctl status NetworkManager.service
#  nmcli dev status
#  vi /etc/sysconfig/network-scripts/ifcfg-enp0s3
#  systemctl restart network.service

# ip addr show
@@@@@@@@@@@@@@@@@@@@@@@@@
Yum update and upgrade
@@@@@@@@@@@@@@@@@@@@@@@@@
# yum update && yum upgrade

@@@@@@@@@@@@@@@@@@@@@@@@@
添加 Apache 服务到系统层使其随系统自动启动
@@@@@@@@@@@@@@@@@@@@@@@@@

现在添加 Apache 服务到系统层使其随系统自动启动
 # systemctl start httpd.service
systemctl enable httpd.service

@@@@@@@@@@@@@@@@@@@@@@@@@
Mount VMware Harddisk on CentOS 7 
@@@@@@@@@@@@@@@@@@@@@@@@@

http://www.ehowstuff.com/how-to-create-lvm-on-centos-7-rhel-7/


@@@@@@@@@@@@@@@@@@@@@@@@@
Mount Windows share folder with cifs
@@@@@@@@@@@@@@@@@@@@@@@@@
( for CentOS7)
# yum install samba-client samba-common cifs-utils

# vi /etc/fstab
### \\\192.168.1.19\owncloud-Data /mnt/win cifs user=win-share,pass=-Pwd-,uid=48,gid=48 0 0
#mount -t cifs -o iocharset=utf8, dir_mode=0770,file_mode=0777, uid=48,gid=48,username=win-share, password=- Pwd - //192.168.1.19/share_samba  /mnt/win

@@@@@@@@@@@@@@@@@@@@@@@@@
Mount Windows share folder with nfs
@@@@@@@@@@@@@@@@@@@@@@@@@
# yum -y install nfs-utils 
# vi /etc/rc.d/rc.local
mount -t nfs 192.168.1.19:/owncloud-data /mnt/win
chmod 755 -R /mnt/win
chown apache:apache -R /mnt/win




# vi /etc/fstab
192.168.1.19:/owncloud-data /mnt/win   nfs defaults 0 0
192.168.1.19:/owncloud-data /mnt/win   nfs rw,hard,intr,rsize=32768,wsize=32768    0       0

#chmod 755 /mnt/win -R
#chown apache:apache -R








ownCloud 9 setup on CentOS7 notes

@@@@@@@@@@@@@@@@@@@@@@@@@@
Install phpMyAdmin
@@@@@@@@@@@@@@@@@@@@@@@@@@


 
# yum -y update
# yum -y install epel*
# yum -y install phpMyAdmin* 
 
# vi /etc/httpd/conf.d/phpMyAdmin.conf
(add
        Require ip 192.168.1.19
        Require ip 192.168.1.36)
# systemctl restart httpd
# systemctl restart MariaDB
 
http://192.168.1.133/phpMyAdmin

@@@@@@@@@@@@@@@@@@@@@@@@@@
安裝 MariaDB
@@@@@@@@@@@@@@@@@@@@@@@@@@

執行以下指令安裝 MariaDB:
 
# yum install mariadb-server mariadb

啟動及設定開機自動執行 MariaDB:
 
# systemctl start mariadb
# systemctl enable mariadb
 
@@@@@@@@@@@@@@@@@@@@@@@@@@
setup owncloud MariaDB database
@@@@@@@@@@@@@@@@@@@@@@@@@@
    
Database : 'ownclouddb'
Database User : 'ownclouduser'
Password : 'centos'
================================================================
#  mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 66
Server version: 5.5.34-MariaDB MariaDB Server
Copyright (c) 2000, 2013, Oracle, Monty Program Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> CREATE DATABASE ownclouddb;
Query OK, 1 row affected (0.04 sec)

MariaDB [(none)]> GRANT ALL ON ownclouddb.* TO ownclouduser@localhost IDENTIFIED BY 'centos';
Query OK, 0 rows affected (0.01 sec)

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.01 sec)

MariaDB [(none)]> exit
Bye
@@@@@@@@@@@@@@@@@@@@@@@@@
view MariaDB log
@@@@@@@@@@@@@@@@@@@@@@@@@
    
 # cat /var/log/mariadb/mariadb.log

@@@@@@@@@@@@@@@@@@@@@@@@@
view ownCloud log
@@@@@@@@@@@@@@@@@@@@@@@@@

# cat /var/www/html/owncloud/data/owncloud.log
# cat /mnt/win/owncloud.log
 
@@@@@@@@@@@@@@@@@@@@@@@@@
show ip address
@@@@@@@@@@@@@@@@@@@@@@@@@
#  systemctl status NetworkManager.service
#  nmcli dev status
#  vi /etc/sysconfig/network-scripts/ifcfg-enp0s3
#  systemctl restart network.service

# ip addr show
 
@@@@@@@@@@@@@@@@@@@@@@@@@
Yum update and upgrade
@@@@@@@@@@@@@@@@@@@@@@@@@
 
# yum update && yum upgrade

@@@@@@@@@@@@@@@@@@@@@@@@@
添加 Apache 服务到系统层使其随系统自动启动
@@@@@@@@@@@@@@@@@@@@@@@@@

现在添加 Apache 服务到系统层使其随系统自动启动
 # systemctl start httpd.service
systemctl enable httpd.service

@@@@@@@@@@@@@@@@@@@@@@@@@
Mount Windows share folder with cifs
@@@@@@@@@@@@@@@@@@@@@@@@@
( for CentOS7)
 
# yum install samba-client samba-common cifs-utils

# vi /etc/fstab
\\\192.168.1.19\owncloud-Data /mnt/win cifs user=win-share,pass=-Pwd-,uid=48,gid=48 0 0

@@@@@@@@@@@@@@@@@@@@@@@@@
Install owncloud by yum 
@@@@@@@@@@@@@@@@@@@@@@@@@
# rpm --import https://download.owncloud.org/download/repositories/9.1.1/CentOS_7/repodata/repomd.xml.key

# wget http://download.owncloud.org/download/repositories/9.1.1/CentOS_7/ce:9.1.repo

# yum clean expire-cache

# yum install owncloud-files

#
vi /tmp/dirperm.sh
 -----------------------------------------------------------------------------------
#!/bin/bash
ocpath='/var/www/html/owncloud'
htuser='apache'
htgroup='apache'
rootuser='root'
 
printf "Creating possible missing Directories\n"
mkdir -p $ocpath/data
mkdir -p $ocpath/assets
mkdir -p $ocpath/updater
 
printf "chmod Files and Directories\n"
find ${ocpath}/ -type f -print0 | xargs -0 chmod 0640
find ${ocpath}/ -type d -print0 | xargs -0 chmod 0750
 
printf "chown Directories\n"
chown -R ${rootuser}:${htgroup} ${ocpath}/
chown -R ${htuser}:${htgroup} ${ocpath}/apps/
chown -R ${htuser}:${htgroup} ${ocpath}/assets/
chown -R ${htuser}:${htgroup} ${ocpath}/config/
chown -R ${htuser}:${htgroup} ${ocpath}/data/
chown -R ${htuser}:${htgroup} ${ocpath}/themes/
chown -R ${htuser}:${htgroup} ${ocpath}/updater/
 
chmod +x ${ocpath}/occ
 
printf "chmod/chown .htaccess\n"
if [ -f ${ocpath}/.htaccess ]
then
chmod 0644 ${ocpath}/.htaccess
chown ${rootuser}:${htgroup} ${ocpath}/.htaccess
fi
if [ -f ${ocpath}/data/.htaccess ]
then
chmod 0644 ${ocpath}/data/.htaccess
chown ${rootuser}:${htgroup} ${ocpath}/data/.htaccess
fi
-------------------------------------------------------
#
chmod 755 /tmp/dirperm.sh