"Ascension" of Linux

Source: Internet
Author: User

1. Web site service Apache

Apache Introduction:

Open source, cross-platform

Supports multiple Web programming languages

Modular design

• Source code compilation, installation

tar zxf httpd-xxoo. Tar . GZCD httpd. /configure--prefix=/usr/local/httpd--enable-so--enable-rewrite--enable-charset-lite--enable-CGI  make makeinstall

• Optimized execution path:

Ln-s/usr/local/httpd/bin/*/usr/local/bin

Directory structure of the httpd:

Service Catalog:/USR/LOCAL/HTTPD

Master configuration file:/usr/local/httpd/conf/httpd.conf

Web directory:/usr/local/httpd/htdocs

Service script:/usr/local/httpd/bin/apachectl

Execution Program:/USR/LOCAL/HTTPD/BIN/HTTPD

Access log:/usr/local/httpd/log/access_log

Error log:/usr/local/httpd/log/error_log

2. mysql database

MySQL Database introduction:

Open-Source relational database

Features of MySQL:

multithreaded, multi-user

Based on C/s architecture

Fast query speed

Safe and reliable

MySQL Source installation:

Install CMake:

tar zxf cmake.xxoo. Tar . GZCD CMake. /Install

Install MySQL:

Useradd-s/sbin/nologin-M mysqltar zxf mysql.xxoo. Tar  -dcmake_install_prefix=/usr/local/mysql-dsysconfdir=/etc-ddefault_charset=UTF8 -ddefault_collation=utf8_general_ci-dwith_extra_charsets=all make make  Install

Additional adjustments after installation:

chmod -R mysql:myql/usr/local/MySQLcp support-files/my-medium.cnf/etc/my.cnf/ usr/local/mysql/scripts/mysql_install_db--user=mysql--basedir=/usr/local/mysql--datadir=/usr/local/mysql/  Dataecho'path= $PATH:/usr/local/mysql/bin' >>/etc/profile. /etc/profile

To add a system service:

CP support-files/mysql.server/etc/rc.d/init.d/mysqldchmod +x/etc/rc.d/  --add MySQL

• Log in and out of MySQL

1-u root [-p]2-uroot-3, exit Mysqlexit

• Basic management operations of the database

1, link Mysqlmysql-U Root [-P]2, set MySQL user password mysqladmin-U Root-p password3, exiting the basic administrative operation of the Mysqlexit database1, view database show databases;2, view data table information in the database use database; show tables;3, displays the structure of the data table describe the database name. Table name4, creating a new database Create database name5, creating a new data table name for the CREATE TABLE table (field definition)6, deletes the specified database drop database name7deletes the specified data table from the drop table database name. Table name8, inserting new data into the table insert into table name (field) VALUES (field value)9, querying data from a data tableSelectfield from table name where conditionTen, update the data in the table to the update database. Table Name set Xxoo= AWhere Condition One, delete the specified data information delete from table name where condition
MySQL Operation

• Update user authorization information

Flush privileges;

• Set user permissions

1 , set user permissions, create grant permissions on the database name if the user does not exist. Table name to user @ source address [identified by ' Password '] 2   for user @ Source Address 3, REVOKE user permissions remove permission on the database name. Table name from user @ Source address

• Backup and recovery of databases

Direct backup:/usr/local/mysql/var

Using mysqldump

• Backup operations

Mysqldump-u root-p [Password] [options] database. Table >/path/file name

--opt--all-databases: Backing Up all databases

• Recovery operations

Mysql-u root-p [Database name] </path/file name

"Ascension" of Linux

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.