- 浏览: 60375 次
- 性别:
- 来自: 北京
文章分类
最新评论
1.更新依赖包
yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers patch
MYSQL 安装
yum install -y gcc gcc-c++ libtool autoconf automake imake libxml2-devel expat-devel ncurses-devel cmake bison
MYSQL 下载地址 http://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.7-rc.tar.gz
groupadd mysql
useradd -r -g mysql mysql
编译
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/webserver/mysql -DMYSQL_DATADIR=/data/mysql -DMYSQL_UNIX_ADDR=/data/mysql/mysqld.sock -DWITH_INNOBASE_STORAGE_ENGINE=1 -DENABLED_LOCAL_INFILE=1 -DDEFAULT_CHARSET=utf8 -DDEFALUT_CHARSETS=all -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -DDEFAULT_COLLATION=utf8_general_ci -DMYSQL_USER=mysql -DEXTRA_CHARSETS=all -DMYSQL_TCP_PORT=3306 -DWITH_DEBUG=0
编译通过安装
make && make install
cp support-files/my-medium.cnf /etc/my.cnf #复制配置文件
cp support-files/mysql.server /etc/init.d/mysqld #复制启动脚本
chmod 755 /etc/init.d/mysqld
cd /usr/local/webserver/mysql #进入安装目录
./scripts/mysql_install_db --user=mysql --ldata=/data/mysql #初始化数据库
/etc/init.d/mysqld start
chkconfig --add mysqld #添加系统服务
chkconfig mysqld on #添加开机启动
export PATH=$PATH:/usr/local/webserver/mysql/bin #添加环境变量
echo 'PATH=$PATH:/usr/local/webserver/mysql/bin' >> /etc/profile
service mysqld start/stop
编译参数解释
cmake . \ #开始编译
-DCMAKE_INSTALL_PREFIX=/usr/local/webserver/mysql \ #安装到/usr/local/mysql目录
-DMYSQL_DATADIR=/data/mysql \ #数据存放到/data/mysql目录
-DMYSQL_UNIX_ADDR=/data/mysql/mysqld.sock \ #sock存放到/data/mysql目录
-DWITH_INNOBASE_STORAGE_ENGINE=1 \ #innoDB引擎
-DENABLED_LOCAL_INFILE=1 \
-DDEFAULT_CHARSET=utf8 \ #字符集
-DDEFALUT_CHARSETS=all \ #支持所有字符集
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DWITH_ARCHIVE_STORAGE_ENGINE=1 \
-DWITH_PARTITION_STORAGE_ENGINE=1 \
-DDEFAULT_COLLATION=utf8_general_ci \ #字符集校验
-DMYSQL_USER=mysql \
-DEXTRA_CHARSETS=all \
-DMYSQL_TCP_PORT=3306 \
-DWITH_DEBUG=0\
2.安装php
下载 需要的依赖包
创建一个软件目录
Libmcrypt 下载地址 wget http://jaist.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz
MHash 下载地址 wget http://jaist.dl.sourceforge.net/project/mhash/mhash/0.9.9.9/mhash-0.9.9.9.tar.gz
libiconv 下载地址 wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.8.tar.gz
Memcache 下载地址 wget http://pecl.php.net/get/memcache-3.0.6.tgz
MYSQL_POD 下载地址 wget http://pecl.php.net/get/PDO_MYSQL-1.0.2.tgz
ImageMagick 下载地址 wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.8.5-5.tar.gz
imagick 下载地址 wget http://pecl.php.net/get/imagick-3.1.0RC2.tgz
wget http://unmp.googlecode.com/files/mcrypt-2.6.8.tar.gz
安装libiconv
tar zxvf libiconv-1.8.tar.gz
cd libiconv-1.8/
./configure --prefix=/usr/local
make
make install
cd ../
安装Libmcrypt
tar zxvf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8/
./configure
make
make install
/sbin/ldconfig
cd libltdl/
./configure --enable-ltdl-install
make
make install
cd ../../
安装MHash
tar zxvf mhash-0.9.9.9.tar.gz
cd mhash-0.9.9.9/
./configure
make
make install
cd ../
ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la
ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so
ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4
ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8
ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a
ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la
ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so
ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2
ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1
ln -s /usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-config
安装mcrypt
tar zxvf mcrypt-2.6.8.tar.gz
cd mcrypt-2.6.8/
/sbin/ldconfig
./configure
make
make install
cd ../
安装PHP
groupadd fpm
useradd --shell /sbin/nologin -g fpm fpm
wget http://cn2.php.net/distributions/php-5.3.18.tar.gz
tar -zxf php-5.3.18.tar.gz
cd php-5.3.18/
./configure --prefix=/usr/local/webserver/php --with-config-file-path=/usr/local/webserver/php/etc --with-mysql=/usr/local/webserver/mysql --with-mysqli=/usr/local/webserver/mysql/bin/mysql_config --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap
make ZEND_EXTRA_LIBS='-liconv'
make install
cp php.ini-production /usr/local/webserver/php/etc/php.ini
cd ../
安装Memcache 扩展
tar zxvf memcache-3.0.6.tgz
cd memcache-3.0.6/
/usr/local/webserver/php/bin/phpize
./configure --with-php-config=/usr/local/webserver/php/bin/php-config
make && make install
cd ../
安装eaccelerator
tar jxvf eaccelerator-0.9.6.1.tar.bz2
cd eaccelerator-0.9.6.1/
/usr/local/webserver/php/bin/phpize
./configure --enable-eaccelerator=shared --with-php-config=/usr/local/webserver/php/bin/php-config
make
make install
cd ../
安装PDO MYSQL
tar zxvf PDO_MYSQL-1.0.2.tgz
cd PDO_MYSQL-1.0.2/
/usr/local/webserver/php/bin/phpize
./configure --with-php-config=/usr/local/webserver/php/bin/php-config --with-pdo-mysql=/usr/local/webserver/mysql
make
make install
cd ../
安装ImageMagick
tar zxvf ImageMagick-6.8.0-4.tar.gz
cd ImageMagick-6.8.0-4/
./configure
make
make install
ldconfig /usr/local/lib
cd ../
安装imagick
yum install gtk+-devel
export PKG_CONFIG_PATH=/usr/local/etc/ImageMagick
export PKG_CONFIG_PATH=/usr/local/etc/ImageMagick/lib/pkgconfig
wget http://pecl.php.net/get/imagick-3.0.1.tgz
wget http://pecl.php.net/get/imagick-3.1.0RC1.tgz
tar zxvf imagick-3.0.1.tgz
cd imagick-3.0.1/
/usr/local/webserver/php/bin/phpize
./configure --with-php-config=/usr/local/webserver/php/bin/php-config
make
make install
cd ../
修改php.ini文件
手工修改:查找/usr/local/webserver/php/etc/php.ini中的extension_dir = "./"
修改为extension_dir = "/usr/local/webserver/php/lib/php/extensions/no-debug-non-zts-20090626/"
并在此行后增加以下几行,然后保存:
extension = "memcache.so"
extension = "pdo_mysql.so"
extension = "imagick.so"
再查找output_buffering = Off
修改为output_buffering = On
再查找; cgi.fix_pathinfo=0 去掉;
并且修改为cgi.fix_pathinfo=1 打开pathinfo支持
自动修改:若嫌手工修改麻烦,可执行以下shell命令,自动完成对php.ini文件的修改:
sed -i 's#extension_dir = "./"#extension_dir = "/usr/local/webserver/php/lib/php/extensions/no-debug-non-zts-20090626/"\nextension = "memcache.so"\nextension = "pdo_mysql.so"\nextension = "imagick.so"\n#' /usr/local/webserver/php/etc/php.ini
sed -i 's#output_buffering = Off#output_buffering = On#' /usr/local/webserver/php/etc/php.ini
sed -i "s#; always_populate_raw_post_data = On#always_populate_raw_post_data = On#g" /usr/local/webserver/php/etc/php.ini
sed -i "s#; cgi.fix_pathinfo=0#cgi.fix_pathinfo=1#g" /usr/local/webserver/php/etc/php.ini
配置eAccelerator加速PHP:
mkdir -p /usr/local/webserver/eaccelerator_cache
vi /usr/local/webserver/php/etc/php.ini
文件的最末尾,加上以下配置信息:
=================================================================================================================
[eaccelerator]
zend_extension="/usr/local/webserver/php/lib/php/extensions/no-debug-non-zts-20090626/eaccelerator.so"
eaccelerator.shm_size="64"
eaccelerator.cache_dir="/usr/local/webserver/eaccelerator_cache"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="3600"
eaccelerator.shm_prune_period="3600"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
===================================================================================================================
安装Nginx
创建www用户和组
/usr/sbin/groupadd www
/usr/sbin/useradd -g www www
mkdir -p /webroot/htdocs/mysql
chmod +w /webroot/htdocs/mysql
chown -R www:www /webroot/htdocs/mysql
mkdir -p /webroot/htdocs/www
chmod +w /webroot/htdocs/www
chown -R www:www /webroot/htdocs/www
1、安装Nginx所需的pcre库:
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.31.tar.gz
tar zxvf pcre-8.31.tar.gz
cd pcre-8.31
./configure
make && make install
cd ../
安装 nginx
wget http://nginx.org/download/nginx-1.3.8.tar.gz
tar zxvf nginx-1.3.8.tar.gz
cd nginx-1.3.8/
./configure --user=www --group=www --prefix=/usr/local/webserver/nginx --with-http_stub_status_module --with-http_ssl_module
make && make install
cd ../
3、创建Nginx日志目录
mkdir -p /nginxdata/logs
chmod +w /nginxdata/logs
chown -R www:www /nginxdata/logs
4、创建Nginx配置文件
①、在/usr/local/webserver/nginx/conf/目录中创建nginx.conf文件:
rm -f /usr/local/webserver/nginx/conf/nginx.conf
vi /usr/local/webserver/nginx/conf/nginx.conf
输入
user www www;
worker_processes 2;
error_log /nginxdata/logs/nginx_error.log crit;
pid /usr/local/webserver/nginx/nginx.pid;
#Specifies the value for maximum file descriptors that can be opened by this process.
worker_rlimit_nofile 65535;
events
{
use epoll;
worker_connections 65535;
}
http
{
include mime.types;
default_type application/octet-stream;
#charset gb2312;
server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 8m;
sendfile on;
tcp_nopush on;
keepalive_timeout 60;
tcp_nodelay on;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 64k;
fastcgi_buffers 4 64k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 128k;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_vary on;
#limit_zone crawler $binary_remote_addr 10m;
server
{
listen 80;
server_name www.webroot.c;
index index.html index.htm index.php;
root /webroot/htdocs/www;
#limit_conn crawler 20;
location ~* .*\.php($|/){
include fcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 1h;
}
log_format access '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';
access_log /nginxdata/logs/access.log access;
}
server
{
listen 80;
server_name mysql.webroot.c;
index index.html index.htm index.php;
root /webroot/htdocs/mysql;
location ~* .*\.php($|/){
include fcgi.conf;
}
log_format wwwlogs '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';
access_log /nginxdata/logs/wwwlogs.log wwwlogs;
}
}
=====================编辑cgi配置文件==============
vi /usr/local/webserver/nginx/conf/fcgi.conf
输入:
if ($request_filename ~* (.*)\.php) {
set $php_url $1;
}
if (!-e $php_url.php) {
return 403;
}
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
set $path_info "";
set $real_script_name $fastcgi_script_name;
if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
set $real_script_name $1;
set $path_info $2;
}
fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
fastcgi_param SCRIPT_NAME $real_script_name;
fastcgi_param PATH_INFO $path_info;
## 以上是支持pathinfo的重点部分
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
#fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
#fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
启动nginx
ulimit -SHn 65535
/usr/local/webserver/nginx/sbin/nginx
配置开机自启动
vi /etc/rc.local
输入
ulimit -SHn 65535
/usr/local/webserver/php/sbin/php-fpm start
/usr/local/webserver/nginx/sbin/nginx
mysql start
创建php-fpm 启动脚本
#! /bin/sh
# Description: Startup script for php-fpm on Debian. Place in /etc/init.d and
# run 'update-rc.d php-fpm defaults'.
#
set -e
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="php-fpm daemon"
NAME=php-fpm
#php-fpm路径
DAEMON=/usr/local/webserver/php/bin/$NAME
#配置文件路径
CONFIGFILE=/usr/local/webserver/php/etc/php-fpm.conf
#PID文件路径(在php-fpm.conf设置)
PIDFILE=/usr/local/webserver/php/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Gracefully exit if the package has been removed.
test -x $DAEMON || exit 0
d_start() {
$DAEMON -y $CONFIGFILE || echo -n " already running"
}
d_stop() {
kill -QUIT `cat $PIDFILE` || echo -n " not running"
}
d_reload() {
kill -HUP `cat $PIDFILE` || echo -n " can't reload"
}
case "$1" in
start)
echo -n "Starting $DESC: $NAME"
d_start
echo "."
;;
stop)
echo -n "Stopping $DESC: $NAME"
d_stop
echo "."
;;
reload)
echo -n "Reloading $DESC configuration..."
d_reload
echo "reloaded."
;;
restart)
echo -n "Restarting $DESC: $NAME"
d_stop
sleep 1
d_start
echo "."
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 3
;;
esac
exit 0
安装TCL8.5
wget http://downloads.sourceforge.net/tcl/tcl8.5.12-src.tar.gz
tar -xf tcl8.5.12-src.tar.gz
cd tcl8.5.12-src
./configure --prefix=/usr \ --enable-threads \--mandir=/usr/share/man && make && sed -e "s@^\(TCL_SRC_DIR='\).*@\1/usr/include'@" \ -e "/TCL_B/s@='\(-L\)\?.*unix@='\1/usr/lib@" \ -i tclConfig.sh
make install && make install-private-headers && ln -v -sf tclsh8.5 /usr/bin/tclsh && chmod -v 755 /usr/lib/libtcl8.5.so
安装redis
wget http://download.redis.io/redis-stable.tar.gz
tar -zxvf redis-stable.tar.gz
cd redis-stable
make
make test
make install
useradd redis
mkdir -p /var/lib/redis
mkdir -p /var/log/redis
vi /etc/redis.conf
#文件放在这里,需要修改redis.conf
# The working directory.
#
# The DB will be written inside this directory, with the filename specified
# above using the 'dbfilename' configuration directive.
#
# Also the Append Only File will be created inside this directory.
#
# Note that you must specify a directory here, not a file name.
dir /var/lib/redis
[root@localhost redis-stable]# mkdir -p /var/log/redis
# Specify the log file name. Also 'stdout' can be used to force
# Redis to log on the standard output. Note that if you use standard
# output for logging but daemonize, logs will be sent to /dev/null
logfile /var/log/redis/redislog
----------------------------------------
更改目录拥有者
chown redis.redis /var/lib/redis
chown redis.redis /var/log/redis
建立redis 启动脚本
vim /etc/init.d/redis
#!/bin/bash
#
# Init file for redis
#
# chkconfig: - 80 12
# description: redis daemon
#
# processname: redis
# config: /etc/redis.conf
# pidfile: /var/run/redis.pid
source /etc/init.d/functions
#BIN="/usr/local/bin"
BIN="/usr/local/bin"
CONFIG="/etc/redis.conf"
PIDFILE="/var/run/redis.pid"
### Read configuration
[ -r "$SYSCONFIG" ] && source "$SYSCONFIG"
RETVAL=0
prog="redis-server"
desc="Redis Server"
start() {
if [ -e $PIDFILE ];then
echo "$desc already running...."
exit 1
fi
echo -n $"Starting $desc: "
daemon $BIN/$prog $CONFIG
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
return $RETVAL
}
stop() {
echo -n $"Stop $desc: "
killproc $prog
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog $PIDFILE
return $RETVAL
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
condrestart)
[ -e /var/lock/subsys/$prog ] && restart
RETVAL=$?
;;
status)
status $prog
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
RETVAL=1
esac
exit $RETVAL
---------------------------------------
增加开机自启动
chmod 755 /etc/init.d/redis
chkconfig --add redis
chkconfig --level 345 redis on
chkconfig --list redis
启动
service redis start
安装git
yum install curl
yum install curl-devel
yum install zlib-devel
yum install openssl-devel
yum install perl
yum install cpio
yum install expat-devel
yum install gettext-devel
wget http://www.codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.gz
tar xzvf git-latest.tar.gz
cd git-2011-11-30 #你的目录可能不是这个
autoconf
./configure --prefix=/usr/local/git
make
make install
git --version
修改/etc/profile文件,在文件中追加:
GIT_HOME=/usr/local/git
PATH=$GIT_HOME/bin:$PATH
source /etc/profile
yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers patch
MYSQL 安装
yum install -y gcc gcc-c++ libtool autoconf automake imake libxml2-devel expat-devel ncurses-devel cmake bison
MYSQL 下载地址 http://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.7-rc.tar.gz
groupadd mysql
useradd -r -g mysql mysql
编译
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/webserver/mysql -DMYSQL_DATADIR=/data/mysql -DMYSQL_UNIX_ADDR=/data/mysql/mysqld.sock -DWITH_INNOBASE_STORAGE_ENGINE=1 -DENABLED_LOCAL_INFILE=1 -DDEFAULT_CHARSET=utf8 -DDEFALUT_CHARSETS=all -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -DDEFAULT_COLLATION=utf8_general_ci -DMYSQL_USER=mysql -DEXTRA_CHARSETS=all -DMYSQL_TCP_PORT=3306 -DWITH_DEBUG=0
编译通过安装
make && make install
cp support-files/my-medium.cnf /etc/my.cnf #复制配置文件
cp support-files/mysql.server /etc/init.d/mysqld #复制启动脚本
chmod 755 /etc/init.d/mysqld
cd /usr/local/webserver/mysql #进入安装目录
./scripts/mysql_install_db --user=mysql --ldata=/data/mysql #初始化数据库
/etc/init.d/mysqld start
chkconfig --add mysqld #添加系统服务
chkconfig mysqld on #添加开机启动
export PATH=$PATH:/usr/local/webserver/mysql/bin #添加环境变量
echo 'PATH=$PATH:/usr/local/webserver/mysql/bin' >> /etc/profile
service mysqld start/stop
编译参数解释
cmake . \ #开始编译
-DCMAKE_INSTALL_PREFIX=/usr/local/webserver/mysql \ #安装到/usr/local/mysql目录
-DMYSQL_DATADIR=/data/mysql \ #数据存放到/data/mysql目录
-DMYSQL_UNIX_ADDR=/data/mysql/mysqld.sock \ #sock存放到/data/mysql目录
-DWITH_INNOBASE_STORAGE_ENGINE=1 \ #innoDB引擎
-DENABLED_LOCAL_INFILE=1 \
-DDEFAULT_CHARSET=utf8 \ #字符集
-DDEFALUT_CHARSETS=all \ #支持所有字符集
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DWITH_ARCHIVE_STORAGE_ENGINE=1 \
-DWITH_PARTITION_STORAGE_ENGINE=1 \
-DDEFAULT_COLLATION=utf8_general_ci \ #字符集校验
-DMYSQL_USER=mysql \
-DEXTRA_CHARSETS=all \
-DMYSQL_TCP_PORT=3306 \
-DWITH_DEBUG=0\
2.安装php
下载 需要的依赖包
创建一个软件目录
Libmcrypt 下载地址 wget http://jaist.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz
MHash 下载地址 wget http://jaist.dl.sourceforge.net/project/mhash/mhash/0.9.9.9/mhash-0.9.9.9.tar.gz
libiconv 下载地址 wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.8.tar.gz
Memcache 下载地址 wget http://pecl.php.net/get/memcache-3.0.6.tgz
MYSQL_POD 下载地址 wget http://pecl.php.net/get/PDO_MYSQL-1.0.2.tgz
ImageMagick 下载地址 wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.8.5-5.tar.gz
imagick 下载地址 wget http://pecl.php.net/get/imagick-3.1.0RC2.tgz
wget http://unmp.googlecode.com/files/mcrypt-2.6.8.tar.gz
安装libiconv
tar zxvf libiconv-1.8.tar.gz
cd libiconv-1.8/
./configure --prefix=/usr/local
make
make install
cd ../
安装Libmcrypt
tar zxvf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8/
./configure
make
make install
/sbin/ldconfig
cd libltdl/
./configure --enable-ltdl-install
make
make install
cd ../../
安装MHash
tar zxvf mhash-0.9.9.9.tar.gz
cd mhash-0.9.9.9/
./configure
make
make install
cd ../
ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la
ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so
ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4
ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8
ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a
ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la
ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so
ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2
ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1
ln -s /usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-config
安装mcrypt
tar zxvf mcrypt-2.6.8.tar.gz
cd mcrypt-2.6.8/
/sbin/ldconfig
./configure
make
make install
cd ../
安装PHP
groupadd fpm
useradd --shell /sbin/nologin -g fpm fpm
wget http://cn2.php.net/distributions/php-5.3.18.tar.gz
tar -zxf php-5.3.18.tar.gz
cd php-5.3.18/
./configure --prefix=/usr/local/webserver/php --with-config-file-path=/usr/local/webserver/php/etc --with-mysql=/usr/local/webserver/mysql --with-mysqli=/usr/local/webserver/mysql/bin/mysql_config --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap
make ZEND_EXTRA_LIBS='-liconv'
make install
cp php.ini-production /usr/local/webserver/php/etc/php.ini
cd ../
安装Memcache 扩展
tar zxvf memcache-3.0.6.tgz
cd memcache-3.0.6/
/usr/local/webserver/php/bin/phpize
./configure --with-php-config=/usr/local/webserver/php/bin/php-config
make && make install
cd ../
安装eaccelerator
tar jxvf eaccelerator-0.9.6.1.tar.bz2
cd eaccelerator-0.9.6.1/
/usr/local/webserver/php/bin/phpize
./configure --enable-eaccelerator=shared --with-php-config=/usr/local/webserver/php/bin/php-config
make
make install
cd ../
安装PDO MYSQL
tar zxvf PDO_MYSQL-1.0.2.tgz
cd PDO_MYSQL-1.0.2/
/usr/local/webserver/php/bin/phpize
./configure --with-php-config=/usr/local/webserver/php/bin/php-config --with-pdo-mysql=/usr/local/webserver/mysql
make
make install
cd ../
安装ImageMagick
tar zxvf ImageMagick-6.8.0-4.tar.gz
cd ImageMagick-6.8.0-4/
./configure
make
make install
ldconfig /usr/local/lib
cd ../
安装imagick
yum install gtk+-devel
export PKG_CONFIG_PATH=/usr/local/etc/ImageMagick
export PKG_CONFIG_PATH=/usr/local/etc/ImageMagick/lib/pkgconfig
wget http://pecl.php.net/get/imagick-3.0.1.tgz
wget http://pecl.php.net/get/imagick-3.1.0RC1.tgz
tar zxvf imagick-3.0.1.tgz
cd imagick-3.0.1/
/usr/local/webserver/php/bin/phpize
./configure --with-php-config=/usr/local/webserver/php/bin/php-config
make
make install
cd ../
修改php.ini文件
手工修改:查找/usr/local/webserver/php/etc/php.ini中的extension_dir = "./"
修改为extension_dir = "/usr/local/webserver/php/lib/php/extensions/no-debug-non-zts-20090626/"
并在此行后增加以下几行,然后保存:
extension = "memcache.so"
extension = "pdo_mysql.so"
extension = "imagick.so"
再查找output_buffering = Off
修改为output_buffering = On
再查找; cgi.fix_pathinfo=0 去掉;
并且修改为cgi.fix_pathinfo=1 打开pathinfo支持
自动修改:若嫌手工修改麻烦,可执行以下shell命令,自动完成对php.ini文件的修改:
sed -i 's#extension_dir = "./"#extension_dir = "/usr/local/webserver/php/lib/php/extensions/no-debug-non-zts-20090626/"\nextension = "memcache.so"\nextension = "pdo_mysql.so"\nextension = "imagick.so"\n#' /usr/local/webserver/php/etc/php.ini
sed -i 's#output_buffering = Off#output_buffering = On#' /usr/local/webserver/php/etc/php.ini
sed -i "s#; always_populate_raw_post_data = On#always_populate_raw_post_data = On#g" /usr/local/webserver/php/etc/php.ini
sed -i "s#; cgi.fix_pathinfo=0#cgi.fix_pathinfo=1#g" /usr/local/webserver/php/etc/php.ini
配置eAccelerator加速PHP:
mkdir -p /usr/local/webserver/eaccelerator_cache
vi /usr/local/webserver/php/etc/php.ini
文件的最末尾,加上以下配置信息:
=================================================================================================================
[eaccelerator]
zend_extension="/usr/local/webserver/php/lib/php/extensions/no-debug-non-zts-20090626/eaccelerator.so"
eaccelerator.shm_size="64"
eaccelerator.cache_dir="/usr/local/webserver/eaccelerator_cache"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="3600"
eaccelerator.shm_prune_period="3600"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
===================================================================================================================
安装Nginx
创建www用户和组
/usr/sbin/groupadd www
/usr/sbin/useradd -g www www
mkdir -p /webroot/htdocs/mysql
chmod +w /webroot/htdocs/mysql
chown -R www:www /webroot/htdocs/mysql
mkdir -p /webroot/htdocs/www
chmod +w /webroot/htdocs/www
chown -R www:www /webroot/htdocs/www
1、安装Nginx所需的pcre库:
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.31.tar.gz
tar zxvf pcre-8.31.tar.gz
cd pcre-8.31
./configure
make && make install
cd ../
安装 nginx
wget http://nginx.org/download/nginx-1.3.8.tar.gz
tar zxvf nginx-1.3.8.tar.gz
cd nginx-1.3.8/
./configure --user=www --group=www --prefix=/usr/local/webserver/nginx --with-http_stub_status_module --with-http_ssl_module
make && make install
cd ../
3、创建Nginx日志目录
mkdir -p /nginxdata/logs
chmod +w /nginxdata/logs
chown -R www:www /nginxdata/logs
4、创建Nginx配置文件
①、在/usr/local/webserver/nginx/conf/目录中创建nginx.conf文件:
rm -f /usr/local/webserver/nginx/conf/nginx.conf
vi /usr/local/webserver/nginx/conf/nginx.conf
输入
user www www;
worker_processes 2;
error_log /nginxdata/logs/nginx_error.log crit;
pid /usr/local/webserver/nginx/nginx.pid;
#Specifies the value for maximum file descriptors that can be opened by this process.
worker_rlimit_nofile 65535;
events
{
use epoll;
worker_connections 65535;
}
http
{
include mime.types;
default_type application/octet-stream;
#charset gb2312;
server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 8m;
sendfile on;
tcp_nopush on;
keepalive_timeout 60;
tcp_nodelay on;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 64k;
fastcgi_buffers 4 64k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 128k;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_vary on;
#limit_zone crawler $binary_remote_addr 10m;
server
{
listen 80;
server_name www.webroot.c;
index index.html index.htm index.php;
root /webroot/htdocs/www;
#limit_conn crawler 20;
location ~* .*\.php($|/){
include fcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 1h;
}
log_format access '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';
access_log /nginxdata/logs/access.log access;
}
server
{
listen 80;
server_name mysql.webroot.c;
index index.html index.htm index.php;
root /webroot/htdocs/mysql;
location ~* .*\.php($|/){
include fcgi.conf;
}
log_format wwwlogs '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';
access_log /nginxdata/logs/wwwlogs.log wwwlogs;
}
}
=====================编辑cgi配置文件==============
vi /usr/local/webserver/nginx/conf/fcgi.conf
输入:
if ($request_filename ~* (.*)\.php) {
set $php_url $1;
}
if (!-e $php_url.php) {
return 403;
}
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
set $path_info "";
set $real_script_name $fastcgi_script_name;
if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
set $real_script_name $1;
set $path_info $2;
}
fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
fastcgi_param SCRIPT_NAME $real_script_name;
fastcgi_param PATH_INFO $path_info;
## 以上是支持pathinfo的重点部分
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
#fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
#fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
启动nginx
ulimit -SHn 65535
/usr/local/webserver/nginx/sbin/nginx
配置开机自启动
vi /etc/rc.local
输入
ulimit -SHn 65535
/usr/local/webserver/php/sbin/php-fpm start
/usr/local/webserver/nginx/sbin/nginx
mysql start
创建php-fpm 启动脚本
#! /bin/sh
# Description: Startup script for php-fpm on Debian. Place in /etc/init.d and
# run 'update-rc.d php-fpm defaults'.
#
set -e
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="php-fpm daemon"
NAME=php-fpm
#php-fpm路径
DAEMON=/usr/local/webserver/php/bin/$NAME
#配置文件路径
CONFIGFILE=/usr/local/webserver/php/etc/php-fpm.conf
#PID文件路径(在php-fpm.conf设置)
PIDFILE=/usr/local/webserver/php/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Gracefully exit if the package has been removed.
test -x $DAEMON || exit 0
d_start() {
$DAEMON -y $CONFIGFILE || echo -n " already running"
}
d_stop() {
kill -QUIT `cat $PIDFILE` || echo -n " not running"
}
d_reload() {
kill -HUP `cat $PIDFILE` || echo -n " can't reload"
}
case "$1" in
start)
echo -n "Starting $DESC: $NAME"
d_start
echo "."
;;
stop)
echo -n "Stopping $DESC: $NAME"
d_stop
echo "."
;;
reload)
echo -n "Reloading $DESC configuration..."
d_reload
echo "reloaded."
;;
restart)
echo -n "Restarting $DESC: $NAME"
d_stop
sleep 1
d_start
echo "."
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 3
;;
esac
exit 0
安装TCL8.5
wget http://downloads.sourceforge.net/tcl/tcl8.5.12-src.tar.gz
tar -xf tcl8.5.12-src.tar.gz
cd tcl8.5.12-src
./configure --prefix=/usr \ --enable-threads \--mandir=/usr/share/man && make && sed -e "s@^\(TCL_SRC_DIR='\).*@\1/usr/include'@" \ -e "/TCL_B/s@='\(-L\)\?.*unix@='\1/usr/lib@" \ -i tclConfig.sh
make install && make install-private-headers && ln -v -sf tclsh8.5 /usr/bin/tclsh && chmod -v 755 /usr/lib/libtcl8.5.so
安装redis
wget http://download.redis.io/redis-stable.tar.gz
tar -zxvf redis-stable.tar.gz
cd redis-stable
make
make test
make install
useradd redis
mkdir -p /var/lib/redis
mkdir -p /var/log/redis
vi /etc/redis.conf
#文件放在这里,需要修改redis.conf
# The working directory.
#
# The DB will be written inside this directory, with the filename specified
# above using the 'dbfilename' configuration directive.
#
# Also the Append Only File will be created inside this directory.
#
# Note that you must specify a directory here, not a file name.
dir /var/lib/redis
[root@localhost redis-stable]# mkdir -p /var/log/redis
# Specify the log file name. Also 'stdout' can be used to force
# Redis to log on the standard output. Note that if you use standard
# output for logging but daemonize, logs will be sent to /dev/null
logfile /var/log/redis/redislog
----------------------------------------
更改目录拥有者
chown redis.redis /var/lib/redis
chown redis.redis /var/log/redis
建立redis 启动脚本
vim /etc/init.d/redis
#!/bin/bash
#
# Init file for redis
#
# chkconfig: - 80 12
# description: redis daemon
#
# processname: redis
# config: /etc/redis.conf
# pidfile: /var/run/redis.pid
source /etc/init.d/functions
#BIN="/usr/local/bin"
BIN="/usr/local/bin"
CONFIG="/etc/redis.conf"
PIDFILE="/var/run/redis.pid"
### Read configuration
[ -r "$SYSCONFIG" ] && source "$SYSCONFIG"
RETVAL=0
prog="redis-server"
desc="Redis Server"
start() {
if [ -e $PIDFILE ];then
echo "$desc already running...."
exit 1
fi
echo -n $"Starting $desc: "
daemon $BIN/$prog $CONFIG
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
return $RETVAL
}
stop() {
echo -n $"Stop $desc: "
killproc $prog
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog $PIDFILE
return $RETVAL
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
condrestart)
[ -e /var/lock/subsys/$prog ] && restart
RETVAL=$?
;;
status)
status $prog
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
RETVAL=1
esac
exit $RETVAL
---------------------------------------
增加开机自启动
chmod 755 /etc/init.d/redis
chkconfig --add redis
chkconfig --level 345 redis on
chkconfig --list redis
启动
service redis start
安装git
yum install curl
yum install curl-devel
yum install zlib-devel
yum install openssl-devel
yum install perl
yum install cpio
yum install expat-devel
yum install gettext-devel
wget http://www.codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.gz
tar xzvf git-latest.tar.gz
cd git-2011-11-30 #你的目录可能不是这个
autoconf
./configure --prefix=/usr/local/git
make
make install
git --version
修改/etc/profile文件,在文件中追加:
GIT_HOME=/usr/local/git
PATH=$GIT_HOME/bin:$PATH
source /etc/profile
发表评论
-
安装 m4 autoconf automake libtool
2013-04-08 18:50 1428###安装m4 wget http://mirrors.ke ... -
如何让Centos支持中文
2012-12-25 16:52 902http://ftp.dc.volia.com/pub/Cen ... -
HTTP协议详解
2012-09-18 23:15 682引言 ... -
Install rz & sz
2012-09-16 15:33 864yum -y install lrzsz -
以module 方式Apache php
2012-09-05 00:22 1225php的安装、以module方式,将php与apache 结合 ... -
配置虚拟路径 和 虚拟主机
2012-09-03 20:55 770记得加入 NameVirtualHost * 配置虚拟路径 和 ... -
Windows下以cgi方式安装Apache php
2012-09-03 17:20 12021.首先配置 ScriptAlias 目录为自己php根目录 ... -
LNMP环境搭建
2012-09-02 22:11 848更新依赖包 yum -y install gcc gcc-c+ ...
相关推荐
1. 安装Git并克隆phpredis仓库:`apt install git && git clone https://github.com/phpredis/phpredis.git` 2. 移动phpredis到适当目录:`mv phpredis /etc/phpredis` 3. 安装扩展所需的依赖:`sudo apt-get ...
docker-lnmpDocker镜像,包括Linux + Nginx + Mysql + PHP + Redis1. 功能支持PHP多版本切换(5.4/5.6/7.2)Mysql映射到宿主机目录docker-lnmp/mysql支持mysql/nginx/php日志站点配置见docker-lnmp/conf/conf.d支持...
本文围绕LNMP+Redis集群的部署、ECShop电商项目的介绍以及Git版本控制系统的深入讲解展开。通过对这些知识点的学习,可以帮助开发者更好地理解和掌握如何构建高性能的电子商务平台,并有效地管理项目的版本控制。...
lnmp自动搭建Linux+Nginx+PHP+Mysql的运行环境,以及PHP程序相关的Memcached,redis, mongodb等软件的自动安装shell脚本。目前已在centos 6.x (64bit)测试正常。各软件列表:Nginx V1.9.5Tengine V2.1.1PHP V5.5.21与...
Docker结合最新的php-fpm,nginx,redis,memcached,mariadb和git,nodejs,yarn等常用工具 此仓库与和相关联 如果您正在寻找LNMongoP,请转到 php-fpm 有关更多信息,请访问 Nginx的 有关更多信息,请访问 工具 ...
- **常用命令**:如 `git clone`, `git commit`, `git push` 等。 ##### 5. 分支管理 - **分支**:在 Git 中可以创建多个分支,用于开发不同的功能。 - **合并**:当分支功能开发完成后,可以将其合并到主分支。 -...
3. LNMP安装常见问题解答。 4. Fiddler的教程资源。 5. PHP进程管理相关的开源项目。 6. MySQL常用命令参考。 这些笔记涵盖了Redis操作、文件压缩、RPM包管理、Git版本控制、PHP时间计算、IDE快捷键以及各种工具的...
**LAMP架构详解** ...这个"ЛAMP电子教案"旨在为初学者...通过深入学习,你可以建立起坚实的Web开发基础,进一步探索更高级的主题,如负载均衡、缓存技术(如Redis或Memcached)以及安全实践(如防止SQL注入和XSS攻击)。
PHP56,PHP72 / Nginx / MySQL / MongoDB / Redis / Memcached 视频教程: 目录结构: build 应用 data 数据库数据存放路径(mysql,redis,mongo) ...shell 常用shell存放路径 vhost 虚拟主机配置 ...git cl
该方案为基于Docker Compose的DNMP集成环境部署设计源码,包含86个文件,涵盖13个tar包、10个Git忽略文件、8个PNG图片、7个配置文件、7个Lua脚本、6个Shell脚本、5个YAML文件、5个环境变量文件、4个示例文件以及3个...
5. **版本控制**:Git是常用的代码版本控制系统,指南会解释如何在Linux环境中安装Git,创建本地仓库,进行版本管理,以及与远程仓库的交互。 6. **自动化部署与持续集成**:介绍Jenkins、Docker等工具,用于自动化...
5. **LAMP/LNMP架构**:LAMP(Linux + Apache + MySQL + PHP)和LNMP(Linux + Nginx + MySQL + PHP)是常见的Web开发环境,了解这两种架构的搭建、调试和优化方法对于Web开发者来说非常实用。 6. **版本控制**:...
12. **版本控制**:为了协同开发和代码管理,项目可能使用了Git进行版本控制,学习使用Git可以帮助团队协作和代码回溯。 通过这个毕业设计项目,学生可以深入理解PHP Web开发的全貌,从数据库设计到前后端交互,再...
- **Git**:源码可能使用Git进行版本控制,便于团队协作和回滚更改。 - **服务器环境**:需要PHP运行环境(如LAMP或LNMP),确保所有依赖库和扩展安装到位。 - **HTTPS配置**:为提高安全性,网站应配置HTTPS,...
学习如何通过缓存技术如Redis和Memcached提升网站响应速度,以及使用防火墙规则、入侵检测系统等保障服务器安全,都是一个合格的Linux网站管理员必备的技能。 总的来说,"Linux网站建设技术指南"将带你走进Linux...
11. **版本控制**:Jcow Lite作为开源项目,可能会用到Git进行版本控制,开发者需要了解基本的Git命令和协作流程。 12. **社区功能**:社交系统的核心包括用户注册、个人资料、好友系统、消息通知、动态发布、评论...
3. **NoSQL知识**:了解memcached、redis、mongodb等NoSQL解决方案,理解其优缺点和应用场景。 4. **Web开发优化**:理解Web开发中的缓存策略和站点优化方案,提高网页加载速度和用户体验。 5. **面向对象编程**:...
3. **缓存机制**:为了提升性能,该系统可能会使用缓存策略,例如在内存中存储最近访问的页面或者使用文件缓存(如APC, Memcached, Redis等)。当用户请求相同内容时,直接从缓存中读取,而不是重新执行数据库查询和...