CentOS Build Web Platform

Source: Internet
Author: User
Tags ldap pear

CentOS queries whether Apache is installed
Rpm-qa httpd

A similar httpd-2.2appears. El6.centos. 4. x86_64  , indicating installed

Yum-y Install httpd//installation Apache

Yum-y Install PHP//installation PHP PHP 5.3.3-46

Yum-y install MySQL//MySQL (5.1.73)

Yum-y Install Mysql-server (5.1.73)
Yum-y Install Php-mysql (5.3.3-46)

To install the Apache extension:
Yum-y Install httpd-manual mod_ssl mod_perl mod_auth_mysql

To install the PHP extension:
Yum-y Install PHP-GD php-xml php-mbstring php-ldap php-pear php-xmlrpc

Yum-y Install libjpeg* php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-bcmath Php-mhas H Libmcrypt

To install the MySQL extension:
Yum-y Install MYSQL-CONNECTOR-ODBC mysql-devel libdbi-dbd-mysql

Setting the boot level for Apache services
Chkconfig--levels 235 httpd on
Apache is a service, so it can be started by setting the start level of the service

Info

1, verify that the installation is successful and now open http://IP Address2, installation directory description Apache defaults to the Web site's root directory/var/www/The default main configuration file for HTML directories is/etc/httpd/conf/The httpd.conf configuration is stored in the/etc/httpd/conf.d/the directory Apache configuration file is/etc/httpd/conf under modules on/usr/lib/httpd The PHP configuration file under the/etc/php.d/and/etc/Php.iniphp's modules is placed in/usr/lib/php/modules under
MySQL configuration profile in/etc/my.cnf#/sbin/chkconfig httpd on [set Apache server httpd service boot] or chkconfig--levels235httpd on#/sbin/service httpd start [Start httpd Service, independent of boot start] or/etc/init.d/httpd start#/sbin/Service mysqld start [Start mysqld Service, unrelated to boot boot]note:sbin directory itself in the system path environment, can omit mysql_secure_installation//or/usr/bin/mysqladmin-u Root Password'New-password'/usr/bin/mysqladmin-u root-h iz259588ge4z Password'New-password'

Chkconfig command Details Set boot service: http://www.jb51.net/LINUXjishu/86331.html

Java-related configuration:

See if Java is installed,

Java-version

Yum List Installed | grep java

If you have a openjdk with your own installation, remove it first:

Yum-y Remove java-1.7.0-openjdk*

Yum-y Remove Tzdata-java.noarch

Install open jdk1.7 or later release or the Sun JDK decompression:

OpenJDK and Sun JDK differences Reference: http://www.zhihu.com/question/19646618

The introduction of the relationship between Oracle's project release manager Joe Darcy in Oscon 2011 also confirms that OPENJDK 7 and Oracle JDK 7 are very close to the program, and they share a lot of the same code: http://zhidao.baidu.com /link?url=g7azwk4dv3icvdi1fo6w9ailbbnpxbb-do85u8b1wvtc4ndzsb26rcre4bcj_ Bk6v3fp5aakxdnx2odspp1onwv2pmkyt-ltsxpyvdkdsv_

Find JDK Packages

Yum-y List java*

Yum-y Install java-1.7.0-openjdk*

Download SUNJDK upload and install the configuration

Export JAVA_HOME=/USR/SHARE/JDK1. 6 . 0_14export PATH= $JAVA _home/bin: $PATHexport CLASSPATH

Reference: http://www.linuxidc.com/Linux/2012-09/70780.htm

Http://www.centoscn.com/image-text/install/2014/0827/3585.html

Http://www.cnblogs.com/samcn/archive/2011/03/16/1986248.html

Note

Noarch is the abbreviation for no architecture, indicating that the package can be used on various CPUs

/etc/profile: The first file that is used when the operating system customizes the user environment at logon, which sets the environment information for each user of the system, which is executed when the user logs on for the first time.

/etc/environment: The second file used by the operating system at logon, the system sets environment variables for environment files before reading your own profile.

~/.profile: The third file that is used to log on is the. profile file, which each user can use to enter shell information that is specific to their own use, which is executed only once when the user logs on. By default, he sets some environment variables, Executes the user's. bashrc file.

/ETC/BASHRC: Executes this file for each user running the bash shell. When the bash shell is opened, the file is read.

~/.BASHRC: This file contains bash information dedicated to your bash shell, which is read when you log in and every time you open a new shell.

To install Tomcat:

Yum installation Tomcat6

Yum-y Install Tomcat6 Tomcat6-webapps tomcat6-admin-webapps Tomcat6-docs-webapp Tomcat6-javadoc

Yum installs Tomcat to automatically install the relevant software, such as the JRE environment, so there is no need to install the JRE separately.

Yum installed Tomcat Directory Description:

Configuration file directory:/etc/tomcat6

Installer Home directory:/var/lib/tomcat6/

After installing with Yum on CentOS, the Tomcat-related directories have been linked to/usr/share/by symbolicTomcat6 directory, including WebApps, which is convenient for our configuration management [[email protected] tomcat6]# ll/usr/share/tomcat6 Total Dosage4drwxr-xr-x.2Root root4096October + xx: -binlrwxrwxrwx.1Root Tomcat AOctober + xx: -Conf->/etc/tomcat6lrwxrwxrwx.1Root root atOctober + xx: -Lib->/usr/share/java/tomcat6lrwxrwxrwx.1Root root -October + xx: -Logs->/var/log/tomcat6lrwxrwxrwx.1Root root atOctober + xx: -Temp->/var/cache/tomcat6/templrwxrwxrwx.1Root root -October + xx: -WebApps->/var/lib/tomcat6/webappslrwxrwxrwx.1Root root atOctober + xx: -Work->/var/cache/tomcat6/Work Modification port 8080 is 80: Requires 80 port is not occupied, you can use netstat-NAT to see if Port 80 is in use. A) Modify VI/etc/tomcat6/8080 of the following fields in the Server.xml file are<connector port="8080"Protocol="http/1.1"ConnectionTimeout="20000"Redirectport="8443"/>b) Since the system does not allow Tomcat users to use ports below 1024 in CENTOS6 , it is also necessary to modify the VI/etc/tomcat6/tomcat6.conf found Connector_port .="8080"and commented out, add the following two lines: Tomcat_user="Root"Connector_port=" the"Note: The security to do so needs to be verified C) Restart the Tomcat service using the command service TOMCAT6 restart. Later access to the page can only need to enter the IP or host name, and no longer need to add port number. 

or there is an available version of the Tomcat7yum list available Tomcat*#yum install tomcat tomcat-webapps tomcat-admin-  WebApps. Service Tomcat start  //Start TOMCAT7

The TOMCAT7 installation directory is located in/USR/LOCAL/TOMCAT7

Use TOMCAT7 to download the compressed version

Reference: http://lcbk.net/tomcat/1407.html

Tomcat Configuration Apr

CentOS Build Web Platform

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.