How to build an overall system and application on VC?
Due to business needs, You need to log on to the Logbase O & M security system and use vmvare vSphere client to build the system and applications.
1. First, log on to the Logbase O & M security system. After entering the system, you can select a device to enter the VC interface. The browser must support JAVA. If not, you can download one.
2. After a series of clicks to ignore, enter the VC interface
After mounting the operating system image, start the Virtual Machine. Then, you can see the redhat system installation interface on the console. You can click the button at the top right of the console to enter, you can also right-click the desired server on the left and choose open console to enter. redhat installation is not described here, which is very simple.
After installing the system, you also need to install the vm tool. Right-click the desired server and choose "client"> "Install/upgrade vmware tool, the following message is displayed at the bottom of the vc, prompting you to "execute the VMWare Tools installation program mounting", and then execute it on the terminal of the virtual machine:
[Root @ Webmail ~] # Mount/dev/cdrom/media
[Root @ Webmail ~] # Df-h | grep media
/Dev/sr0 60 M 60 M 0 100%/media
[Root @ Webmail ~] # Cd/media/
[Root @ Webmail media] # ls
[Root @ Webmail media] # cp VMwareTools-8.6.0-425873.tar.gz/tmp
[Root @ Webmail media] # cd/tmp/
[Root @ Webmail tmp] # tar zxf VMwareTools-8.6.0-425873.tar.gz
[Root @ Webmail tmp] # cd vmware-tools-distrib/
[Root @ Webmail vmware-tools-distrib] #./vmware-install.pl-d
[Root @ Webmail ~] # Cd/
[Root @ Webmail/] # umount/media
Vm tool installation is complete.
4. Activate the SSH function of the Virtual Machine on Logbase and log on to prepare to install the application and database.
5. Put the jdk-7u79-linux-x64.rpm and apache-tomcat-6.0.37.tar.gz on the web server via SSH, how to configure it is not described.
Put mysql-5.1.73-1.glibc23.x86_64.rpm-bundle.tar on the dbserver,
Extract
Tar xvf MySQL-5.1.73-1.glibc23.x86_64.rpm-bundle.tar
We only use two RPMs: server and client,
First, open the rpm package permission through chmod 777 *. Otherwise, the rpm package cannot be used.
-- Check whether mysql has been installed
Rpm-qa | grep-I mysql
If the mysql-libs-5.1.61-4.el6.x86_64 appears, the library file is already installed, you should uninstall it first, otherwise there will be a overwriting error. Note that the -- nodeps option is used during uninstallation, and the dependency is ignored:
Rpm-e mysql-libs-5.1.61-4.el6.x86_64 -- nodeps
----- Rpm Installation
Rpm-ivh MySQL-server-5.1.73-1.glibc23.x86_64.rpm
Check after installing the server
---- Inspection team
Id mysql
---- Start
Service mysql start
--- View port
Netstat-anp | grep 3306
Write down how to install the client
Rpm-ivh MySQL-client-5.1.73-1.glibc23.x86_64.rpm
Rpm-ivh MySQL-devel-5.1.73-1.glibc23.x86_64.rpm
-- Set the initial mysql password
/Usr/bin/mysqladmin-u root password 'dzswdrp'
--- Enter Detection
Mysql-u root-p
6. identify many security problems through security scanning, so you need to Upgrade openssh
Prepare three packages first (only openssh is required in my process ). Zlib is required in the normal process, but due to the lack of gcc package in my system, this solution will be mentioned later.
Rpm-qa | grep gcc
No gcc package found, only libgcc
Uninstall openssh
Rpm-e 'rpm-qa | grep openssh'
Because the server lacks the gcc package and the Internet is not activated, the yum external source cannot be created. You need to set up your own local source as follows:
Mkdir-p/mnt/cdrom
Mkdir/yum
Mount/dev/cdrom/mnt/cdrom
Cp-R/mnt/cdrom/yum
Cd/yum/cdrom/Packages
Rpm-ivh deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
Rpm-ivh python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
Rpm-ivh createrepo-0.9.8-5.el6.noarch.rpm
Cd ../repodata
Createrepo-g c27858b7430afeb372d0dd50d8a56fd46b47bc81bb9580c2bb91ab697e40592e-comps-rhel6-Server.xml./---- xml file name is not set as this, depending on the situation
Vim/etc/yum. repos. d/rhel-cdrom.repo
--------------------------
[Rhel_6_iso]
Name = local iso
Baseurl = file: // yum/cdrom
Gpgcheck = 0
---------------------------------
Now the local yum source is set up
Install gcc-related packages, pam-related packages, and openssl-devel (if not installed, an error will be reported when openssh is installed later)
Yum-y install gcc *
Yum-y install pam *
Yum-y install openssl-devel
Next, query the gcc, zlib, and pam packages again. install openssh after confirmation.
Rpm-qa | grep gcc
Rpm-qa | grep zlib
Rpm-qa | grep pam
Rpm-qa | grep openssl-devel
D/usr/local/rpm/openssh-6.8p1
. /Configure -- prefix =/usr/local/openssh -- sysconfdir =/etc/ssh -- with-pam -- with-ssl-dir =/usr/local/openssl -- with-md5-passwords -- mandir = /usr/share/man
If the message "PAM is enabled" is displayed, proceed to the next step.
Make & make install
/Usr/local/openssh/sbin/sshd appears.
Place part of Files
Cp-p/contrib/redhat/sshd. init/etc/init. d/sshd (Note: here the contrib path is the decompressed installation package path, for example:/tmp/openssh-6.0p1/contrib/redhat)
Chmod u + x/etc/init. d/sshd
Chkconfig -- add sshd
Cp/usr/local/rpm/openssh-6.8p1/sshd_config/etc/ssh/sshd_config
Cp/usr/local/openssh/sbin/sshd/usr/sbin/sshd
Cp-p/usr/local/rpm/openssh-6.8p1/ssh/usr/bin/ssh
Touch/usr/bin/ssh-keygen
Chmod 755/usr/bin/ssh-keygen
Touch/etc/ssh/ssh_host_ecdsa_key.pub
Detection
Ssh-V
Enable
Service sshd start