server all-install
yuminstallgcc
yuminstallgcc-c++
yuminstallmake
***********allpcneedinstall*************
1)mongodb:
1installboost/scons/uuid
yuminstallboost-devel
yuminstallscons
2installmongodb
scons--prefix=/opt/mongodb--fullinstall
cp-r./sbin/opt/mongodb/
mkdir/app/mongodb
vi/etc/rc.localaddline/opt/mongodb/sbin/shardserverstart
2)jdk
1./jdk-6u32-linux-x64.bin
2cp-rjdk1.6.0_32//opt/jdk1.6
3vi/etc/profile
exportJAVA_HOME=/opt/jdk1.6
exportCLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
exportPATH=$JAVA_HOME/bin:$PATH
4source/etc/profile
set
5fortest
echo$JAVA_HOME
java-version
***************gameserverneedinstall*********************
1)uuid
yuminstalllibuuid-devel
2)jsoncpp
sconsplatform=linux-gcc
cdlibs/linux-gcc-4.4.4/
cp*/usr/lib64/
ln-s/usr/lib64/libjson_linux-gcc-4.4.4_libmt.so/usr/lib64/libjsoncpp.so
cd../../include
cp-rjson/usr/include/
**************gatewayserverneedinstall************************
1)nginx
1********installfromsource
libtool
zlib
pcre
2yuminstallopenssl-devel
3进入nginx安装目录
./configure--prefix=/opt/nginx--with-http_ssl_module
make
makeinstall
4把这里的nginx.conf拷到相应的位置(注意修改中文部分的配置)
cp/path/to/nginx.conf/opt/nginx/conf/nginx.conf
vi/etc/rc.local
/opt/nginx/sbin/nginx
2)php
1**********installformsource*****************
zlib(zlibwillinstallwheninstallthenginx)
libxml(yuminstalllibxml2-devel)
libtool(libtoolwillinstallwheninstallthenginx)
libjpeg
libpng
libmcrypt
libcurl(yuminstalllibcurl-devel)
openssl(opensslwillinstallwheninstallthenginx)
2groupaddwebuser
useradd-gwebuserwebuser
3./configure--prefix=/opt/php--enable-fpm--with-fpm-user=webuser--with-fpm-group=webuser--with-curl--with-mcrypt--enable-mbstring--enable-pdo--with-pdo-mysql=mysqlnd--with-mysqli=mysqlnd--with-mysql=mysqlnd--with-openssl--with-gd--with-jpeg-dir=/usr/lib/--with-png-dir=/usr/lib/--enable-exif--enable-zip
make
makeinstall
4cpphp-fpm.conf/opt/php/etc/php-fpm.conf
cpphp.ini/opt/php/lib/php.ini
cp./sapi/fpm/init.d.php-fpm/etc/init.d/php-fpm
chmod755/etc/init.d/php-fpm
chkconfigphp-fpmon
3)mongodbphpdriver
#installmongodbphpdriver
cdmongodb-mongodb-php-driver-<commit_id>
/opt/php/bin/phpize
./configure--with-php-config=/opt/php/bin/php-config
make&&makeinstall
vi/opt/php/lib/php.ini
extension=mongo.so
安装mysql
groupaddmysql
useradd-gmysqlmysql
mkdir-p/app/mysql/mysqld_log/innodb
chownmysql:mysql/app/mysql/mysqld_log-R
cd/opt/mysql
#cp/path/to/my.cnfmy.cnf
./scripts/mysql_install_db--defaults-file=./my.cnf
#cp/path/to/mysqld/opt/mysql/sbin/mysqld
/opt/mysql/sbin/mysqldstart
/opt/mysql/bin/mysqladmin--socket=/tmp/mysql.sock-urootpasswordxxx
/opt/mysql/bin/mysql-uroot--password='xxx'--socket=/tmp/mysql.sock
GRANTALLPRIVILEGESON*.*TO'root'@'%'IDENTIFIEDBY'xxx'WITHGRANTOPTION;
flushprivileges;