CentOS Lamp Part I-Environment building 19th class

Source: Internet
Author: User

CentOS Lamp The first part-environment build Linux Software removal method, MySQL installation, 19th session


The first half of the class

How to remove Linux software

MySQL Installation

The second half of the class


Apache Below a software httpd, you will httpd mistakenly think that is Apache

Sohu Image: Http://mirrors.sohu.com

Kangsheng statue: http://www.aminglinux.com/study_v2/download.html

How to remove Linux software
SOURCE Package Delete: Delete directory directly
RPM Delete: rpm-e
Yum Delete Yum Remove


Download MySQL
/USR/LOCAL/SRC Source Package Placement Place

Binary free Compiler package: mysql-5.1.40-linux-i686-icc-glibc23.tar.gz


wget http://syslab.comsenz.com/downloads/linux/mysql-5.1.40-linux-i686-icc-glibc23.tar.gz//Hong Sing address
Note: The above address is for 32-bit machines, if your machine is 64-bit, download this package (http://syslab.comsenz.com/downloads/linux/mysql-5.1.40-linux-x86_64- ICC-GLIBC23.TAR.GZ) installation method is the same.

mysql-5.1.40-linux-i686-icc-glibc23.tar.gz//ICC means to compile with GCC

Skip-networking does not allow MySQL to listen on Port 3306, only with local UNIX sockets
Connect the database locally with/tmp/mysql.sock without TCP/IP

Steps:

Tarzxvf/usr/local/src/mysql-5.1. +-linux-i686-icc-glibc23.Tar. GZ//Download the compile-free installation packageMVmysql-5.1. +-linux-i686-icc-glibc23/usr/local/MySQL useradd-s/sbin/nologin MySQL//new MySQL user CD/usr/local/MySQLmkdir-p/data/MySQL//New database Data directoryChown-R mysql:mysql/data/MySQL//change data directory belonging to the main group./scripts/mysql_install_db--user=mysql--datadir=/data/MySQL//initializationCPsupport-files/my-large.cnf/etc/MY.CNF//Copy configuration file
VI/ETC/MY.CNF//Modify configuration fileCPsupport-files/mysql.server/etc/init.d/mysqld//Copy startup script
VI!$//Modify startup script Basedir=/usr/local/mysql, Datadir=/data/mysqlchmod 755/etc/init.d/mysqld//Change startup script permissions Vim/etc/init.d/mysqld #修改datadirchkconfig--add mysqld chkconfig mysqld on//Join to System Services list and set startup level service Mysqld start//start MySQL
Ps-aux|grep MySQL//whether there is a MySQL process
Netstat-lnp|grep 3306

MySQL Initialization

F

CentOS Lamp Part I-Environment building 19th class

Related Article

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.