Game Server Build Script

Source: Internet
Author: User

#!/bin/bash#install mysqlrpm -q mysqlif [ $? -eq 0 ]thenrpm -e  --nodeps mysql else yum -y install libevent* libtool* autoconf*  libstd* ncurse* bison* openssl* gcc gcc-c++ bzip2*yum -y  groupinstall  "Development tools" ficd /usr/src/wget http://www.cmake.org/files/v2.8/ cmake-2.8.12.1.tar.gztar zxvf cmake-2.8.12.1.tar.gzcd cmake-2.8.12.1./configure &&  make && make installcd /usr/src/wget http://downloads.mysql.com/ archives/get/file/mysql-5.6.20.tar.gztar zxvf mysql-5.6.20.tar.gzcd mysql-5.6.20cmake - dcmake_install_prefix=/usr/local/mysql -dmysql_datadir=/usr/local/mysql/data -dsysconfdir=/etc  -dwith_myisam_storage_engine=1 -dwith_innobase_storage_engine=1 -dwith_memory_storage_engine=1  -dwith_readline=1 -dmysql_unix_adDr=/var/lib/mysql/mysql.sock -dmysql_tcp_port=3306 -denabled_local_infile=1 -dwith_partition_ Storage_engine=1 -dextra_charsets=all -ddefault_charset=utf8 -ddefault_collation=utf8_general_ cimake && make installgroupadd mysqluseradd -m -g mysql  mysqlchown -r mysql:mysql /usr/local/mysqlcd /usr/local/mysqlscripts/mysql_install_db  --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysqlrm -rf /etc/ my.cnfecho  ' [client] '  >> /etc/my.cnfecho  ' port=3306 '  >> /etc/ my.cnfecho  ' socket=/var/lib/mysql/mysql.sock '  >> /etc/my.cnfecho  ' [mysqld] '   >> /etc/my.cnfecho  ' port=3306 '  >> /etc/my.cnfecho  ' basedir=/usr/local/ MySQL '  >> /etc/my.cnfecho  ' datadir=/usr/local/mysql/data '  >> /etc/ my.cnfecho  ' Socket=/var/lib/mysql/mysql.Sock '  >> /etc/my.cnfecho  ' Log-bin = log-bin '  >> /etc/my.cnfecho   ' slow-query-log = 1 '  >> /etc/my.cnfecho  ' long-query-time = 1 '  >> /etc/my.cnfecho  ' Slow-query-log-file = slow-query-log '  >> / etc/my.cnfecho  ' Default-time-zone = system '  >> /etc/my.cnfecho  ' Character-set-server = utf8 '  >> /etc/my.cnfecho  ' default-storage-engine =  innodb '  >> /etc/my.cnfecho  ' [MySQL] '  >> /etc/my.cnfecho  ' Default-character-set=utf8 '  >> /etc/my.cnfcp /usr/local/mysql/support-files/mysql.server  /etc/init.d/mysqlchkconfig mysql onservice mysql startecho  ' path=/usr/local/ Mysql/bin: $PATH '  >> /etc/profileecho  ' Export path '  >> /etc/ Profilesource /etc/profileln -s /usr/local/mysql/bin/* /usr/local/bin/mysqladmin -u root password  ' gamma23$ ' mysql -uroot -e  "grant all privileges on *.* to  ' root ' @ '% '   identified by  ' gamma23$ '  WITH GRANT OPTION; '  -pgamma23$sed -i  "/commit/d"  /etc/sysconfig/iptablesecho  '-a input -m  state --state new -m tcp -p tcp --dport 3306 -j accept '  >> /etc/sysconfig/iptablesecho  ' COMMIT '  >> /etc/sysconfig/ iptablesservice iptables restart#install rediscd /usr/src/wget http:// Download.redis.io/releases/redis-2.8.13.tar.gztar zxvf redis-2.8.13.tar.gzcd redis-2.8.13make  && make installsrc/redis-server &redis-cli flushall#install python# Yum -y install gcc gcc-c++cd /usr/src/wget https://www.python.org/ftp/python/2.7.4/python-2.7.4.tar.bz2bzip2 -d python-2.7.4.tar.bz2tar xvf  python-2.7.4.tarcd python-2.7.4./configuremake all && make install & & make clean && make distclean#config pythonmv /usr/bin/python  /usr/bin/python2.6.6ln -s /usr/local/bin/python2.7 /usr/bin/pythonsed -i  ' 1  s/python/python2.6.6/g '  /usr/bin/yumpython -v#install nodecd /usr/src/wget -c  http://nodejs.org/dist/v0.10.23/node-v0.10.23.tar.gztar zxvf node-v0.10.23.tar.gzcd  node-v0.10.23./configure --prefix=/usr/local/node/0.10.23make && make install# config nodesed -i  '/export path user/i  #set  for nodejs '  /etc/ profilesed -i  '/export path user/i export node_home=/usr/local/node/0.10.23 '  /etc/profilesed -i  '/export&nbsp Path user/i export path= $NODE _home/bin: $PATH '  /etc/profilesource /etc/profilenode  -vln -s /usr/local/node/0.10.23/lib/node_modules/npm/lib/* /usr/local/lib/#install   pomelonpm install pomelo -g#npm install pomelo -g --unsafe-permnpm  Install forever -g


This article is from the "Sean" blog, so be sure to keep this source http://chengfuxing.blog.51cto.com/5168625/1674918

Game Server Build Script

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.