Ubuntu 14.04服务器安装及软件配置
1、安装操作系统,配置root账号,通过sudo设置root的密码 如果使用ubuntu server 14.04,开启root需额外配置
1.开启root远程登录权限
sudo vi /etc/ssh/sshd_config
将PermitRootLogin without-password 修改为PermitRootLogin yes
2.重启ssh服务
service ssh restart
2、更新sources.list,然后 apt-get update
vim /etc/apt/sources.list
deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty-backports main restricted universe multiverse
apt-get update
3、通过 locale -a ,检查中文包问题,( 具体参考:英文Ubuntu安装中文包(locale)的方法;),然后,在/root/.profile 中增加: export LC_ALL=zh_CN.UTF-8( 具体参考: 调整更改ubuntu时区,时间,locale )。
vim /root/.profile
export LC_ALL=zh_CN.UTF-
输入以下命令安装:
cd /usr/share/locales
sudo ./install-language-pack zh_CN
然后重开终端,就可以发现中文locale已经安装完毕,警告已经不再出现了。
当然,还可以执行:
sudo locale-gen
重建locale。
Ubuntu 内存问题:调整参数:/etc/sysctl.conf 【针对4G内存进行配置,老柏优化】
vim /etc/sysctl.conf
vm.lowmem_reserve_ratio =
vm.min_free_kbytes =
4、安装相关软件
安装openjdk
sudo apt-get install openjdk--jdk
安装MySQL
sudo apt-get install mysql-server
安装libcv
sudo apt-get install libcv2.
安装tomcat7
sudo apt-get install tomcat7 tomcat7-admin
安装gcc
apt-get install build-essential
安装libstdc++5
sudo apt-get install libstdc++
安装libxv-dev
apt-get install libxv-dev
安装libcurl (httpclient)
./configure --prefix=/usr/local/curl ; make ; make install
5、软件与环境参数配置
环境变量:
vim /root/.profile
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/opt/xdt/videocheck/libs/dh:/opt/xdt/videocheck/libs/hk
export JAVA_OPTS="-server -Xms512m -Xmx1024m -XX:PermSize=600M -XX:MaxPermSize=600m" export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/opt/xdt/videocheck/libs/dh:/opt/xdt/videocheck/libs/hk
export LC_ALL=zh_CN.UTF-
export JAVA_OPTS="-server -Xms512m -Xmx1024m -XX:PermSize=600M -XX:MaxPermSize=600m"
6、优化tomcat
安装authbind工具: apt-get install authbind
修改tomcat配置文件: /etc/default/tomcat7
/etc/default/tomcat7, 修改:AUTHBIND=yes
开放80端口:
touch /etc/authbind/byport/80
chmod 0755 /etc/authbind/byport/80
chown tomcat7:tomcat7 /etc/authbind/byport/80
7、MySQL数据库(存储过程与参数配置)
开启MySQL Event统计功能:
sudo vim /etc/mysql/my.cnf
增加下面内容:
-- 查看是否开启定时器
SHOW VARIABLES LIKE 'event_scheduler';
-- 开启定时器 0:off 1:on
SET GLOBAL event_scheduler = 1;
event_scheduler = 1
bind-address = 0.0.0.0
[client]
default-character-set=utf8
[mysqld]
character_set_server=utf8
[mysql]
default-character-set=utf8
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'system' WITH GRANT OPTION;
flush privileges;
啦啦啦
Ubuntu 14.04服务器安装及软件配置的更多相关文章
- Ubuntu 16.04服务器安装及软件配置
1.配置静态地址 vim /etc/network/interfaces auto enp1s0 iface enp1s0 inet static address 192.168.1.131 netm ...
- ubuntu 14.04 64位安装bigbluebutton
BigBlueButton 是一个使用 ActionScript 开发的在线视频会议系统或者是远程教育系统,主要功能包括在线PPT演示.视频交流和语音交流,还可以进行文字交流.举手发言等功能,特别适合 ...
- 如何在 Ubuntu 14.04 上安装 Elasticsearch,Logstash 和 Kibana
介绍 在本教程中,我们将去的 Elasticsearch 麋鹿堆栈安装 Ubuntu 14.04 — — 那就是,Elasticsearch 5.2.x,Logstash 2.2.x 和 Kibana ...
- Ubuntu 14.04中Elasticsearch集群配置
Ubuntu 14.04中Elasticsearch集群配置 前言:本文可用于elasticsearch集群搭建参考.细分为elasticsearch.yml配置和系统配置 达到的目的:各台机器配置成 ...
- deepsooncms在Ubuntu 14.04上部署教程
deepsooncms在Ubuntu 14.04上部署教程 一.安装mono1.在命令行运行sudo apt-key adv --keyserver keyserver.ubuntu.com --re ...
- Ubuntu 14.04 中 安装elasticsearch2.*+logstash2.*+kibana
在Ubuntu 14.04 上安装单机版ELK 2.*(脚本化) 1.判断是否为root权限 if [ "${UID}" -ne 0 ]; then echo "You ...
- 【DDD/CQRS/微服务架构案例】在Ubuntu 14.04.4 LTS中运行WeText项目的服务端
在<WeText项目:一个基于.NET实现的DDD.CQRS与微服务架构的演示案例>文章中,我介绍了自己用Visual Studio 2015(C# 6.0 with .NET Frame ...
- Ubuntu 14.04 LTS下安装Google Chrome浏览器
在Ubuntu 14.04下安装Google Chrome浏览器非常简单,只要到Chrome的网站下载Deb安装包并进行安装即可.当然你也可以使用APT软件包管理器来安装Google Chrome浏览 ...
- 烂泥:ubuntu 14.04搭建OpenVPN服务器
本文由秀依林枫提供友情赞助,首发于烂泥行天下 公司分部需要连接公司内部的服务器,但是该服务器只允许公司内部的网络访问. 为了解决这个问题,打算使用VPN.对于VPN以前使用最多的是PPTP这个解决方案 ...
随机推荐
- android开发(45) 自定义软键盘(输入法)
概述 在项目开发中遇到一个需求,”只要数字键盘的输入,仅仅有大写字母的输入,某些输入法总是会提示更新,弹出广告等“,使得我们需要自定义输入. 关联到的知识 KeyboardView 一个视图 ...
- 【C】——APUE小程序之递归遍历目录
递归降序遍历目录层次结构,并按文件类型计数. 先介绍相关的函数: #include<dirent.h> DIR *opendir(const char *pathname); //打开目录 ...
- Graph-BFS-图的广度优先遍历
#include <iostream> #include <queue> using namespace std; /* 5 5 1 2 1 3 1 5 2 4 3 5 1 2 ...
- Q_UNUSED() 方法的使用
Q_UNUSED() 没有实质性的作用,用来避免编译器警告 //比如说 int testFunc(int a, int b, int c, int d) { int e; return a+b+c; ...
- 捋一捋Spring Web的源码思路
Servlet前提 Java规定了Servlet Container为每一个web app创建一个Servlet Context:而Servlet Context中又包含了诸多Servlet -- 其 ...
- JDBC PrepareStatement对象执行批量处理实例
以下是使用PrepareStatement对象进行批处理的典型步骤顺序 - 使用占位符创建SQL语句. 使用prepareStatement()方法创建PrepareStatement对象. 使用se ...
- JUnit套件测试实例
“套件测试”是指捆绑了几个单元测试用例并运行起来.在JUnit中,@RunWith 和 @Suite 这两个注解是用来运行套件测试. 下面的例子演示这两个单元测试:JunitTest1 和 Junit ...
- 转载:帮你提升 Python 的 27 种编程语言
帮你提升 Python 的 27 种编程语言: 出处:http://www.oschina.net/translate/languages-to-improve-your-python
- Spring-core中的cglib小用法
对象复制听说用这个更高效 /** * 拷贝对象 * @param src 源对象 * @param dist 需要赋值的对象 */ public static void copy(Object src ...
- 下拉刷新XListView的简单分析
依照这篇博文里的思路分析和理解的 先要理解Scroller,看过的博文: http://ipjmc.iteye.com/blog/1615828 http://blog.csdn.net/wangji ...