ha666_go运行环境配置
项目地址:http://git.oschina.net/ha666/ha666_go
服务器配置:
CPU: 1核 |
内存: 1024 MB |
操作系统: CentOS 7.0 64位 |
内网IP: 10.171.231.48 |
带宽计费方式: 按使用流量 |
当前使用带宽: 带宽:66Mbps(峰值) |
1、修改语言
阿里云的ECS默认语言是:en_US.UTF-8,需要改成zh_CN.UTF-8
修改方法:vim /etc/locale.conf,然后重启。
查看方法:echo $LANG
2、安装ab(ApacheBench)
[root@iZ23n2t9gynZ ~]# yum install httpd-tools 已加载插件:langpacks base | 3.6 kB 00:00:00 epel | 4.3 kB 00:00:00 extras | 3.4 kB 00:00:00 updates | 3.4 kB 00:00:00 (1/7): base/7/x86_64/group_gz | 154 kB 00:00:00 (2/7): epel/x86_64/group_gz | 169 kB 00:00:00 (3/7): epel/x86_64/updateinfo | 368 kB 00:00:00 (4/7): extras/7/x86_64/primary_db | 87 kB 00:00:00 (5/7): epel/x86_64/primary_db | 3.6 MB 00:00:00 (6/7): base/7/x86_64/primary_db | 5.1 MB 00:00:01 (7/7): updates/7/x86_64/primary_db | 4.0 MB 00:00:01 正在解决依赖关系 --> 正在检查事务 ---> 软件包 httpd-tools.x86_64.0.2.4.6-31.el7.centos.1 将被 安装 --> 解决依赖关系完成 依赖关系解决 ============================================================================================================================================================= Package 架构 版本 源 大小 ============================================================================================================================================================= 正在安装: httpd-tools x86_64 2.4.6-31.el7.centos.1 updates 79 k 事务概要 ============================================================================================================================================================= 安装 1 软件包 总下载量:79 k 安装大小:168 k Is this ok [y/d/N]: y Downloading packages: httpd-tools-2.4.6-31.el7.centos.1.x86_64.rpm | 79 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction 正在安装 : httpd-tools-2.4.6-31.el7.centos.1.x86_64 1/1 验证中 : httpd-tools-2.4.6-31.el7.centos.1.x86_64 1/1 已安装: httpd-tools.x86_64 0:2.4.6-31.el7.centos.1 完毕!
3、安装mysql
先查看yum上提供的数据库可下载版本
[root@iZ23n2t9gynZ ~]# yum list | grep mysql akonadi-mysql.x86_64 1.9.2-4.el7 base apr-util-mysql.x86_64 1.5.2-6.el7 base calligra-kexi-driver-mysql.x86_64 2.9.7-1.el7 epel collectd-mysql.x86_64 5.5.0-2.el7 epel dmlite-plugins-mysql.x86_64 0.7.4-1.el7 epel dovecot-mysql.x86_64 1:2.2.10-4.el7_0.1 base dpm-copy-server-mysql.x86_64 1.8.10-1.el7 epel dpm-name-server-mysql.x86_64 1.8.10-1.el7 epel dpm-server-mysql.x86_64 1.8.10-1.el7 epel dpm-srm-server-mysql.x86_64 1.8.10-1.el7 epel dspam-mysql.x86_64 3.10.2-11.el7 epel exim-mysql.x86_64 4.84-4.el7 epel freeradius-mysql.x86_64 3.0.4-6.el7 base fts-mysql.x86_64 3.3.1-3.el7 epel gnokii-smsd-mysql.x86_64 0.6.31-10.el7 epel holland-mysqldump.noarch 1.0.10-3.el7 epel holland-mysqllvm.noarch 1.0.10-3.el7 epel lfc-server-mysql.x86_64 1.8.10-1.el7 epel libdbi-dbd-mysql.x86_64 0.8.3-16.el7 base libgda-mysql.x86_64 1:5.1.2-2.el7.1 epel libnss-mysql.x86_64 1.5-19.el7 epel libodb-mysql.x86_64 2.3.0-1.el7 epel libodb-mysql-devel.x86_64 2.3.0-1.el7 epel lighttpd-mod_mysql_vhost.x86_64 1.4.37-1.el7 epel mysql++.x86_64 3.1.0-12.el7 epel mysql++-devel.x86_64 3.1.0-12.el7 epel mysql++-manuals.x86_64 3.1.0-12.el7 epel mysql-connector-java.noarch 1:5.1.25-3.el7 base mysql-connector-odbc.x86_64 5.2.5-6.el7 base mysql-connector-python.noarch 1.1.6-1.el7 epel mysql-proxy.x86_64 0.8.5-2.el7 epel mysql-proxy-devel.x86_64 0.8.5-2.el7 epel mysql-utilities.noarch 1.3.6-1.el7 epel mysqlreport.noarch 3.5-11.el7 epel mysqltuner.noarch 1.2.0-7.el7 epel nagios-plugins-mysql.x86_64 2.0.3-3.el7 epel nodejs-mysql.noarch 2.3.2-1.el7 epel opendbx-mysql.x86_64 1.4.6-6.el7 epel opensips-mysql.x86_64 1.10.5-3.el7 epel owncloud-mysql.noarch 8.0.8-1.el7 epel pdns-backend-mysql.x86_64 3.4.6-1.el7 epel perdition-mysql.x86_64 2.1-2.el7 epel php-mysql.x86_64 5.4.16-36.el7_1 updates php-mysqlnd.x86_64 5.4.16-36.el7_1 updates php-pear-MDB2-Driver-mysql.noarch 1.5.0-0.8.b4.el7 epel php-pear-MDB2-Driver-mysqli.noarch 1.5.0-0.8.b4.el7 epel proftpd-mysql.x86_64 1.3.5a-1.el7 epel qt-mysql.i686 1:4.8.5-8.el7 base qt-mysql.x86_64 1:4.8.5-8.el7 base qt5-qtbase-mysql.x86_64 5.4.2-1.el7 epel redland-mysql.x86_64 1.0.16-6.el7 base root-sql-mysql.x86_64 5.34.32-3.el7 epel rsyslog-mysql.x86_64 7.4.7-7.el7_0 base soci-mysql.x86_64 3.2.3-1.el7 epel soci-mysql-devel.x86_64 3.2.3-1.el7 epel voms-mysql-plugin.x86_64 3.1.6-5.el7 epel zabbix20-proxy-mysql.x86_64 2.0.15-1.el7 epel zabbix20-server-mysql.x86_64 2.0.15-1.el7 epel zabbix20-web-mysql.noarch 2.0.15-1.el7 epel zabbix22-dbfiles-mysql.noarch 2.2.10-1.el7 epel zabbix22-proxy-mysql.x86_64 2.2.10-1.el7 epel zabbix22-server-mysql.x86_64 2.2.10-1.el7 epel zabbix22-web-mysql.noarch 2.2.10-1.el7 epel
然后安装mariadb
[root@iZ23n2t9gynZ ~]# yum install mariadb mariadb-server 已加载插件:langpacks 软件包 1:mariadb-5.5.44-1.el7_1.x86_64 已安装并且是最新版本 正在解决依赖关系 --> 正在检查事务 ---> 软件包 mariadb-server.x86_64.1.5.5.44-1.el7_1 将被 安装 --> 正在处理依赖关系 perl-DBI,它被软件包 1:mariadb-server-5.5.44-1.el7_1.x86_64 需要 --> 正在处理依赖关系 perl-DBD-MySQL,它被软件包 1:mariadb-server-5.5.44-1.el7_1.x86_64 需要 --> 正在处理依赖关系 perl(DBI),它被软件包 1:mariadb-server-5.5.44-1.el7_1.x86_64 需要 --> 正在检查事务 ---> 软件包 perl-DBD-MySQL.x86_64.0.4.023-5.el7 将被 安装 ---> 软件包 perl-DBI.x86_64.0.1.627-4.el7 将被 安装 --> 正在处理依赖关系 perl(RPC::PlServer) >= 0.2001,它被软件包 perl-DBI-1.627-4.el7.x86_64 需要 --> 正在处理依赖关系 perl(RPC::PlClient) >= 0.2000,它被软件包 perl-DBI-1.627-4.el7.x86_64 需要 --> 正在检查事务 ---> 软件包 perl-PlRPC.noarch.0.0.2020-14.el7 将被 安装 --> 正在处理依赖关系 perl(Net::Daemon) >= 0.13,它被软件包 perl-PlRPC-0.2020-14.el7.noarch 需要 --> 正在处理依赖关系 perl(Net::Daemon::Test),它被软件包 perl-PlRPC-0.2020-14.el7.noarch 需要 --> 正在处理依赖关系 perl(Net::Daemon::Log),它被软件包 perl-PlRPC-0.2020-14.el7.noarch 需要 --> 正在处理依赖关系 perl(Compress::Zlib),它被软件包 perl-PlRPC-0.2020-14.el7.noarch 需要 --> 正在检查事务 ---> 软件包 perl-IO-Compress.noarch.0.2.061-2.el7 将被 安装 --> 正在处理依赖关系 perl(Compress::Raw::Zlib) >= 2.061,它被软件包 perl-IO-Compress-2.061-2.el7.noarch 需要 --> 正在处理依赖关系 perl(Compress::Raw::Bzip2) >= 2.061,它被软件包 perl-IO-Compress-2.061-2.el7.noarch 需要 ---> 软件包 perl-Net-Daemon.noarch.0.0.48-5.el7 将被 安装 --> 正在检查事务 ---> 软件包 perl-Compress-Raw-Bzip2.x86_64.0.2.061-3.el7 将被 安装 ---> 软件包 perl-Compress-Raw-Zlib.x86_64.1.2.061-4.el7 将被 安装 --> 解决依赖关系完成 依赖关系解决 ============================================================================================================================================================= Package 架构 版本 源 大小 ============================================================================================================================================================= 正在安装: mariadb-server x86_64 1:5.5.44-1.el7_1 updates 11 M 为依赖而安装: perl-Compress-Raw-Bzip2 x86_64 2.061-3.el7 base 32 k perl-Compress-Raw-Zlib x86_64 1:2.061-4.el7 base 57 k perl-DBD-MySQL x86_64 4.023-5.el7 base 140 k perl-DBI x86_64 1.627-4.el7 base 802 k perl-IO-Compress noarch 2.061-2.el7 base 260 k perl-Net-Daemon noarch 0.48-5.el7 base 51 k perl-PlRPC noarch 0.2020-14.el7 base 36 k 事务概要 ============================================================================================================================================================= 安装 1 软件包 (+7 依赖软件包) 总下载量:12 M 安装大小:59 M Is this ok [y/d/N]: y Downloading packages: (1/8): perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64.rpm | 32 kB 00:00:00 (2/8): perl-Compress-Raw-Zlib-2.061-4.el7.x86_64.rpm | 57 kB 00:00:00 (3/8): perl-DBD-MySQL-4.023-5.el7.x86_64.rpm | 140 kB 00:00:00 (4/8): perl-DBI-1.627-4.el7.x86_64.rpm | 802 kB 00:00:00 (5/8): perl-Net-Daemon-0.48-5.el7.noarch.rpm | 51 kB 00:00:00 (6/8): perl-IO-Compress-2.061-2.el7.noarch.rpm | 260 kB 00:00:00 (7/8): perl-PlRPC-0.2020-14.el7.noarch.rpm | 36 kB 00:00:00 (8/8): mariadb-server-5.5.44-1.el7_1.x86_64.rpm | 11 MB 00:00:02 ------------------------------------------------------------------------------------------------------------------------------------------------------------- 总计 5.1 MB/s | 12 MB 00:00:02 Running transaction check Running transaction test Transaction test succeeded Running transaction 正在安装 : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64 1/8 正在安装 : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64 2/8 正在安装 : perl-IO-Compress-2.061-2.el7.noarch 3/8 正在安装 : perl-Net-Daemon-0.48-5.el7.noarch 4/8 正在安装 : perl-PlRPC-0.2020-14.el7.noarch 5/8 正在安装 : perl-DBI-1.627-4.el7.x86_64 6/8 正在安装 : perl-DBD-MySQL-4.023-5.el7.x86_64 7/8 正在安装 : 1:mariadb-server-5.5.44-1.el7_1.x86_64 8/8 验证中 : perl-Net-Daemon-0.48-5.el7.noarch 1/8 验证中 : 1:mariadb-server-5.5.44-1.el7_1.x86_64 2/8 验证中 : perl-IO-Compress-2.061-2.el7.noarch 3/8 验证中 : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64 4/8 验证中 : perl-PlRPC-0.2020-14.el7.noarch 5/8 验证中 : perl-DBI-1.627-4.el7.x86_64 6/8 验证中 : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64 7/8 验证中 : perl-DBD-MySQL-4.023-5.el7.x86_64 8/8 已安装: mariadb-server.x86_64 1:5.5.44-1.el7_1 作为依赖被安装: perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7 perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7 perl-DBD-MySQL.x86_64 0:4.023-5.el7 perl-DBI.x86_64 0:1.627-4.el7 perl-IO-Compress.noarch 0:2.061-2.el7 perl-Net-Daemon.noarch 0:0.48-5.el7 perl-PlRPC.noarch 0:0.2020-14.el7 完毕!
启动mariadb
[root@iZ23n2t9gynZ ~]# systemctl start mariadb
开机自动启动
[root@iZ23n2t9gynZ ~]# systemctl enable mariadb ln -s '/usr/lib/systemd/system/mariadb.service' '/etc/systemd/system/multi-user.target.wants/mariadb.service'
设置root密码
[root@iZ23n2t9gynZ ~]# mysql_secure_installation /usr/bin/mysql_secure_installation:行379: find_mysql_client: 未找到命令 NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MariaDB to secure it, we'll need the current password for the root user. If you've just installed MariaDB, and you haven't set the root password yet, the password will be blank, so you should just press enter here. Enter current password for root (enter for none): OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MariaDB root user without the proper authorisation. Set root password? [Y/n] y New password: Re-enter new password: Password updated successfully! Reloading privilege tables.. ... Success! By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? [Y/n] y ... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] y ... Success! By default, MariaDB comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] y - Dropping test database... ... Success! - Removing privileges on test database... ... Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n] y ... Success! Cleaning up... All done! If you've completed all of the above steps, your MariaDB installation should now be secure. Thanks for using MariaDB!
登录测试
[root@iZ23n2t9gynZ ~]# mysql -uroot -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 13 Server version: 5.5.44-MariaDB MariaDB Server Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]>
4、安装redis
yum install -y tcl
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make
cd src
make test
配置redis
cd /root/redis-stable cp redis.conf /usr/local/bin cd src cp redis-server /usr/local/bin cp redis-cli /usr/local/bin
配置redis.conf(vim /usr/local/bin/redis.conf)
daemonize yes port 26125 bind 127.0.0.1 # save 900 1 # save 300 10 # save 60 10000 maxclients 60000 maxmemory 500mb
启动与客户端连接
[root@iZ23n2t9gynZ ~]# redis-server /usr/local/bin/redis.conf [root@iZ23n2t9gynZ ~]# redis-cli -p 26125 127.0.0.1:26125> info # Server redis_version:3.0.5 redis_git_sha1:00000000 redis_git_dirty:0 redis_build_id:8960fb2f771de35e redis_mode:standalone os:Linux 3.10.0-123.9.3.el7.x86_64 x86_64 arch_bits:64 multiplexing_api:epoll gcc_version:4.8.2 process_id:32538 run_id:2b0eb3b85cfcb8c3d37157e12756d6b0bcdcc467 tcp_port:26125 uptime_in_seconds:68 uptime_in_days:0 hz:10 lru_clock:2251601 config_file:/usr/local/bin/redis.conf # Clients connected_clients:1 client_longest_output_list:0 client_biggest_input_buf:0 blocked_clients:0 # Memory used_memory:3416888 used_memory_human:3.26M used_memory_rss:9699328 used_memory_peak:3416888 used_memory_peak_human:3.26M used_memory_lua:36864 mem_fragmentation_ratio:2.84 mem_allocator:jemalloc-3.6.0 # Persistence loading:0 rdb_changes_since_last_save:0 rdb_bgsave_in_progress:0 rdb_last_save_time:1445092109 rdb_last_bgsave_status:ok rdb_last_bgsave_time_sec:-1 rdb_current_bgsave_time_sec:-1 aof_enabled:0 aof_rewrite_in_progress:0 aof_rewrite_scheduled:0 aof_last_rewrite_time_sec:-1 aof_current_rewrite_time_sec:-1 aof_last_bgrewrite_status:ok aof_last_write_status:ok # Stats total_connections_received:2 total_commands_processed:2 instantaneous_ops_per_sec:0 total_net_input_bytes:42 total_net_output_bytes:3849 instantaneous_input_kbps:0.00 instantaneous_output_kbps:0.00 rejected_connections:0 sync_full:0 sync_partial_ok:0 sync_partial_err:0 expired_keys:0 evicted_keys:0 keyspace_hits:0 keyspace_misses:0 pubsub_channels:0 pubsub_patterns:0 latest_fork_usec:0 migrate_cached_sockets:0 # Replication role:master connected_slaves:0 master_repl_offset:0 repl_backlog_active:0 repl_backlog_size:1048576 repl_backlog_first_byte_offset:0 repl_backlog_histlen:0 # CPU used_cpu_sys:0.02 used_cpu_user:0.06 used_cpu_sys_children:0.00 used_cpu_user_children:0.00 # Cluster cluster_enabled:0 # Keyspace 127.0.0.1:26125>
环境配置完了。
ha666_go运行环境配置的更多相关文章
- JAVA EE 运行环境配置(包含JAVA SE)
JAVA EE 运行环境配置(包含JAVA SE) 1.下载并安装jre-7u7-windows-i586.exe (最新的JAVA运行环境) 2.下载并安装java_ee_sdk-6u4-jdk7- ...
- maven(六),外置maven运行环境配置
外置maven eclipse内置的maven插件是固定版本,如果要用其他版本的maven,可以使用外置maven 下载地址: http://maven.apache.org/download.cgi ...
- win2008 r2 服务器php+mysql+sqlserver2008运行环境配置(从安装、优化、安全等)
这篇文章主要介绍了win2008 r2 服务器php+mysql+sqlserver2008运行环境配置(从安装.优化.安全等),需要的朋友可以参考下 win2008 r2 安装 http://www ...
- Sublime Text3 for Java 编译运行环境配置 入门详解 - 精简归纳
Sublime Text3 for Java 编译运行环境配置 入门详解 - 精简归纳 JERRY_Z. ~ 2020 / 9 / 24 转载请注明出处!️ 目录 Sublime Text3 for ...
- Java 学习(1): windows java 运行& 环境配置
Java 文件的运行 如下,创建了一个 名为"HelloWorld.java" 的 Java 文件: public class HelloWorld { public static ...
- wampserver - windows服务器下php运行环境配置
之前一直在通过windows server IIS跑php程序,直到后来,发现了她 “wampserver", 一个法国的windows+apache+php+mysql部署包. 感觉挺好用 ...
- 根据不同运行环境配置和组织node.js应用
安装node-config模块 npm install config --save || yarn add config mkidr config // 创建config文件夹 在config文件夹下 ...
- Ubuntu16.04 faster-rcnn+caffe+gpu运行环境配置以及解决各种bug
https://blog.csdn.net/flygeda/article/details/78638824 本文主要是对近期参考的网上各位大神的博客的总结,其中,从安装系统到跑通程序过程中遇到的各种 ...
- Java(JDK/Tomcat/Maven)运行环境配置及工具(idea/eclipse)安装
Java (计算机编程语言) Java是一门面向对象编程语言,不仅吸收了C++语言的各种优点,还摒弃了C++里难以理解的多继承.指针等概念,因此Java语言具有功能强大和简单易用两个特征. Java语 ...
随机推荐
- 【Android - 框架】之RxJava的使用
RxJava算是最新最常用的,也是程序员们最喜欢的框架之一了. RxJava的核心由Observable(被观察者,事件源)和Subscriber(观察者)构成,Observable负责发出一系列事件 ...
- MapObject shape数据操作
利用MO 的GeoDataset .DataConnection Recordset 进行数据操作 在MO中.使用GeoDataset对象和DataConnection 对象来连接和读取地理数据. ...
- nandflash中oob、ecc分析
1.为何需要分析? 最近一直接触这类驱动,如果对它的原理不懂的话,驱动调试会很麻烦!!!!!! 2.ecc? nand的纠错能力,目前有1位.4位和8位,也就是说在512字节中如果是4位的ecc那就可 ...
- Seeking USB Serial Com Port in Windows Automatically : via PID VID
After you read previous article, you might know how to operate a com port in Windows. But that ex ...
- 在C#中使用InputBox
以前用VB编程常用InputBox,现在学了C#,竟然找不到它了--后来到网上查到了,现在贡献给大家:1.首先要添加引用Microsoft.VisualBasic2.命名空间 Using Micros ...
- HTML5事件——contextmenu 隐藏鼠标右键菜单
在window中单击右键或在Mac中Ctrl+单击时会触发contextmenu事件,通过取消其默认动作能够提供自己定义菜单. 首先先写一个自己的菜单: <style> ul, li { ...
- docker 镜像和容器的批量清理
镜像和容器的清理 删除所有运行中的容器 $ docker kill $(docker ps -q) 删除所有停止的容器 $ docker rm $(docker ps -a -q) 删除所有没有tag ...
- [置顶] 基于视频采集卡驱动的错误修改CX26828
基于视频采集卡驱动的错误修改CX26828 1. 设置root密码 command:sudo passwd root 2.查看系统状态 输入命令:lsmod root@ubuntu:/home/yu# ...
- Shell脚本编程——了解你的Linux系统必须掌握的20个命令
要想详细了解你的Linux系统,为系统评估和性能调化提供准确的信息,那么,你会经常用到这几组命令. 一. 系统信息 1. 查看内核版本.编译主机.编译器版本和编译时间的信息 cat /p ...
- DeDeCMS 每次都被黑出翔了!!DEDECMS漏洞扫描
在dedecms基础上用插件的形式制作了一分类信息平台.结果问题不断的接踵而至.每次上去扫描一下.各种漏洞.危急代码一堆一堆的.全然被黑出翔了. 之所以这种原因, 1)开源程序的开放性,让全部人都能够 ...