Install gcc-*, zlib-devel, OpenSSL-devel, PCRE-devel, ncurses-devel, libxml2-devel, libpng-devel, bzip2-devel, curl-devel, libjpeg-devel, FreeType with yum -devel, net-snmp-devel
1.install apr-1.4.6.tar.bz2 (a dependency package used by Apache)
./Configure -- prefix =/usr/local/APR & make install & Echo $?
2.install apr-util-1.5.1.tar.bz2
./Configure -- prefix =/usr/local/APR-util -- With-Apr =/usr/local/APR/
Make & make install
3.a.install httpd-2.4.3.tar.gz
. /Configure -- prefix =/usr/local/apache2 -- With-Apr =/usr/local/APR -- With-Apr-util =/usr/local/APR-util/-- enable -module = so -- enable-Deflate = shared -- enable-expires = shared -- enable-Rewrite = shared -- enable-Cache -- enable-file-Cache -- enable-Mem-Cache -- enable -disk-Cache -- enable-static-support -- enable-static-AB -- disable-userdir -- With-MPM = prefork -- enable-nonportable-Atomics-disable-ipv6 -- With-sendfile
Make & make install & Echo $?
B. Test method:
A. Stop the system's original HTTP service, rpm-e httpd
B. Start the newly installed apache2,/usr/local/apache2/bin/apachectl-K start
Root 8334 0.0 0.4 4468 2200? SS/usr/local/apache2/bin/httpd-K start
Daemon 8335 0.0 0.3 4468 1708? S/usr/local/apache2/bin/httpd-K start
Daemon 8336 0.0 0.3 4468 1708? S/usr/local/apache2/bin/httpd-K start
Daemon 8337 0.0 0.3 4468 1708? S/usr/local/apache2/bin/httpd-K start
Daemon 8338 0.0 0.3 4468 1708? S/usr/local/apache2/bin/httpd-K start
Daemon 8339 0.0 0.3 4468 1708? S/usr/local/apache2/bin/httpd-K start
Root 8375 0.0 0.1 3916 704 pts/1 R + grep Apache
C. killall httpd
4. Install the cmake package
Rpm-IVH./cmake-2.6.4-7.el5.i386.rpm
5.a.install mysql-5.5.29.tar.gz
B. Create a user for MySQL
Groupadd MySQL
Useradd-G MySQL
C. cmake \
>-Dcmake_install_prefix =/usr/local/MySQL \
>-Dmysql_datadir =/usr/local/MySQL/data/-dmysql_unix_addr =/usr/local/MySQL. Sock \
>-Dwith_innodbbase_storage_engine = 1 \
>-Denable_local_infile = 1 \
>-Dextra_charsets = all \
>-Ddefault_charset = utf8 \
>-Ddefault_collation = utf8_general_ci \
>-Dmysql_user = MySQL \
>-Dwith_debug = 0 \
>-Dwith_embeded_server = 0
Equivalent to cmake-dcmake_install_prefix =/usr/local/MySQL-dmysql_datadir =/usr/local/MySQL/data/-dmysql_unix_addr =/usr/local/MySQL. sock-encoding = 1-denable_local_infile = 1-dextra_charsets = All-ddefault_charset = utf8-ddefault_collation = utf8_general_ci-dmysql_user = mysql-dwith_debug = 0-encoding = 0
D. Make & make install & Echo $?
E. Configuration File
CP support-files/my-innodb-heavy-4G.cnf/etc/My. CNF
Vim/etc/My. CNF
Add under [mysqld]
Skip-name-resolve = 1
CP support-files/MySQL. Server/etc/init. d/mysqlsource
[[Email protected] mysql-5.5.29] # chmod 755/etc/init. d/mysqlsource
[[Email protected] mysql-5.5.29] # chown-r mysql. MySQL/usr/local/MySQL/
F. initialize the database.
Sh scripts/mysql_install_db -- user = MySQL -- basedir =/usr/local/MySQL/-- datadir =/usr/local/MySQL/data/
G. Link
Ln-S/usr/local/MySQL/bin/*/usr/bin/
Ln-S/usr/local/MySQL/lib/*/usr/lib/
Ln-S/usr/local/MySQL/libexec/usr/local/libexec
6.install libiconv-1.14.tar.gz
./Configure -- prefix =/usr/local/-- With-Apr =/usr/local/APR & make install & Echo $?
7.install libmcrypt-2.5.8.tar.gz
./Configure & make install & ldconfig
CD libltdl/
./Configure -- enable-ltdl-install & make install & Echo $?
8.install mhash-0.9.9.tar.gz
./Configure & make install & Echo $?
Link Creation
Ln-S/usr/local/lib/*/usr/lib/
Ln-S/usr/local/bin/libmcrypt-config/usr/bin/
9.install mcrypt-2.6.8.tar.gz
./Configure & make install & Echo $?
10.a.install php-5.4.11.tar.bz2
. /Configure -- prefix =/usr/local/PHP -- With-config-file-Path =/usr/local/PHP/etc -- With-mysql =/usr/local/MySQL/ -- With-mysqli =/usr/local/MySQL/bin/mysql_config -- With-PDO-mysql =/usr/local/MySQL -- With-iconv-Dir =/usr/local/ -- enable-FPM -- With-FPM-user = Apache -- With-FPM-group = Apache -- With-PCRE-RegEx -- With-zlib -- with-bz2 -- enable-calendar -- disable-phar -- With-curl -- enable-DBA -- With-libxml-dir -- enable-FTP -- With-Gd -- With-JPEG-dir -- With-PNG-dir -- With-zlib-Dir -- With-FreeType-dir -- enable-Gd-native-TTF -- enable-Gd-JIS-Conv -- With-mhash -- enable-mbstring -- With-mcrypt -- enable-pcntl -- enable -XML -- disable-rpath -- enable-shmop -- enable-sockets -- enable-zip -- enable-bcmath -- With-SNMP -- disable-ipv6 -- disable-rpath -- disable-Debug -- with-apxs2 =/ usr/local/apache2/bin/apxs
Make zend_extra_libs = '-liconv'
Make install & Echo $?
B. Configuration File
[[Email protected] php-5.4.11] # cp PHP. ini-production/usr/local/PHP/etc/PHP. ini
[[Email protected] php-5.4.11] # Vim/usr/local/apache2/CONF/httpd. conf
Addtype application/X-httpd-PHP. php (ADD)
Directoryindex index. php (modify)
[[Email protected] php-5.4.11] # cd/usr/local/apache2/htdocs/
[[Email protected] htdocs] # rm-RF index.html
[[Email protected] htdocs] # Vim index. php
<? PHP
Phpinfo ();
?>
C. Start the service
[[Email protected] htdocs] #/usr/local/apache2/bin/httpd
[[Email protected] htdocs] #/etc/init. d/mysqlsource start
11.install discuz_7.2_full_ SC _utf8.zip
[[Email protected] arvon] # unzip discuz_7.2_full_ SC _utf8.zip
[[Email protected] arvon] # mv upload/*/usr/local/apache2/htdocs/
MV: overwrite '/usr/local/apache2/htdocs/index. php '?
[[Email protected] arvon] # cd/usr/local/apache2/htdocs/
[[Email protected] htdocs] # chmod-r 777 *
[[Email protected] htdocs] # Vim/usr/local/PHP/etc/PHP. ini
Short_open_tag = on (modify)
[[Email protected] htdocs] # rm-RF index. php
[[Email protected] htdocs] # cp/home/arvon/upload/index. php ./
[[Email protected] htdocs] # pwd
/Usr/local/apache2/htdocs
12. Use a browser to set
IP/install
This article from the "crazy" blog, please be sure to keep this source http://arvon.blog.51cto.com/9255495/1555354
Build a lamp Forum