Use local ISO file as Yum source
Step # 1:mount an ISO file
# yum Install Createrepo
# Mkdir-p/mnt/iso/{1,2,3}
# Mount-o LOOP/PATH/TO/CENTOS1.ISO/MNT/ISO/1
Step # 2:create a repository
# Cd/mnt/iso
# Createrepo.
Clean repo, enter:
# Yum Clean All
Step # 3:create Config file
# Vi/etc/yum.repos.d/iso.repo
Write the following:
[Myisorepository]
Name=iso
Baseurl=file:///mnt/iso
Enabled=1
Save and close the changes.
# yum Install Package-name
Environmental preparedness
# yum install-y gcc gcc-c++ make zlib-devel cmake ncurses-devel libxml2-devel curl-devel libjpeg-devel libpng-devel freet Ype-devel vim vsftpd sudo
Apache
# tar XZVF httpd-2.2.21.tar.gz
# CD httpd-2.2.21
#./configure--prefix=/usr/local/apache--enable-modules=so--enable-rewrite--enable-headers--enable-expires-- Enable-mime-magic--enable-deflate
# make
# make Install
# CP/USR/LOCAL/APACHE/BIN/APACHECTL/ETC/RC.D/INIT.D/HTTPD
# VI/ETC/RC.D/INIT.D/HTTPD
Under the file header #!/bin/bash line, add the following lines
# chkconfig:2345 50 40
# description:this is a Internet www Server
# chkconfig--add httpd
Cronolog
# tar XZVF cronolog-1.6.2.tar.gz
# CD cronolog-1.6.2
#./configure
# make
# make Install
Mysql
# tar XZVF mysql-5.5.18.tar.gz
# CD Mysql-5.5.18.tar.gz
# CMake.
-dcmake_install_prefix=/usr/local/mysql
-dmysql_datadir=/mydata/mysql
-dwith_innobase_storage_engine=1
-dwith_myisam_storage_engine=1
-dwith_memory_storage_engine=1
-denabled_local_infile=1
-dmysql_tcp_port=3306
-dmysql_unix_addr=/tmp/mysql.sock
-dmysql_user=mysql
-dsysconfdir=/etc
-dextra_charsets=all
-ddefault_charset=utf8
-ddefault_collation=utf8_general_ci
-dwith_debug=0
# make
# make Install
# CP SUPPORT-FILES/MY-MEDIUM.CNF/ETC/MY.CNF
# CP Support-files/mysql.server/etc/init.d/mysqld
#/usr/local/mysql/scripts/mysql_install_db--user=mysql--basedir=/usr/local/mysql/--datadir=/mydata/mysql/
# chmod +x/etc/init.d/mysqld
# chkconfig--add mysqld
# chown Mysql:mysql/mydata/mysql-r
# chown Mysql:mysql/usr/local/mysql-r
#PHP
#./configure--prefix=/usr/local/php--with-mysql=/usr/local/mysql--with-mysqli=/usr/local/mysql/bin/mysql_ Config--with-apxs2=/usr/local/apache/bin/apxs--with-gd--with-zlib--with-freetype-dir--with-config-file-path=/ Usr/local/php/etc--enable-gd-native-ttf--enable-zend-multibyte--disable-ipv6--with-iconv--disable-debug-- Enable-mbregex--with-curl--enable-mbstring=all--enable-zip--enable-exif--with-jpeg-dir-- Enable-ftp
# make
# make Install
#配置apache
# vi/usr/local/apache/conf/httpd.conf
AddType application/x-httpd-php. php
AddType Application/x-httpd-php-source. Phps
Install memcache*
# yum Install-y memcached
# chkconfig--add memcached
# service memcached Start
#/usr/local/php/bin/pecl Install Memcache