Build an environment: ubuntu12.04 + nginx + Percona5.6.12

Source: Internet
Author: User
Tags tidy percona
Set up ubuntu12.04 + nginx + Percona5.6.121 ### set up a test environment ### 001 # set the root password 002sudopasswdroot003 # switch root004suroot005 # I don't know why, but cannot connect after I change the source, helpless use of default, who tell me why ?... Environment build ubuntu 12.04 + nginx + Percona5.6.12 1 ### build a test environment ### 001 # set the root password 002 sudo passwd root003 # switch root004su root005 # I don't know why, after I changed the source, I couldn't connect to it, but I had no choice but to use the default one. who told me why? 006 gedit/etc/apt/sources. list007apt-get update008apt-get remove-y apache2 apache2-utils apache2-mpm-prefork apache2.2-common apache2.2-bin apache2-doc apache2-mpm-worker php5-fpm mysql-common mysql-client mysql-server php5 pure-ftpd-mysql009apt-get pure-ftpd-common-y autoremove010 011apt-get install-y gcc g ++ make autoconf libltdl-dev libgd2-xpm-dev libfreetype6 libfreetype6-dev libxm L2-dev libjpeg-dev libpng12-dev libcurl4-openssl-dev libssl-dev patch libmcrypt-dev libmhash-dev libncurses5-dev libreadline-dev bzip2 libcap-dev ntpdate chkconfig diffutils sendmail iptables unzip012 013 #### 64-bit 014ln- s/usr/lib/x86_64-linux-gnu/libpng */usr/lib/015ln-s/usr/lib/x86_64-linux-gnu/libjpeg */usr/lib/016 #### 32-bit 017ln-s/usr/lib/i386-linux-gnu/libpng */usr/lib/018ln-s/usr/lib/i386 -Linux-gnu/libjpeg */usr/lib/019 020 ########## synchronization Time: 021 ntpdate tiger.sina.com. cn022hwclock-w023 024 mkdir-p/data0/www/php program path 025 mkdir-p/data0/soft/download installation package path 026 mkdir-p/data0/service/etc/configuration folder 027 mkdir-p/data0/service/environment installation path 028 mkdir-p/data0/service/init. d/startup program path 029 mkdir-p/data0/datas/mysql_data/data storage directory 030 031 ############ 032/etc/init. d/apparmor stop033update-rc.d-f apparmor remove034apt-g Et remove-y apparmor apparmor-utils035 ### simple add user 036 groupadd mysql037useradd-g mysql mysql038 039 groupadd www040useradd-g www www041 042 ############ ######## install the Percona-Server043 # Download cmake044tar zxvf cmake...tar.gz 045. /bootstrap046make047make install048apt-get install bison // The following cmake will execute error 049 050tar zxvf Percona-Server-5.6.12.rc.tar.gz051cd Percona .... 052 053 # cmake. -LH: check the compilation parameter 054 #### line feed. -?? Forgot ,?? /Div> 055 cmake. \ 056-DCMAKE_BUILD_TYPE: STRING = Release \ 057-DSYSCONFDIR: PATH =/data0/service/Percona-Server-5.6.12 \ 058-DCMAKE_INSTALL_PREFIX: PATH =/data0/service/Percona-Server-5.6.12 \ 059-DENABLED_PROFILING: BOOL = ON \ 060-DENABLE_DEBUG_SYNC: BOOL = OFF \ 061-DMYSQL_DATADIR: PATH =/data0/datas/mysql_data \ 062-DMYSQL_MAINTAINER_MODE: BOOL = OFF \ 063-DWITH_EXTRA_CHARSETS: STRING = utf8, gbk, gb2312 \ 064 -DWITH_SSL: STRING = bundled \ 065-DWITH_UNIT_TESTS: BOOL = OFF \ 066-DWITH_ZLIB: STRING = bundled \ 067-DWITH_PARTITION_STORAGE_ENGINE: BOOL = ON \ 068-DINSTALL_LAYOUT: STRING = STANDALONE \ 069-DCOMMUNITY_BUILD: BOOL = ON \ 070-LH071 072make073 074 make install075 076ln-sf/data0/service/Percona-Server-5.6.12/data0/service/mysql077 078cp support-files/my-default.cnf/data0/service/etc/my. cnf079ln-sf/data0/serv Ice/etc/my. cnf/etc/my. cnf080 081cp support-files/mysql. server/data0/service/init. d/mysqld082chmod 755/data0/service/init. d/mysqld083ln-sf/data0/service/init. d/mysqld/etc/init. d/mysqld084 085 echo "/data0/service/mysql/lib/">/etc/ld. so. conf086ldconfig087 088 089 chown-R mysql. mysql/data0/datas/mysql_data/090 091 chmod 700/data0/soft/Percona-Server-5.6.12-rc60.4/scripts/mysql_install_db092/ Data0/soft/Percona-Server-5.6.12-rc60.4/scripts/mysql_install_db -- user = mysql -- basedir =/data0/service/Percona-Server-5.6.12 -- datadir =/data0/datas/mysql_data/093 094 095/data0/service/ mysql/bin/mysqladmin-u root password "123456" 096 097/data0/service/mysql/bin/mysql-uroot-p "123456"-e "use mysql; update user set password = password ('000000') where user = 'root'; delete from user where user = ''; drop us Er ''@ '%'; flush privileges; "098 ## start 099 service mysqld start100 101 ############################# ### install nginx102 # install pcre103tar zxvf pcre-8.10.tar.gz104cd first. /configure -- prefix =/usr?make=make install108 109 ### replace * with 110tar zxvf nginx-*** .tar.gz 111cd nginx *** 112 make clean113./configure -- user = www -- group = www -- prefix =/data0/service/nginx-**** -- with-http_stub_status_module -- with-http_ssl _ Module114 115 make & make install116 117ln-sf/data0/service/nginx-*****/data0/service/nginx118mkdir/data0/service/nginx/conf/vhost119mkdir/data0 /service/nginx/conf/rewrite120mkdir-p/data0/www/default121 ### the website log is stored here, remember to configure 122 mkdir-p/data0/www_logs123 124 chown-R www. www/data0/www/125 126 ### I will not post the following configuration files. if necessary, I will post them to 127cp *****/fcgi. conf/data0/service/nginx/conf/fcgi. conf128cp *****/nginx. Conf/data0/service/nginx/conf/nginx. conf129cp *****/default. conf/data0/service/nginx/conf/vhost/000. default. conf130cp ***/init. nginxd/data0/service/init. d/nginxd131 132 chmod 755/data0/service/init. d/nginxd133rm-f/etc/init. d/nginxd134ln-sf/data0/service/init. d/nginxd/etc/init. d/nginxd135 136 # Remember to write nginxd nginx. conf default. conf configuration 137 # start 138 service nginxd start139 ########################### ############# Install php5.5140 #### libiconv141tar zxvf libiconv-1.14.tar.gz142cd. /configure -- prefix =/usr144make145make install146ldconfig147 148tar zxvf php-5.5.1.tar.gz149 150 ### forget the operation here no... 151 #64152 # ln-s/usr/lib/x86_64-linux-gnu/libssl. */usr/lib/153 # 32154ln-s/usr/lib/i386-linux-gnu/libssl. */usr/lib/155 #### forgot ....?? /Div> 156 157cd php-5.5.1158 ##### found a lot of less package, depressing, this piece of use for a long time, this Austria! 159apt-get install postgresql160apt-get install postgresql-9.1 postgresql-client-9.1 postgresql-client-common postgresql-common postgresql-server-dev-9.1161apt-get install libxslt-dev162 163 # Remove -- with-tidy = option because it didn't fix this tidy .... I forgot fpm at the beginning ...? 164. /configure -- enable-opcache -- prefix =/data0/service/php-5.5.1 -- with-mysql = mysqlnd -- with-mysqli = mysqlnd -- with-pgsql =/usr -- with-curl -- -openssl-dir -- with-zlib-dir =/usr -- with-xpm-dir =/usr -- with-pdo-pgsql =/usr -- with-pdo-mysql = mysqlnd -- with-xsl =/usr -- with-ldap -- with-xmlrpc -- with-iconv-dir =/usr -- with-snmp =/usr -- enable-exif -- enable-calendar -- with-bz2 =/usr -- with-mcrypt =/usr -- -Gd -- with-jpeg-dir =/usr -- with-png-dir =/usr -- with-freetype-dir =/usr -- enable-mbstring -- enable-zip --- pear -- with-libdir =/lib/i386-linux-gnu -- with-config-file-path =/data0/service/etc -- enable-fpm165 166 make ZEND_EXTRA_LIBS = '-liconv' 167 168 make install169 170ln -sf/data0/service/php-5.5.1/data0/service/php171 ### select the php. ini file 172cp php. ini-development/data0/service/php/etc/php. ini173ln-s F/data0/service/etc/data0/service/php/etc/php. ini174 175cd/data0/service/php/etc/176cp php-fpm.conf.default php-fpm.conf 177vim 178 // find the following lines to make sure the following lines do not exist before "; "179pid = run/php-fpm.pid 180error_log = log/php-fpm.log 181 listen = 127.0.0.1: 9000 182pm. max_children = 50 183pm. start_servers = 20 184pm. min_spare_servers = 5 185pm. max_spare_servers = 35 186pm. max_requests = 500187 # Remember to modify these two values to 188u. Ser = www189group = www190 191 192cp/data0/soft/php-5.5.1/sapi/fpm/init. d. php-fpm/data0/service/init. d/php-fpm193chmod 755/data0/service/init. d/php-fpm194ln-sf/data0/service/init. d/php-fpm/etc/init. d/php-fpm195 196vim php. ini197 modify: extension = "/data0/service/php-5.5.1/lib/php/extensions/no-debug-non-zts-20121212/" 198 199 ###### get it done, close 200 service mysqld restart201service php-fpm start202service ngi Nxd restart203 204 #################################### ######### 206 # I succeeded ~ Comfortable ~ #207 ###################################### ########
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.