Ubuntu 12.04 x64 설치 램프를 컴파일하려면

6001 단어
컴파일 설치 아파치 2.4.2
 
  
sudo echo 'start'
echo :
echo configure: error: APR not found. Please read the documentation.
echo :
wget http://labs.renren.com/apache-mirror/apr/apr-1.4.6.tar.bz2
tar -jxvf apr-1.4.6.tar.bz2
cd apr-1.4.6
./configure --prefix=/usr/local/apr
make
sudo make install
cd ..
echo :
echo AH00526: Syntax error on line 490 of /usr/local/apache2/conf/httpd.conf:
echo Unknown filter provider DEFLATE
echo httpd: Syntax error on line 101 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/mod_deflate.so into server: /usr/local/apache2/modules/mod_deflate.so: undefined symbol: inflate
echo :
sudo sed -i "s/LDFLAGS=\"\"/LDFLAGS=\"-lz\"/g" '/usr/local/apr/bin/apr-1-config'
wget http://labs.renren.com/apache-mirror/apr/apr-util-1.4.1.tar.bz2
tar -jxvf apr-util-1.4.1.tar.bz2
cd apr-util-1.4.1
./configure --prefix=/usr/local/apr-util -with-apr=/usr/local/apr/bin/apr-1-config
make
sudo make install
cd ..

echo :
echo configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
echo :
sudo echo start
wget http://downloads.sourceforge.net/project/pcre/pcre/8.30/pcre-8.30.zip
unzip pcre-8.30.zip
cd pcre-8.30
./configure --prefix=/usr/local/pcre
sudo make
sudo make install
cd ..

echo :
echo checking whether to enable mod_deflate... configure: error: mod_deflate has been requested but can not be built due to prerequisite failures
echo :
sudo apt-get install -y zlib1g-dev

echo :
wget http://labs.renren.com/apache-mirror/httpd/httpd-2.4.2.tar.bz2
tar -jxvf httpd-2.4.2.tar.bz2
cd httpd-2.4.2
./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre --enable-so --enable-rewrite --enable-deflate --with-module=metadata:expires
make
sudo make install
echo 'ExpiresActive On' | sudo tee -a /usr/local/apache2/conf/httpd.conf
echo 'FileEtag none' | sudo tee -a /usr/local/apache2/conf/httpd.conf
echo 'SetOutputFilter DEFLATE' | sudo tee -a /usr/local/apache2/conf/httpd.conf
sudo sed -i "s/#LoadModule deflate_module modules\/mod_deflate.so/LoadModule deflate_module modules\/mod_deflate.so/g" '/usr/local/apache2/conf/httpd.conf'
sudo /usr/local/apache2/bin/apachectl start
cd ..

컴파일 설치 mysql 5.5.25a Ubuntu 11.04 x64 컴파일 설치 mysql
OS:Ubuntu 11.04 x64
mysql 5.5.17 수동 설치
mysqlnd 소개:http://cn.php.net/manual/zh/mysqli.overview.php#mysqli.overview.mysqlnd
mysqli、mysql、pdo_mysql의 차이점:http://cn.php.net/manual/zh/mysqli.overview.php#mysqli.overview.mysqlnd
mysql에서.com에서 최신 버전을 다운로드하면 rpm 자동 설치 패키지가 Federo, CentOS에 사용되고 deb 패키지가 없습니다.그래서 Ubuntu는 수동으로 설치해야 합니다.Linux - Generic 2.6(x86, 64-bit), Compressed TAR Archive를 다운로드합니다.참조:http://dev.mysql.com/doc/refman/5.5/en/binary-installation.html
다운로드 주소:http://www.mysql.com/downloads/mysql/
 
  
echo shell , 。
sudo apt-get install -y libaio1
sudo apt-get remove -y mysql-common mysql-server mysql-client
sudo rm -rf /etc/mysql/
wget -O mysql-5.5.20-linux2.6-x86_64.tar.gz http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.20-linux2.6-x86_64.tar.gz/from/http://mysql.oss.eznetsols.org/
tar -zxvf mysql-5.5.20-linux2.6-x86_64.tar.gz
sudo mv ./mysql-5.5.20-linux2.6-x86_64 /usr/local/mysql
sudo groupadd mysql
sudo useradd -r -g mysql mysql
cd /usr/local/mysql
sudo chown -R mysql .
sudo chgrp -R mysql .
sudo /usr/local/mysql/scripts/mysql_install_db --user=mysql
sudo chown -R root .
sudo chown -R mysql data
sudo cp support-files/my-medium.cnf /etc/my.cnf
sudo ln -s /usr/local/mysql/bin/mysql /usr/bin/
sudo ln -s /usr/local/mysql/bin/mysqldump /usr/bin/
sudo cp support-files/mysql.server /etc/init.d/mysql
sudo /etc/init.d/mysql start
./bin/mysqladmin -u root password '1'
sudo /etc/init.d/mysql restart
mysql -uroot -p1

mysqld를 켜면 자동으로 시작할 수 있는 서비스 추가
 
  
sudo cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql
sudo update-rc.d mysql defaults

설치가 완료되었습니다. mysql를 설정해야 합니다.
컴파일 설치 php 5.4.4
 
  
sudo apt-get install -y curl libxml2 libxml2-dev libssl-dev sendmail libcurl4-openssl-dev libjpeg-dev libpng-dev libmcrypt-dev
wget -O php-5.4.4.tar.bz2 http://cn.php.net/get/php-5.4.4.tar.bz2/from/this/mirror
tar -jxvf php-5.4.4.tar.bz2
cd php-5.4.4
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-curl --with-mcrypt --enable-mbstring --enable-pdo --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-openssl --with-imap-ssl --with-gd --with-jpeg-dir=/usr/lib/ --with-png-dir=/usr/lib/ --enable-exif --enable-zip
make
sudo make install
sudo cp php.ini-development /usr/local/php/lib/php.ini
sudo rm /usr/bin/php
sudo ln -s /usr/local/php/bin/php /usr/bin/php
echo 'AddHandler application/x-httpd-php .php' | sudo tee -a /usr/local/apache2/conf/httpd.conf
sudo sed -i "s/;include_path = \".:\/php\/includes\"/include_path = \"\/usr\/local\/php\/lib\/php\"/g" '/usr/local/php/lib/php.ini'
sudo /usr/local/apache2/bin/apachectl restart

좋은 웹페이지 즐겨찾기