测试环境搭建最详细步骤
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
cmake -DCMAKE_INSTALL_PREFIX=/home/richapm/public/mysql
./configure --prefix=/home/richapm/public/memcached --with-libevent=/home/richapm/public/
./configure --prefix=/home/richapm/public
JAVA_HOME=/home/richapm/public/jdk1.7.0_72
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
CATALINA_HOME=/home/richapm/release/apache-tomcat
PATH=$JAVA_HOME/bin:/home/richapm/public/bin:/home/richapm/public/mysql/bin:/home/richapm/public/mongodb/bin:$PATH:
$HOME/bin
export JAVA_HOME
export CLASSPATH
export PATH
export LANG="zh_CN.UTF-8"
安装mysql:
$ cd /home/richapm/src
$ tar xf mysql-5.7.2-m12.tar.gz
$ cmake -DCMAKE_INSTALL_PREFIX=/home/richapm/public/mysql
$ make && make install
安装mongodb:
$ cd /home/richapm/src
$ tar xf mongodb-linux-x86_64-rhel62-3.0.4.tgz
$ mv mongodb-linux-x86_64-rhel62-3.0.4 ~/public/mongodb
安装并配置jdk:
$ cd /home/richapm/src
$ tar xf jdk-7u72-linux-x64.gz
$ mv jdk-7u72-linux-x64 ~/public/jdk1.7.0_72
$ more ~/.bash_profile
JAVA_HOME=/home/public/jdk1.7.0_72 (配置java home)
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar (配置dt.jar和 tools.jar)
CATALINA_HOME=/home/release/apache-tomcat (配置tomcat)
PATH=$JAVA_HOME/bin:/home/public/bin:/home/richapm/public/mysql/bin:/home/richapm/public/mongodb/bin:$PATH:
$HOME/bin (配置java、public、mysql、mongodb等各个软件的bin)
export JAVA_HOME
export CLASSPATH
export PATH
export LANG="zh_CN.UTF-8"
安装memcached:
需先安装:libevent
$ cd /home/richapm/src
$ tar xf libevent-2.0.22-stable.tar.gz
$ cd libevent-2.0.22-stable
$ ./configure --prefix=/home/richapm/public
$(MAKE)... yes
$ make && make install
$ cd /home/richapm/src
$ tar xf memcached-1.4.13.tar.gz
$ cd memcached-1.4.13
$ ./configure --prefix=/home/richapm/public/memcached --with-libevent=/home/richapm/public/
$(MAKE)... yes
$ make && make install
安装tomcat:
$ cd /home/richapm/src
$ tar xf apache-tomcat-7.0.52.tar.gz
$ mv apache-tomcat-7.0.52 ~/release
zmodem安装及使用:
安装zmodem:
# rpm -ivh lrzsz-0.12.20-27.1.el6.x86_64.rpm
从本地选择文件上传到服务器;
rz
传输到CRT下载目录下;
# sz lrzsz-0.12.20-27.1.el6.x86_64.rpm
从服务器的另一个IP网口拷贝文件到当前目录:
# scp oamonitor@192.168.21.444:/home/oamonitor/src/lrzsz-0.12.20-27.1.el6.x86_64.rpm .
GRANT ALL PRIVILEGES on *.* to 'root'@'%' identified by 'gztest';
创建root用户的密码:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('gztest');
修改root用户的密码:
update user set password=PASSWORD('gztest') where user='root';
创建mysql用户:
CREATE USER 'richapm'@'192.168.%' IDENTIFIED BY 'u83B6AZ3X112eaubfi0o2';
重启mysql服务:
service mysqld restart
(注:参数--skip-grant-tables为跳过授权表;--skip-net
working为不监听TCP/IP连接);
mysqld_safe --skip-grant-tables --skip-networking &
重启mysql服务:
service mysqld restart
查看mysql启动进程:
ps -ef|grep mysql
登录mysql:
mysql -p
停止mysql服务:
service mysqld stop
显示用户:
show user
创建库:
create database richapm;
显示表格:
show databases;
切换用户:
use richapm
导入数据框架:
source /home/richapm/apm_table4.sql;
导入数据包:
source /home/richapm/apm_data4.sql;