系统配置备忘

1. 安装CentOS 5.5 X64版本,使用最小模式安装(只包含基本系统)

yum -y update
reboot
uname -r
rpm -q kernel
rpm -e kernel-2.6.18-194.el5
shutdown now

2. 虚拟机内新建1块虚拟硬盘
fdisk /dev/sdb

为新硬盘分区并格式化 fdisk mkfs.ext3
修高fstab 自动加载硬盘分区 到 /opt/telenav
/dev/sdb1 /opt/telenav ext3 defaults 1 2

yum install gcc gcc-c++ autoconf automake

yum install gcc gcc-c++ autoconf automake glibc glibc-devel glib2 glib2-devel libevent libevent-devel ncurses ncurses-devel openssl openssl-devel readline readline-devel

./configure --prefix=/opt/telenav/server/proxy/nginx --user=nginx --group=nginx --with-cc-opt='-O2' --with-cpu-opt=opteron

chmod +x nginx
chkconfig --add nginx
chkconfig --level 345 nginx on

vi /etc/sysctl.conf 优化内核
sysctl -p

d srclib/apr
./configure --prefix=/opt/telenav/server/webserver/httpd/bin/apr

./configure --prefix=/opt/telenav/server/webserver/httpd/bin/apr-util --with-apr=/opt/telenav/server/webserver/httpd/bin/apr

./configure --prefix=/opt/telenav/server/webserver/httpd --enable-mods-shared=all --enable-so --with-apr=/opt/telenav/server/webserver/httpd/bin/apr/ --with-apr-util=/opt/telenav/server/webserver/httpd/bin/apr-util --disable-ipv6 -disable-dav   

httpd的2.2.10之后的版本执行这一步的make的时候可能会报错,解决办法:

在configure后加上:      --with-included-apr

cp apachectl /etc/init.d/httpd
chmod +x httpd
chkconfig --add httpd
chkconfig --level 345 httpd on

cd /opt/telenav/install/httpd/httpd-2.2.15/modules/proxy
/opt/telenav/server/webserver/httpd/bin/apxs -c -i mod_proxy.c proxy_util.c
/opt/telenav/server/webserver/httpd/bin/apxs -c -i mod_proxy_ajp.c ajp*.c

./configure --prefix=/opt/telenav/server/appserver/tomcat/bin/apr --with-apr=/opt/telenav/server/webserver/httpd/bin/apr --with-java-home=/opt/telenav/java/jdk1.6.0

./configure --prefix=/opt/telenav/server/appserver/tomcat/bin/ --with-java=/opt/telenav/java/jdk1.6.0

chmod +x tomcat
chkconfig --add tomcat
chkconfig --level 345 tomcat on

#vi /etc/security/limits.conf

增加下面这一行内容:

    - nofile 65536

CHOST="x86_64-pc-linux-gnu" CXX=gcc CXXFLAGS="-O3 -march=nocona -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/opt/telenav/server/database/mysql --with-unix-socket-path=/opt/telenav/server/database/mysql/tmp/mysql.sock --enable-assembler --enable-shared --enable-thread-safe-client --with-plugins=all --with-charset=utf8 -with-client-ldflags=-all-static -with-mysqld-ldflags=-all-static --with-pthread --without-debug

CREATE USER 'doudouy'@'%' IDENTIFIED BY 'doudouy!@#$%^&*()_+';
GRANT ALL PRIVILEGES ON . TO doudouy@"%" IDENTIFIED BY "doudouy!@#$%^&*()_+";
flush privileges;

change master to master_host='172.16.214.242', master_user='repluser', aster_password='repluser1234567890-=',master_log_file='mysql-bin.000013',master_log_pos=255;
CHANGE MASTER TO MASTER_HOST='172.16.214.242',MASTER_USER='repluser',MASTER_PASSWORD='repluser1234567890-=',MASTER_LOG_FILE='mysql-bin.000013',MASTER_LOG_POS=255;


GRANT REPLICATION SLAVE,REPLICATION CLIENT,RELOAD,SUPER ON . TO 'repluser'@'%' identified by 'repluser1234567890-=';
flush privileges;
FLUSH TABLES WITH READ LOCK;
SHOW MASTER STATUS;
UNLOCK TABLES;

10:
CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.000010',MASTER_LOG_POS=106;
START SLAVE;
SHOW SLAVE STATUS;

vi /etc/security/limits.conf

*                -       nofile          65535

你可能感兴趣的:(tomcat,nginx,mysql,centos,gcc)