CENTOS6.2_64 bit Server Environment configuration: source code compiled MySQL

Source: Internet
Author: User
Keywords MySQL server Linux

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

Since 2 years ago, more and more feel the limitations of the virtual host is obvious, for the development of the personnel to bring a lot of obstacles, all things to be based on the virtual mainframe to do, even the site has a word will be filtered out, in fact, the word is very formal. Later simply malicious, from Taobao carefully selected, buy the first VPS (virtual dedicated services), configuration is not high, only 1G memory, 50G hard disk. It's enough for a little station. Since then began to contact the VPS, it faced the manager is an independent server, through the operator provided by the management backstage, we can operate like a real computer, you can shut down, boot, reload system, but these operations are carried out through the network. All the way through, the Linux system has a certain understanding of day-to-day management and configuration operation also mastered a lot. Now it's time to write down some procedures for configuring a server environment that provides Web services, as well as a memo for yourself.

Target Server environment requirements:

1, Centos 6.2 64bit (Server Operators according to customer requirements to provide the corresponding version of the system, the first time you can install, you can also manage their own background operations)

2, mysql-5.5.30

3, php-5.4.13

4, nginx-1.2.7

Above 2-3 is the source code compiled installation, depending on the operating system installation method may require other dependent installation package, then will explain. This article installs the operating system in Mini installation, so the more commonly used packages are not, this should be noted, because the minimal installation can reduce unnecessary overhead to achieve the goal of saving resources and improving performance.

During the installation of all programs, you have found that the package you are using can be installed once through this statement

Yum install gcc gcc-c++ gcc-g77 pcre-devel openssl-devel bison autoconf automake make cmake libcurl-devel gd-devel zlib* F iex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel*

Before you start, check to see if the Wget tool is installed, run wget carriage return, and if you return the following message that the tool is not installed.

Wget:missing URL

Usage:wget [OPTION] ... [URL] ...

Try ' wget--help ' for more option

Otherwise run Yum install wget for installation, the relevant documents are relatively small, within 1 minutes can be installed.

Suppose the partial installation directory,/setup (store all downloaded installation package files), the other target program installed directory is/apps

Installation process begins: Source code installed MySQL, selected version is mysql-5.5.30, with the old version of a bit different place, is the use of CMake compiled.

Download Address: http://mysql.cs.pu.edu.tw/Downloads/MySQL-5.5/mysql-5.5.30.tar.gz

#groupadd MySQL//Add user Group

#useradd-R-G MySQL mysql-s/sbin/nologin//increase user to user group and prohibit shell login

#cd/setup

#wget http://mysql.cs.pu.edu.tw/Downloads/MySQL-5.5/mysql-5.5.30.tar.gz

#......... Omit download process

#tar ZXF mysql-5.5.30.tar.gz

#cd mysql-5.5.30

#cmake-dcmake_install_prefix=/apps/mysql

-dmysql_datadir=/apps/mysql/data

-dwith_partition_storage_engine=1

-dwith_innobase_storage_engine=1

-dwith_perfschema_storage_engine=1

-dmysql_unix_addr=/tmp/mysql.sock

-dwith_myisam_storage_engine=1

-dmysql_user=mysql

-dmysql_tcp_port=3306

-denabled_local_infile=1

-dwith_extra_charsets=all

-dwith_ssl=yes

-ddefault_collation=utf8_general_ci

-ddefault_charset=utf8

#make//The time of this process varies depending on the configuration.

#make Install

#

#cd/apps/mysql//Enter MySQL installation directory

#chown –R mysql.mysql./set permissions on MySQL directory, modify the user and user group

# CP SUPPORT-FILES/MY-MEDIUM.CNF/ETC/MY.CNF Select a different default profile based on configuration height

# scripts/mysql_install_db--user=mysql//To initialize database with MySQL user

# CP Support-files/mysql.server/etc/init.d/mysqld//Copy the launcher to the/etc/init.d/directory and rename it mysqld to join the system service settings to start automatically

# chmod +X/ETC/INIT.D/MYSQLD//Take this step to prevent a lack of execution permissions causing a failure to start

# chkconfig--level 345 mysqld on//Join system services and set to boot

#

#可以通过以下命令测试mysql是滞安装成功

#services mysqld Start if the hint OK is successful.

Attach a section on how to create users and databases individually and authorize users.

Create user ' username ' @ ' localhost ' identified by ' password; Username,password username and corresponding password

Flush privileges; Refresh the data, or the following action prompts the wrong

Create DATABASE dbname default character set UTF8 collate utf8_general_ci; Create a database with a default encoding of Urf8, named dbname

Grant all privileges in dbname.* to ' username ' @ ' localhost '; Setting up database Authorization for users

Flush privileges; Refresh operation, this creates a database called dbname, which corresponds to the user username

A lot of users are very mysterious to Linux, feel very difficult to control, in fact, as long as willing to spend some time learning, hands-on contact with her, you will love this through the command line to operate the system, because the command line has its unique flavor. Moreover, she wins windows in terms of stability and security.

The next article will introduce the source code compilation installation of Nginx.

Original article: Reprint please specify the source, thank you!

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.